Search completed in 2.57 seconds.
3289 results for "allow":
Your results are loading. Please wait...
Reason: Multiple CORS header 'Access-Control-Allow-Origin' not allowed - HTTP
reason reason: multiple cors header ‘access-control-allow-origin’ not allowed what went wrong?
... more than one access-control-allow-origin header was sent by the server.
... this isn't allowed.
... if you have access to the server you can change your implementation to echo back an origin in the access-control-allow-origin header.
DataTransfer.effectAllowed - Web APIs
the datatransfer.effectallowed property specifies the effect that is allowed for a drag operation.
...within the dragenter and dragover event handlers, this property will be set to whatever value was assigned during the dragstart event, thus effectallowed may be used to determine which effect is permitted.
... assigning a value to effectallowed in events other than dragstart has no effect.
...And 7 more matches
Access-Control-Allow-Headers - HTTP
the access-control-allow-headers response header is used in response to a preflight request which includes the access-control-request-headers to indicate which http headers can be used during the actual request.
... header type response header forbidden header name no syntax access-control-allow-headers: <header-name>[, <header-name>]* access-control-allow-headers: * directives <header-name> the name of a supported request header.
... examples a custom header here's an example of what an access-control-allow-headers header might look like.
...And 5 more matches
allowevents - Archive of obsolete content
« xul reference home allowevents type: boolean if true, events are passed to children of the element.
...by setting the allowevents attribute to true, this special behavior is disabled, and the events are targeted the same as other elements.
...however, the allowevents attribute is handled in a different way.
...And 4 more matches
Reason: CORS header 'Access-Control-Allow-Origin' missing - HTTP
reason reason: cors header 'access-control-allow-origin' missing what went wrong?
... the response to the cors request is missing the required access-control-allow-origin header, which is used to determine whether or not the resource can be accessed by content operating within the current origin.
... if the server is under your control, add the origin of the requesting site to the set of domains permitted access by adding it to the access-control-allow-origin header's value.
...And 4 more matches
Access-Control-Allow-Origin - HTTP
the access-control-allow-origin response header indicates whether the response can be shared with requesting code from the given origin.
... header type response header forbidden header name no syntax access-control-allow-origin: * access-control-allow-origin: <origin> access-control-allow-origin: null directives * for requests without credentials, the literal value "*" can be specified, as a wildcard; the value tells browsers to allow requesting code from any origin to access the resource.
... note: null should not be used: "it may seem safe to return access-control-allow-origin: "null", but the serialization of the origin of any resource that uses a non-hierarchical scheme (such as data: or file:) and sandboxed documents is defined to be "null".
...And 4 more matches
FeaturePolicy.allowedFeatures() - Web APIs
the allowedfeatures() method of the featurepolicy interface returns a list of directive names of all features allowed by the feature policy.enables introspection of individual directives of the feature policy it is run on.
... as such, allowedfeatures() method returns a subset of directives returned by features().
... syntax const allowed = featurepolicy.allowedfeatures() parameters none.
...And 3 more matches
FeaturePolicy.allowsFeature() - Web APIs
the allowsfeature() method of the featurepolicy interface enables introspection of individual directives of the feature policy it is run on.
... it returns a boolean that is true if and only if the specified feature is allowed in the specified context (or the default context if no context is specified).
... syntax const allowed = featurepolicy.allowsfeature(<feature>) or const allowed = featurepolicy.allowsfeature(<feature>, <origin>) parameters feature name a specific feature name must be specified.
...And 3 more matches
FeaturePolicy.getAllowlistForFeature() - Web APIs
the getallowlistforfeature() method of the featurepolicy allows query of the allow list for a specific feature for the current feature policy.
... syntax const allowlist = featurepolicy.getallowlistforfeature(<feature>) parameter feature name a specific feature name must be specified.
... return value an allow list for the specified feature.
...And 3 more matches
HTMLIFrameElement.allowPaymentRequest - Web APIs
the allowpaymentrequest property of the htmliframeelement interface returns a boolean indicating whether the payment request api may be invoked on a cross-origin iframe.
... syntax var allow = htmliframeelement.allowpaymentrequest value a boolean.
... specifications specification status comment payment request apithe definition of 'allowpaymentrequest' in that specification.
...And 3 more matches
PublicKeyCredentialRequestOptions.allowCredentials - Web APIs
allowcredentials is an optional property of the publickeycredentialrequestoptions dictionary which indicates the existing credentials acceptable for retrieval.
...contrary to allowcredentials, it is used to filter out credentials.
... syntax allowcredentials = publickeycredentialrequestoptions.allowcredentials value an array whose elements are objects with the following properties: type a string describing type of public-key credential to be created.
...And 3 more matches
Allowing cross-origin use of images and canvas - HTML: Hypertext Markup Language
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.
... if the source of the foreign content is an html <img> or svg <svg> element, attempting to retrieve the contents of the canvas isn't allowed.
... 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.
...And 3 more matches
Access-Control-Allow-Credentials - HTTP
the access-control-allow-credentials response header tells browsers whether to expose the response to frontend javascript code when the request's credentials mode (request.credentials) is include.
... when a request's credentials mode (request.credentials) is include, browsers will only expose the response to frontend javascript code if the access-control-allow-credentials value is true.
... the access-control-allow-credentials header works in conjunction with the xmlhttprequest.withcredentials property or with the credentials option in the request() constructor of the fetch api.
...And 3 more matches
Reason: CORS header 'Access-Control-Allow-Origin' does not match 'xyz' - HTTP
reason reason: cors header 'access-control-allow-origin' does not match 'xyz' what went wrong?
... simply put, the origin making the request does not match any of the origins permitted by the access-control-allow-origin header.
... this error can also occur if the response includes more than one access-control-allow-origin header.
...And 2 more matches
Reason: missing token ‘xyz’ in CORS header ‘Access-Control-Allow-Headers’ from CORS preflight channel - HTTP
reason reason: missing token ‘xyz’ in cors header ‘access-control-allow-headers’ from cors preflight channel what went wrong?
... the access-control-allow-headers header is sent by the server to let the client know which headers it supports for cors requests.
... the value of access-control-allow-headers should be a comma-delineated list of header names, such as "x-custom-information" or any of the standard but non-basic header names (which are always allowed).
...And 2 more matches
Allow - HTTP
WebHTTPHeadersAllow
the allow header lists the set of methods supported by a resource.
... this header must be sent if the server responds with a 405 method not allowed status code to indicate which request methods can be used.
... an empty allow header indicates that the resource allows no request methods, which might occur temporarily for a given resource, for example.
...And 2 more matches
SyntaxError: "use strict" not allowed in function with non-simple parameters - JavaScript
the javascript exception "'use strict' not allowed in function" occurs when a "use strict" directive is used at the top of a function with default parameters, rest parameters, or destructuring parameters.
... message edge: cannot apply strict mode on functions with non-simple parameter list firefox: syntaxerror: "use strict" not allowed in function with default parameter syntaxerror: "use strict" not allowed in function with rest parameter syntaxerror: "use strict" not allowed in function with destructuring parameter chrome: syntaxerror: illegal 'use strict' directive in function with non-simple parameter list error type syntaxerror.
... a "use strict" directive is written at the top of a function that has one of the following parameters: default parameters rest parameters destructuring parameters a "use strict" directive is not allowed at the top of such functions per the ecmascript specification.
...And 2 more matches
Reason: invalid token ‘xyz’ in CORS header ‘Access-Control-Allow-Headers’ - HTTP
reason reason: invalid token ‘xyz’ in cors header ‘access-control-allow-headers’ what went wrong?
... the response to the cors request that was sent by the server includes an access-control-allow-headers header which includes at least one invalid header name.
... the access-control-allow-headers header is sent by the server in response to a preflight request; it lets the client know which http headers are permitted in cors requests.
... this is a problem that most likely can only be fixed on the server side, by modifying the server's configuration to no longer send the invalid or unknown header name with the access-control-allow-headers header.
Reason: invalid token ‘xyz’ in CORS header ‘Access-Control-Allow-Methods’ - HTTP
reason reason: invalid token ‘xyz’ in cors header ‘access-control-allow-methods’ what went wrong?
... the response to the cors request that was sent by the server includes an access-control-allow-methods header which includes at least one invalid method name.
... the access-control-allow-methods header is sent by the server to let the client know what http request methods it supports for cors requests.
... this is a problem that most likely can only be fixed on the server side, by modifying the server's configuration to no longer send the invalid or unknown method name with the access-control-allow-methods header.
Reason: Did not find method in CORS header ‘Access-Control-Allow-Methods’ - HTTP
reason reason: did not find method in cors header ‘access-control-allow-methods’ what went wrong?
... the http method being used by the cors request is not included in the list of methods specified by the response's access-control-allow-methods header.
... for example, if the response includes: access-control-allow-methods: get,head,post trying to use a put request will fail with this error.
... note: if the server includes any unrecognized or undefined method names in its access-control-allow-methods header, a different error occurs: reason: invalid token ‘xyz' in cors header ‘access-control-allow-methods’.
Access-Control-Allow-Methods - HTTP
the access-control-allow-methods response header specifies the method or methods allowed when accessing the resource in response to a preflight request.
... header type response header forbidden header name no syntax access-control-allow-methods: <method>, <method>, ...
... access-control-allow-methods: * directives <method> comma-delimited list of the allowed http request methods.
... examples access-control-allow-methods: post, get, options access-control-allow-methods: * specifications specification status comment fetchthe definition of 'access-control-allow-methods' in that specification.
JSSecurityCallbacks.contentSecurityPolicyAllows
the jssecuritycallbacks.contentsecuritypolicyallows callback is called when a script attempts to access an object property.
... description check whether runtime code generation is allowed for the current global.
... jssecuritycallbacks.contentsecuritypolicyallows is invoked once per global object upon the first attempt to evaluate js code from a string (either through eval or the function constructor).
Reason: expected ‘true’ in CORS header ‘Access-Control-Allow-Credentials’ - HTTP
reason reason: expected ‘true’ in cors header ‘access-control-allow-credentials’ what went wrong?
... the cors request requires that the server permit the use of credentials, but the server's access-control-allow-credentials header's value isn't set to true to enable their use.
... to eliminate this error by changing the server's configuration, adjust the server's configuration to set the access-control-allow-credentials header's value to true.
Reason: Credential is not supported if the CORS header ‘Access-Control-Allow-Origin’ is ‘*’ - HTTP
reason reason: credential is not supported if the cors header ‘access-control-allow-origin’ is ‘*’ what went wrong?
... the cors request was attempted with the credentials flag set, but the server is configured using the wildcard ("*") as the value of access-control-allow-origin, which doesn't allow the use of credentials.
... if, instead, you need to adjust the server's behavior, you'll need to change the value of access-control-allow-origin to grant access to the origin from which the client is loaded.
Timing-Allow-Origin - HTTP
the timing-allow-origin response header specifies origins that are allowed to see values of attributes retrieved via features of the resource timing api, which would otherwise be reported as zero due to cross-origin restrictions.
... header type response header forbidden header name no syntax timing-allow-origin: * timing-allow-origin: <origin>[, <origin>]* directives * the server may specify "*" as a wildcard, thereby allowing any origin to see timing resources.
... examples to allow any resource to see timing resources: timing-allow-origin: * to allow https://developer.mozilla.org to see timing resources, you can specify: timing-allow-origin: https://developer.mozilla.org specifications specification status comment resource timing level 3the definition of 'timing-allow-origin' in that specification.
405 Method Not Allowed - HTTP
WebHTTPStatus405
the hypertext transfer protocol (http) 405 method not allowed response status code indicates that the request method is known by the server but is not supported by the target resource.
... the server must generate an allow header field in a 405 response containing a list of the target resource's currently supported methods.
... status 405 method not allowed specifications specification title rfc 7231, section 6.5.5: 405 method not allowed hypertext transfer protocol (http/1.1): semantics and content ...
allownegativeassertions - Archive of obsolete content
« xul reference home allownegativeassertions type: boolean valid on any element that has a datasources attribute.
...this attribute, if true, which is the default, allows a datasource to negate an earlier assertion.
allowEvents - Archive of obsolete content
« xul reference allowevents type: boolean gets and sets the value of the allowevents attribute.
Reason: CORS request external redirect not allowed - HTTP
reason reason: cors request external redirect not allowed what went wrong?
Index - Web APIs
WebAPIIndex
2 angle_instanced_arrays api, reference, webgl, webgl extension the angle_instanced_arrays extension is part of the webgl api and allows to draw the same object, or groups of similar objects multiple times, if they share the same vertex data, primitive count and type.
... 6 abortcontroller api, abortcontroller, experimental, interface, reference the abortcontroller interface represents a controller object that allows you to abort one or more dom requests as and when desired.
... 10 abortsignal api, abortsignal, dom, experimental, interface, reference the abortsignal interface represents a signal object that allows you to communicate with a dom request (such as a fetch) and abort it if required via an abortcontroller object.
...And 183 more matches
HTTP Index - HTTP
WebHTTPIndex
6 data urls base64, guide, http, intermediate, url data urls, urls prefixed with the data: scheme, allow content creators to embed small files inline in documents.
... 19 cross-origin resource policy (corp) http, reference, security cross-origin resource policy is an opt-in mechanism that allows web applications to protect against certain cross-origin requests, such as those issued by the browser when resources are embedded using elements such as <script> and <img>.
... 21 cors errors cors, errors, http, https, messages, same-origin, security, console, troubleshooting cross-origin resource sharing (cors) is a standard that allows a server to relax the same-origin policy.
...And 75 more matches
Index - Archive of obsolete content
82 event/core the event/core module allows the creation of apis to broadcast and subscribe to events.
...mozilla provides a simple way of shipping default settings by allowing default preferences.
...so the extension will not be allowed to move out of the amo sandbox.
...And 70 more matches
sslfnc.html
the policy flags for all cipher suites are turned off by default, disallowing all cipher suites.
...this may be helpful if you have an export license that permits more or fewer capabilities than those allowed by the other export policy functions.
... the policy flags for all cipher suites are turned off by default, disallowing all cipher suites.
...And 48 more matches
Migrating from Firebug - Firefox Developer Tools
it shows log information associated with a web page and allows you to execute javascript expressions via its command line.
... server logs firebug extensions like firephp allow to log server-side messages to the firebug console.
... show network requests the console panel in firebug allows to log ajax requests (aka xmlhttprequests).
...And 38 more matches
Feature-Policy - HTTP
the http feature-policy header provides a mechanism to allow and deny the use of browser features in its own frame, and in content within any <iframe> elements in the document.
... header type response header forbidden header name yes syntax feature-policy: <directive> <allowlist> <directive> the feature policy directive to apply the allowlist to.
... <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested browsing contexts (iframes) regardless of their origin.
...And 35 more matches
Index - HTTP
WebHTTPHeadersIndex
found 122 pages: # page tags and summary 1 http headers http, http header, networking, overview, reference http headers allow the client and the server to pass additional information with the request or the response.
...browsers usually don't set this header as the default value for each content type is usually correct and transmitting it would allow easier fingerprinting.
... 7 access-control-allow-credentials cors, http, reference, header the access-control-allow-credentials response header tells browsers whether to expose the response to frontend javascript code when the request's credentials mode (request.credentials) is "include".
...And 34 more matches
Index
MozillaTechXPCOMIndex
it has multiple language bindings, allowing xpcom components to be used and implemented in javascript, java, and python in addition to c++.
... 50 javaxpcom embedding, java, javaxpcom, mozilla, xpcom, xpcom:language bindings javaxpcom allows for communication between java and xpcom, such that a java application can access xpcom objects, and xpcom can access any java class that implements an xpcom interface.
... 55 pyxpcom landing, mozilla, pyxpcom, xpcom, xpcom:language bindings pyxpcom allows for communication between python and xpcom, such that a python application can access xpcom objects, and xpcom can access any python class that implements an xpcom interface.
...And 33 more matches
Cross-Origin Resource Sharing (CORS) - HTTP
WebHTTPCORS
a “simple request” is one that meets all the following conditions: one of the allowed methods: get head post apart from the headers automatically set by the user agent (for example, connection, user-agent, or the other headers defined in the fetch spec as a “forbidden header name”), the only headers which are allowed to be manually set are those which the fetch spec defines as a “cors-safelisted request-header”, which are: accept accept-language cont...
...ent-language content-type (but note the additional requirements below) dpr downlink save-data viewport-width width the only allowed values for the content-type header are: application/x-www-form-urlencoded multipart/form-data text/plain no event listeners are registered on any xmlhttprequestupload object used in the request; these are accessed using the xmlhttprequest.upload property.
... note: webkit nightly and safari technology preview place additional restrictions on the values allowed in the accept, accept-language, and content-language headers.
...And 29 more matches
Index - MDN Web Docs Glossary: Definitions of Web-related terms
10 abstraction abstraction, coding, codingscripting, glossary, programming language abstraction in computer programming is a way to reduce complexity and allow efficient design and implementation in complex software systems.
... 47 cms cms, composing, content management system, glossary a cms (content management system) is software that allows users to publish, organize, change, or remove various kinds of content, not only text but also embedded images, video, audio, and interactive code.
... 65 canvas codingscripting, glossary, graphics, html, javascript the canvas element is part of html5 and allows for dynamic, scriptable rendering of 2d and 3d shapes and bitmap images.
...And 26 more matches
WebIDL bindings
(this allows the return value to be implicitly converted to a parentobject instance by the compiler via one of that class's non-explicit constructors.) if many instances of myinterface are expected to be created quicky, the return value of getparentobject should itself inherit from nswrappercache for optimal performance.
... returning null from getparentobject is allowed in situations in which it's ok to associate the resulting object with a random global object for security purposes; this is not usually ok for things that are exposed to web content.
...in addition to those, all methods that are allowed to throw will get an errorresult& argument appended to their argument list.
...And 26 more matches
SVG documentation index - SVG: Scalable Vector Graphics
WebSVGIndex
for example, this allows alphabetic baselines in roman text to stay aligned across font size changes.
... 32 baseline-shift needsexample, svg, svg attribute the baseline-shift attribute allows repositioning of the dominant-baseline relative to the dominant-baseline of the parent text content element.
...this allows representation of values that would otherwise be clamped to 0 or 1.
...And 25 more matches
Using Feature Policy - HTTP
feature policy allows you to control which origins can use which features, both in the top-level page and in embedded frames.
... essentially, you write a policy, which is an allowed list of origins for each feature.
... for every feature controlled by feature policy, the feature is only enabled in the current document or frame if its origin matches the allowed list of origins.
...And 23 more matches
Index
in order to allow interoperability between software and devices that perform cryptographic operations, nss conforms to a standard called pkcs#11.
... (note that it's important to look at the number 11, as there are other pkcs standards with different numbers that define quite different topics.) a software or hardware module conforming to the pkcs#11 standard implements an interface of c calls, which allow querying the characteristics and offered services of the module.
...this strategy allows nss to work with many hardware devices (e.g., to speed up the calculations required for cryptographic operations, or to access smartcards that securely protect a secret key) and software modules (e.g., to allow to load such modules as a plugin that provides additional algorithms or stores key or trust information) that implement the pkcs#11 interface.
...And 22 more matches
Web Replay
learn more web replay allows firefox content processes to record their behavior, replay it later, and rewind to earlier states.
... save recording and replay on the same machine clicking the 'tools -> web developer -> web replay -> save recording' menu item when a recording tab is open will allow the entire recording to be saved to a file.
... the developer tools can be used to interact with this tab in the same way as a recording tab, though playing forward to the end will pause the tab instead of allowing further recording.
...And 19 more matches
HTML5 - Developer guides
WebGuideHTMLHTML5
it is a new version of the language html, with new elements, attributes, and behaviors, and a larger set of technologies that allows the building of more diverse and powerful web sites and applications.
... semantics: allowing you to describe more precisely what your content is.
... connectivity: allowing you to communicate with the server in new and innovative ways.
...And 19 more matches
<iframe>: The Inline Frame element - HTML: Hypertext Markup Language
WebHTMLElementiframe
allow specifies a feature policy for the <iframe>.
... allowfullscreen set to true if the <iframe> can activate fullscreen mode by calling the requestfullscreen() method.
... this attribute is considered a legacy attribute and redefined as allow="fullscreen".
...And 18 more matches
Autoplay guide for media and Web Audio APIs - Web media technologies
because of that, browsers generally only allow autoplay to occur successfully under specific circumstances.
... autoplay availability as a general rule, you can assume that media will be allowed to autoplay only if at least one of the following is true: the audio is muted or its volume is set to 0 the user has interacted with the site (by clicking, tapping, pressing keys, etc.) if the site has been whitelisted; this may happen either automatically if the browser determines that the user engages with media frequently, or manually through preferences or other user interface features if the autoplay feature policy is used to grant autoplay support to an <iframe> and its document.
... autoplay of media elements now that we've covered what autoplay is and what can prevent autoplay from being allowed, we'll look at how your web site or app can automatically play media upon page load, how to detect when autoplay fails to occur, and tips for coping when autoplay is denied by the browser.
...And 18 more matches
Drag Operations - Web APIs
here is an example which allows a section of content to be dragged.
...during the drag, in an event listener for the dragenter and dragover events, you use the data types of the data being dragged to check whether a drop is allowed.
...this allows data to be provided in more specific types, often custom types, yet still provide fallback data for drop targets that do not support more specific types.
...And 16 more matches
HTML attribute: rel - HTML: Hypertext Markup Language
WebHTMLAttributesrel
link link not allowed author author of the current document or article.
... link link not allowed bookmark permalink for the nearest ancestor section.
... not allowed link not allowed canonical preferred url for the current document.
...And 16 more matches
HTTP headers - HTTP
WebHTTPHeaders
access-control-allow-origin indicates whether the response can be shared.
... access-control-allow-credentials indicates whether the response to the request can be exposed when the credentials flag is true.
... access-control-allow-headers used in response to a preflight request to indicate which http headers can be used when making the actual request.
...And 16 more matches
CSS3 - Archive of obsolete content
media queries recommendation since june 19th, 2012 extends the former media type ( print, screen, … ) to a full language allowing queries on the device media capabilities like only screen and (color) .
... the next iteration of this specification is in the work, allowing to tailor a web site regarding the input methods available on the user agent, with new media features like hover or pointer.
... allow the styling of forms according their content using the css :indeterminate, :default, :valid, :invalid, :in-range, :out-of-range, :required, :optional, :read-only, and :read-write pseudo-classes and the ::value, ::choices, ::repeat-item, and ::repeat-index pseudo-elements.
...And 15 more matches
<input>: The Input (Form Input) element - HTML: Hypertext Markup Language
WebHTMLElementinput
<input type="button" name="button" /> checkbox a check box allowing single values to be selected/deselected.
... <input type="password" name="password"/> radio a radio button, allowing a single value to be selected out of multiple choices with the same name value.
...whether to allow multiple values name all name of the form control.
...And 15 more matches
HTML documentation index - HTML: Hypertext Markup Language
WebHTMLIndex
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.
...classes allow css and javascript to select and access specific elements via the class selectors or functions like the dom method document.getelementsbyclassname.
...if so, the browser modifies its widget to allow editing.
...And 15 more matches
CSP: sandbox - HTTP
syntax content-security-policy: sandbox; content-security-policy: sandbox <value>; where <value> can optionally be one of the following values: allow-downloads-without-user-activation allows for downloads to occur without a gesture from the user.
... allow-forms allows the page to submit forms.
... if this keyword is not used, this operation is not allowed.
...And 15 more matches
CSP: script-src - HTTP
syntax one or more sources can be allowed for the script-src policy: content-security-policy: script-src <source>; content-security-policy: script-src <source> <source>; sources <source> can be one of the following: <host-source> internet hosts by name or ip address, as well as an optional url scheme and/or port number.
... data: allows data: uris to be used as a content source.
... mediastream: allows mediastream: uris to be used as a content source.
...And 15 more matches
Index - Archive of obsolete content
ArchiveMozillaXULIndex
14 allowevents xul attributes, xul reference no summary!
... 15 allownegativeassertions xul attributes, xul reference no summary!
...this allows items within the menu to be navigated with the cursor keys.
...And 14 more matches
Introduction to automated testing - Learn web development
commercial cross-browser testing apps like lambdatest, sauce labs, browserstack, and testingbot are based on selenium, but allow you to access their set up remotely using a simple interface, saving you the hassle of setting up your own testing system.
...note that node comes with node package manager (npm), which allows you to easily install packages, share your own packages with others, and run useful scripts on your projects.
... for example, let's first create a test directory to allow us to play without fear of breaking anything.
...And 14 more matches
CSP: style-src - HTTP
syntax one or more sources can be allowed for the style-src policy: content-security-policy: style-src <source>; content-security-policy: style-src <source> <source>; sources <source> can be one of the following: <host-source> internet hosts by name or ip address, as well as an optional url scheme and/or port number.
... data: allows data: uris to be used as a content source.
... mediastream: allows mediastream: uris to be used as a content source.
...And 14 more matches
nsIDocShell
void setcurrenturi(in nsiuri auri); void suspendrefreshuris(); void tabtotreeowner(in boolean forward, out boolean tookfocus); attributes attribute type description allowauth boolean certain dochshells (like the message pane) should not throw up auth dialogs because it can act as a password trojan.
... allowdnsprefetch boolean attribute that determines whether dns prefetch is allowed for this subtree of the docshell tree.
... allowimages boolean attribute stating whether or not images should be loaded.
...And 13 more matches
Introduction to web APIs - Learn web development
application programming interfaces (apis) are constructs made available in programming languages to allow developers to create complex functionality more easily.
...for example, the twitter api allows you to do things like displaying your latest tweets on your website.
...let's recap this to make it clearer, and also mention where other javascript tools fit in: javascript — a high-level scripting language built into browsers that allows you to implement functionality on web pages/apps.
...And 12 more matches
History Service Design
objectives the primary objectives of the new history service implementation in places are: improve access to browsing history allow association of useful metadata with urls flexible query system for both end-users and add-ons developers clean architecture for ease of code reuse and maintainability the most known and visible feature of history are views.
...each visit is associated with a favicon, to allow for better recognizability and groupable by common timeframes or domains.
... history views should allow to quickly find a page in a certain timeframe remembering only small details about it.
...And 12 more matches
nsIAccessibleRole
role_grip 4 represents a special mouse pointer, which allows a user to manipulate user interface elements such as windows.
... role_list 33 represents a list box, allowing the user to select one or more items.
... role_outline 35 represents an outline or tree structure, such as a tree view control, that displays a hierarchical list and allows the user to expand and collapse branches.
...And 12 more matches
<input type="email"> - HTML: Hypertext Markup Language
WebHTMLElementinputemail
the following attributes: attribute description list the id of the <datalist> element that contains the optional pre-defined autocomplete options maxlength the maximum number of characters the input should accept minlength the minimum number of characters long the input can be and still be considered valid multiple whether or not to allow multiple, comma-separated, e-mail addresses to be entered pattern a regular expression the input's contents must match in order to be valid placeholder an exemplar value to display in the input field whenever it is empty readonly a boolean attribute indicating whether or not the contents of the input should be read-only size a number indicating how ...
...see allowing multiple e-mail addresses for an example, or html attribute: multiple for more details.
... using email inputs e-mail addresses are among the most frequently-inputted textual data forms on the web; they're used when logging into web sites, when requesting information, to allow order confirmation, for webmail, and so forth.
...And 12 more matches
CSP: base-uri - HTTP
if this value is absent, then any uri is allowed.
...not setting this allows any url.
... syntax one or more sources can be allowed for the base-uri policy: content-security-policy: base-uri <source>; content-security-policy: base-uri <source> <source>; sources while this directive uses the same arguments as other csp directives, some of them don’t make sense for `<base>`, such as the keywords 'unsafe-inline' and 'strict-dynamic' <source> can be one of the following: <host-source> internet hosts by name or ip address, as well as an optional url scheme and/or port number.
...And 12 more matches
Gecko Roles
role_grip represents a special mouse pointer, which allows a user to manipulate user interface elements such as windows.
... role_list represents a list box, allowing the user to select one or more items.
... role_outline represents an outline or tree structure, such as a tree view control, that displays a hierarchical list and allows the user to expand and collapse branches.
...And 11 more matches
Starting WebLock
this callback allows the component to execute any one-time registration code it may need.
... the weblock user interface the weblock component in this tutorial uses xul to define the additional browser ui in a cross-platform way, and xul uses javascript to access and control xpcom components, but gecko's pluggable ui allows any user interface to call into gecko and the components you create as easily as you can from xul.
...this should allow any browser in the gecko application to browse any website regardless of the white list.
...And 11 more matches
Feature Policy - HTTP
feature policy allows web developers to selectively enable, disable, and modify the behavior of certain features and apis in the browser.
...this allows you to lock in best practices, even as the codebase evolves over time — as well as to more safely compose third-party content — by limiting which features are available.
... allow iframes to use the fullscreen api.
...And 11 more matches
CSP: navigate-to - HTTP
this is an enforcement on what navigations this document initiates not on what this document is allowed to navigate to.
...not setting this allows anything.
... data: allows data: uris to be used as a content source.
...And 11 more matches
Understanding WebAssembly text format - WebAssembly
there is another issue here — using numeric indices to refer to items can be confusing and annoying, so the text format allows you to name parameters, locals, and most other items simply by including a name prefixed by a dollar symbol ($) just before the type declaration.
...this is very useful, as it allows dynamic linking of multiple modules.
... data sections allow a string of bytes to be written at a given offset at instantiation time and are similar to the .data sections in native executable formats.
...And 11 more matches
Migrate apps from Internet Explorer to Mozilla - Archive of obsolete content
for example, rather than: if (ismozilla || isie5) you would use: if (document.getelementbyid) this would allow other browsers that support that w3c standard method, such as opera or safari, to work without any changes.
... javascript also allows inline conditional statements, which can help with code readability: var foo = (condition) ?
... some older browsers, such as internet explorer, had such quirks as allowing you to use entities by replacing the ; (semi-colon) character at the end with regular text content: &nbsp foo &nbsp&nbsp foo internet explorer will render the above &nbsp as white spaces, even though that is against the w3c specification.
...And 10 more matches
Index - Learn web development
it allows you to upload code repositories for storage in the git version control system.
... 47 index index, learn, mdn meta found 348 pages: 48 javascript — dynamic client-side scripting beginner, codingscripting, javascript, javascripting beginner, landing, module, topic, l10n:priority javascript is a programming language that allows you to implement complex things on web pages.
... 53 graceful asynchronous programming with promises beginner, codingscripting, guide, javascript, learn, promises, async, asynchronous, catch, finally, then promises are a comparatively new feature of the javascript language that allow you to defer further actions until after a previous action has completed, or respond to its failure.
...And 10 more matches
Introduction to client-side frameworks - Learn web development
the web allows us to do things that used to be possible only in native applications installed on our computers.
...these opinions allow for predictability and homogeneity in an application; predictability allows software to scale to an enormous size and still be maintainable; predictability and maintainability are essential for the health and longevity of software.
...this application should allow users to do things like render a list of tasks, add a new task, and delete a task; and it must do this while reliably tracking and updating the data underlying the application.
...And 10 more matches
Variable fonts guide - CSS: Cascading Style Sheets
this allows for common typographic techniques such as setting different size headings in different weights for better readability at each size, or using a slightly narrower width for data-dense displays.
... introducing the 'variation axis' the heart of the new variable fonts format is the concept of an axis of variation describing the allowable range of that particular aspect of the typeface design.
...this can generally be resolved fairly easily, but does require an extra step in writing your css: font-weight: 375; font-variation-settings: 'wght' 375; the following live example's css can be edited to allow you to play with font weight values.
...And 10 more matches
CSP: default-src - HTTP
the user agent looks for the default-src directive and uses this value for it: child-src connect-src font-src frame-src img-src manifest-src media-src object-src prefetch-src script-src script-src-elem script-src-attr style-src style-src-elem style-src-attr worker-src csp version 1 directive type fetch directive syntax one or more sources can be allowed for the default-src policy: content-security-policy: default-src <source>; content-security-policy: default-src <source> <source>; sources <source> can be one of the following: <host-source> internet hosts by name or ip address, as well as an optional url scheme and/or port number.
... data: allows data: uris to be used as a content source.
... mediastream: allows mediastream: uris to be used as a content source.
...And 10 more matches
CSP: form-action - HTTP
not setting this allows anything.
... data: allows data: uris to be used as a content source.
... mediastream: allows mediastream: uris to be used as a content source.
...And 10 more matches
CSP: img-src - HTTP
syntax one or more sources can be allowed for the img-src policy: content-security-policy: img-src <source>; content-security-policy: img-src <source> <source>; sources <source> can be one of the following: <host-source> internet hosts by name or ip address, as well as an optional url scheme and/or port number.
... data: allows data: uris to be used as a content source.
... mediastream: allows mediastream: uris to be used as a content source.
...And 10 more matches
CSP: object-src - HTTP
to set allowed types for <object>, <embed>, and <applet> elements, use the plugin-types directive.
... elements controlled by object-src are perhaps coincidentally considered legacy html elements and aren't receiving new standardized features (such as the security attributes sandbox or allow for <iframe>).
... syntax one or more sources can be allowed for the object-src policy: content-security-policy: object-src <source>; content-security-policy: object-src <source> <source>; sources <source> can be one of the following: <host-source> internet hosts by name or ip address, as well as an optional url scheme and/or port number.
...And 10 more matches
CSP: script-src-attr - HTTP
syntax one or more sources can be allowed for the script-src-attr policy: content-security-policy: script-src-attr <source>; content-security-policy: script-src-attr <source> <source>; script-src-attr can be used in conjunction with script-src: content-security-policy: script-src <source>; content-security-policy: script-src-attr <source>; sources <source> can be one of the following: <host-source> internet hosts by name or...
... data: allows data: uris to be used as a content source.
... mediastream: allows mediastream: uris to be used as a content source.
...And 10 more matches
CSP: script-src-elem - HTTP
syntax one or more sources can be allowed for the script-src-elem policy: content-security-policy: script-src-elem <source>; content-security-policy: script-src-elem <source> <source>; script-src-elem can be used in conjunction with script-src: content-security-policy: script-src <source>; content-security-policy: script-src-elem <source>; sources <source> can be one of the following: <host-source> internet hosts by name or...
... data: allows data: uris to be used as a content source.
... mediastream: allows mediastream: uris to be used as a content source.
...And 10 more matches
An overview of HTTP - HTTP
WebHTTPOverview
http is a protocol which allows the fetching of resources, such as html documents.
...this means some parts of displayed text are links which can be activated (usually by a click of the mouse) to fetch a new web page, allowing the user to direct their user-agent and navigate through the web.
...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.
...And 10 more matches
From object to iframe — other embedding technologies - Learn web development
at this point we'd like to take somewhat of a sideways step, looking at some elements that allow you to embed a wide variety of content types into your webpages: the <iframe>, <embed> and <object> elements.
... <iframe>s are for embedding other web pages, and the other two allow you to embed pdfs, svg, and even flash — a technology that is on the way out, but which you'll still see semi-regularly.
...these were embedded in a master document called a frameset, which allowed you to specify the area on the screen that each frame filled, rather like sizing the columns and rows of a table.
...And 9 more matches
Getting started with Vue - Learn web development
this allows you to create markup managed entirely by vue, which can improve developer experience and performance when dealing with complex applications.
... it also allows you to take advantage of libraries for client-side routing and state management when you need to.
...this allows you to select a different routing/state management library if they better fit your application.
...And 9 more matches
Using the Web Audio API - Web APIs
we'll briefly look at some concepts, then study a simple boombox example that allows us to load an audio track, play and pause it, and change its volume and stereo panning.
... example code our boombox looks like this: note the retro cassette deck with a play button, and vol and pan sliders to allow you to alter the volume and stereo panning.
... the web audio api handles audio operations inside an audio context, and has been designed to allow modular routing.
...And 9 more matches
Evolution of HTTP - HTTP
http/1.0 – building extensibility http/0.9 was very limited and both browsers and servers quickly extended it to be more versatile: versioning information is now sent within each request (http/1.0 is appended to the get line) a status code line is also sent at the beginning of the response, allowing the browser itself to understand the success or failure of the request and to adapt its behavior in consequence (like in updating or using its local cache in a specific way) the notion of http headers has been introduced, both for the requests and the responses, allowing metadata to be transmitted and making the protocol extremely flexible and extensible.
... pipelining has been added, allowing to send a second request before the answer for the first one is fully transmitted, lowering the latency of the communication.
... content negotiation, including language, encoding, or type, has been introduced, and allows a client and a server to agree on the most adequate content to exchange.
...And 9 more matches
CSP: connect-src - HTTP
syntax one or more sources can be allowed for the connect-src policy: content-security-policy: connect-src <source>; content-security-policy: connect-src <source> <source>; sources <source> can be one of the following: <host-source> internet hosts by name or ip address, as well as an optional url scheme and/or port number.
... data: allows data: uris to be used as a content source.
... mediastream: allows mediastream: uris to be used as a content source.
...And 9 more matches
CSP: prefetch-src - HTTP
syntax one or more sources can be allowed for the prefetch-src policy: content-security-policy: prefetch-src <source>; content-security-policy: prefetch-src <source> <source>; sources <source> can be one of the following: <host-source> internet hosts by name or ip address, as well as an optional url scheme and/or port number.
... data: allows data: uris to be used as a content source.
... mediastream: allows mediastream: uris to be used as a content source.
...And 9 more matches
CSP: style-src-attr - HTTP
syntax one or more sources can be allowed for the style-src-attr policy: content-security-policy: style-src-attr <source>; content-security-policy: style-src-attr <source> <source>; style-src-attr can be used in conjunction with style-src: content-security-policy: style-src <source>; content-security-policy: style-src-attr <source>; sources <source> can be one of the following: <host-source> internet hosts by name or ip addre...
... data: allows data: uris to be used as a content source.
... mediastream: allows mediastream: uris to be used as a content source.
...And 9 more matches
CSP: style-src-elem - HTTP
syntax one or more sources can be allowed for the style-src-elem policy: content-security-policy: style-src-elem <source>; content-security-policy: style-src-elem <source> <source>; style-src-elem can be used in conjunction with style-src: content-security-policy: style-src <source>; content-security-policy: style-src-elem <source>; sources <source> can be one of the following: <host-source> internet hosts by name or ip a...
... data: allows data: uris to be used as a content source.
... mediastream: allows mediastream: uris to be used as a content source.
...And 9 more matches
Feature-Policy: fullscreen - HTTP
the http feature-policy header fullscreen directive controls whether the current document is allowed to use element.requestfullscreen().
...this directive allows or prevents cross-origin frames from using fullscreen mode.
...via the allow attribute) and the allowfullscreen attribute are present on an <iframe> element, this directive takes precedence.
...And 9 more matches
Web video codec guide - Web media technologies
additionally, in saturated 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.
... lossy compression to some degree, artifacts and other forms of quality degradation wil occur, depending on the specific codec and how much compression is being applied the more the encoded video is allowed to deviate from the source, the easier it is to accomplish higher compression rates quality setting the higher the quality configuration, the more like the original media the encoded video will look in general, higher quality settings will result in larger encoded video files; the degree to which this is true varies depending on the codec bit rate quality generally im...
...this compensates for the panning of the camera, allowing for more overlap between the two frames.
...And 9 more matches
Same-origin policy - Web security
for example, assume a script from the document at http://store.company.com/dir/other.html executes the following: document.domain = "company.com"; afterward, the page can pass the same-origin check with http://company.com/dir/page.html (assuming http://company.com/dir/page.html sets its document.domain to "company.com" to indicate that it wishes to allow that - see document.domain for more).
... note: when using document.domain to allow a subdomain to access its parent securely, you need to set document.domain to the same value in both the parent domain and the subdomain.
...these interactions are typically placed into three categories: cross-origin writes are typically allowed.
...And 9 more matches
MCD, Mission Control Desktop, AKA AutoConfig - Archive of obsolete content
choosing mozilla products allow us to use the same apps while running either windows or linux systems (i suspect mac osx would be fine too).
... file api that centralized preference file uses a javascript api that allows us to do what we need.
... //note: for accessing the active directory of windows server later than 2000 //it is necessary to allow anonymous read access.
...And 8 more matches
New Security Model for Web Services - Archive of obsolete content
if the sandbox is unable to distinguish the common uri substring of the domain to be trusted from similar uris of untrusted domains, then it could allow a script loaded from an indistinguishable domain to exploit firewall-protected resources.
...quite complex settings may be required to permit the user to allow access to desired external services without risking other resources.
... using a soap header for verification soap messages have a distinct processing model allowing a header to be added that the recipient is required to understand and accept, which identifies the untrusted source of a script making a request.
...And 8 more matches
Introduction to the server side - Learn web development
perhaps the most significant benefit of server-side code is that it allows you to tailor website content for individual users.
... it can even allow interaction with users of the site, sending notifications and updates via email or through other channels.
... server-side programming is very useful because it allows us to efficiently deliver information tailored for individual users and thereby create a much better user experience.
...And 8 more matches
Componentizing our Svelte app - Learn web development
we'll componentize our app, then add more functionality to allow users to update existing components.
... newtodo.svelte: the text input and button that allow you to enter a new todo item.
... filterbutton.svelte: the all, active, and completed buttons that allow you to apply filters to the displayed todo items.
...And 8 more matches
Experimental features in Firefox
nightly 43 yes developer edition 43 no beta 43 no release 43 no preference name layout.css.control-characters.enabled or layout.css.control-characters.visible property: initial-letter the initial-letter css property is part of the css inline layout specification and allows you to specify how dropped, raised, and sunken initial letters are displayed.
... nightly 50 no developer edition 50 no beta 50 no release 50 no preference name layout.css.initial-letter.enabled conic gradients conic gradients expand css gradients to allow the color transitions to be rendered circling around a center point rather than radiating from it.
... nightly 75 no developer edition 75 no beta 75 no release 75 no preference name layout.css.conic-gradient.enabled and gfx.webrender.all pseudo-class: :focus-visible allows focus styles to be applied to elements like buttons and form controls, only when they are focused using the keyboard (e.g.
...And 8 more matches
Mozilla Web Services Security Model
mozilla allows sites hosting such web services to tell mozilla that other sites can access the service.
...this element must have either one delegate element child or any number (0 or more) of allow element children.
... the allow element if no delegate elements are present or if the web service is in the same directory as the web-script-access.xml file, then the allow elements will be processed.
...And 8 more matches
NSS environment variables
before 3.0 nss_allow_weak_signature_alg boolean (any non-empty value to enable) enables the use of md2 and md4 inside signatures.
... this was allowed by default before nss 3.12.3.
... 3.12.5 nss_hash_alg_support string specifies agorithms allowed to be used in certain applications, such as in signatures on certificates and crls.
...And 8 more matches
Index
20 int_fits_in_jsval jsapi reference, obsolete, spidermonkey determines if a specified c integer value, i, lies within the range allowed for integer jsvals.
... 34 js::compileoptions jsapi reference, reference, référence(2), spidermonkey some methods of js::owningcompileoptions and js::compileoptions return the instance itself to allow method chain.
... 67 js::setlargeallocationfailurecallback jsapi reference, reference, référence(2), spidermonkey if a large allocation fails when calling pod_{calloc,realloc}cangc, the js engine may call the large-allocation- failure callback, if set, to allow the embedding to flush caches, possibly perform shrinking gcs, etc.
...And 8 more matches
Web Console remoting - Firefox Developer Tools
this architecture allows you to connect a web console client instance to a server running on b2g, fennec or some other firefox instance.
... the new web console actors are: the webconsoleactor allows js evaluation, autocomplete, start/stop listeners, etc.
...this approach allows for lower resource usage on the server - this is a potential issue if the server runs on devices with fewer resources.
...And 8 more matches
Content Security Policy (CSP) - HTTP
WebHTTPCSP
a csp compatible browser will then only execute scripts loaded in source files received from those allowlisted domains, ignoring all other script (including inline scripts and event-handling html attributes).
... as an ultimate form of protection, sites that want to never allow scripts to be executed can opt to globally disallow script execution.
... mitigating packet sniffing attacks in addition to restricting the domains from which content can be loaded, the server can specify which protocols are allowed to be used; for example (and ideally, from a security standpoint), a server can specify that all content must be loaded using https.
...And 8 more matches
CSP: child-src - HTTP
syntax one or more sources can be allowed for the child-src policy: content-security-policy: child-src <source>; content-security-policy: child-src <source> <source>; sources <source> can be one of the following: <host-source> internet hosts by name or ip address, as well as an optional url scheme and/or port number.
... data: allows data: uris to be used as a content source.
... mediastream: allows mediastream: uris to be used as a content source.
...And 8 more matches
CSP: font-src - HTTP
syntax one or more sources can be allowed for the font-src policy: content-security-policy: font-src <source>; content-security-policy: font-src <source> <source>; sources <source> can be one of the following: <host-source> internet hosts by name or ip address, as well as an optional url scheme and/or port number.
... data: allows data: uris to be used as a content source.
... mediastream: allows mediastream: uris to be used as a content source.
...And 8 more matches
CSP: frame-src - HTTP
syntax one or more sources can be allowed for the frame-src policy: content-security-policy: frame-src <source>; content-security-policy: frame-src <source> <source>; sources <source> can be one of the following: <host-source> internet hosts by name or ip address, as well as an optional url scheme and/or port number.
... data: allows data: uris to be used as a content source.
... mediastream: allows mediastream: uris to be used as a content source.
...And 8 more matches
CSP: manifest-src - HTTP
syntax one or more sources can be allowed for the manifest-src policy: content-security-policy: manifest-src <source>; content-security-policy: manifest-src <source> <source>; sources <source> can be one of the following: <host-source> internet hosts by name or ip address, as well as an optional url scheme and/or port number.
... data: allows data: uris to be used as a content source.
... mediastream: allows mediastream: uris to be used as a content source.
...And 8 more matches
CSP: media-src - HTTP
syntax one or more sources can be allowed for the media-src policy: content-security-policy: media-src <source>; content-security-policy: media-src <source> <source>; sources <source> can be one of the following: <host-source> internet hosts by name or ip address, as well as an optional url scheme and/or port number.
... data: allows data: uris to be used as a content source.
... mediastream: allows mediastream: uris to be used as a content source.
...And 8 more matches
CSP: worker-src - HTTP
syntax one or more sources can be allowed for the worker-src policy: content-security-policy: worker-src <source>; content-security-policy: worker-src <source> <source>; sources <source> can be one of the following: <host-source> internet hosts by name or ip address, as well as an optional url scheme and/or port number.
... data: allows data: uris to be used as a content source.
... mediastream: allows mediastream: uris to be used as a content source.
...And 8 more matches
Introduction to Public-Key Cryptography - Archive of obsolete content
encryption and decryption allow two communicating parties to disguise information they send to each other.
... tamper detection allows the recipient of information to verify that it has not been modified in transit.
... authentication allows the recipient of information to determine its origin-that is, to confirm the sender's identity.
...And 7 more matches
Styling lists - Learn web development
h for reference.</p> <ul> <li>hummus</li> <li>pita</li> <li>green salad</li> <li>halloumi</li> </ul> <h2>recipe (ordered) list</h2> <p>paragraph for reference, paragraph for reference, paragraph for reference, paragraph for reference, paragraph for reference, paragraph for reference.</p> <ol> <li>toast pita, leave to cool, then slice down the edge.</li> <li>fry the halloumi in a shallow, non-stick pan, until browned on both sides.</li> <li>wash and chop the salad.</li> <li>fill pita with salad, hummus, and fried halloumi.</li> </ol> <h2>ingredient description list</h2> <p>paragraph for reference, paragraph for reference, paragraph for reference, paragraph for reference, paragraph for reference, paragraph for reference.</p> <dl> <dt>hummus</dt> <dd>a thick dip/sauce ge...
... list-style-image: allows you to use a custom image for the bullet, rather than a simple square or circle.
... bullet styles as mentioned above, the list-style-type property allows you to set what type of bullet to use for the bullet points.
...And 7 more matches
Server-side web frameworks - Learn web development
web frameworks allow you to write simplified syntax that will generate server-side code to work with these requests and responses.
...this allows developers to optimize for the characteristics of different databases based on their usage.
...an email field would only allow valid email addresses).
...And 7 more matches
TypeScript support in Svelte - Learn web development
even if you are not planning to adopt it, this article will be useful for allowing you to learn what it has to offer and help you make your own decision.
... rich ide support: type information allows code editors and ides to offer features like code navigation, autocompletion, and smarter hints.
... safer refactoring: types allows ides to know more about your code, and assist you while refactoring large portions of your code base.
...And 7 more matches
Working with Svelte stores - Learn web development
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.
... a store is simply an object with a subscribe() method that allows interested parties to be notified whenever the store value changes, and an optional set() method that allows you to set new values for the store.
... this setup allows us to work with stores in a reactive way.
...And 7 more matches
Mozilla’s UAAG evaluation report
most browsers do not allow the user to select text with the keyboard alone.
... 2.4 allow time-independent interaction.
...allow configuration not to render some content that may reduce accessibility.
...And 7 more matches
An Overview of XPCOM
the xpcom solution the cross platform component object module (xpcom) is a framework which allows developers to break up monolithic software projects into smaller modularized pieces.
... the goal of xpcom is to allow different pieces of software to be developed and built independently of one another.
... in order to allow interoperability between components within an application, xpcom separates the implementation of a component from the interface, which we discuss in interfaces.
...And 7 more matches
Mozilla
add-ons add-ons allow developers to extend and modify the functionality of firefox.
... browser chrome tests the browser chrome test suite is an automated testing framework designed to allow testing of application chrome windows using javascript.
... it currently allows you to run javascript code in the same scope as the main firefox browser window and report results using the same functions as the mochitest test framework.
...And 7 more matches
Using Service Workers - Web APIs
the previous attempt — appcache — seemed to be a good idea because it allowed you to specify assets to cache really easily.
...service worker syntax is more complex than that of appcache, but the trade off is that you can use javascript to control your appcache-implied behaviors with a fine degree of granularity, allowing you to handle this problem and many more.
... note: your service worker functions like a proxy server, allowing you to modify requests and responses, replace them with items from its own cache, and more.
...And 7 more matches
HTML attribute reference - HTML: Hypertext Markup Language
allow <iframe> specifies a feature-policy for the iframe.
...allowed values are ltr (left-to-right) or rtl (right-to-left) dirname <input>, <textarea> disabled <button>, <command>, <fieldset>, <input>, <keygen>, <optgroup>, <option>, <select>, <textarea> indicates whether the user can interact with the element.
... integrity <link>, <script> specifies a subresource integrity value that allows browsers to verify what they fetch.
...And 7 more matches
Feature-Policy: geolocation - HTTP
the http feature-policy header geolocation directive controls whether the current document is allowed to use the geolocation interface.
...this directive allows or prevents cross-origin frames from accessing geolocation.
... syntax feature-policy: geolocation <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested browsing contexts (iframes) regardless of their origin.
...And 7 more matches
Feature-Policy: publickey-credentials-get - HTTP
the http feature-policy header publickey-credentials-get directive controls whether the current document is allowed to access web authentcation api to create new public-key credentials, i.e, via navigator.credentials.get({publickey: ..., ...}).
... syntax feature-policy: publickey-credentials-get <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested browsing contexts (iframes) regardless of their origin.
... 'self': the feature will be allowed in this document, and in all nested browsing contexts (iframes) in the same origin.
...And 7 more matches
<mo> - MathML
WebMathMLElementmo
allowed values are true or false.
... allowed values are true or false.
...allowed values are either true or false.
...And 7 more matches
XUL accessibility guidelines - Archive of obsolete content
the bookmark manager allows users to sort bookmarks by a particular column of information and choose which columns to display.
...with xul you can allow elements to flex with the resizing of the application window.
...provide users with clear instruction and feedback, and allow users to correct errors.
...And 6 more matches
Introduction to SSL - Archive of obsolete content
it uses tcp/ip on behalf of the higher-level protocols, and in the process allows an ssl-enabled server to authenticate itself to an ssl-enabled client, allows the client to authenticate itself to the server, and allows both machines to establish an encrypted connection.
... these capabilities address fundamental concerns about communication over the internet and other tcp/ip networks: ssl server authentication allows a user to confirm a server's identity.
... ssl client authentication allows a server to confirm a user's identity.
...And 6 more matches
WAI-ARIA basics - Learn web development
as an example, aria-required="true" specifies that a form input needs to be filled in to be valid, whereas aria-labelledby="label" allows you to put an id on an element, then reference it as being the label for anything else on the page, including multiple elements, which is not possible using <label for="input">.
...where this is unavoidable, wai-aria provides a means to allow other elements to receive focus (using tabindex).
... signposts/landmarks wai-aria adds the role attribute to browsers, which allows you to add extra semantic value to elements on your site wherever they are needed.
...And 6 more matches
Client-side storage - Learn web development
it consists of javascript apis that allow you to store data on the client (i.e.
... the storage.setitem() method allows you to save a data item in storage — it takes two parameters: the name of the item, and its value.
...our example will allow you enter a name, after which the page will update to give you a personalized greeting.
...And 6 more matches
What is JavaScript? - Learn web development
a high-level definition javascript is a scripting or programming language that allows you to implement complex features on web pages — every time a web page does more than just sit there and display static information for you to look at — displaying timely content updates, interactive maps, animated 2d/3d graphics, scrolling video jukeboxes, etc.
... the core client-side javascript language consists of some common programming features that allow you to do things like: store useful values inside variables.
... apis are ready-made sets of code building blocks that allow a developer to implement programs that would otherwise be hard or impossible to implement.
...And 6 more matches
Advanced Svelte: Reactivity, lifecycle, accessibility - Learn web development
we will also learn about the action directive, which will allow us to extend the functionality of html elements in a reusable and declarative way.
...this is much faster than directly updating the dom and allows the framework to apply many optimization techniques.
... note: svelte allows us to specify different options that affect how the compiler works.
...And 6 more matches
Handling common JavaScript problems - Learn web development
online the jshint homepage provides an online linter, which allows you to enter your javascript code on the left and provides an output on the right, including metrics, warnings, and errors.
...for a start, there is a console api that allows javascript code to interact with the browser's javascript console.
... declaring strict mode at the top of your javascript code causes it to be parsed with a stricter set of rules, meaning that more warnings and errors will be thrown, and some things will be disallowed that would otherwise be acceptable.
...And 6 more matches
Overview of Mozilla embedding APIs
the component manager allows new instances of registered xpcom components to be instantiated.
...the webbrowser exposes a set of interfaces which allow the embedding application to control activity and respond to changes within this client area.
... nscomtypeinfo<interface-type>::getiid() this template helper class allows easy access to an interface's nsiid.
...And 6 more matches
nsIParserUtils
astring converttoplaintext(in astring src, in unsigned long flags, in unsigned long wrapcol); nsidomdocumentfragment parsefragment(in astring fragment, in unsigned long flags, in boolean isxml, in nsiuri baseuri, in nsidomelement element); astring sanitize(in astring src, in unsigned long flags); constants constant value description sanitizerallowcomments (1 << 0) flag for sanitizer: allow comment nodes.
... sanitizerallowstyle (1 << 1) flag for sanitizer: allow <style> elements and style attributes (with contents sanitized in case of -moz-binding).
... sanitizercidembedsonly (1 << 2) flag for sanitizer: only allow cid: urls for embedded content.
...And 6 more matches
nsIProtocolHandler
inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview boolean allowport(in long port, in string scheme); nsichannel newchannel(in nsiuri auri); nsiuri newuri(in autf8string aspec, in string aorigincharset, in nsiuri abaseuri); attributes attribute type description defaultport long the default port is the port the protocol uses by default.
... uri_forbids_automatic_document_replacement 1<<5 "automatic" loads that would replace the document (such as a meta refresh, certain types of xlinks, and other non-user-triggered loads) are not allowed if the originating uri has this protocol flag.
... uri_is_local_file 1<<9 uris for this protocol from other origins should only be allowed if those origins should have access to the local file system.
...And 6 more matches
Using IndexedDB - Web APIs
if the database does exist but you are specifying an upgraded version number, an onupgradeneeded event is triggered straight away, allowing you to provide an updated schema in its handler.
...one of the main 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.
...And 6 more matches
Advanced techniques: Creating and sequencing audio - Web APIs
the interface consists of master controls, which allow us to play/stop the sequencer, and adjust the bpm (beats per minute) to speed up or slow down the "music".
... each voice also has local controls, which allow you to manipulate the effects or parameters particular to each technique we are using to create those voices.
...we can allow the user to control these using range inputs on the interface: <label for="attack">attack</label> <input name="attack" id="attack" type="range" min="0" max="1" value="0.2" step="0.1" /> <label for="release">release</label> <input name="release" id="release" type="range" min="0" max="1" value="0.5" step="0.1" /> now we can create some variables over in javascript and have them change when the i...
...And 6 more matches
Web Audio API - Web APIs
the web audio api provides a powerful and versatile system for controlling audio on the web, allowing developers to choose audio sources, add effects to audio, create audio visualizations, apply spatial effects (such as panning) and much more.
... web audio concepts and usage the web audio api involves handling audio operations inside an audio context, and has been designed to allow modular routing.
... timing is controlled with high precision and low latency, allowing developers to write code that responds accurately to events and is able to target specific samples, even at a high sample rate.
...And 6 more matches
Functions and classes available to Web Workers - Web APIs
unknown no postmessage() yes, on dedicatedworkerglobalscope no no unknown no apis available in workers function functionality support in gecko (firefox) support 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).
... 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.
...it allows access to a cryptographically strong random number generator and to cryptographic primitives.
...And 6 more matches
CSS Tutorials - CSS: Cascading Style Sheets
WebCSSTutorials
using multiple backgrounds backgrounds are fundamental for nice styling: css allows you to set several of them on each box.
... scaling background images css allows you to resize images used as an element's background.
... css animations css3 animations allow you to define configurations of style, as keyframes, and to transition between them defining an animation.
...And 6 more matches
<link>: The External Resource Link element - HTML: Hypertext Markup Language
WebHTMLElementlink
these provide useful hints to allow the browser to choose the most appropriate icon available.
...the allowed values are: anonymous a cross-origin request (i.e.
...if the server does not give credentials to the origin site (by not setting the access-control-allow-origin http header) the resource will be tainted and its usage restricted.
...And 6 more matches
<video>: The Video Embed element - HTML: Hypertext Markup Language
WebHTMLElementvideo
controls if this attribute is present, the browser will offer controls to allow the user to control video playback, including volume, seeking, and pause/resume playback.
... the allowed values are nodownload, nofullscreen and noremoteplayback.
...the allowed values are: anonymous sends a cross-origin request without a credential.
...And 6 more matches
CSP: frame-ancestors - HTTP
not setting this allows anything.
...default-src), but doesn't allow 'unsafe-eval' or 'unsafe-inline' for example.
...only the sources listed below are allowed: <host-source> internet hosts by name or ip address, as well as an optional url scheme and/or port number, separated by spaces.
...And 6 more matches
Feature-Policy: camera - HTTP
the http feature-policy header camera directive controls whether the current document is allowed to use video input devices.
... when this policy is enabled, the promise returned by mediadevices.getusermedia() will reject with a notallowederror.
... syntax feature-policy: camera <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested browsing contexts (iframes) regardless of their origin.
...And 6 more matches
Feature-Policy: encrypted-media - HTTP
the http feature-policy header encrypted-media directive controls whether the current document is allowed to use the encrypted media extensions api (eme).
... syntax feature-policy: encrypted-media <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested browsing contexts (iframes) regardless of their origin.
... 'self': the feature will be allowed in this document, and in all nested browsing contexts (iframes) in the same origin.
...And 6 more matches
Feature-Policy: microphone - HTTP
the http feature-policy header microphone directive controls whether the current document is allowed to use audio input devices.
... when this policy is enabled, the promise returned by mediadevices.getusermedia() will reject with a notallowederror.
... syntax feature-policy: microphone <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested browsing contexts (iframes) regardless of their origin.
...And 6 more matches
Feature-Policy: midi - HTTP
the http feature-policy header midi directive controls whether the current document is allowed to use the web midi api.
... syntax feature-policy: midi <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested browsing contexts (iframes) regardless of their origin.
... 'self': the feature will be allowed in this document, and in all nested browsing contexts (iframes) in the same origin.
...And 6 more matches
Feature-Policy: payment - HTTP
the http feature-policy header field's payment directive controls whether the current document is allowed to use the payment request api.
... syntax feature-policy: payment <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested browsing contexts (iframes) regardless of their origin.
... 'self': the feature will be allowed in this document, and in all nested browsing contexts (iframes) in the same origin.
...And 6 more matches
Feature-Policy: picture-in-picture - HTTP
the http feature-policy header picture-in-picture directive controls whether the current document is allowed to play a video in a picture-in-picture mode via the corresponding api.
... syntax feature-policy: picture-in-picture <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested browsing contexts (iframes) regardless of their origin.
... 'self': the feature will be allowed in this document, and in all nested browsing contexts (iframes) in the same origin.
...And 6 more matches
Feature-Policy: screen-wake-lock - HTTP
the http feature-policy header screen-wake-lock directive controls whether the current document is allowed to use screen wake lock api to indicate that device should not dim or turn off the screen.
... syntax feature-policy: screen-wake-lock <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested browsing contexts (iframes) regardless of their origin.
... 'self': the feature will be allowed in this document, and in all nested browsing contexts (iframes) in the same origin.
...And 6 more matches
Feature-Policy: sync-xhr - HTTP
the http feature-policy header sync-xhr directive controls whether the current document is allowed to make synchronous xmlhttprequest requests.
... syntax feature-policy: sync-xhr <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested browsing contexts (iframes) regardless of their origin.
... 'self': the feature will be allowed in this document, and in all nested browsing contexts (iframes) in the same origin.
...And 6 more matches
Feature-Policy: unsized-media - HTTP
the http feature-policy header unsized-media directive controls whether the current document is allowed to change the size of media elements after the initial layout is complete.
... syntax feature-policy: unsized-media <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested browsing contexts (iframes) regardless of their origin.
... 'self': the feature will be allowed in this document, and in all nested browsing contexts (iframes) in the same origin.
...And 6 more matches
Feature-Policy: usb - HTTP
the http feature-policy header usb directive controls whether the current document is allowed to use the webusb api.
... syntax feature-policy: usb <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested browsing contexts (iframes) regardless of their origin.
... 'self': the feature will be allowed in this document, and in all nested browsing contexts (iframes) in the same origin.
...And 6 more matches
Feature-Policy: wake-lock - HTTP
the http feature-policy header wake-lock directive controls whether the current document is allowed to use wake lock api to indicate that device should not enter power-saving mode.
... syntax feature-policy: wake-lock <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested browsing contexts (iframes) regardless of their origin.
... 'self': the feature will be allowed in this document, and in all nested browsing contexts (iframes) in the same origin.
...And 6 more matches
Feature-Policy: xr-spatial-tracking - HTTP
the http feature-policy header xr-spatial-tracking directive controls whether the current document is allowed to use the webxr device api.
... syntax feature-policy: xr-spatial-tracking <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested browsing contexts (iframes) regardless of their origin.
... 'self': the feature will be allowed in this document, and in all nested browsing contexts (iframes) in the same origin.
...And 6 more matches
A re-introduction to JavaScript (JS tutorial) - JavaScript
they have methods as well that allow you to manipulate the string and access information about the string: 'hello'.charat(0); // "h" 'hello, world'.replace('world', 'mars'); // "hello, mars" 'hello'.touppercase(); // "hello" other types javascript distinguishes between null, which is a value that indicates a deliberate non-value (and is only accessible through the null keyword), and undefined, which is a value of type undefined ...
... let allows you to declare block-level variables.
... let a; let name = 'simon'; the following is an example of scope with a variable declared with let: // myletvariable is *not* visible out here for (let myletvariable = 0; myletvariable < 5; myletvariable++) { // myletvariable is only visible in here } // myletvariable is *not* visible out here const allows you to declare variables whose values are never intended to change.
...And 6 more matches
Codecs used by WebRTC - Web media technologies
some browsers may choose to allow other codecs as well.
...sometimes it means requiring a specific value for a parameter, or that a specific set of values be allowed.
...its support of in-band stereo signals allows support for stereo without complicating the demultiplexing process.
...And 6 more matches
Mozilla Application Framework in Detail - Archive of obsolete content
you may also further enhance the user interface by allowing 3rd parties to develop "themes" for your application.
...in addition to the technologies already mentioned, we go even further by allowing you to even create your own custom interface widgets.
...xbl (extensible binding language) allows you to expand your library of interface elements, and even construct your own xml language for defining your ui.
...And 5 more matches
textbox - Archive of obsolete content
the disabled attribute is allowed only for form controls.
... hidespinbuttons type: boolean if true, the number box does not have arrow buttons next to it to allow the user to adjust the value.
... maxlength type: integer the maximum number of characters that the textbox allows to be entered.
...And 5 more matches
CSS and JavaScript accessibility best practices - Learn web development
previous overview: accessibility next css and javascript, when used properly, also have the potential to allow for accessible web experiences ...
... abbreviations an element that allows an abbreviation, acronym, or initialization to be associated with its expansion: <p>web content is marked up using <abbr title="hypertext markup language">html</abbr>.</p> again, you might want to style it in some simple way: abbr { color: #a60000; } the recognised styling convention for abbreviations is a dotted underline, and it is unwise to significantly deviate from this.
... form elements elements to allow users to input data into websites: <div> <label for="name">enter your name</label> <input type="text" id="name" name="name"> </div> you can see some good example css in our form-css.html example (see it live also).
...And 5 more matches
HTML: A good basis for accessibility - Learn web development
you can also bring up a list of all headings in many screen readers, allowing you to use them as a handy table of contents to find specific content.
... one key aspect of the accessibility of ui controls is that by default, browsers allow them to be manipulated by the keyboard.
...ttons the ability to be focused (including via tab) by giving each one the attribute tabindex="0": <div data-message="this is from the first button" tabindex="0">click me!</div> <div data-message="this is from the second button" tabindex="0">click me too!</div> <div data-message="this is from the third button" tabindex="0">and me!</div> basically, the tabindex attribute is primarily intended to allow tabbable elements to have a custom tab order (specified in positive numerical order), instead of just being tabbed through in their default source order.
...And 5 more matches
HTML: A good basis for accessibility - Learn web development
you can also bring up a list of all headings in many screen readers, allowing you to use them as a handy table of contents to find specific content.
... one key aspect of the accessibility of ui controls is that by default, browsers allow them to be manipulated by the keyboard.
...ttons the ability to be focused (including via tab) by giving each one the attribute tabindex="0": <div data-message="this is from the first button" tabindex="0">click me!</div> <div data-message="this is from the second button" tabindex="0">click me too!</div> <div data-message="this is from the third button" tabindex="0">and me!</div> basically, the tabindex attribute is primarily intended to allow tabbable elements to have a custom tab order (specified in positive numerical order), instead of just being tabbed through in their default source order.
...And 5 more matches
CSS values and units - Learn web development
previous overview: building blocks next every property used in css has a value or set of values that are allowed for that property, and taking a look at any property page on mdn will help you understand the values that are valid for any particular property.
... in the following example we have set the color of our heading using a keyword, and the background using the rgb() function: h1 { color: black; background-color: rgb(197,93,161); } a value in css is a way to define a collection of allowable sub-values.
...if the allowed value includes <length-percentage> then you can use a length or a percentage.
...And 5 more matches
Choosing the right approach - Learn web development
further information introducing asynchronous javascript, in particular async callbacks settimeout() settimeout() is a method that allows you to run a function after an arbitrary amount of time has passed.
... further information cooperative asynchronous javascript: timeouts and intervals, in particular settimeout() settimeout() reference setinterval() setinterval() is a method that allows you to run a function repeatedly with a set interval of time between each execution.
... not as efficient as requestanimationframe(), but allows you to choose a running rate/frame rate.
...And 5 more matches
Making decisions in your code — conditionals - Learn web development
human beings (and other animals) make decisions all the time that affect their lives, from small ("should i eat one cookie or two?") to large ("should i stay in my home country and work on my father's farm, or should i move to america and study astrophysics?") conditional statements allow us to represent such decision making in javascript, from the choice that must be made (for example, "one cookie or two"), to the resulting outcome of those choices (perhaps the outcome of "ate one cookie" might be "still felt hungry", and the outcome of "ate two cookies" might be "felt full, but mom scolded me for eating all the cookies".) if...else statements let's look at by far the most co...
...if you help me by going and doing the shopping, i'll give you some extra allowance so you can afford that toy you wanted." in javascript, we could represent this like so: let shoppingdone = false; if (shoppingdone === true) { let childsallowance = 10; } else { let childsallowance = 5; } this code as shown always results in the shoppingdone variable returning false, meaning disappointment for our poor child.
...best to stay in with a cup of hot chocolate, or go build a snowman.'; } else if (choice === 'overcast') { para.textcontent = 'it isn\'t raining, but the sky is grey and gloomy; it could turn any minute, so take a rain coat just in case.'; } else { para.textcontent = ''; } } here we've got an html <select> element allowing us to make different weather choices, and a simple paragraph.
...And 5 more matches
A first splash into JavaScript - Learn web development
display control allowing the player to restart the game.
... allow them to enter another guess.
... display control allowing the player to restart the game.
...And 5 more matches
Getting started with Ember - Learn web development
increasing cohesion among many team's technology stacks community-backed "best practices" allow for faster long-term development speed.
... ember is built on javascript technologies and is a thin layer on top of traditional object-oriented programming, while still allowing developers to utilize functional programming techniques.
... that said, because this tutorial is a focus on the javascript side of making a small web application, todomvc's value comes from providing pre-made css and recommended html structure, which eliminates small differences between implementations, allowing for easier comparison.
...And 5 more matches
Understanding client-side JavaScript frameworks - Learn web development
beginning our react todo list let's say that we’ve been tasked with creating a proof-of-concept in react – an app that allows users to add, edit, and delete tasks they want to work on, and also mark tasks as complete without deleting them.
...react interactivity: events and state with our component plan worked out, it's now time to start updating our app from a completely static ui to one that actually allows us to interact and change things.
...this includes allowing you to edit existing tasks and filtering the list of tasks between all, completed, and incomplete tasks.
...And 5 more matches
Handling common HTML and CSS problems - Learn web development
one service that can do this is the w3c markup validation service, which allows you to point to your code, and returns a list of errors: css has a similar story — you need to check that your property names are spelled correctly, property values are spelled correctly and are valid for the properties they are used on, you are not missing any curly braces, and so on.
...these allows you to paste your code into a window, and it will flag up any errors with crosses, which can then be hovered to get an error message informing you what the problem is.
... dirty markup also allows you to make fixes to your markup using the clean button.
...And 5 more matches
Accessibility Features in Firefox
keyboard support "mozilla firefox is a web-browser with superior keyboard support." alan cantor, cantor access consulting firefox includes keyboard access to all of its amazing features: browse with caret allows users to select arbitrary content with the keyboard and move through content as if inside a read-only editor.
... this allows copying arbitrary pieces of text to the clipboard.
...a "smart keywords" feature enhances this even further by allowing custom searches from the command line such as "word punditry" to look up the word "punditry" in an online dictionary.
...And 5 more matches
Browser API
the html browser api is an extension of the html <iframe> element that allows web apps to implement browsers or browser-like applications.
... navigation methods the following navigation methods allow navigation through the browsing history of the <iframe>.
... htmliframeelement.reload() allows reloading of the <iframe> element content.
...And 5 more matches
IPDL Tutorial
ipdl, short for "inter-process-communication protocol definition language", is a mozilla-specific language allowing c++ code to pass messages between processes or threads in an organized and secure way.
...an ipdl protocol declares how actors communicate: it declares the possible messages that may be sent between actors, as well as a state machine describing when messages are allowed to be sent.
... parameters message declarations allow any number of parameters.
...And 5 more matches
NSS 3.12.6 release notes
new in nss 3.12.6 ssl3 & tls renegotiation indication extension (rfc 5746) by default, nss 3.12.6 uses the new tls renegotiation indication extension for tls renegotiation but allows simple ssl/tls connections (without renegotiation) with peers that don't support the tls renegotiation indication extension.
... the behavior of nss for renegotiation can be changed through api function calls, or with the following environment variables: nss_ssl_enable_renegotiation values: [0|n|n]: ssl_renegotiate_never never allow renegotiation - that was the default for 3.12.5 release.
... [1|u|u]: ssl_renegotiate_unrestricted server and client are allowed to renegotiate without any restrictions.
...And 5 more matches
Using the Places history service
nsiautocompletesearch: url-bar autocomplete from history from 1.9.1 (firefox3.1) on, don't use any places service on (or after) quit-application has been notified, since the database connection will be closed to allow the last sync, and changes will most likely be lost.
... this separation of the global page information and the visit allows us to store information about each time the page was visited instead of just the last time.
... the "session id" allows these paths to be reconstructed more easily.
...And 5 more matches
nsIHttpChannel
netwerk/protocol/http/nsihttpchannel.idlscriptable this interface allows for the modification of http request parameters and the inspection of the resulting http response status and headers when they become available.
...l be sent referrer_policy_origin only send the origin of the referring uri referrer_policy_origin_when_xorigin same as the default; only send the origin of the referring uri for cross-origin requests referrer_policy_unsafe_url always send the referrer, even when downgrading from https to http attributes attribute type description allowpipelining boolean this attribute is a hint to the channel to indicate whether or not the underlying http transaction should be allowed to be pipelined with other transactions.
... redirectionlimit unsigned long this attribute specifies the number of redirects this channel is allowed to make.
...And 5 more matches
nsISelectionPrivate
void getrangesforinterval(in nsidomnode beginnode, in print32 beginoffset, in nsidomnode endnode, in print32 endoffset, in prbool allowadjacent, out pruint32 resultcount, [retval, array, size_is(resultcount)] out nsidomrange results); void getrangesforintervalarray(in nsinode beginnode, in print32 beginoffset, in nsinode endnode, in print32 endoffset, in boolean allowadjacent, in rangearray results); native code only!
... void getrangesforintervalcomarray(in nsidomnode beginnode, in print32 beginoffset, in nsidomnode endnode, in print32 endoffset, in prbool allowadjacent, in rangearray results); native code only!
... void getrangesforinterval( in nsidomnode beginnode, in print32 beginoffset, in nsidomnode endnode, in print32 endoffset, in prbool allowadjacent, out pruint32 resultcount, [retval, array, size_is(resultcount)] out nsidomrange results ); parameters beginnode beginoffset endnode endoffset these four parameters represent the range to compare against the selection.
...And 5 more matches
SVGTransformList - Web APIs
exceptions: a domexception with code no_modification_allowed_err is raised when the list corresponds to a read only attribute or when the object itself is read only.
... exceptions: a domexception with code no_modification_allowed_err is raised when the list corresponds to a read only attribute or when the object itself is read only.
... exceptions: a domexception with code no_modification_allowed_err is raised when the list corresponds to a read only attribute or when the object itself is read only.
...And 5 more matches
Movement, orientation, and motion: A WebXR example - Web APIs
by importing this polyfill, we allow the example to work on many browsers that don't yet have webxr implementations in place, and we smooth out any transient deviations from the specification that occur during these still somewhat experimental days of the webxr specification.
...the code looks like this: const xrotationdegreespersecond = 25; const yrotationdegreespersecond = 15; const zrotationdegreespersecond = 35; const enablerotation = true; const allowmouserotation = true; const allowkeyboardmotion = true; const enableforcepolyfill = false; //const session_type = "immersive-vr"; const session_type = "inline"; const mouse_speed = 0.003; xrotationdegreespersecond the number of degrees of rotation to apply around the x axis per second.
... allowmouserotation if true, you can use the mouse to pitch and yaw the view angle.
...And 5 more matches
Implementing a Microsoft Active Accessibility (MSAA) Server - Accessibility
using this information, a screen reader will speak out loud important changes to the document or ui, and allow the user to track where they navigate.
...screen magnifiers will zoom to the focus, keeping it on the screen at all times, or even allow the user to enter a special low vision document reading mode, with a variety of features such as ticker mode where text is streamed on a single line.
... msaa provides information in several different ways: a com interface (iaccessible) that allows applications to expose the tree of data nodes that make up each window in the user interface currently being interacted with and custom interface extensions via interfaces via queryinterface and queryservice.
...And 5 more matches
Live streaming web audio and video - Developer guides
live streaming formats generally allow adaptive streaming by breaking streams into a series of small segments and making those segments available at different qualities and bit rates.
...using rtp with rtcp allows for adaptive streaming.
... for example: <video src="rtsp://myhost.com/mymedia.format"> <!-- fallback here --> </video> media source extensions (mse) media source extensions is a w3c working draft that plans to extend htmlmediaelement to allow javascript to generate media streams for playback.
...And 5 more matches
Creating a cross-browser video player - Developer guides
<source src="video/tears-of-steel-battle-clip-medium.ogg" type="video/ogg"> <!-- flash fallback --> <object type="application/x-shockwave-flash" data="flash-player.swf?videourl=video/tears-of-steel-battle-clip-medium.mp4" width="1024" height="576"> <param name="movie" value="flash-player.swf?videourl=video/tears-of-steel-battle-clip-medium.mp4" /> <param name="allowfullscreen" value="true" /> <param name="wmode" value="transparent" /> <param name="flashvars" value="controlbar=over&amp;image=img/poster.jpg&amp;file=flash-player.swf?videourl=video/tears-of-steel-battle-clip-medium.mp4" /> <img alt="tears of steel poster image" src="img/poster.jpg" width="1024" height="428" title="no video playback possible, please download the video ...
...doing things this way still allows users who have javascript turned off (for whatever reason) to still have access to the browser's native controls.
... for browsers that do not support html5 video, a flash player is provided that will allow playback of the mp4 video source, provided the end user has flash installed.
...And 5 more matches
Audio and Video Delivery - Developer guides
it's also possible to feed an <audio> element a base64 encoded wav file, allowing to generate audio on the fly: <audio id="player" src="data:audio/x-wav;base64,uklgrvc..."></audio> speak.js employs this technique.
...e video element: if (navigator.mediadevices) { navigator.mediadevices.getusermedia({ video: true, audio: false }) .then(function onsuccess(stream) { var video = document.getelementbyid('webcam'); video.autoplay = true; video.srcobject = stream; }) .catch(function onerror() { alert('there has been a problem retreiving the streams - are you running on file:/// or did you disallow access?'); }); } else { alert('getusermedia is not supported in this browser.'); } to find out more, read our mediadevices.getusermedia page.
... mediastream recording new standards are being rolled out to allow your browser to grab media from your mic or camera using getusermedia and record it instantly using the new mediarecorder api.
...And 5 more matches
Audio and video manipulation - Developer guides
common audio filters these are some of the common types of audio filter you can apply: low pass: allows frequencies below the cutoff frequency to pass through and attenuates frequencies above the cutoff.
... high pass: allows frequencies above the cutoff frequency to pass through and attenuates frequencies below the cutoff.
... band pass: allows a range of frequencies to pass through and attenuates the frequencies below and above this frequency range.
...And 5 more matches
<img>: The Image Embed element - HTML: Hypertext Markup Language
WebHTMLElementimg
use both width and height to set the intrinsic size of the image, allowing it to take up space before it loads, to mitigate content layout shifts.
... if the crossorigin attribute is specified, then a cors request is sent (with the origin request header); but if the server does not opt into allowing cross-origin access to the image data by the origin site (by not sending any access-control-allow-origin response header, or by not including the site's origin in any access-control-allow-origin response header it does send), then the browser marks the image as tainted and restricts access to its image data, preventing its usage in <canvas> elements.
... allowed values: anonymous a cors request is sent with credentials omitted (that is, no cookies, x.509 certificates, or authorization request header).
...And 5 more matches
<input type="number"> - HTML: Hypertext Markup Language
WebHTMLElementinputnumber
a string value of any means that no stepping is implied, and any value is allowed (barring other constraints, such as min and max).
... the default stepping value for number inputs is 1, allowing only integers to be entered—unless the stepping base is not an integer.
...for example, let's give our example a minimum of 0, and a maximum of 100: <input type="number" placeholder="multiple of 10" step="10" min="0" max="100"> in this updated version, you should find that the up and down step buttons will not allow you to go below 0 or above 100.
...And 5 more matches
Content-Security-Policy - HTTP
the http content-security-policy response header allows web site administrators to control resources the user agent is allowed to load for a given page.
... elements controlled by object-src are perhaps coincidentally considered legacy html elements and are not receiving new standardized features (such as the security attributes sandbox or allow for <iframe>).
... trusted-types used to specify an allow-list of trusted types policies.
...And 5 more matches
Feature-Policy: accelerometer - HTTP
the http feature-policy header accelerometer directive controls whether the current document is allowed to gather information about the acceleration of the device through the accelerometer interface.
... syntax feature-policy: accelerometer <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested browsing contexts (iframes) regardless of their origin.
... 'self': the feature will be allowed in this document, and in all nested browsing contexts (iframes) in the same origin.
...And 5 more matches
Feature-Policy: ambient-light-sensor - HTTP
the http feature-policy header ambient-light-sensor directive controls whether the current document is allowed to gather information about the amount of light in the environment around the device through the ambientlightsensor interface.
... syntax feature-policy: ambient-light-sensor <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested browsing contexts (iframes) regardless of their origin.
... 'self': the feature will be allowed in this document, and in all nested browsing contexts (iframes) in the same origin.
...And 5 more matches
Feature-Policy: autoplay - HTTP
the http feature-policy header autoplay directive controls whether the current document is allowed to autoplay media requested through the htmlmediaelement interface.
... syntax feature-policy: autoplay <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested browsing contexts (iframes) regardless of their origin.
... 'self': the feature will be allowed in this document, and in all nested browsing contexts (iframes) in the same origin.
...And 5 more matches
Feature-Policy: battery - HTTP
the http feature-policy header battery directive controls whether the current document is allowed to gather information about the acceleration of the device through the batterymanager interface obtained via navigator.getbattery().
... syntax feature-policy: battery <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested browsing contexts (iframes) regardless of their origin.
... 'self': the feature will be allowed in this document, and in all nested browsing contexts (iframes) in the same origin.
...And 5 more matches
Feature-Policy: document-domain - HTTP
the http feature-policy header document-domain directive controls whether the current document is allowed to set document.domain.
... syntax feature-policy: document-domain <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested browsing contexts (iframes) regardless of their origin.
... 'self': the feature will be allowed in this document, and in all nested browsing contexts (iframes) in the same origin.
...And 5 more matches
Feature-Policy: gyroscope - HTTP
the http feature-policy header gyroscope directive controls whether the current document is allowed to gather information about the orientation of the device through the gyroscope interface.
... syntax feature-policy: gyroscope <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested browsing contexts (iframes) regardless of their origin.
... 'self': the feature will be allowed in this document, and in all nested browsing contexts (iframes) in the same origin.
...And 5 more matches
Feature-Policy: layout-animations - HTTP
the http feature-policy header layout-animations directive controls whether the current document is allowed to show layout animations.
... syntax feature-policy: layout-animations <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested browsing contexts (iframes) regardless of their origin.
... 'self': the feature will be allowed in this document, and in all nested browsing contexts (iframes) in the same origin.
...And 5 more matches
Feature-Policy: legacy-image-formats - HTTP
the http feature-policy header legacy-image-formats directive controls whether the current document is allowed to display images in legacy formats.
... syntax feature-policy: legacy-image-formats <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested browsing contexts (iframes) regardless of their origin.
... 'self': the feature will be allowed in this document, and in all nested browsing contexts (iframes) in the same origin.
...And 5 more matches
Feature-Policy: magnetometer - HTTP
the http feature-policy header magnetometer directive controls whether the current document is allowed to gather information about the orientation of the device through the magnetometer interface.
... syntax feature-policy: magnetometer <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested browsing contexts (iframes) regardless of their origin.
... 'self': the feature will be allowed in this document, and in all nested browsing contexts (iframes) in the same origin.
...And 5 more matches
Feature-Policy: oversized-images - HTTP
the http feature-policy header oversized-images directive controls whether the current document is allowed to download and display large images.
... syntax feature-policy: oversized-images <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested browsing contexts (iframes) regardless of their origin.
... 'self': the feature will be allowed in this document, and in all nested browsing contexts (iframes) in the same origin.
...And 5 more matches
Feature-Policy: unoptimized-images - HTTP
the http feature-policy header unoptimized-images directive controls whether the current document is allowed to download and display unoptimized images.
... syntax feature-policy: unoptimized-images <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested browsing contexts (iframes) regardless of their origin.
... 'self': the feature will be allowed in this document, and in all nested browsing contexts (iframes) in the same origin.
...And 5 more matches
Feature-Policy: vibrate - HTTP
the http feature-policy header vibrate directive controls whether the current document is allowed to trigger device vibrations via navigator.vibrate() method of vibration api.
... syntax feature-policy: vibrate <allowlist>; <vibrate> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested browsing contexts (iframes) regardless of their origin.
... 'self': the feature will be allowed in this document, and in all nested browsing contexts (iframes) in the same origin.
...And 5 more matches
web-share - HTTP
the http feature-policy header web-share directive controls controls whether the current document is allowed to use the navigator.share() of web share api to share text, links, images, and other content to arbitrary destiations of user's choice.
... syntax feature-policy: web-share <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested browsing contexts (iframes) regardless of their origin.
... 'self': the feature will be allowed in this document, and in all nested browsing contexts (iframes) in the same origin.
...And 5 more matches
The "codecs" parameter in common media types - Web media technologies
some media types only let you specify the names of the codecs to use, while others allow you to specify various constraints on those codecs as well.
... f a one-digit flag indicating whether the color should be allowed to use the full range of possible values (1), or should be constrained to those values considered legal for the specified color configuration (that is, the studio swing representation).
...not yet supported by webrtc, but an extension to the webrtc api to allow svc is in development.
...And 5 more matches
Using the WebAssembly JavaScript API - WebAssembly
this allows a single web app to use multiple independent libraries — each of which are using webassembly internally — to have separate memories that are fully isolated from each other.
...memory imports are useful for two reasons: they allow javascript to fetch and create the initial contents of memory before or concurrently with module compilation.
... they allow a single memory object to be imported by multiple module instances, which is a critical building block for implementing dynamic linking in webassembly.
...And 5 more matches
Modules - Archive of obsolete content
any property defined on the global object will be accessible from both scripts: // index.js: loadscript("www.foo.com/a.js"); foo; // => 3 // a.js: foo = 3; exporting names the script loader we obtained from the components object allows us load scripts from other locations, but its api is rather limited.
...the script loader we obtained from components allows us to do just that: function loadscript(url) { let global = {}; loader.loadsubscript(url, global); return global; } if present, the loadsubscript function evaluates the script to be loaded in the scope of the second argument.
...foo = 5; importing names in addition to exporting properties from the script being loaded to the loading script, we can also import properties from the loading script to the script being loaded: function loadscript(url, imports) { let global = { imports: imports, exports: {} }; loader.loadsubscript(url, global); return global.exports; } among other things, this allows us to import loadscript to scripts being loaded, allowing them to load further scripts: // index.js: loadscript("www.foo.com/a.js", { loadscript: loadscript }).foo; => 5 // a.js: exports.foo = imports.loadscript("www.foo.com/b.js").bar; // b.js: exports.bar = 5; sandboxes and compartments the loadscript function as defined in the previous section still has some serious shortcomings.
...And 4 more matches
widget - Archive of obsolete content
second, it allows firefox to treat your interface as a first-class citizen.
... for example, in the future firefox may allow the user to drag widgets from the add-on bar to other toolbars.
... allow object an optional object describing permissions for the content.
...And 4 more matches
Chapter 3: Introduction to XUL—How to build a more intuitive UI - Archive of obsolete content
<button label="button" width="200" height="100"/> listing 6: setting the size of a button also, as shown in listing 7, you can embed css inline into elements via the style attribute, which allows you to set sizes using units other than pixels.
... this is used to allow the user to toggle the display of additional information.
... using the icon attribute instead of the image attribute allows you to display buttons with icons that are standard for the platform.
...And 4 more matches
Intercepting Page Loads - Archive of obsolete content
attaching the load event handler to gbrowser allows us to listen to these events for all tabs, without having to worry how many tabs are open.
...the channel is available to allow you to modify headers and such.
...in a nutshell, there are a lot of state and status changes going on when a page loads, and the notify constants allow you to filter out the events you don't need to listen to.
...And 4 more matches
The Essentials of an Extension - Archive of obsolete content
if the application or version range don't match, you won't be allowed to install the extension, or the extension will be installed in a disabled state.
...this division allows other developers to create themes that replace skins, and translators to create localizations in different languages, all of this without having to change your extension or your code.
...xul allows you to create richer and more interactive interfaces than the ones you can create with html, or at least xul makes it easier.
...And 4 more matches
tabbrowser - Archive of obsolete content
addtab( url, referreruri, charset, postdata, owner, allowthirdpartyfixup ) addtab( url, {referreruri: ..., charset: ..., postdata: ..., owner: ..., allowthirdpartyfixup: ..., relatedtocurrent: ...
... firefox 3.6 note the second form of this method was added in firefox 3.6; it allows you to specify the parameters by name, in any order.
... loadonetab( url, referreruri, charset, postdata, loadinbackground, allowthirdpartyfixup ) loadonetab( url, { referreruri: ..., charset: ..., postdata: ..., inbackground: ..., allowthirdpartyfixup: ..., relatedtocurrent: ...
...And 4 more matches
Archived Mozilla and build documentation - Archive of obsolete content
implementing a calicalendarviewcontroller allows for these actions to be performed in a manner consistent with the rest of the application in which the calicalendarview is included.
... 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.
... dtrace dtrace is sun microsystem's dynamic tracing framework that allows developers to instrument a program with probes that have little to no effect on performance when not in use and very little when active.
...And 4 more matches
NPAPI plugin reference - Archive of obsolete content
browser-side plug-in api this chapter describes methods in the plug-in api that are provided by the browser; these allow call back to the browser to request information, tell the browser to repaint part of the window, and so forth.
... np_getvalue allows the browser to query the plug-in for information.
... npapi plug-in side api this chapter describes methods in the plug-in api that are available from the plug-in object; these allow plug-ins to interact with the browser.
...And 4 more matches
Audio for Web games - Game development
it is worth noting that autoplay with sound is allowed if: the user has interacted with the domain.
... note: playing part of your file at zero volume could also work if the browser allows you to change volume (see below).
... as the web audio api allows precise timing and control of audio playback, we can use it to play samples at specific moments, which is a crucial immersive aspect of gaming.
...And 4 more matches
Introduction to CSS layout - Learn web development
css page layout techniques allow us to take elements contained in a web page and control where they are positioned relative to their default position in normal layout flow, the other elements around them, their parent container, or the main viewport/window.
... the position property — allows you to precisely control the placement of boxes inside other boxes.
...this property allows us to change the default way something displays.
...And 4 more matches
The HTML5 input types - Learn web development
now we'll look at the functionality of newer form controls in detail, including some new input types, which were added in html5 to allow collection of specific types of data.
... you can also use the multiple attribute in combination with the email input type to allow several email addresses to be entered in the same input (separated by commas): <input type="email" id="email" name="email" multiple> on some devices — notably, touch devices with dynamic keyboards like smart phones — a different virtual keypad might be presented that is more suitable for entering email addresses, including the @ key.
...this is because the email input type allows intranet email addresses by default.
...And 4 more matches
Other form controls - Learn web development
<textarea cols="30" rows="8"></textarea> this renders like so: the main difference between a <textarea> and a regular single line text field is that users are allowed to include hard line breaks (i.e.
...its possible values are: both: the default — allows resizing horizontally and vertically.
... horizontal: allows resizing only horizontally.
...And 4 more matches
Third-party APIs - Learn web development
provide apis allowing developers to make use of their data (e.g.
... third party apis are apis provided by third parties — generally companies such as facebook, twitter, or google — to allow you to access their functionality via javascript and use it on your site.
... third party apis have a slightly different permissions system — they tend to use developer keys to allow developers access to the api functionality, which is more to protect the api vendor than the user.
...And 4 more matches
Framework main features - Learn web development
domain-specific languages all of the frameworks discussed in this module are powered by javascript, and all allow you to use domain-specific languages (dsls) in order to build your applications.
...typescript is useful for the strictness it allows developers to enforce on their code.
...what if we wanted to only allow numbers to be passed into this function?
...And 4 more matches
CSUN Firefox Materials
" - alan cantor, cantor access consulting (http://www.cantoraccess.com) firefox includes keyboard access to all of its amazing features: find as you type allows for quick navigation to links and text searching without opening a separate dialog -- this allows more convenient use by screen magnification users because there is a single point of regard for the search.
... browse with caret allows users to select arbitrary content with the keyboard and move through content as if inside a read-only editor.
... this allows copying arbitrary pieces of text to the clipboard.
...And 4 more matches
Error codes returned by Mozilla APIs
ns_error_illegal_value (0x80070057) an argument supplied to a method was not valid, for instance a null value was supplied as an argument which does not allow null values, or a value was out of range.
...only normal_file_type and directory_type are allowed.
... ns_error_file_access_denied (0x80520015) an operation was not performed on a file because the file cannot be accessed, typically because the permissions set for the file do not allow the operation.
...And 4 more matches
Frame script loading and lifetime
the script just writes "foo" to the command line: // chrome script var mm = gbrowser.selectedbrowser.messagemanager; mm.loadframescript('data:,dump("foo\\n")', true); loadframescript() takes two mandatory parameters: a url that points to the frame script you want to load a boolean flag, allowdelayedload note: if the message manager is a global frame message manager or a window message manager, loadframescript() may load the script multiple times, once in each applicable frame.
... to define the mapping between a chrome:// url and a frame script packaged with an extension, use a "chrome.manifest" file to register a chrome url: // chrome.manifest content my-e10s-extension chrome/content/ // chrome script mm.loadframescript("chrome://my-e10s-extension/content/content.js", true); allowdelayedload if the message manager is a global frame message manager or a window message manager then: if allowdelayedload is true, the frame script will be loaded into any new frame, which has opened after the loadframescript() call.
... if allowdelayedload is false, the script will only be loaded into frames which are open when the call was made.
...And 4 more matches
Mozilla Port Blocking
background on 08/15/2001, cert issued a vulnerability note vu#476267 for a "cross-protocol" scripting attack, known as the html form protocol attack which allowed sending arbitrary data to most tcp ports.
... a simple exploit of this hole allows an attacker to send forged unsigned mail through a mail server behind your firewall: a really nasty hole.
..."access to the port number given has been disabled for security reasons." "establishing a connection to an unsafe or otherwise banned port was prohibited" "0x804b0013 (ns_error_port_access_not_allowed)" if your product or web site uses a port which is blocked by mozilla's default port blocking rules, you can either change the port of your service to a unblocked value (recommended if possible) or ask your mozilla users to enable the port.
...And 4 more matches
An overview of NSS Internals
in order to allow interoperability between software and devices that perform cryptographic operations, nss conforms to a standard called pkcs#11.
... (note that it's important to look at the number 11, as there are other pkcs standards with different numbers that define quite different topics.) a software or hardware module conforming to the pkcs#11 standard implements an interface of c calls, which allow querying the characteristics and offered services of the module.
...this strategy allows nss to work with many hardware devices (e.g., to speed up the calculations required for cryptographic operations, or to access smartcards that securely protect a secret key) and software modules (e.g., to allow to load such modules as a plugin that provides additional algorithms or stores key or trust information) that implement the pkcs#11 interface.
...And 4 more matches
Python binding for NSS
this allows other python threads to execute during the time a nss/nspr function is progress in another thread.
... many methods/functions provide sane default (keyword) parameters freeing the python programmer from having to specify all parameters yet allowing them to be overriden when necessary.
...the (indent, text) pairs allow you to insert the item into a gui tree structure or simply change the indentation formatting.
...And 4 more matches
Scripting Java
it allows us to write powerful scripts quickly by making use of the many java libraries available.
... rhino provides another convenience by allowing properties of javabeans to be accessed directly by their property names.
...to facilitate this rhino allows to pass javascript function when such interface is expected.
...And 4 more matches
nsIFile
newname this parameter allows you to specify a new leaf name for the file to be copied.
... newname this parameter allows you to specify a new leaf name for the file to be copied.
... newname this parameter allows you to specify a new leaf name for the file to be copied.
...And 4 more matches
nsITreeView
3 note: renamed from progressnone in gecko 1.8 drop_before -1 drop_on 0 drop_after 1 indropbefore 0 obsolete since gecko 1.8 indropon 1 obsolete since gecko 1.8 indropafter 2 obsolete since gecko 1.8 methods candrop() methods used by the drag feedback code to determine if a drag is allowable at the current location.
... to get the behavior where drops are only allowed on items, such as the mailnews folder pane, always return false when the orientation is not drop_on.
... return value true if a drop is allowed at the current location; otherwise false.
...And 4 more matches
Index - Firefox Developer Tools
3 accessibility inspector accessibility, accessibility inspector, devtools, guide, tools the accessibility inspector provides a means to access important information exposed to assistive technologies on the current page via the accessibility tree, allowing you to check what's missing or otherwise needs attention.
...the dom hierarchy can be navigated using a two-paned window that allows a variety of different views on the document and all nodes within.
... 7 dom inspector faq dom_inspector the file menu contains approaches which will allow you to inspect a document.
...And 4 more matches
BiquadFilterNode() - Web APIs
the defaults for all are as follows: q: 1 detune: 0 frequency: 350 gain: 0 lowpass: (default) allows frequencies below a cutoff frequency to pass through, and attenuates frequencies above the cutoff.
... bandpass: a bandpass filter allows a range of frequencies to pass through and attenuates the frequencies below and above this frequency range.
... lowshelf: the lowshelf filter allows all frequencies through, but adds a boost (or attenuation) to the lower frequencies.
...And 4 more matches
Fullscreen API - Web APIs
methods the fullscreen api adds methods to the document and element interfaces to allow turning off and on full-screen mode.
...this is false if full-screen mode is not available for any reason (such as the "fullscreen" feature not being allowed, or full-screen mode not being supported).
...the full-screen mode feature is identified by the string "fullscreen", with a default allow-list value of "self", meaning that full-screen mode is permitted in top-level document contexts, as well as to nested browsing contexts loaded from the same origin as the top-most document.
...And 4 more matches
LockedFile - Web APIs
methods lockedfile.getmetadata() allows to retrieve the file metadata (size and date of the last modification).
... lockedfile.readasarraybuffer() allows to retrieve a part of the content of the file as an arraybuffer.
... lockedfile.readastext() allows to retrieve a part of the content of the file as a string.
...And 4 more matches
SVGLengthList - Web APIs
exceptions: a domexception with code no_modification_allowed_err is raised when the list corresponds to a read only attribute or when the object itself is read only.
... exceptions: a domexception with code no_modification_allowed_err is raised when the list corresponds to a read only attribute or when the object itself is read only.
... exceptions: a domexception with code no_modification_allowed_err is raised when the list corresponds to a read only attribute or when the object itself is read only.
...And 4 more matches
SVGNumberList - Web APIs
exceptions: a domexception with code no_modification_allowed_err is raised when the list corresponds to a read only attribute or when the object itself is read only.
... exceptions: a domexception with code no_modification_allowed_err is raised when the list corresponds to a read only attribute or when the object itself is read only.
... exceptions: a domexception with code no_modification_allowed_err is raised when the list corresponds to a read only attribute or when the object itself is read only.
...And 4 more matches
SVGPathSegList - Web APIs
exceptions: a domexception with code no_modification_allowed_err is raised when the list cannot be modified.
... exceptions: a domexception with code no_modification_allowed_err is raised when the list cannot be modified.
... exceptions: a domexception with code no_modification_allowed_err is raised when the list cannot be modified.
...And 4 more matches
SVGPointList - Web APIs
exceptions: a domexception with code no_modification_allowed_err is raised when the list corresponds to a read only attribute or when the object itself is read only.
... exceptions: a domexception with code no_modification_allowed_err is raised when the list corresponds to a read only attribute or when the object itself is read only.
... exceptions: a domexception with code no_modification_allowed_err is raised when the list corresponds to a read only attribute or when the object itself is read only.
...And 4 more matches
SVGStringList - Web APIs
exceptions: a domexception with code no_modification_allowed_err is raised when the list corresponds to a read only attribute or when the object itself is read only.
... exceptions: a domexception with code no_modification_allowed_err is raised when the list corresponds to a read only attribute or when the object itself is read only.
... exceptions: a domexception with code no_modification_allowed_err is raised when the list corresponds to a read only attribute or when the object itself is read only.
...And 4 more matches
Using the Screen Capture API - Web APIs
example of a window allowing the user to select a display surface to capture you can then use the captured stream, capturestream, for anything that accepts a stream as input.
... a user agent might allow the capture of the entire content of an obscured window after gaining permission from the user to do so.
...however, user agents may allow the capture of audio along with the video content.
...And 4 more matches
Typical use cases of Flexbox - CSS: Cascading Style Sheets
we either display the space outside of the items — therefore spacing them out with white space between or around them — or we absorb the extra space inside the items and therefore need a method of allowing the items to grow and take up this space.
...in this case we would use the flex properties to allow items to grow and shrink in proportion to one another as described in controlling ratios of flex items along the main axis.
...this is the shorthand for flex: 1 1 0 and causes all of the items become the same width, as they are working from a flex-basis of 0 allowing all of the space to be distributed evenly.
...And 4 more matches
CSS values and units - CSS: Cascading Style Sheets
when viewing css property value syntax in a css specification or the mdn property page, allowable keywords will be listed in the following form.
... the following values are the pre-defined keyword values allowed for float.
... distance units where a distance unit, also known as a length, is allowed as a value for a property, this is described as the <length> type.
...And 4 more matches
clamp() - CSS: Cascading Style Sheets
WebCSSclamp
it takes three parameters: a minimum value, a preferred value, and a maximum allowed value.
... the clamp() function can be used anywhere a <length>, <frequency>, <angle>, <time>, <percentage>, <number>, or <integer> is allowed.
... note that using clamp() for font sizes, as in these examples, allows you to set a font-size that grows with the size of the viewport, but doesn't go below a minimum font-size or above a maximum font-size.
...And 4 more matches
<integer> - CSS: Cascading Style Sheets
WebCSSinteger
decimal points are not allowed.
... +---12 only one leading +/- is allowed.
... ten letters are not allowed.
...And 4 more matches
Adding captions and subtitles to HTML5 video - Developer guides
the <track> element html5 allows us to specify subtitles for a video using the <track> element.
... the various attributes of this element allow us to specify such things as the type of content that we're adding, the language it's in, and of course a reference to the text file that contains the actual subtitle information.
...l" kind="subtitles" srclang="es" src="captions/vtt/sintel-es.vtt"> </video> as you can see, each <track> element has the following attributes set: kind is given a value of subtitles, indicating the type of content the files contain label is given a value indicating which language that subtitle set is for — for example english or deutsch — these labels will appear in the user interface to allow the user to easily select which subtitle language they want to see.
...And 4 more matches
<input type="password"> - HTML: Hypertext Markup Language
WebHTMLElementinputpassword
specifics of how the entry process works may vary from browser to browser; mobile devices, for example, often display the typed character for a moment before obscuring it, to allow the user to be sure they pressed the key they meant to press; this is helpful given the small size of keys and the ease with which the wrong one can be pressed, especially on virtual keyboards.
... <label for="userpassword">password: </label> <input id="userpassword" type="password"> allowing autocomplete to allow the user's password manager to automatically enter the password, specify the autocomplete attribute.
... for passwords, this should typically be one of the following: on allow the browser or a password manager to automatically fill out the password field.
...And 4 more matches
MIME types (IANA media types) - HTTP
no whitespace is allowed in a mime type: type/subtype the type represents the general category into which the data type falls, such as video or text.
...this can be used, for instance, to represent an email that includes a forwarded message as part of its data, or to allow sending very large messages in chunks as if it were multiple messages.
... examples include message/rfc822 (for forwarded or replied-to message quoting) and message/partial to allow breaking a large message into smaller ones automatically to be reassembled by the recipient.
...And 4 more matches
CORS errors - HTTP
WebHTTPCORSErrors
cross-origin resource sharing (cors) is a standard that allows a server to relax the same-origin policy.
... this is used to explicitly allow some cross-origin requests while rejecting others.
... if the cors configuration isn't setup correctly, the browser console will present an error like "cross-origin request blocked: the same origin policy disallows reading the remote resource at $somesite" indicating that the request was blocked due to violating the cors security rules.
...And 4 more matches
Feature-Policy: display-capture - HTTP
syntax feature-policy: display-capture <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested browsing contexts (iframes) regardless of their origin.
... 'self': the feature will be allowed in this document, and in all nested browsing contexts (iframes) in the same origin.
... 'src': (in an iframe allow attribute only) the feature will be allowed in this iframe, as long as the document loaded into it comes from the same origin as the url in the iframe's src attribute.
...And 4 more matches
Content type - SVG: Scalable Vector Graphics
no embedded white space is allowed in clock values, although leading and trailing white space characters will be ignored.
...white space characters are allowed around the numerical values.
...some attributes allow both iris and text strings as content.
...And 4 more matches
Extension Versioning, Update and Compatibility - Archive of obsolete content
as a rough overview this is a version string split by periods, some examples: 2.0 1.0b1 3.0pre1 5.0.1.2 note: before firefox 1.5 the more basic firefox version format was used: major.minor.release.build[+] where only digits were allowed.
... the toolkit version format supports the firefox version format but allows greater flexibility.
...this allows you to say that your add-on will install into any toolkit based application.
...And 3 more matches
Modularization techniques - Archive of obsolete content
inheriting from nsisupports allows any interface to be interrogated about other interfaces that its instance may support, and insures that reference counting facilities are always available.
... on the other hand, objects are allowed a certain degree of flexibility in their implementations of addref() and release().
...a factory allows an implementor to hide both the class declaration and creation details of an object, an extremely important step for allowing maximum flexibility in the implementation of a class and reducing compile time dependencies.
...And 3 more matches
Template and Tree Listeners - Archive of obsolete content
the tree view handles all of these operations, but allows an observer to be attached which is invoked during these operations.
...this allows you to handle dragging with more flexibility.
...in other situations, you may wish to allow items to be dragged between (before or after) rows.
...And 3 more matches
textbox (Toolkit autocomplete) - Archive of obsolete content
the disabled attribute is allowed only for form controls.
... maxlength type: integer the maximum number of characters that the textbox allows to be entered.
...for more information about autocomplete textboxes, see the autocomplete documentation (xpfe [thunderbird/seamonkey]) (firefox) number a textbox that only allows the user to enter numbers.
...And 3 more matches
Textbox (XPFE autocomplete) - Archive of obsolete content
the disabled attribute is allowed only for form controls.
... maxlength type: integer the maximum number of characters that the textbox allows to be entered.
...for more information about autocomplete textboxes, see the autocomplete documentation (xpfe [thunderbird/seamonkey]) (firefox) number a textbox that only allows the user to enter numbers.
...And 3 more matches
Splitters - Archive of obsolete content
it creates a skinny bar between two sections which allows these sections to be resized.
... you can place a splitter anywhere you want and it will allow resizing of the elements that come before it and the elements that come after it in the same box.
... when a splitter is placed inside a horizontal box, it will allow resizing horizontally.
...And 3 more matches
RDF in Mozilla FAQ - Archive of obsolete content
both datasources refer to "website" by url: this is the "key" that allows the datasources to be "merged" effectively.
... for this reason, there is an observer interface that allows you to spy on a datasource's progress.
...first, check here to make sure you will be allowed to access a built-in datasource.
...And 3 more matches
Fundamental text and font styling - Learn web development
text layout styles: properties that affect the spacing and other layout features of the text, allowing manipulation of, for example, the space between lines and letters, and how the text is aligned within the content box.
...but it was a rare occasion such as this that he did.</p> font families to set a different font on your text, you use the font-family property — this allows you to specify a font (or list of fonts) for the browser to apply to the selected elements.
... note: there is a way to download a custom font along with a webpage, to allow you to customize your font usage in any way you want: web fonts.
...And 3 more matches
What are browser developer tools? - Learn web development
it also allows you to instantly modify the html and css and see the results of your changes reflected live in the browser viewport.
... some browsers also have copy css path and copy xpath available, to allow you to copy the css selector or xpath expression that would select the current html element.
... grid: if the page you are inspecting uses css grid, this section allows you to view the grid details.
...And 3 more matches
Video and audio content - Learn web development
the <video> element the <video> element allows you to embed a video very easily.
... the paragraph inside the <video> tags this is called fallback content — this will be displayed if the browser accessing the page doesn't support the <video> element, allowing us to provide a fallback for older browsers.
...you can find the example that goes along with this article on github, written by ian devlin (see the source code too.) this example uses some javascript to allow users to choose between different subtitles.
...And 3 more matches
Cooperative asynchronous JavaScript: Timeouts and intervals - Learn web development
introduction for a long time, the web platform has offered javascript programmers a number of functions that allow them to asynchronously execute code after a certain time interval has elapsed, and to repeatedly execute a block of code asynchronously until you tell it to stop.
...executes a specified block of code before the browser next repaints the display, allowing an animation to be run at a suitable framerate regardless of the environment it is being run in.
...so to cancel our above timeout, you'd do this: cleartimeout(mygreeting); note: see greeter-app.html for a slightly more involved demo that allows you to set the name of the person to say hello to in a form, and cancel the greeting using a separate button (see the source code also).
...And 3 more matches
Drawing graphics - Learn web development
this article provides an introduction to canvas, and further resources to allow you to learn more.
...webgl allows you to create real 3d graphics inside your web browser; the below example shows a simple rotating webgl cube: this article will focus mainly on 2d canvas, as raw webgl code is very complex.
... you'll also see that we are chaining assignments together with multiple equals signs — this is allowed in javascript, and it is a good technique if you want to make multiple variables all equal to the same value.
...And 3 more matches
Website security - Learn web development
cross-site scripting (xss) xss is a term used to describe a class of attacks that allow an attacker to inject client-side scripts through the website into the browsers of other users.
... sql injection sql injection vulnerabilities enable malicious users to execute arbitrary sql code on a database, allowing data to be accessed, modified, or deleted irrespective of the user's permissions.
... cross-site request forgery (csrf) csrf attacks allow a malicious user to execute actions using the credentials of another user without that user’s knowledge or consent.
...And 3 more matches
Getting started with React - Learn web development
this allows teams to set conventions that work best for them, and to adopt react in any way they would like to.
...the jsx approach allows us to nest our elements within each other, just like we do with html: const header = ( <header> <h1>mozilla developer network</h1> </header> ); note: the parentheses in the previous snippet aren't unique to jsx, and don’t have any effect on your application.
...once you're comfortable with it, however, it will allow you to build user interfaces more quickly and intuitively, and allow others to better understand your codebase at a glance.
...And 3 more matches
Getting started with Svelte - Learn web development
onboarding people with basic web development knowledge: svelte has a shallow learning curve.
...to achieve this, svelte extends vanilla web technologies in the following ways: it extends html by allowing javascript expressions in markup and providing directives to use conditions and loops, in a fashion similar to handlebars.
... it extends css by adding a scoping mechanism, allowing each component to define their own styles without the risk of clashing with other component's styles.
...And 3 more matches
Dynamic behavior in Svelte: working with variables and props - Learn web development
in this article we'll be using variables and props to make our app dynamic, allowing us to add and delete todos, mark them as complete, and filter them by status.
...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.
...And 3 more matches
Handling common accessibility problems - Learn web development
the elements that have this capability are the common ones that allow user to interact with web pages, namely links, <button>s, and form elements like <input>.
... safari doesn't allow you to tab through links by default; to enable this, you need to open safari's preferences, go to advanced, and check the press tab to highlight each item on a webpage checkbox.
...you might have inherited a site where the semantics are not very good (perhaps you've ended up with a horrible cms that generates buttons made with <div>s), or you are using a complex control that does not have keyboard accessibility built in, like the html5 <video> element (amazingly, opera is the only browser that allows you to tab through the <video> element's default browser controls).
...And 3 more matches
Setting up your own test automation environment - Learn web development
different browsers require different drivers to allow webdriver to communicate with and control them.
... next, we need to install a framework to allow us to work with selenium from inside node.
... next, you need to download the relevant drivers to allow webdriver to control the browsers you want to test.
...And 3 more matches
Introducing a complete toolchain - Learn web development
tools used in our toolchain in this article we're going to use the following tools and features: jsx, a react-related set of syntax extensions that allow you to do things like defining component structures inside javascript.
... transformation: tooling that allows us to use the latest features of a language (e.g.
... revision control can also allow you to branch out your project code, creating a separate version and try out new functionality on, without those changes affecting your original code.
...And 3 more matches
Embedding API for Accessibility
there are many other pieces, such as preferences to allow the user to change foreground and background colors, and font sizes.
...dfile); /* these alerts will also be mirrored visually, either on the status bar or elsewhere */ no background images setboolpref("browser.accept.background_images", acceptbackgroundimages); no blinking text setboolpref("browser.blink_allowed", acceptblinktext); no animations setcharpref("image.animation_mode", animationmode); animationmode: "normal", "none", "once" moz 0.8 applets setboolpref("browser.accept.applets", acceptapplets); no ...
...", acceptaudio); no timed events setboolpref("browser.accept.timed_events", accepttimedevents); no timer speed setintpref("timer.relative_speed", percent); /* 100 corresponds to normal speed, 200 to double speed */ no allow cycling in lists and links setboolpref("keyboardnav.allow_cycling", allowcycling); no mouse pointer moves with keyboard focus setboolpref("keyboardnav.mouse_follows_keyboard_focus", mousefollows); /* if this pref is set, the mouse pointer will always be move to the 0,0 pixel of the cur...
...And 3 more matches
Multiple Firefox profiles
having different profiles would help separate work and personal life, or allow each family member to have his or her own set of bookmarks, settings, and add-ons.
..."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.
...select this option to allow firefox to load the selected profile, without prompting at startup.
...And 3 more matches
Getting Started with Chat
software there are several different applications which allow you to connect to irc networks.
... you will need to use the following information to configure the server connection: server: irc.mozilla.org port: 6667 (default) or 6697 (ssl) desktop clients desktop clients tens to allow the most detailed configuration.
... web-based clients there are also a few web-based clients which allow connecting to irc by clicking on irc:// links.
...And 3 more matches
Internationalized Domain Names (IDN) Support in Mozilla Browsers
until recently domain names allowed only a subset of 7-bit ascii characters.
... idn allows host/domain names with non-ascii characters for user input into a browser's location bar or url's embedded in web pages.
...arabic and hebrew), and check whether or not unassigned characters in the unicode repertoire are used -- allowing them for "query strings" but disallowing them for "stored strings" such as the data input for domain name registration.
...And 3 more matches
Creating localizable web applications
text messages don't hardcode english content allow localizers to localize english content, such as: text messages, number formats, date formats, word order and sentence structure.
...however, in this snippet, the concatenation of the $persona['date'] variable is still hardcoded and only allows one ordering of the sentence, while some grammars might require, for instance, to put the date in front of the "added" descriptor.
...good: // %1$s is persona name, %2$s is athor's username printf(_("%1$s by %2$s"), $persona['name'], $persona['display_username']); use printf variables swapping use printf() ordered variables (%1$s, %2$s, etc.) to allow changes to the order of the sentence.
...And 3 more matches
Profiling with the Firefox Profiler
tip: long-running tasks in the parent process will block all input or drawing with the browser ui (aka "ui jank") whereas long-running tasks in the content process will block interactivity with the page but still allowing the user to pan and zoom around thanks to apz.
...clicking on a tracing marker will create a selection corresponding with its duration allowing for easy zooming in on interesting time ranges.
... as you zoom in on ranges, breadcrumbs are created allowing you to easily navigate back to previously-selected ranges or the entire profile (denoted as "full range").
...And 3 more matches
NSS_3.12.3_release_notes.html
nss_allow_weak_signature_alg boolean (any non-empty value to enable) enables the use of md2 and md4 hash algorithms inside signatures.
... this was allowed by default before nss 3.12.3.
... nss_hash_alg_support string specifies algorithms allowed to be used in certain applications, such as in signatures on certificates and crls.
...And 3 more matches
JIT Optimization Strategies
the function containing the arguments.length is allowed to use the arguments object in the following ways without disabling this optimization: access arguments.length access arguments.callee access individual args using arguments[i] save arguments into variables, as long as those variables cannot be accessed by any nested function, and as long as there exists no eval anywhere within the function or nested function definitions.
...the function containing the arguments.callee is allowed to use the arguments object in the following ways without disabling this optimization: access arguments.length access arguments.callee access individual args using arguments[i] save arguments into variables, as long as those variables cannot be accessed by any nested function, and as long as there exists no eval anywhere within the function or nested function definitions.
...} in the above example, the properties x and y can always be determined to exist on any instance of someconstructor at definite locations, allowing the engine to infer deterministically the position of x without a shape guard.
...And 3 more matches
Mozilla internal string guide
this allows for a method (.get()) to access the underlying character buffer.
...the constructor takes parameters which allows it to construct a 8-bit string from a printf-style format string and parameter list.
... bulk write bulkwrite() allows capacity-aware cache-friendly low-level writes to the string's buffer.
...And 3 more matches
Components.utils.exportFunction
allowcallbacks: deprecated/redundant from firefox 34.
... this option allows the exported function to accept callbacks as arguments.
... allowcrossoriginarguments: do not check that arguments to the exported function are subsumed by the caller: this allows the caller to pass objects with a different origin into the exported function, which can then use its privileged status to make cross-origin requests with them.
...And 3 more matches
nsIClipboardDragDropHooks
allowdrop() will be called many times during drag so ensure that it is efficient.
... method overview boolean allowdrop(in nsidomevent event, in nsidragsession session); boolean allowstartdrag(in nsidomevent event); boolean oncopyordrag(in nsidomevent aevent, in nsitransferable trans); boolean onpasteordrop(in nsidomevent event, in nsitransferable trans); methods allowdrop() tells gecko whether a drop is allowed on this content area.
... boolean allowdrop( in nsidomevent event, in nsidragsession session ); parameters event the dom event (drag gesture).
...And 3 more matches
nsIDroppedLinkHandler
1.0 66 introduced gecko 2.0 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview boolean candroplink(in nsidomdragevent aevent, in prbool aallowsamedocument); astring droplink(in nsidomdragevent aevent, out astring aname, [optional] in boolean adisallowinherit); void droplinks(in nsidomdragevent aevent, [optional] in boolean adisallowinherit, [optional] out unsigned long acount, [retval, array, size_is(acount)] out nsidroppedlinkitem alinks); methods candroplink() determines if a link being dragged can be dropped.
... boolean candroplink( in nsidomdragevent aevent, in prbool aallowsamedocument ); parameters aevent a dragenter or dragover event.
... aallowsamedocument if false, drops are only allowed if the document of the source of the drag is different from the destination.
...And 3 more matches
nsIFrameScriptLoader
methods void loadframescript(in astring aurl, in boolean aallowdelayedload, [optional] in boolean aruninglobalscope) void removedelayedframescript(in astring aurl); jsval getdelayedframescripts(); loadframescript() load a script in the remote frame.
... if this function is called on a chromemessagebroadcaster (for example, a global frame message manager or a window message manager) then: loadframescript() will load the frame script independently into each applicable frame: every open frame in the given window for the window message manager, or every frame in every window for the global message manager if aallowdelayedload is true, then the script will also be loaded into any applicable new frames opened after the loadframescript() call.
... if this function is called on a chromemessagesender: it will load the frame script only into this chromemessagesender's frame aallowdelayedload should always be true.
...And 3 more matches
nsIProcessScriptLoader
methods void loadprocessscript(in astring aurl, in boolean aallowdelayedload) void removedelayedprocessscript(in astring aurl); jsval getdelayedprocessscripts(); loadprocessscript() load a script in the child process.
... if aallowdelayedload is true, then the script will also be loaded into any new child processes created after the loadprocessscript() call.
... if this function is called on a chromemessagesender: it will load the process script only into this chromemessagesender's child process aallowdelayedload should always be true.
...And 3 more matches
nsISecurityCheckedComponent
inherits from: nsisupports last changed in gecko 1.7 capability strings in gecko, a "capability" is a string identifying a set of actions that code is allowed to perform.
... two examples: code that has the "universalxpconnect" capability is allowed to access all of xpcom.
...code that has the "universalbrowserread" capability is allowed to perform certain actions that allow it to read information from the local system.
...And 3 more matches
Getting Started Guide
an nscomptr looks and acts as much like a raw xpcom interface pointer as c allows, but it knows it owns the object it points to.
...first: you no longer need, nor are you allowed, to call addref or release.
...however, be aware that if you should have queried but didn't, e.g., when assigning in a raw pointer where c++ allows the assignment, but xpcom wouldn't, nscomptr will assert at runtime.
...And 3 more matches
Autoconfiguration in Thunderbird
the configuration file description and definition the original project page on the mozilla wiki for background, design, implementation and project details this document describes how autoconfiguration in thunderbird works, and what to do to allow mail servers to be autoconfigured.
...this allows to autoconfigure almost 50% of our user's email accounts.
...in such complicated cases, this is the only way to allow an automatic setup.
...And 3 more matches
Debugger - Firefox Developer Tools
allowunobservedasmjs a boolean value indicating whether asm.js code running inside this debugger instance’s debuggee globals is invisible to debugger api handlers and breakpoints.
... allowwasmbinarysource a boolean value indicating whether webassembly sources will be available in binary form.
...(allowing the handler to substitute its own value for the new global object doesn’t seem useful.) this handler method is only available to debuggers running in privileged code (“chrome”, in firefox).
...And 3 more matches
DOMException - Web APIs
indexsizeerror the index is not in the allowed range.
...(legacy code value: 5 and legacy constant name: invalid_character_err) nomodificationallowederror the object cannot be modified.
... (legacy code value: 7 and legacy constant name: no_modification_allowed_err) notfounderror the object cannot be found here.
...And 3 more matches
Document.requestStorageAccess() - Web APIs
if the sub frame doesn't have the token allow-storage-access-by-user-activation, reject.
...examples: allow lists, block lists, on-device classification, user settings, anti-clickjacking heuristics, or prompting the user for explicit permission.
...after the requesting origin has exceeded the maximum allowable number of storage access grants, any future call to requeststorageaccess() during the same browsing session will prompt the user.
...And 3 more matches
Using Fetch - Web APIs
supplying request options the fetch() method can optionally accept a second parameter, an init object that allows you to control a number of different settings: see fetch() for the full options available, and more details.
...rigin, strict-origin-when-cross-origin, unsafe-url body: json.stringify(data) // body data type must match "content-type" header }); return response.json(); // parses json response into native javascript objects } postdata('https://example.com/answer', { answer: 42 }) .then(data => { console.log(data); // json data parsed by `data.json()` call }); note that mode: "no-cors" only allows a limited set of headers in the request: accept accept-language content-language content-type with a value of application/x-www-form-urlencoded, multipart/form-data, or text/plain sending a request with credentials included to cause browsers to send a request with credentials included, even for a cross-origin call, add credentials: 'include' to the init object you pass to the fetch() me...
...making a copy like this allows you to make use of the request/response again while varying the init options if desired.
...And 3 more matches
MediaDevices.getUserMedia() - Web APIs
if the user denies permission, or matching media is not available, then the promise is rejected with notallowederror or notfounderror respectively.
... notallowederror one or more of the requested source devices cannot be used at this time.
...on browsers that support managing media permissions with feature policy, this error is returned if feature policy is not configured to allow access to the input source(s).
...And 3 more matches
MediaTrackConstraints - Web APIs
a constraints dictionary is passed into applyconstraints() to allow a script to establish a set of exact (required) values or ranges and/or preferred values or ranges of values for the track, and the most recently-requested set of custom constraints can be retrieved by calling getconstraints().
...allowed values are none and crop-and-scale.
...the value may be a single one of the following strings, or an array of them to allow the browser flexibility in deciding what to do about the cursor.
...And 3 more matches
SVGTransform - Web APIs
exceptions: a domexception with code no_modification_allowed_err is raised when attempting to modify a read only attribute or when the object itself is read only.
... exceptions: a domexception with code no_modification_allowed_err is raised when attempting to modify a read only attribute or when the object itself is read only.
... exceptions: a domexception with code no_modification_allowed_err is raised when attempting to modify a read only attribute or when the object itself is read only.
...And 3 more matches
Signaling and video calling - Web APIs
webrtc allows real-time, peer-to-peer, media exchange between two devices.
... to allow the server to support signaling and ice negotiation, we need to update the code.
... we'll have to allow directing messages to one specific user instead of broadcasting to all connected users, and ensure unrecognized message types are passed through and delivered, without the server needing to know what they are.
...And 3 more matches
Accessibility documentation index - Accessibility
5 aria annotations aria, accessibility, wai-aria, annotations, comments, details, suggestions wai-aria version 1.3 sees the addition of a set of new features, collectively known as aria annotations, which allow the creation of accessible annotations inside web documents.
... 26 using the aria-valuemax attribute aria, accessibility the aria-valuemax attribute is used to define the maximum value allowed for a range widget such as a slider, spinbutton or progressbar.
... 27 using the aria-valuemin attribute aria, accessibility, needscontent the aria-valuemin attribute is used to define the minimum value allowed for a range widget such as a slider, spinbutton or progressbar.
...And 3 more matches
@font-feature-values - CSS: Cascading Style Sheets
a swash feature value definition allows only one value: ident1: 2 is valid, but ident2: 2 4 isn't.
...an annotation feature value definition allows only one value: ident1: 2 is valid, but ident2: 2 4 isn't.
...an ornaments feature value definition allows only one value: ident1: 2 is valid, but ident2: 2 4 isn't.
...And 3 more matches
Basic concepts of flexbox - CSS: Cascading Style Sheets
changing flex-direction adding the flex-direction property to the flex container allows us to change the direction in which our flex items display.
...set it to nowrap, which is also the initial value, and they will instead shrink to fit the container because they are using initial flexbox values that allows items to shrink.
... in the live example below try changing the first value to one of the allowable values for flex-direction - row, row-reverse, column or column-reverse, and also change the second to wrap and nowrap.
...And 3 more matches
<audio>: The Embed Audio element - HTML: Hypertext Markup Language
WebHTMLElementaudio
controls if this attribute is present, the browser will offer controls to allow the user to control audio playback, including volume, seeking, and pause/resume playback.
...the allowed values are: anonymous sends a cross-origin request without a credential.
...if the server does not give credentials to the origin site (by not setting the access-control-allow-origin: http header), the image will be tainted, and its usage restricted.
...And 3 more matches
<input type="file"> - HTML: Hypertext Markup Language
WebHTMLElementinputfile
additional attributes in addition to the common attributes shared by all <input> elements, inputs of type file also support the following attributes: attribute description accept one or more unique file type specifiers describing file types to allow capture what source to use for capturing image or video data files a filelist listing the chosen files multiple a boolean which, if present, indicates that the user may choose more than one file accept the accept attribute value is a string that defines the file types the file input should accept.
... multiple when the multiple boolean attribute is specified, the file input allows the user to select more than one file.
... attribute description webkitdirectory a boolean indicating whether or not to only allow the user to choose a directory (or directories, if multiple is also present) webkitdirectory the boolean webkitdirectory attribute, if present, indicates that only directories should be available to be selected by the user in the file picker interface.
...And 3 more matches
<input type="search"> - HTML: Hypertext Markup Language
WebHTMLElementinputsearch
attribute description autocorrect whether or not to allow autocorrect while editing this input field.
... incremental whether or not to send repeated search events to allow updating live search results while the user is still editing the value of the field.
...this allows your code to update the search results in real time as the user edits the search.
...And 3 more matches
HTML elements reference - HTML: Hypertext Markup Language
WebHTMLElement
content sectioning content sectioning elements allow you to organize the document content into logical pieces.
... <select> the html <select> element represents a control that provides a menu of options <textarea> the html <textarea> element represents a multi-line plain-text editing control, useful when you want to allow users to enter a sizeable amount of free-form text, for example a comment on a review or feedback form.
... element description <acronym> the html acronym element (<acronym>) allows authors to clearly indicate a sequence of characters that compose an acronym or abbreviation for a word.
...And 3 more matches
Global attributes - HTML: Hypertext Markup Language
classes allows css and javascript to select and access specific elements via the class selectors or functions like the method document.getelementsbyclassname().
...if so, the browser modifies its widget to allow editing.
... data-* forms a class of attributes, called custom data attributes, that allow proprietary information to be exchanged between the html and its dom representation that may be used by scripts.
...And 3 more matches
HTTP conditional requests - HTTP
both last-modified and etag allow both types of validation, though the complexity to implement it on the server side may vary.
... integrity of a partial download partial downloading of files is a functionality of http that allows to resume previous operations, saving bandwidth and time, by keeping the already obtained information: a server supporting partial downloads broadcasts this by sending the accept-ranges header.
...this is very common in any file system or source control applications, but any application that allows to store remote resources needs such a mechanism.
...And 3 more matches
Content negotiation - HTTP
a default value is often set according the language of the graphical interface of the user agent, but most browsers allow to set different language preferences.
...the header is needed in order to inform the cache of the decision criteria so that it can reproduce it, allowing the cache to be functional while preventing serving erroneous content to the user.
... the vary header was added in the version 1.1 of http and is necessary in order to allow caches to work appropriately.
...And 3 more matches
<mtable> - MathML
WebMathMLElementmtable
the mathml <mtable> element allows you to create tables or matrices.
...this allows you to align the specified row of the table rather than the whole table.
...multiple values separated by space are allowed and apply to the corresponding columns (e.g.
...And 3 more matches
Digital audio concepts - Web media technologies
the options tend to revolve around choosing the method by which the encoder performs the encoding and how much time and processor power it's allowed to consume in order to do so.
...the first involves targeting an average bit rate for the encoded data, while the second involves specifying a constant quality value to target while allowing the bit rate to vary.
...where abr attempts to keep the bit rate on average at a given level, while allowing some fluctuation, cbr uses an actually fixed bit rate for the duration of the audio.
...And 3 more matches
Privacy, permissions, and information security
privacy exceptions may be granted to specific sites or applications, but it may also be granted conditionally, such as by permitting only a select group of people to access it, or only allowing the information to be accessed and used for a limited period of time.
... modern browsers take steps to help prevent fingerprinting-based attacks by either not allowing information to be accessed or, where the information must be made available, by introducing variations that prevent it from being used for identification purposes.
...cy provides the ability to define the extent to which a document's content can be accessed by other devices over the web; used in particular to prevent or mitigate attacks on the server feature policy lets web developers selectively enable, disable, and modify the behavior of certain features and apis both for a document and for subdocuments loaded in <iframe>s <iframe>'s allow attribute technically part of feature policy, the allow attribute on an <iframe> specifies which web features the document in the frame should be allowed to access http public key pinning (hpkp) hpkp is used by servers to instruct a client to associate a specific public key with the server going forward in order to decrease the likelihood of man-in-the-middle attacks http ...
...And 3 more matches
Subresource Integrity - Web security
it works by allowing you to provide a cryptographic hash that a fetched resource must match.
... note: for subresource-integrity verification of a resource served from an origin other than the document in which it’s embedded, browsers additionally check the resource using cross-origin resource sharing (cors), to ensure the origin serving the resource allows it to be shared with the requesting origin.
... an integrity value begins with at least one string, with each string including a prefix indicating a particular hash algorithm (currently the allowed prefixes are sha256, sha384, and sha512), followed by a dash, and ending with the actual base64-encoded hash.
...And 3 more matches
WebAssembly
it is also designed to run alongside javascript, allowing both to work together.
...this allows you to take advantage of webassembly's performance and power and javascript's expressiveness and flexibility in the same apps, even if you don't know how to write webassembly code.
... compiling an existing c module to webassembly a core use-case for webassembly is to take the existing ecosystem of c libraries and allow developers to use them on the web.
...And 3 more matches
Content Processes - Archive of obsolete content
content workers combine these ideas, allowing you to inject a content script into a content process, and automatically set up a communication channel between them.
...among other things, this allows us to specify one or more content scripts to be loaded.
... when a content script is first loaded, the content worker automatically imports a messaging api that allows it to emit messages over a pipe.
...And 2 more matches
Install Manifests - Archive of obsolete content
these version strings are formatted in the same fashion as the version property and will be compared to the application version; this allows the extension author to specify which versions of firefox an extension has been tested with.
... examples <em:targetapplication> <description> <em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id> <!--firefox--> <em:minversion>1.5</em:minversion> <em:maxversion>3.0.*</em:maxversion> </description> </em:targetapplication> gecko 1.9 based applications allow you to use the special targetapplication id toolkit@mozilla.org to say that the add-on is compatible with any toolkit app with a toolkit version matching the minversion and maxversion.
...this allows your add-on's icon to be displayed even when the add-on is disabled, or if the manifest is missing an iconurl entry.
...And 2 more matches
Chapter 5: Let's build a Firefox extension - Archive of obsolete content
most extensions include only one skin package, but you can include multiple skin packages to allow the gui to change with different themes.
...the extension will actually work fine even if these are located in the content package, but putting them in the skin package has the benefit of making it possible to design guis that match specific firefox themes, and allowing theme developers to create special visual effects for extensions.
...this will allow the user to save and restore session snapshots (browser window states) at any time.
...And 2 more matches
Adding Events and Commands - Archive of obsolete content
the addeventlistener method allows you to control the phase where you want to handle an event, with the last argument of the function.
...the dom createevent function allows you to create custom events that you can dispatch and capture.
...this allows you to choose which attributes you want it to observe.
...And 2 more matches
Adding Toolbars and Toolbar Buttons - Archive of obsolete content
firefox allows all of this by default, and if you don't pay attention to the details we describe here, your toolbar may not be as easy to customize as the rest.
...this menu allows hiding and showing any toolbar.
...the toolbarbutton element has the type attribute that allows you to change the behavior of the button in many ways.
...And 2 more matches
Adding windows and dialogs - Archive of obsolete content
it allows you to send a set of optional parameters that can be used to communicate with the dialog.
...the prompt service allows better alerts to be displayed.
... the prompt service allows you to set the title of the dialog however you want it, and also lets you specify the window you want to use as a parent for the alert.
...And 2 more matches
Custom XUL Elements with XBL - Archive of obsolete content
this code gets the dom object that corresponds to the xshelloperson tag, allowing you access to its methods and properties.
... properties and fields the field and property tags allow you to handle element variables and access them from outside of the element.
...it is defined using a getter and setter method, allowing read-only and write-only properties, as well as more complex behavior.
...And 2 more matches
XPCOM Objects - Archive of obsolete content
the fact that it allows to easily create os-independent applications is a big selling point for xulrunner.
...the getservice and createinstance methods allow you to get the component already set to an interface.
... */ [scriptable, uuid(bd46f689-6c1d-47d0-bc07-bb52b546b8b5)] interface xsihellocounter : nsisupports { /* the maximum allowed count.
...And 2 more matches
Inner-browsing extending the browser navigation paradigm - Archive of obsolete content
this new navigational method allows us to make html user interfaces behave similarly to non-web based applications such as contact management software.
...today, this publishing system allows your users to modify content for the portal, but in order to have their text spell checked they must click somewhere and wait for the response page.
...implementing inner-browsing on top of html pages modern browsers have good support for the w3c dom and javascript allowing fine-grained control over page content.
...And 2 more matches
Same origin policy for XBL - Archive of obsolete content
when mozilla needs to decide whether or not xbl is allowed to be loaded, it looks at the nsiprincipal originating the load and the nsiuri to be loaded.
... checks performed once the originating principal is determined, checks are done to make sure the load should be allowed.
... the checks performed are: if the principal originating the load is the system principal, the load is allowed.
...And 2 more matches
Venkman Introduction - Archive of obsolete content
the interactive console also allows for execution of arbitrary javascript code.
...in this way, fbreak allows one to set breakpoints in files that are not yet loaded, as well as set breakpoints that are triggered when a file is loaded.
... the interactive session view another basic view in venkman is the actual interactive session view, which allows you to interact with the debugger from a command line.
...And 2 more matches
Templates - Archive of obsolete content
to allow the creation of elements based on rdf data, you need to provide a simple template which will be duplicated for each element that is created.
...for security reasons, mozilla doesn't allow access to them from other sources.
...the box has two special attributes that allow it to be used for templates, which are used to specify where the data comes from.
...And 2 more matches
Trees - Archive of obsolete content
ArchiveMozillaXULTutorialTrees
a tree also allows the user to rearrange, resize and hide individual columns.
...this allows the view to be optimized such that it only needs to load the data for displayed content.
... an advantage of using a tree view is that it allows the view to store the data in a manner which is more suitable for the data, or to load the data on demand as rows are displayed.
...And 2 more matches
XUL Structure - Archive of obsolete content
this allows a special url form, called a chrome:// url, to be used.
...the extension will hook into the browser using a xul specific feature called an overlay which allows the xul from the extension to mesh with the xul in the browser.
...the packaging system is flexible enough so that you can include whatever parts you need and allow other parts, such as the text for different languages, to be downloaded separately.
...And 2 more matches
The Implementation of the Application Object Model - Archive of obsolete content
the second section describes the xul/rdf architecture itself and outlines enhancements to the xul language in order to allow the markup language to reference local data and to indicate how and when it would like to be annotatable with local data.
...if the xul stream came from a local file, then rdf can either locally annotate the graph (just as before), or it can serialize the xul and write over the original file (thus allowing local changes to a local file to be reflected right in the xul).
...it's likely that this might be the desirable solution for buttons that observe preferences (like the home button) denoting persistence of local annotations to the aom: the persistent attribute a content tree in xul that wishes to allow persistent local annotations to be made to all the nodes in the subtree (including the node itself) must specify this capability using the persistent attribute.
...And 2 more matches
XUL controls - Archive of obsolete content
<colorpicker type="button" color="#cc0080"/> colorpicker reference <datepicker> a set of textboxes which may be used to allow the entry of a date.
... groupbox reference related elements: caption <filefield> allows the user to select a file.
... <scale min="1" max="10"/> scale reference <splitter> allows the user to adjust the division of space between elements.
...And 2 more matches
browser - Archive of obsolete content
droppedlinkhandler(event, uri, name) -- firefox 51 or older droppedlinkhandler(event, links) -- firefox 52 or newer event -- drop event, or null if no event is available uri -- uri string of the dropped link name -- name string of the dropped link links -- array of the dropped items with nsidroppedlinkitem interface homepage type: url this attribute allows you to set a homepage for the browser element.
...the content that is loaded inside the browser is not allowed to access the chrome above it.
...the content that is loaded inside the browser is not allowed to access the chrome above it.
...And 2 more matches
menuitem - Archive of obsolete content
attributes acceltext, accesskey, allowevents, autocheck, checked, closemenu, command, crop, description, disabled, image, key, label, name, selected, tabindex, type, validate, value properties accessibletype, accesskey, command, control, crop, disabled, image, label, labelelement, parentcontainer, selected, tabindex, value style classes menuitem-iconic, menuitem-non-iconic examples <menulist> <menupopup> <menuitem label="option 1" value="1"/> <menuitem label="option 2" value="2"/> <menuitem label="option 3" value="3"...
... allowevents type: boolean if true, events are passed to children of the element.
... the disabled attribute is allowed only for form controls.
...And 2 more matches
timepicker - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] the timepicker is used to allow the user to enter a time.
...arrow buttons next to the fields allow the values to be adjusted with the mouse.
... a fourth textbox appears for 12 hour clocks which allows selection of am or pm.
...And 2 more matches
tree - Archive of obsolete content
ArchiveMozillaXULtree
if you would like to allow the tree to be horizontally scrolled, simply set the width attributes for each column to make the tree wider than its containing object.
... the disabled attribute is allowed only for form controls.
... seltype type: one of the values below used to indicate whether multiple selection is allowed.
...And 2 more matches
treecol - Archive of obsolete content
you can also place splitter elements between the columns to allow column resizing.
... editable type: boolean allows the contents of cells in the column to be changed, especially useful when type="checkbox".
... the attribute also controls whether the column picker allows the user to deselect this column.
...And 2 more matches
window - Archive of obsolete content
this allows you to have a different icon for each window.
...ame" value="enter last name:"/> <textbox id="your-lname" value="hernandez"/> </hbox> <hbox> <button oncommand="alert('save!')"> <description>save</description> </button> </hbox> </vbox> </radiogroup> </groupbox> </vbox> </window> attributes accelerated type: booleanset this attribute to true to allow hardware layer managers to accelerate the window.
...this allows the window to draw in the title bar.
...And 2 more matches
2006-10-06 - Archive of obsolete content
as well as any protocols that you have implemented and are not in the list of protocols nsscriptsecuritymanager::checkloaduri feed: consensus is that it should be allowed and treated as an ordinary link.
... pcast: similar to feed: just differentiating between different types of feeds and should be allowed access.
... webcal: & swebcal: should also be allowed as the security manager doesn't differentiate between access types.
...And 2 more matches
Mozilla XForms Specials - Archive of obsolete content
instead of using digest('abc', 'sha-1') explicitly use the third parameter (the results are equal): digest('abc', 'sha-1', 'base64') (limitation tracked in bug 477857) extensions enumerating instances the standardized nsixformsmodelelement does not allow one to enumerate over all possible instances, but only to retrieve instances by their name.
...we have added a function via the getfeature() call on each node, that allows the form author to do that.
...custom control interface we have added a lot of functionality to our user interface, which allows the form authors to create custom controls.
...And 2 more matches
XForms Input Element - Archive of obsolete content
xforms inputs are most often used when a form author needs to allow for the input/output of simple text into an instance node.
... allows for free-form data entry (xhtml/xul).
...this widget allows the user to omit --- when a value is typed into control (xhtml only).
...And 2 more matches
Mozilla XForms User Interface - Archive of obsolete content
elements from the "form controls" group allows users to interact with instance data.
...range allows the user to choose a value from within a specific range of values.
...trigger allows the user to initiate actions (see the spec).
...And 2 more matches
Using the Right Markup to Invoke Plugins - Archive of obsolete content
future netscape browsers based on mozilla source code will allow the use of a special param element to specify where to get plugins that are not present, but this feature is not available in netscape 7.
... mozilla-based browsers such as netscape 7 also allow for a special classid attribute that can also be used.
... </a> </p> </object> the "java:" classid allows you to reference the class that provides the primary entry point.
...And 2 more matches
Game promotion - Game development
you'll get bonus points for allowing your users to directly play your games online — at least in demo form.
... also, you should do some work on seo to allow people to find your games more easily.
... game portals using game portals is mostly concerned with monetization, but if you're not planning to sell licenses to allow people to purchase your game and are intending to implement adverts or in-app purchases instead, promoting your game across free portals can be effective.
...And 2 more matches
CORS - MDN Web Docs Glossary: Definitions of Web-related terms
but cors gives web servers the ability to say they want to opt into allowing cross-origin access to their resources.
... learn more general knowledge cross-origin resource sharing (cors) on mdn cross-origin resource sharing on wikipedia cors headers access-control-allow-origin indicates whether the response can be shared.
... access-control-allow-credentials indicates whether or not the response to the request can be exposed when the credentials flag is true.
...And 2 more matches
XInclude - MDN Web Docs Glossary: Definitions of Web-related terms
xml inclusions (xinclude) is a w3c recommendation to allow inclusion of xml more different sources in a more convenient fashion than xml external entities.
...firefox does not support it natively, but the following function aims to allow its use with documents passed into it.
... (note that this has not been thoroughly tested for all circumstances and may not necessarily reflect the standard behavior completely.) note also that if you wish to allow xml:base, you will need the xml:base function, and the line beginning var href = ...
...And 2 more matches
Legacy layout methods - Learn web development
this knowledge will be helpful to you if you need to create fallback code for browsers that do not support newer methods, in addition to allowing you to work on existing projects which use these types of systems.
...we need to create an additional class to allow containers to span 2 to 12 columns.
... easier calculations using the calc() function you could use the calc() function to do the math right inside your css — this allows you to insert simple mathematical equations into your css values, to calculate what a value should be.
...And 2 more matches
CSS FAQ - Learn web development
LearnCSSHowtoCSS FAQ
modern browsers have two main rendering modes: quirks mode: also called backwards-compatibility mode, allows legacy webpages to be rendered as their authors intended, following the non-standard rendering rules used by older browsers.
...css allows you to apply styles to particular id and/or class names.
... classes allow you to style multiple elements, therefore they can lead to shorter stylesheets, rather than having to write out the same styling information in multiple rules that use id selectors.
...And 2 more matches
The web and web standards - Learn web development
they received a fair amount of interest, enough to convince timbl's bosses to allow him to go ahead and create a global hypertext system.
... this allows the web to remain a freely-available public resource.
... http hypertext transfer protocol, or http, is a messaging protocol that allows web browsers to communicate with web servers (where web sites are stored).
...And 2 more matches
General asynchronous programming concepts - Learn web development
it is up to the programming environment you are using (web browsers, in the case of web development) to provide you with apis that allow you to run such tasks asynchronously.
...web workers allow you to send some of the javascript processing off to a separate thread, called a worker so that you can run multiple javascript chunks simultaneously.
... to fix such problems, browsers allow us to run certain operations asynchronously.
...And 2 more matches
Graceful asynchronous programming with Promises - Learn web development
previous overview: asynchronous next promises are a comparatively new feature of the javascript language that allow you to defer further actions until after a previous action has completed, or respond to its failure.
... this doesn't do much more than it would if you just didn't bother including the .catch() block at all, but think about it — this allows us to control error handling exactly how we want.
...previously you'd have to include the same code in both the .then() and .catch() callbacks, for example: mypromise .then(response => { dosomething(response); runfinalcode(); }) .catch(e => { returnerror(e); runfinalcode(); }); in more recent modern browsers, the .finally() method is available, which can be chained onto the end of your regular promise chain allowing you to cut down on code repetition and do things more elegantly.
...And 2 more matches
Client-side tooling overview - Learn web development
transformation this stage of your web app lifecycle typically allows you to code in either "future code" (such as the latest css or javascript features that might not have native support in browsers yet) or code using another language entirely, such as typescript.
...good examples here include: babel: a javascript compiler that allows developers to write their code using cutting-edge javascript, which babel then takes and converts into old-fashioned javascript that more browsers can understand.
...for example: sass/scss: this css extension allows you to use variables, nested rules, mixins, functions, and many other features, some of which are available in native css (such as variables), and some of which aren't.
...And 2 more matches
Testopia
it is designed to be a generic tool for tracking test cases, allowing for testing organizations to integrate bug reporting with their test case run results.
... new reports: worst offender and case roll-up set priorities on indidual case-runs new clone options uses the latest extjs 3.0 library converts testopia into a true bugzilla extension numerous bug fixes integration points testopia integrates with bugzilla products, components, versions, and milestones to allow a single management interface for high level objects.
... testopia allows users to login to one tool and uses bugzilla group permissions to limit access to modifying test objects.
...And 2 more matches
Chrome registration
this allows translators to plug in a different chrome package to translate an application without altering the rest of the source code.
.../ are not allowed in the packagename.
...in order to allow for this, the chrome registration manifest allows for "override" instructions: override chrome://package/type/original-uri.whatever new-resolved-uri [flags] note: overrides are not recursive (so overriding chrome://foo/content/bar/ with file:///home/john/blah/ will not usually do what you want or expect it to do).
...And 2 more matches
Script security
the rules for determining whether an object is same-origin with another, and what access is allowed cross-origin, are now mostly standardized across browsers.
... objects in a privileged scope are allowed complete access to objects in a less privileged scope, but by default they see a restricted view of such objects, designed to prevent them from being tricked by the untrusted code.
... gecko guarantees that javascript code running in a given compartment is only allowed to access objects in the same compartment.
...And 2 more matches
Mozilla DOM Hacking Guide
other browsers allow the history object to be used like an array, e.g.
...when set, it allows us to define a getproperty() function on nshistorysh (the helper class for the history object), which will handle the array behavior.
...the part about componentregistrar is designed to allow external modules (in this case xpath) to be included in domclassinfo and as such benefit from the javascript benefits it provides.
...And 2 more matches
nss tech note3
bolyard this week at least 5 different people came to me with variants of the same question: what certificate extensions do i have to put into my cert for nss to allow it to be used for purpose <x>??
... the list of known seccertusages is short: certusagesslclient ........... an ssl client authentication cert certusagesslserver ........... an ordinary ssl server cert certusagesslserverwithstepup.. an ssl server cert that allows export clients to use strong crypto.
... certusagesslca ............... an intermediate or root ca cert allowed to issue ssl client or ssl server certs or other intermediate ssl ca certs.
...And 2 more matches
NSS tools : certutil
-a use ascii format or allow the use of ascii format for input or output.
...the format of the validity-time argument is yymmddhhmmss[+hhmm|-hhmm|z], which allows offsets to be set relative to the validity end time.
...any size between the minimum and maximum is allowed.
...And 2 more matches
certutil
-a use ascii format or allow the use of ascii format for input or output.
...the format of the validity-time argument is yymmddhhmmss[+hhmm|-hhmm|z], which allows offsets to be set relative to the validity end time.
...any size between the minimum and maximum is allowed.
...And 2 more matches
Rhino overview
rhino contains all the features of javascript 1.7 allows direct scripting of java a javascript shell for executing javascript scripts a javascript compiler to transform javascript source files into java class files a javascript debugger for scripts executed with rhino language the javascript language itself is standardized by standard ecma-262 ecmascript: a general purpose, cross-platform programming language.
... in addition, rhino has implemented javaadapters, which allows javascript to implement any java interface or extend any java class with a javascript object.
...these features allow "computational reflection": that is, the ability for a script to determine and influence aspects of the way it is evaluated.
...And 2 more matches
WebReplayRoadmap
new features are possible with time travel, though, which would be nice to support: supporting the debugger's event breakpoints would allow searching the recording for places where particular dom events occur, and -- in the same manner as logpoints -- logging them to the console and allowing them to be seeked to later.
... allowing css to be changed while paused somewhere in the recording and update graphics with the effects of those changes.
... the points in the recording where the mismatches occur can be identified, and the debugger can seek to those points to allow further investigation of the causes of the mismatch.
...And 2 more matches
XForms Accessibility
children mozilla xforms implementation allows form control elements to have child elements.
... range allows the user to choose a value from within a specific range of values (see the spec, the docs).
... trigger allows the user to initiate actions (see the spec, the docs).
...And 2 more matches
Component Internals
parameters passed to this startup call allow you to configure some aspects of xpcom, including the customization of location of specific directories.
...in order to support something like an "are you sure you want to quit" dialog, the application needs to provide a higher-level event (e.g., startshutdown()) which allows for cancellation.
...the module interface provides yet another abstraction - this time of the factories - and allows for multiple factory objects.
...And 2 more matches
Setting up the Gecko SDK
building a windows project this section is writting for those of you who do not wish to install visual studio or the express edition, allowing the user to be able to create commercial extensions without buying the full version of visual studio and allowing them to use their own editors.
... this allows you to created the component without sending any extra dlls set path=%path%;d:\projects\xulrunner-sdk\sdk\bin;d:\projects\xulrunner-sdk\bin this tells the command prompt where to find the gecko tools, importantly (xpidl, regxpcom, and gmake).
... also, if you notice, this turns on "xp_win" and "xp_win32" definitions, this allows xp and onward support.
...And 2 more matches
nsIIOService
implemented by @mozilla.org/network/io-service;1 as a service: var ioservice = components.classes["@mozilla.org/network/io-service;1"] .getservice(components.interfaces.nsiioservice); method overview boolean allowport(in long aport, in string ascheme); acstring extractscheme(in autf8string urlstring); unsigned long getprotocolflags(in string ascheme); nsiprotocolhandler getprotocolhandler(in string ascheme); nsichannel newchannel(in autf8string aspec, in string aorigincharset, in nsiuri abaseuri); obsolete since gecko 48 nsichannel newchannel2(in autf8string asp...
... methods allowport() checks if a port number is banned.
... is similar to nsiprotocolhandler.allowport().
...And 2 more matches
nsIMsgFolder
gned 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 nsimsgcopyservicelistener listener ); void copyfilemessage(in nsifi...
... invfeditsearchscope boolean readonly customidentity nsimsgidentity readonly: this allows a folder to have a special identity.
... knowssearchnntpextension boolean readonly allowsposting boolean readonly relativepathname acstring readonly sizeondisk unsigned long size of this folder on disk (not including .msf file) for imap, it's the sum of the size of the messages.
...And 2 more matches
nsIParentalControlsService
toolkit/components/parentalcontrols/public/nsiparentalcontrolsservice.idlscriptable this interface provides access to the operating system's parental controls feature, allowing code to detect whether such a service is enabled and to request overrides to bypass the feature.
...see the constants for allowed values.
... aflag pass true if the event was blocked or false if it was allowed.
...And 2 more matches
nsIPrincipal
nown 2 enable_with_user_permission 3 enable_granted 4 methods native code only!canenablecapability short canenablecapability( in string capability ); parameters capability missing description return value missing description exceptions thrown missing exception missing description checkmayload() checks whether this principal is allowed to load the network resource located at the given uri under the same-origin policy.
... this means that codebase principals are only allowed to load resources from the same domain, the system principal is allowed to load anything, and null principals are not allowed to load anything.
...if the load is allowed this function does nothing.
...And 2 more matches
nsISHistoryListener
return value true to allow the go back operation to proceed or false to cancel it.
... return value true to allow the go forward operation to proceed or false to cancel it.
... return value true to allow the operation to proceed or false to cancel it.
...And 2 more matches
nsISelection2
method overview void getrangesforinterval(in nsidomnode beginnode, in print32 beginoffset, in nsidomnode endnode, in print32 endoffset, in prbool allowadjacent, out pruint32 resultcount, [retval, array, size_is(resultcount)] out nsidomrange results); void getrangesforintervalcomarray(in nsidomnode beginnode, in print32 beginoffset, in nsidomnode endnode, in print32 endoffset, in prbool allowadjacent, in rangearray results); native code only!
... void getrangesforinterval( in nsidomnode beginnode, in print32 beginoffset, in nsidomnode endnode, in print32 endoffset, in prbool allowadjacent, out pruint32 resultcount, [retval, array, size_is(resultcount)] out nsidomrange results ); parameters beginnode beginoffset endnode endoffset these four parameters represent the range to compare against the selection.
... allowadjacent specifies whether the returned ranges are allowed to touch the input range rather than merely overlapping it.
...And 2 more matches
Index
this allows exposure of mailnews-specific data to user interface using rdf templates.
...this may seem like a lot of infrastructure just to read messages from a flat file, but it allows us to do it asynchronously, and to have reading local messages fit into the same kind of mechanisms that reading nntp and imap messages do - running urls, getting onstart/stoprunningurl notifications when the url starts/stops, etc.
... additionally, ad-hoc packages called try builds are made available on an as-needed basis to allow for testing of certain patches, and are typically announced in related bug reports.
...And 2 more matches
Set a breakpoint - Firefox Developer Tools
at this point you can do useful things like studying the value of different variables at that point, allowing you to work out why a problem is occurring.
...these are called column breakpoints, and allow you to set the breakpoint to happen exactly on any one of the function calls in the line (or multiple calls), by clicking on each relevant one.
... if the breakpoint is an unconditional breakpoint, you'll get an option add condition, which allows you to turn it into a conditional breakpoint.
...And 2 more matches
Dominators view - Firefox Developer Tools
if you already know what shallow size, retained size, and dominators are, skip to the dominators ui section.
... each entry displays: the retained size of the node, as bytes and as a percentage of the total the shallow size of the node, as bytes and as a percentage of the total the nodes's name and address in memory.
...you can also see that these objects have a relatively tiny "shallow size", so almost all of the retained size is in the objects that they dominate.
...And 2 more matches
DisplayMediaStreamConstraints.video - Web APIs
syntax displaymediastreamconstraints.video = allowvideoflag; displaymediastreamconstraints.video = mediatrackconstraints; displaymediastreamconstraints = { video: allowvideoflag | mediatrackconstraints; } value the value may be either a boolean or a mediatrackconstraints object.
...the value may be a single one of the following strings, or an array of them to allow the browser flexibility in deciding what to do about the cursor.
...this may be a single one of the following strings, or a list of them to allow multiple source surfaces: application the stream contains all of the windows of the application chosen by the user rendered into the one video track.
...And 2 more matches
FileSystemEntrySync - Web APIs
invalid_modification_err you tried one of the following disallowed operations: moving an entry into its parent without changing its name moving a parent directory into one of its child directories.
... [todo: verify ] no_modification_allowed_err one of the following is not writable: the source entry, its parent directory, and the target directory.
... invalid_modification_err you tried one of the following disallowed operations: moving an entry into its parent without changing its name moving a parent directory into one of its child directories.
...And 2 more matches
Using the Permissions API - Web APIs
historically, different apis handle their own permissions inconsistently — for example the notifications api allows for explicit checking of permission status and requesting permission, whereas the geolocation api doesn't (which causes problems if the user denied the initial permission request, as we'll see below).
... the permissions api provides the tools to allow developers to implement a better user experience as far as permissions are concerned.
... accessing the permissions api the navigator.permissions property has been added to the browser to allow access to the global permissions object.
...And 2 more matches
Storage Access API - Web APIs
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.
...the api therefore also adds the allow-storage-access-by-user-activation sandbox token.
... the embedding website needs to add this to allow storage access requests to be successful, along with allow-scripts and allow-same-origin to allow it to call the api, and execute in an origin that can have cookies: <iframe sandbox="allow-storage-access-by-user-activation allow-scripts allow-same-origin"> ...
...And 2 more matches
Streams API concepts - Web APIs
the streams api adds a very useful set of tools to the web platform, providing objects allowing javascript to programmatically access streams of data received over the network and process them as desired by the developer.
... the chunks inside the stream are read by a reader — this processes the data one chunk at a time, allowing you to do whatever kind of operation you want to do on it.
... there is also a construct you’ll use called a controller — each reader has an associated controller that allows you to control the stream (for example, to cancel it if wished).
...And 2 more matches
Basic concepts behind Web Audio API - Web APIs
audio graphs the web audio api involves handling audio operations inside an audio context, and has been designed to allow modular routing.
... audio data: what's in a sample when an audio signal is processed, sampling means the conversion of a continuous signal to a discrete signal; or put another way, a continuous sound wave, such as a band playing live, is converted to a sequence of samples (a discrete-time signal) that allow a computer to handle the audio in distinct blocks.
...the 44.1 khz sampling frequency allows for a 2.05 khz transition band.
...And 2 more matches
Using Web Workers - Web APIs
in this section we'll discuss the javascript found in our basic dedicated worker example (run dedicated worker): this allows you to enter two numbers to be multiplied together.
... in the worker, we can respond when the message is received by writing an event handler block like this (worker.js): onmessage = function(e) { console.log('message received from main script'); var workerresult = 'result: ' + (e.data[0] * e.data[1]); console.log('posting message back to main script'); postmessage(workerresult); } the onmessage handler allows us to run some code whenever a message is received, with the message itself being available in the message event's data attribute.
...however, if the script constructs a worker, code running in the worker's context will be allowed to use eval().
...And 2 more matches
Using XMLHttpRequest - Web APIs
what characters are not allowed?
...as long as the server is configured to allow requests from your web application's origin, xmlhttprequest will work.
..."&" : "?") + (new date()).gettime()); oreq.send(null); security firefox 3 note versions of firefox prior to firefox 3 allowed you to set the preference capability.policy.<policyname>.xmlhttprequest.open</policyname> to allaccess to give specific sites cross-site access.
...And 2 more matches
Cognitive accessibility - Accessibility
time it is important to allow users the time they require to complete tasks.
... timers options for adjusting time requirements include: allowing the user to turn off or adjust the time to at least 10 times the original limit before encountering it.
... provide a toggle on content that allows users to enable a longer session time limit, or no session time limit at all.
...And 2 more matches
Operable - Accessibility
completing a hotel or flight booking often has a time limit), the user should be given controls to allow them to adjust, extend or turn off the time limit.
... 2.2.6 timeouts (aaa) added in 2.1 if there is a timeout (caused by user inactivity) warn users at the start of a process so they will not be surprised that a timeout exists (or only allow the timeout to occur after 20 hours of inactivity.
... 2.3.3 animations from interactions (aaa) added in 2.1 allow users to disable animations from interactions (unless the animation is essential).
...And 2 more matches
:visited - CSS: Cascading Style Sheets
WebCSS:visited
styling restrictions for privacy reasons, browsers strictly limit which styles you can apply using this pseudo-class, and how they can be used: allowable css properties are color, background-color, border-color, border-bottom-color, border-left-color, border-right-color, border-top-color, column-rule-color, outline-color, text-decoration-color, and text-emphasis-color.
... allowable svg attributes are fill and stroke.
... the alpha component of the allowed styles will be ignored.
...And 2 more matches
Color picker tool - CSS: Cascading Style Sheets
sion : setprecision, setsensivity : setsensivity, getprecision : getprecision, createslider : createslider, }; })(); 'use strict'; window.addeventlistener("load", function() { colorpickertool.init(); }); var colorpickertool = (function colorpickertool() { /*========== get dom element by id ==========*/ function getelembyid(id) { return document.getelementbyid(id); } function allowdropevent(e) { e.preventdefault(); } /*========== make an element resizable relative to it's parent ==========*/ var uicomponent = (function uicomponent() { function makeresizable(elem, axis) { var valuex = 0; var valuey = 0; var action = 0; var resizestart = function resizestart(e) { e.stoppropagation(); e.preventdefault(); if (e.button !== 0) return; ...
...ample() { var node = document.createelement('div'); node.classname = 'sample'; this.uid = samples.length; this.index = nr_samples++; this.node = node; this.color = new color(base_color); node.setattribute('sample-id', this.uid); node.setattribute('draggable', 'true'); node.addeventlistener('dragstart', this.dragstart.bind(this)); node.addeventlistener('dragover' , allowdropevent); node.addeventlistener('drop' , this.dragdrop.bind(this)); this.updateposition(this.index); this.updatebgcolor(); samples.push(this); }; colorsample.prototype.updatebgcolor = function updatebgcolor() { this.node.style.backgroundcolor = this.color.getcolor(); }; colorsample.prototype.updateposition = function updateposition(index) { this.index = index; ...
...; trash_can = getelembyid('trash-can'); addsamplebutton.init(); for (var i=0; i<16; i++) { var sample = new colorsample(); container.appendchild(sample.node); } addsamplebutton.updateposition(samples.length); updateui(); active = samples[0]; active.activate(); container.addeventlistener('click', setactivatesample); trash_can.addeventlistener('dragover', allowdropevent); trash_can.addeventlistener('dragenter', function() { this.parentelement.setattribute('drag-state', 'enter'); }); trash_can.addeventlistener('dragleave', function(e) { this.parentelement.setattribute('drag-state', 'none'); }); trash_can.addeventlistener('drop', deletesample); uicolorpicker.subscribe('picker', function(color) { if (active) active.updat...
...And 2 more matches
filter - CSS: Cascading Style Sheets
WebCSSfilter
values of an amount over 100% are allowed, providing brighter results.
...values of an amount over 100% are allowed, providing results with more contrast.
...the function accepts a parameter of type <shadow> (defined in css3 backgrounds), with the exception that the inset keyword is not allowed.
...And 2 more matches
resize - CSS: Cascading Style Sheets
WebCSSresize
both the element displays a mechanism for allowing the user to resize it, which may be resized both horizontally and vertically.
... horizontal the element displays a mechanism for allowing the user to resize it in the horizontal direction.
... vertical the element displays a mechanism for allowing the user to resize it in the vertical direction.
...And 2 more matches
<time-percentage> - CSS: Cascading Style Sheets
syntax refer to the documentation for <time> and <percentage> for details of the individual syntaxes allowed by this type.
... examples use in calc() where a <time-percentage> is specified as an allowable type, this means that the percentage resolves to a time and therefore can be used in a calc() expression.
... valid percentages 50% +50% optional plus sign -50% negative percentages are not valid for all properties that accept percentages invalid percentages 50 % space not allowed between the space and the percentage sign valid times 12s positive integer -456ms negative integer 4.3ms non-integer 14ms the unit is case-insensitive, although capital letters are not recommended.
...And 2 more matches
Constraint validation - Developer guides
by setting values on validation-related attributes, allowing basic constraints to be described in a simple way, without the need for javascript.
...the constraint validation is done in the following ways: by a call to the checkvalidity() or reportvalidity() method of a form-associated dom interface, (htmlinputelement, htmlselectelement, htmlbuttonelement, htmloutputelement or htmltextareaelement), which evaluates the constraints only on this element, allowing a script to get this information.
...not only do most countries allow an optional prefix with the country code (like d- in germany, f- in france or switzerland), but some countries have postal codes with only a fixed number of digits; others, like the uk, have more complex structures, allowing letters at some specific positions.
...And 2 more matches
HTML attribute: accept - HTML: Hypertext Markup Language
the accept attribute takes as its value a comma-separated list of one or more file types, or unique file type specifiers, describing which file types to allow.
... <p> <label for="soundfile">select an audio file:</label> <input type="file" id="soundfile" accept="audio/*"> </p> <p> <label for="videofile">select a video file:</label> <input type="file" id="videofile" accept="video/*"> </p> <p> <label for="imagefile">select some images:</label> <input type="file" id="imagefile" accept="image/*" multiple> </p> note the last example allows you to select multiple iamges.
... regardless of the user's device or operating system, the file input provides a button that opens up a file picker dialog that allows the user to choose a file.
...And 2 more matches
<input type="datetime-local"> - HTML: Hypertext Markup Language
in other words, an implementation should allow any valid combination of year, month, day, hour, and minute - even if such a combination is invalid in the user's local time zone (such as times within a daylight saving time spring-forward transition gap).
...clicking the down arrow on the right hand side brings up a date picker to allow you to choose a date; you have to enter the time manually.
... a string value of any means that no stepping is implied, and any value is allowed (barring other constraints, such as min and max).
...And 2 more matches
<input type="tel"> - HTML: Hypertext Markup Language
WebHTMLElementinputtel
attribute description autocorrect whether or not to allow autocorrect while editing this input field.
... <input id="telno" name="telno" type="tel" placeholder="123-4567-8901"> controlling the input size you can control not only the physical length of the input box, but also the minimum and maximum lengths allowed for the input text itself.
...this doesn't limit the user to those options, but does allow them to select commonly-used telephone numbers more quickly.
...And 2 more matches
Cross-Origin-Opener-Policy - HTTP
the http cross-origin-opener-policy (coop) response header allows you to ensure a top-level document does not share a browsing context group with cross-origin documents.
...this allows you to have more control over references to a window than rel=noopener, which only affects outgoing navigations.
... header type response header forbidden header name no syntax cross-origin-opener-policy: unsafe-none | same-origin-allow-popups | same-origin directives unsafe-none this is the default value.
...And 2 more matches
Details of the object model - JavaScript
because of this different basis, it can be less apparent how javascript allows you to create hierarchies of objects and to have inheritance of properties and their values.
...in addition, any object can be associated as the prototype for another object, allowing the second object to share the first object's properties.
... javascript implements inheritance by allowing you to associate a prototypical object with any constructor function.
...And 2 more matches
Template literals (Template strings) - JavaScript
template literals are string literals allowing embedded expressions.
...within a backticked template, it is simple to allow inner backticks simply by using them inside a placeholder ${ } within the template.
... tags allow you to parse template literals with a function.
...And 2 more matches
Trailing commas - JavaScript
javascript has allowed trailing commas in array literals since the beginning, and later added them to object literals (ecmascript 5) and most recently (ecmascript 2017) to function parameters.
... json, however, disallows trailing commas.
... var arr = [1, 2, 3,,,]; arr.length; // 5 objects starting with ecmascript 5, trailing commas in object literals are legal as well: var object = { foo: "bar", baz: "qwerty", age: 42, }; trailing commas in functions ecmascript 2017 allows trailing commas in function parameter lists.
...And 2 more matches
Web audio codec guide - Web media technologies
in addition to providing audio for specific speakers in a sound system, some codecs may allow audio channels to be used to provide alternative audio, such as vocals in different languages or descriptive audio for visually impaired people.
...practice 64 kbps is always used g.722 annex b super wide-band: 64 kbps, 80 kbps, and 96 kbps g.722 annex d stereo wide-band: 64 kbps and 80 kbps g.722 annex d stereo super wide-band: 80 kbps, 96 kbps, 112 kbps, and 128 kbps variable bit rate (vbr) support no supported sample formats 14-bit integer supported sample rates 16 khz (adpcm is specified to allow 8 khz, 11.025 khz, 22.05 khz, 44.1 khz, but g.722 uses 16 khz) recommended minimum bit rate for stereo sound 128 kbps at 44.1 khz sample rate compression lossy maximum audio channels 2 audio frequency bandwidth 50 hz - 7 khz latency 4 ms browser compatibility feature chrome edge ...
...in addition, there is an optional part of the opus specification (opus custom) that does allow for non-standard sample rates, but the use of this feature is discouraged.
...And 2 more matches
Progressive web app structure - Progressive web apps (PWAs)
client-side rendering (csr) allows the website to be updated in the browser almost instantly when navigating to different pages, but requires more of an initial download hit and extra rendering on the client at the beginning.
...it also allows the website to be accessible offline if the network connection is not available.
... this architecture allows a website to benefit the most from all the pwa features — it caches the app shell and manages the dynamic content in a way that greatly improves the performance.
...And 2 more matches
The building blocks of responsive design - Progressive web apps (PWAs)
we've written a simple-but-fun prototype for an application called snapshot, which takes a video stream from your webcam (using getusermedia()) then allows you to capture stills from that video stream (using html5 <canvas>), and save them to a gallery.
... note: media queries are a css3 feature that allow you to selectively apply css depending on the results of media feature tests — for more on the basics, read media queries.
... <source src="videos/320/crystal320.mp4" type="video/mp4" media="all and (max-width: 480px)"> <source src="videos/320/crystal320.webm" type="video/webm" media="all and (max-width: 480px)"> <source src="videos/720/crystal720.mp4" type="video/mp4" media="all and (min-width: 481px)"> <source src="videos/720/crystal720.webm" type="video/webm" media="all and (min-width: 481px)"> </video> this allows your site to serve different video files based on the available space, in order to optimize the user's experience.
...And 2 more matches
Structural overview of progressive web apps - Progressive web apps (PWAs)
client-side rendering (csr) allows the website to be updated in the browser almost instantly when navigating to different pages, but requires more of an initial download hit and extra rendering on the client at the beginning.
...it also allows the website to be accessible offline if the network connection is not available.
... benefits of the app shell pattern this architecture allows a web site to benefit the most from all the pwa features — it caches the app shell and manages the dynamic content in a way that greatly improves the performance.
...And 2 more matches
Web security
this secure connection allows clients to be sure that they are connected with the intended server, and to exchange sensitive data.
...it works by allowing you to provide a cryptographic hash that a fetched resource must match.
... http access-control-allow-origin the access-control-allow-origin response header indicates whether the response can be shared with requesting code from the given origin.
...And 2 more matches
Web Components
web components is a suite of different technologies allowing you to create reusable custom elements — with their functionality encapsulated away from the rest of your code — and utilize them in your web apps.
... custom elements: a set of javascript apis that allow you to define custom elements and their behaviour, which can then be used as desired in your user interface.
... extensions for creating custom built-in elements the is global html attribute: allows you to specify that a standard html element should behave like a registered custom built-in element.
...And 2 more matches
page-worker - Archive of obsolete content
allow object an object with keys to configure the permissions on the page worker.
... the boolean key script controls if scripts from the page are allowed to run.
... properties port object that allows you to: send events to the content script using the port.emit function receive events from the content script using the port.on function see the guide to communicating using port for details.
... allow a object describing permissions for the content.
panel - Archive of obsolete content
allow object an optional object describing permissions for the content.
... if the options argument is given, it will be shallow merged with the options provided in the constructor: the options passed in the show method takes precedence.
... properties port eventemitter object that allows you to: send events to the content script using the port.emit function receive events from the content script using the port.on function see the guide to communicating using port for details.
... allow an object describing permissions for the content.
frame/utils - Archive of obsolete content
execution of scripts may easily be enabled: let { open } = require('sdk/window/utils'); let { create } = require('sdk/frame/utils'); let window = open('data:text/html,top'); let frame = create(window.document, { uri: 'data:text/html,<script>console.log("running");</script>', allowjavascript: true }); } globals functions create(document, options) creates a xul browser element in a privileged document.
... allowauth boolean whether to allow auth dialogs.
... allowjavascript boolean whether to allow javascript execution.
... allowplugins boolean whether to allow plugin execution.
Enhanced Extension Installation - Archive of obsolete content
the extension manager loads the xml/rdf datasources (this is allowable and necessary because a major change has happened) and gets a list of all items that need to be installed (tracked using a tobeinstalled flag on the item in the datasource).
...this allows the user to shield items installed at lower locations by installing items at higher locations.
...this should prevent against random file deletions and allow developers to easily reset their state by deleting one of the required system files.
...this allows for the removal of the installlogreader/writer objects in the extension manager.
Appendix: What you should know about open-source software licenses - Archive of obsolete content
however, source code that is dual-licensed with either the mpl or gpl allows additions or linkages with gpl source code.
... document licenses as open-source software grows in popularity, people have begun thinking about applying its principles to content other than software, to allow anyone to duplicate, distribute, and modify it freely.
...the debian project, however, considers its terms too harsh, and that it does not allow for the free distribution of documents.
... it is particularly convenient in the way that it allows creators to decide whether to permit commercial uses or not, whether to enforce copyleft or not, etc.
Appendix E: DOM Building and Insertion (HTML & XUL) - Archive of obsolete content
* @param {boolean} allowstyle if true, allow <style> nodes and * style attributes in the parsed fragment.
... */ function parsehtml(doc, html, allowstyle, baseuri, isxml) { let parser_utils = "@mozilla.org/parserutils;1"; // user the newer nsiparserutils on versions that support it.
... if (parser_utils in cc) { let parser = cc[parser_utils] .getservice(ci.nsiparserutils); if ("parsefragment" in parser) return parser.parsefragment(html, allowstyle ?
... parser.sanitizerallowstyle : 0, !!isxml, baseuri, doc.documentelement); } return cc["@mozilla.org/feed-unescapehtml;1"] .getservice(ci.nsiscriptableunescapehtml) .parsefragment(html, !!isxml, baseuri, doc.documentelement); } the returned fragment may be appended to any element in the given document.
The Box Model - Archive of obsolete content
using the former allows the ui to scale proportionately depending on font size settings, which are often changed by users with accessibility limitations.
...here's a typical usage of the label element: <label control="xulschoolhello-greeting-textbox" value="&xulschoolhello.typegreeting.label;" /> <textbox id="xulschoolhello-greeting-textbox" /> the label says something like "type a greeting message", and the textbox next to it allows the user to type the message.
...for instance, templates don't allow you to set the internal text in a description element in a way that it wraps properly.
...if the line of text is longer than its container will allow, the text will be cut, showing "..." in the place where it was cut.
Tabbed browser - Archive of obsolete content
openuilinkin( url, where, allowthirdpartyfixup, postdata, referrerurl ) where: "current" current tab (if there aren't any browser windows, then in a new window instead) "tab" new tab (if there aren't any browser windows, then in a new window instead) "tabshifted" same as "tab" but in background if default is to select new tabs, and vice versa "window" new window "save" save to disk (with no filename hint!) op...
...enuilink( url, e, ignorebutton, ignorealt, allowkeywordfixup, postdata, referrerurl ) the following code will open a url in a new tab, an existing tab, or an existing window based on which mouse button was pressed and which hotkeys (ex: ctrl) are being held.
...lization var container = gbrowser.tabcontainer; container.addeventlistener("tabpinned", exampletabpinned, false); container.addeventlistener("tabunpinned", exampletabunpinned, false); // when no longer needed container.removeeventlistener("tabpinned", exampletabpinned, false); container.removeeventlistener("tabunpinned", exampletabunpinned, false); detecting tab selection the following code allows you to detect when a new tab is selected in the browser: function exampletabselected(event) { var browser = gbrowser.selectedbrowser; // browser is the xul element of the browser that's just been selected } // during initialisation var container = gbrowser.tabcontainer; container.addeventlistener("tabselect", exampletabselected, false); // when no longer needed container.removeeventlisten...
...er("tabselect", exampletabselected, false); getting document of currently selected tab the following code allows you to retrieve the document that is in the selected tab.
An Interview With Douglas Bowman of Wired News - Archive of obsolete content
wired news redesign in a nutshell driven by xhtml 1.0 transitional and css; allows centralized control over layout and appearance for thousands of pages; simple markup allows for rapid changes to templates; average page weight dropped by almost half; page layout accomplished with simple css positioning; vastly increased accessibility without special coding or user agent detection.
... using absolute positioning for left and right columns allowed the markup for each column to fall in any order.
...but positioning did allow the center column to fall first in the markup.
...this allows us to temporarily display on screen the same formatting to be used for printing that page.
Style System Overview - Archive of obsolete content
style context api the style context api allows data to be obtained through a set of structs (see nsstylestruct.h).
...the rule tree allows sharing.
... to allow for optimizations, each style struct contains only inherited properties or only “reset” properties.
... as for other style changes, we have to “walk” the rule tree and clear all the style data coming from the old inline style nsistylerule, since there could be an !important rule that overrides it, which would allow dynamic changes to put the style attribute in multiple places in the rule tree.
Plug-n-Hack - Archive of obsolete content
pnh allows security tools to declare the functionality that they support which is suitable for invoking directly from the browser.
... a browser that supports pnh can then allow the user to invoke such functionality without having to switch to and from the tool.
... while some of the pnh capabilities do have a fixed meaning, particularly around proxy configuration, most of the capabilities are completely generic, allowing tools to expose whatever functionality they want.
...plug-n-hack topics phase 1 this provides simplified integration and allows tools to advertize their capabilities to browsers phase 2 this will allow browsers to advertize their capabilities to security tools tools supporting pnh the browsers and tools known to support or be working on support for pnh get involved how to implement pnh in your tool or get involved with pnh development ...
Manifest Files - Archive of obsolete content
three overlays are also specified, which allow content from different packages to combine together.
...while they may be installed from any site, other sites are not configured to allow installations by default.
...this allows you to copy files to any location and perform other file management tasks.
...this allows a separate executable file, and the application may be distributed independently of a browser.
Numeric Controls - Archive of obsolete content
other characters are not allowed and are just ignored if typed.
... in addition, arrow buttons appear beside the textbox to allow the user to cycle through the values.
...the default value is 1, but specifying a different value allows the number to change by a larger amount.
...date and time entry fields the datepicker and timepicker elements may be used to allow the user to enter dates and times.
XUL element attributes - Archive of obsolete content
allowevents type: boolean if true, events are passed to children of the element.
... allownegativeassertions type: boolean valid on any element that has a datasources attribute.
...this attribute, if true, which is the default, allows a datasource to negate an earlier assertion.
...this attribute, if true, which is the default, allows a datasource to negate an earlier assertion.
iframe - Archive of obsolete content
the content that is loaded inside the browser is not allowed to access the chrome above it.
...the content that is loaded inside the browser is not allowed to access the chrome above it.
...the content that is loaded inside the browser is not allowed to access the chrome above it.
...this can be used to workaround things like bug 540911 inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortd...
listbox - Archive of obsolete content
there are numerous methods which allow the items in the listbox to be retrieved and modified.
... the disabled attribute is allowed only for form controls.
... seltype type: one of the values below used to indicate whether multiple selection is allowed.
... value type: string the string attribute allows you to associate a data value with an element.
menu - Archive of obsolete content
ArchiveMozillaXULmenu
attributes acceltext, accesskey, allowevents, command, crop, disabled, image, label, menuactive, open, sizetopopup, tabindex, value properties accessibletype, accesskey, command, control, crop, disabled, image, itemcount, label, labelelement, menupopup, open, parentcontainer, selected, tabindex, value methods appenditem, getindexofitem, getitematindex, insertitemat, removeitemat style classes menu-iconic example <menubar id="sample-...
... allowevents type: boolean if true, events are passed to children of the element.
... the disabled attribute is allowed only for form controls.
... value type: string the string attribute allows you to associate a data value with an element.
menuseparator - Archive of obsolete content
attributes acceltext, accesskey, allowevents, command, crop, disabled, image, label, selected, tabindex, value properties accessibletype, accesskey, command, control, crop, disabled, image, label, labelelement, parentcontainer, selected, tabindex, value examples <menu label="menu"> <menupopup> <menuitem label="item1"/> <menuseparator/> <menuitem label="item2"/> <menuitem label="item3"/> </menupopup> </menu> attributes acceltext type: string text that appears beside the menu label to indicate the shortcut k...
... allowevents type: boolean if true, events are passed to children of the element.
... the disabled attribute is allowed only for form controls.
... value type: string the string attribute allows you to associate a data value with an element.
scale - Archive of obsolete content
ArchiveMozillaXULscale
« xul reference home [ examples | attributes | properties | methods | related ] a scale (sometimes referred to as a "slider") allows the user to select a value from a range.
... a bar displayed either horizontally or vertically allows the user to select a value by dragging a thumb on the bar.
... the disabled attribute is allowed only for form controls.
... value type: string the string attribute allows you to associate a data value with an element.
titlebar - Archive of obsolete content
if you don't want this behavior, you can override it by setting allowevents="true" on the titlebar element.
... style="background: rgba(30, 30, 30, 0.9); -moz-border-radius: 10px; -moz-box-shadow: 0 1px 8px rgba(0, 0, 0, 0.8); margin: 8px 12px 16px;"/> </window> it can be opened from the error console like this: open("file:///users/markus/sites/hudwindow.xul", "", "chrome=1, titlebar=0") attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortd...
...irection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width note: the allowevents attribute did not work for title bars prior to firefox 3.
... properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(...
calICalendarView - Archive of obsolete content
this allows lack of required predictability allows calicalendarview implementations to be re-used in a variety of sitatuations.
...this link allows the calicalendarview to have a way of creating, modifying, and deleting events based on user interaction with the dom nodes it controls, often without requiring any other user interaction.
... supportsdisjointdates consumers of calicalendarview should check this attribute to determine whether or not the implementation allows for calls to setdatelist.
... if an implementation returns true for this attribute, it must allow for any arbitrary set of dates to be displayed.
E4X for templating - Archive of obsolete content
rn strs.formatstringfromname(msg,args,args.length); } return strs.getstringfromname(msg); } for example, <toolbarbutton label={$s('mytoolbar.label')}/> conditionals function _if (cond, h, _else) { if (cond && cond != undefined) { // we need undefined condition for e4x return h(cond); } else if (_else) { return _else(cond); } return ''; // empty string allows conditions in attribute as well as element content } for example: {_if(elems.length(), function () <description>{elems[0]}</description>, function _else () <label>no data</label> )} note that the simple xmllist() constructor (<></>) may be useful to still be able to use an expression closure (i.e., without needing return statements and braces): {_if(elems.length(), function () <> ...
...unctions can also be easily serialized inline (and then perhaps converted to the dom) as needed: var list = <>{_if(elems.length(), function () <> <markup/> <markup/> </>)}</>.toxmlstring(); iterating functions such as the following foreach (which can work with arrays, objects, or e4x objects) are quite convenient in iterating over complex structures such as e4x would not normally allow.
...although a big advantage of e4x is being able to separate presentation from business logic, and the above-mentioned technique may fly in the face of this, if formatted well, it can also allow inline shaping of xml somewhat akin to the w3c standard xquery language, allowing the scripting to mix in context with the surrounding declarative xml: var a = <a><b/><c/><d/></a>; var b = <bar>{function () { var content = <></>; for each (var el in a) { el.@att = 'val'; content += el; } return content; }()}</bar>; giving: <bar> <b att="val"/> <c att="val"/> ...
... <d att="val"/> </bar> one may still wish to remove complex business logic and supply as variables to the e4x, but the above allows the shaping of resulting content to be made more clear (and sometimes design logic also calls for extra processing).
Back to the Server: Server-Side JavaScript On The Rise - Archive of obsolete content
runat=”server-proxy” – allows for the exposure of server-side javascript functions to the browser.
...if you intend to allow the execution of server-side javascript from the client-side, you can correct the code in listing 1 by doing one of three things.
...since jaxer allows you to define which code is reserved for the server-side, which code stays on the client-side, and which code is shared between the two, it's very possible to produce a single page application which could also include any number of external assets such as a popular third party framework.
...there are numerous methods in this namespace which allow for a simple, yet powerful approach to file management.
XForms Custom Controls - Archive of obsolete content
this will allow you to bind your custom control for the data type that you are targeting and any type derived from that target type.
...this will also allow you to be up to date with our current approaches (often the result of hard-learned lessons) and that will hopefully help you to more easily write your own controls.
...nsixformsaccessors the nsixformsaccessors interface allows access to the value and the state of the instance node that the control is bound to (see extensions/xforms/nsixformsaccessors.idl).
...these are: xformswidget-general - defines utility properties and methods common for all xforms controls xformswidget-accessors - defines the methods that are allow the bindings to work with bound instance nodes and the xforms element itself.
Obsolete: XPCOM-based scripting for NPAPI plugins - Archive of obsolete content
the new mozilla xpcom architecture allows xpcom components be scriptable via a different mechanism called xpconnect.
...the changes allow to make existing 4.x plugins scriptable with only minor modifications in their code.
...scriptable instance class #include "nsitestplugin.h" #include "nsiclassinfo.h" // we must implement nsiclassinfo because it signals the // mozilla security manager to allow calls from javascript.
... // helper class to implement all necessary nsiclassinfo method stubs // and to set flags used by the security system class nsclassinfomixin : public nsiclassinfo { // these flags are used by the dom and security systems to signal that // javascript callers are allowed to call this object's scritable methods.
Anatomy of a video game - Game development
being more specific with the browser about when your function needs to be called allows the browser to optimize when it is called.
... timing the main loop to when the browser paints to the display allows you to run your loop as frequently as the browser wants to paint.
... note: systems (hardware or software) that are not capable of microsecond accuracy are allowed to provide millisecond accuracy as a minimum.
...the update method sets checkpoints and, as frequently as the system allows, the render method draws instants of time around them.
Tiles and tilemaps overview - Game development
square tiles allow for two perspectives: top-down (like many rpg's or strategy games like warcraft 2 or final fantasy's world view.) side-view (like platformers such as super mario bros.) static tilemaps a tilemap can either fit into the visible screen area screen or be larger.
...they can follow a character — like in platformers or rpgs — or allow the player to control the camera — like in strategy or simulation games.
...this allows us to have a richer game world with less tiles, since the same image can be used with different backgrounds.
... if characters or other game sprites are drawn in the middle of the layer stack, this allows for interesting effects such as having characters walking behind trees or buildings.
Accessible multimedia - Learn web development
the problem with native html5 controls html5 video and audio instances even come with a set of inbuilt controls that allow you to control the media straight out of the box.
... creating custom audio and video controls html5 video and audio share an api — html media element — which allows you to map custom functionality to buttons and other controls — both of which you define yourself.
...you can find the example that goes along with this article on github, written by ian devlin (see the source code too.) this example uses some javascript to allow users to choose between different subtitles.
...text tracks even allow search engines to link directly to a spot partway through the video.
Responsive design - Learn web development
as more diverse screen sizes became available, the concept of responsive web design (rwd) appeared, a set of practices that allows web pages to alter their layout and appearance to suit different screen widths, resolutions, etc.
...media queries allow us to run a series of tests (e.g.
... css grid in css grid layout the fr unit allows the distribution of available space across grid tracks.
...users should be allowed to zoom as much or as little as they need to; preventing this causes accessibility problems.
Web fonts - Learn web development
in this article we will go further, exploring web fonts in detail — these allow you to download custom fonts along with your web page, to allow for more varied, custom text styling.
...web fonts are a css feature that allows you to specify font files to be downloaded along with your website as it is accessed, meaning that any browser that supports web fonts can have exactly the fonts you specify available to it.
...the latter part in each case is optional, but it is useful to declare it because it allows browsers to find a font they can use faster.
... variable fonts there is a newer font technology available in browsers called variable fonts — these are fonts that allow many different variations of a typeface to be incorporated into a single file, rather than having a separate font file for every width, weight, or style.
Sending form data - Learn web development
<?php // the global $_post variable allows you to access the data sent with the post method by name // to access the data sent with the get method, you can use $_get $say = htmlspecialchars($_post['say']); $to = htmlspecialchars($_post['to']); echo $say, ' ', $to; ?> this example displays a page with the data we sent.
... include one or more <input type="file"> controls to allow your users to select the file(s) that will be uploaded.
... limit the incoming amount of data to allow only what's necessary.
...store them on a different server and allow access to the file only through a different subdomain or even better through a completely different domain.
JavaScript basics - Learn web development
third-party apis that allow developers to incorporate functionality in sites from other content providers, such as twitter or facebook.
... let myvariable = true; array this is a structure that allows you to store multiple values in a single reference.
...next, the code calls on an api localstorage, which allows us to store data in the browser and retrieve it later.
...this allows the user to enter a different name by pressing the button.
Publishing your website - Learn web development
all registrars will have a feature to allow you to check if the domain name you want is available.
...it allows you to upload code repositories for storage in the git version control system.
...github has a very useful feature called github pages, which allows you to expose website code live on the web.
... using a web-based ide such as codepen there are a number of web apps that emulate a website development environment, allowing you to enter html, css and javascript, and then display the result of that code as a website — all in one browser tab.
Responsive images - Learn web development
let's run through the contents of each now: srcset defines the set of images we will allow the browser to choose between, and what size each image is.
... resolution switching: same size, different resolutions if you're supporting multiple display resolutions, but everyone sees your image at the same real-world size on the screen, you can allow the browser to choose an appropriate resolution image by using srcset with x-descriptors and without sizes — a somewhat easier syntax!
...the <picture> element allows us to implement just this kind of solution.
... this code allows us to display a suitable image on both wide screen and narrow screen displays, as shown below: note: you should use the media attribute only in art direction scenarios; when you do use media, don't also offer media conditions within the sizes attribute.
HTML table basics - Learn web development
LearnHTMLTablesBasics
a table allows you to quickly and easily look up values that indicate some kind of connection between different types of data, for example a person and their age, or a day of the week, or the timetable for a local swimming pool.
... tables headers also have an added benefit — along with the scope attribute (which we'll learn about in the next article), they allow you to make tables more accessible by associating each header with all the data in the same row or column.
... allowing cells to span multiple rows and columns sometimes we want cells to span multiple rows or columns.
...fortunately, table headers and cells have the colspan and rowspan attributes, which allow us to do just those things.
Client-Server Overview - Learn web development
http/1.1 200 ok server: apache x-backend-server: developer1.webapp.scl3.mozilla.com vary: accept,cookie, accept-encoding content-type: text/html; charset=utf-8 date: wed, 07 sep 2016 00:11:31 gmt keep-alive: timeout=5, max=999 connection: keep-alive x-frame-options: deny allow: get x-cache-info: caching content-length: 41823 <!doctype html> <html lang="en-us" dir="ltr" class="redesign no-js" data-ffo-opensanslight=false data-ffo-opensans=false > <head prefix="og: http://ogp.me/ns#"> <meta charset="utf-8"> <meta http-equiv="x-ua-compatible" content="ie=edge"> <script>(function(d) { d.classname = d.classname.replace(/\bno-js/, ''); })(document.documentelement);...
...the x-frame-options: deny line tells the browser not to allow this page to be embedded in an <iframe> in another site).
...this has major advantages over a static site: using a database allows the product information to be stored efficiently in an easily extensible, modifiable, and searchable way.
...you don't need to know how regular expressions work at this point, other than that they allow us to match patterns in the url (rather than the hard coded values above) and use them as parameters in our view functions.
React interactivity: Events and state - Learn web development
previous overview: client-side javascript frameworks next with our component plan worked out, it's now time to start updating our app from a completely static ui to one that actually allows us to interact and change things.
... react provides a variety of special functions that allow us to provide new capabilities to components, like state.
...in form.js, change your very first line so that it reads like this: import react, { usestate } from "react"; this allows us to import the usestate() function by itself, and utilize it anywhere in this file.
...__lg" name="text" autocomplete="off" value={name} onchange={handlechange} /> <button type="submit" classname="btn btn__primary btn__lg"> add </button> </form> ); } export default form; putting it all together: adding a task now that we've practiced with events, callback props, and hooks we're ready to write functionality that will allow a user to add a new task from their browser.
Command line crash course - Learn web development
better programs exist for providing a terminal experience on windows, such as powershell (see here to find installers), and gitbash (which comes as part of the git for windows toolset) however, the best option for windows in the modern day is the windows subsystem for linux (wsl) — a compatibility layer for running linux operating systems directly from inside windows 10, allowing you to run a “true terminal” directly on windows, without needing a virtual machine.
... note: many terminal commands allow you to use asterisks as "wild card" characters, meaning "any sequence of characters".
... this allows you to run an operation against a potentially large number of files at once, all of which match the specified pattern.
... the pipe operator can connect these inputs and outputs together, allowing us to build up increasingly more complex operations to suit our needs — the output from one command can become the input to the next command.
Accessibility API cross-reference
<h> is also available but its use is not recommended because of lack of suitable tools - and the heading level is undefined click on this thing and then click on the item for tooltip style help helpballoon n/a n/a n/a editable field that allows user to assign a key combination hotkeyfield n/a n/a n/a graphic that indicates something, such as an arrow indicator n/a n/a n/a abstract role - a generic type of widget that allows user input.
... sectionhead (abstract role) a form widget that allows the user to make selections from a set of choices.
... n/a n/a aria-errormessage an item that has been expanded, such as a tree item or accordion expanded expanded expanded aria-expanded=true indicates this object allows progressive disclosure of its children.
...presence of the aria-expanded attribute, regardless of value can extend selection extselectable n/a n/a not clipped to boundary of parent, does not auto-move with parent floating n/a n/a identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion, allows assistive technology to override the general default of reading in document source order.
Gecko info for Windows accessibility vendors
this is done to ensure a common look and feel across all supported platforms, and to allow for different skins (appearances).
...these roles can occur on content because of the new accessible dhtml technology which allows the author to specify the type of document or container.
... the domenum { navrelation_flows_to = 0x1006 }; enum { navrelation_flows_from = 0x1007 }; these two relations allow the reading flow to break out of the normal dom flow.
...previously it was not posible to make this accessible, but firefox 1.5 supports accessible dhtml, which allows authors to make advanced widgets and web applications accessible.
Android-specific test suites
disabling one failing test in general, it's not sensible to allow java code that doesn't observe the existing coding style; in this respect, this job is equivalent to the eslint jobs that check the javascript coding style throughout the tree.
... using this suite will allow the code to be analyzed to spot any design flaws or potential bugs.
... disabling one failing test in general, it's not sensible to allow new java code to land that findbugs detects issues with.
... disabling one failing test in general, it's not sensible to allow new java code to land that lint detects issues with.
Makefile - variables
local_includes allow use of moz_objdir in .mozconfig with older gnu gcc on beos.
... moz_url_classifier moz_widget_toolkit android, beos, cocoa, gtk2, os2, qt, windows moz_xpctools moz_xul moz_x11 test variable description enable_tests boolean value that should wrapper all unit tests to allow disabling on demand[1].
... sdk_headers makefile generation description no_makefile_rule [pending] inhibit makefile.in deps that would allow $obj/makefile to be generated.
... l10nbasedir moz_chrome_multilocale a list of locale names to process moz_chrome_file_format both, file, jar, omni, symlink packager_no_libs hack to allow one makefile to include another without pulling in libs:: target definitions.
Eclipse CDT
although eclipse doesn't do fuzzy matching when you type a file name, it does allow you to use wildcards.
... note that the search, call hierarchy, and other tabs have a "pin" button that allows you to open multiple tabs of these type.
...when the object directory is inside the source directory (and not filtered out by a resource filter), then eclipse's "allow heuristic resolution of includes" option (enabled by default) will generally allow the included headers to be found when eclipse processes source files, that don't have any build output parser data.
...this option allows to have multiple definitions for the same header file, which might fix this issue.
Performance best practices for Firefox front-end engineers
if you need more elevated privileges than a standard worker allows, consider using a chromeworker, which is a firefox-only api which lets you create workers with more elevated privileges.
...this allows you to put all of your dom writes (most importantly, anything that could change the size or position of things in the dom) just before the style and layout steps of the pipeline, combining all the style and layout calculations into a single batch so it all happens once, in a single frame tick, instead of across multiple frames.
... nsidomwindowutils.getboundswithoutflushing() getboundswithoutflushing() does exactly what its name suggests: it allows you to get the bounds rectangle for a dom node contained in a window without flushing layout.
... this means that the information you get is potentially out-of-date, but allows you to avoid a sync reflow.
Using the Browser API
MozillaGeckoChromeAPIBrowser APIUsing
the html browser api is an extension of the html <iframe> element that allows web apps to implement browsers or browser-like applications.
... demo to demonstrate basic usage of this api, we have created a simple browser api demo that provides buttons allowing you to (re)load web pages, stop loading, move forward and back in history, and zoom in and out of the page.
...finally, we call blur() on the url bar to stop focusing it, so the keyboard moves off the screen, allowing us to get our full screen view back.
...ted'); } else if(search.getattribute('class') === 'search shifted') { search.setattribute('class', 'search'); if(searchactive) { browser.clearmatch(); searchactive = false; prev.disabled = true; next.disabled = true; searchbar.value = ''; } } }); note that whenever one of the search-related methods is invoked, a mozbrowserfindchange event is fired to allow you to react to search changes in a more precise way if desired: //browser.addeventlistener('mozbrowserfindchange', function(e) { // can react to find changes if required //}) reporting errors we've got one more piece of code to mention from our source: browser.addeventlistener('mozbrowsererror', function (e) { console.log("loading error: " + e.detail); }); this simple listener logs an er...
PBackground
this protocol is called pcompositor, and allows us to bypass the main thread of the parent process, which trims the latency of texture uploads since they will not get bogged down if that thread is busy.
...pbackground allows us to bypass the chrome process's main thread if used from the content process' main thread.
...the background thread is designed to be responsive (nobody is allowed to do long running computation or file i/o on it) to guarantee better latency than going through the main threads (which can run arbitrary js, gc, etc.) can provide.
...this allows the dom code to generally not worry about what thread (main vs.
JavaScript code modules
ctypes.jsm provides an interface that allows javascript code to call native libraries without requiring the development of an xpcom component.
... customizableui.jsm allows you to interact with customizable buttons and items in firefox's main window ui.
... jni.jsm abstracts the js-ctypes to provide an interface that allows javascript code to call code running in native jvms.
... osfile.jsm allows routines to access files.
Scroll-linked effects
instead, using the css snap-points property will allow the browser to run the animation asynchronously, providing a smooth visual effect to the user.
...however, in some cases the current apis offered by the browser do not allow this.
...currently there are a few proposals for apis that would allow such effects, and they all have their advantages and disadvantages.
... compositorworker: allows javascript to be run on the compositor thread in small chunks, provided it doesn't cause the framerate to drop.
L20n HTML Bindings
in addition to the pre-defined whitelists, any element found in the original source html is allowed in the translation as well.
...</p> the input element is not on the default whitelist but since it's present in the source html, it is also allowed in the translation.
... the value attribute is allowed on input elements, but type is not.
... similarly, href and onclick attributes are not allowed in translations and they are not inserted in the final dom.
Midas editor module security preferences
add these lines to user.js: user_pref("capability.policy.policynames", "allowclipboard"); user_pref("capability.policy.allowclipboard.sites", "https://www-archive.mozilla.org"); user_pref("capability.policy.allowclipboard.clipboard.cutcopy", "allaccess"); user_pref("capability.policy.allowclipboard.clipboard.paste", "allaccess"); change the url https://www.mozilla.org to the site for which you want to enable this function.
...for example: user_pref("capability.policy.allowclipboard.sites", "http://www-archive.mozilla.org") is not the same as: user_pref("capability.policy.allowclipboard.sites", "https://www-archive.mozilla.org") this is because the first uses http while the second uses https.
... if you want to allow multiple urls to access the paste operation, separate the urls with a space.
... for example: user_pref("capability.policy.allowclipboard.sites", "https://www-archive.mozilla.org https://developer.mozilla.org") again, keep in mind the security risks involved here and be sure to remove permission to access the clipboard once you no longer need it enabled.
About NSPR
i/o nspr's i/o is a slightly augmented bsd sockets model that allows arbitrary layering.
...while the object is not declared as opaque, the api provides methods that allow and encourage clients to treat the addresses as polymorphic items.
...this allows a minimal timer period in of approximately 12 hours.
...use of 64 bits allows a representation of times approximately in the range of -30000 to the year 30000.
Introduction to NSPR
the netscape portable runtime (nspr) api allows compliant applications to use system facilities such as threads, thread synchronization, i/o, interval timing, atomic operations, and several other low-level services in a platform-independent manner.
... the current implementation of nspr allows developers to compile a single source code base on macintosh (ppc), win32 (nt 3.51, nt 4.0, win'95), and over twenty versions of unix.
...condition variables allow one or more threads to wait for a predetermined condition to exist, and they allow another thread to notify them when the condition occurs.
...if the logic of a program allows for timing of waits on conditions, then the clock must be treated as part of the monitored data and the amount of time elapsed re-asserted when the call returns.
PR_Shutdown
how the kind of disallowed operations on the socket.
...further receives will be disallowed.
...further sends will be disallowed.
...further sends and receives will be disallowed.
nss tech note1
sec_asn1_any: allows the decoder to match this template with any component type, regardless of the tag in the input data.
...sec_quickderdecodeitem allows it at any nested sublevel.
... sec_asn1_choice: allows decoding of components that are of variable type.
...this will allow you to free both the input data and the decoded data at once when freeing the arena.
sslerr.html
ssl_error_no_ciphers_supported -12265 "no cipher suites are present and enabled in this program." possible causes: (a) all cipher suites have been configured to be disabled, (b) the only cipher suites that are configured to be enabled are those that are disallowed by cipher export policy, (c) the socket is configured to handshake as a server, but the certificate associated with that socket is inappropriate for the key exchange algorithm selected.
... ssl_error_no_trusted_ssl_client_ca -12199 "no certificate authority is trusted for ssl client authentication." ssl_error_session_not_found -12198 "client's ssl session id not found in server's session cache." ssl_error_server_cache_not_configured -12185 "ssl server cache not configured and not disabled for this socket." ssl_error_renegotiation_not_allowed -12176 "renegotiation is not allowed on this ssl socket." received a malformed (too long or short or invalid content) ssl handshake: all the error codes in the following block indicate that the local socket received an improperly formatted ssl3 handshake message from the remote peer.
... sec_error_decryption_disallowed -8143 cannot decrypt: encrypted using a disallowed algorithm or key size.
... sec_error_bad_export_algorithm -8117 required algorithm is not allowed.
GCIntegration - SpiderMonkey Redirect 1
this should be obvious by now, but never ever allow a gc thing point to a gc thing in a different compartment unless it's a wrapper that's registered in the cross-compartment wrapper map.
...in between these slices, non-gc code is allowed to run.
...the remembered set allows us to collect the nursery without needing to look at the tenured generation at all, aside from the remembered set entries.
... there are three simplifications, similar to the ones for incremental write barriers, that will allow us to avoid write barriers in some cases.
Bytecode Descriptions
this must be used only in scripts where new.target is allowed: non-arrow function scripts and other scripts that have a non-arrow function script on the scope chain.
...this allows alternate faster implementations to be used that avoid unnecesary allocations.
...jsop::supercall behaves exactly like jsop::new, but is used for supercall expressions, to allow jits to distinguish them from new expressions.
...for example, delete super.prop; is allowed in methods, but always throws a referenceerror.
Exact Stack Rooting
the purpose of js::mutablehandlet is to allow out-parameters for rooted gcthings.
... this class solves two problems: c++ only allows one level of user-defined implicit type conversion.
...this makes js::handlet and js::rootedt behave the same, allowing us to seamlessly weave js::handlets into the js api.
... rootedobject obj(cx, js_newobject(cx, clasp, nullptr(), nullptr()); common pitfalls the c++ type system allows us to eliminate the possibility of most common errors; however, there are still a few things that you can get wrong that the compiler cannot help you with.
JS::CompileOptions
methods some methods of js::owningcompileoptions and js::compileoptions return the instance itself to allow method chain.
... the web platform allows scripts to be loaded from arbitrary cross-origin sources.
... this allows an attack by which a malicious website loads a sensitive file (say, a bank statement) cross-origin (using the user's cookies), and sniffs the generated syntax errors (via a window.onerror handler) for juicy morsels of its contents.
... asmjsoption bool true if asm.js is allowed in the code.
JS_SetOptions
mxr id search for jsoption_xml jsoption_allow_xml added in spidermonkey 15 if this is off, e4x syntax isn't supported no matter what version number is set.
... mxr id search for jsoption_allow_xml jsoption_moar_xml added in spidermonkey 15 ecmascript for xml (e4x) support: parse <!-- --> as a token, not backward compatible with the comment-hiding hack used in html script tags.
... only used if jsoption_allow_xml is set.
... mxr id search for jsoption_relimit jsoption_anonfunfix added in spidermonkey 1.8 disallow function () {} in statement context, per ecma-262 edition 3.
JSAPI reference
umber js_reporterrorflagsandnumberuc js_reporterrornumberucarray added in spidermonkey 24 js_reportoutofmemory js_reportallocationoverflow added in spidermonkey 1.8 js_geterrorreporter js_seterrorreporterobsolete since jsapi 52 js_errorfromexception js_geterrorprototype jsreport_is_exception jsreport_is_strict jsreport_is_warning jsreport_is_strict_mode_error the following functions allow c/c++ functions to throw and catch javascript exceptions: js::createerror added in spidermonkey 38 js_isexceptionpending js_getpendingexception js_setpendingexception js_clearpendingexception js_throwstopiteration added in spidermonkey 1.8 js_isstopiteration added in spidermonkey 31 typedef jsexceptionstate js_saveexceptionstate js_restoreexceptionstate js_dropexceptionstate the...
...these functions also allow spidermonkey to account the number of bytes allocated: js_malloc js_free js_realloc js_strdup struct jsfreeop added in spidermonkey 17 js_freeop added in spidermonkey 17 js_getdefaultfreeop added in spidermonkey 17 javascript objects, strings, and floating-point numbers are garbage collected.
...ropertybyid added in spidermonkey 1.8.1 js_hasownproperty added in jsapi 45 js_hasownpropertybyid added in jsapi 45 js_deleteproperty js_deletepropertybyid added in spidermonkey 1.8.1 js_deleteproperty2 obsolete since jsapi 39 js_deleteucproperty2 obsolete since jsapi 39 js_deletepropertybyid2 added in spidermonkey 1.8.1 obsolete since jsapi 39 the following functions are lower-level, allowing the jsapi application more access to details of how properties are implemented.
... js_getmethod obsolete since jsapi 23 js_getmethodbyid obsolete since jsapi 23 a spidermonkey extension allows a native function to return an lvalue—that is, a reference to a property of an object: js_setcallreturnvalue2 obsolete since javascript 1.8.5 id a jsid is an identifier for a property or method of an object.
Querying Places
executing a query places queries have several basic parts: the query object: nsinavhistoryquery, holds the search parameters the query options: nsinavhistoryqueryoptions, allows configuration of the search result the history service: nsinavhistoryservice, executes the query the first first step is to create the query and options, and fill them with the parameters you want.
...let options = placesutils.history.getnewqueryoptions(); // no query parameters will return everything let query = placesutils.history.getnewquery(); // execute the query let result = placesutils.history.executequery(query, options); result types nsinavhistoryqueryoptions has a resulttype property that allows configuration of the grouping and level of detail to be returned in the results.
...this allows for a simpler implementation and interface than a full logical operation with nested clauses while still being expressive.
...it allows you to get the query options and parameters.
XPCOM array guide
MozillaTechXPCOMGuideArrays
this array is read-only, and the interface does not provide any methods that will allow adding and removing members.
... nsimutablearray - a scriptable container for scriptable xpcom objects, which allows addition and removal of member objects.
...this basic interface only allows querying of existing elements in the array.
...this allows direct processing of array elements without worrying about calling release().
Avoiding leaks in JavaScript XPCOM components
reference counting reference counting is a simple solution to the problem of allowing multiple owners to influence the lifetime of an object.
...it allows javascript code to access xpcom objects (i.e., it wraps native xpcom objects for javascript) and it allows javascript code to implement xpcom interfaces (i.e., it wraps javascript objects for xpcom).
... one might think that the wrappers of native xpcom objects (to allow them to be used from javascript) would just work the other way around.
... (on wrapped objects other that dom nodes, we allow javascript programmers to set properties, but we don't do anything to protect them from garbage collection.
Finishing the Component
weblock interfaces interface name defined by status summary nsisupports xpcom frozen provides interface discovery, and object reference counting nsiobserver xpcom frozen allows messaging passing between objects nsicontentpolicy content not frozen interface for policy control mechanism iweblock web lock not frozen enables and disables weblock.
...if they match, the component allows the load to continue by returning true.
... do not allow this nsiuri to load.
... allow this nsiuri to load *_retval = pr_true; return ns_ok; } node = node->next; } return ns_ok; } at this point, all of the backend work is complete.
operator+=
return values this operator returns a reference back to the object being modified to allow operator chaining.
... return values this operator returns a reference back to the object being modified to allow operator chaining.
... return values this operator returns a reference back to the object being modified to allow operator chaining.
... return values this operator returns a reference back to the object being modified to allow operator chaining.
operator=
return values this operator returns a reference back to the object being modified to allow operator chaining.
... return values this operator returns a reference back to the object being modified to allow operator chaining.
... return values this operator returns a reference back to the object being modified to allow operator chaining.
... return values this operator returns a reference back to the object being modified to allow operator chaining.
operator=
return values this operator returns a reference back to the object being modified to allow operator chaining.
... return values this operator returns a reference back to the object being modified to allow operator chaining.
... return values this operator returns a reference back to the object being modified to allow operator chaining.
... return values this operator returns a reference back to the object being modified to allow operator chaining.
nsIChannel
netwerk/base/nsichannel.idlscriptable this interface allows clients to construct 'get' requests for specific protocols, and manage them in a uniform way.
...for example, queryinterfacing to nsihttpchannel allows response headers to be retrieved for the corresponding http transaction.
... implementations are allowed to synchronously add themselves to the associated load group (if any).
... exceptions thrown ns_error_already_opened if the channel is reopened ns_error_port_access_not_allowed if the specified port is in the nsioservice forbidden port list.
nsIEffectiveTLDService
ns_error_unexpected or other error returned by nsiidnservice.normalize() when the hostname contains characters disallowed in uris.
... ns_error_unexpected this exception originates in the normalize() method in nsiidnservice and is thrown when ahost contains characters disallowed in uris.
... ns_error_unexpected or other error returned by nsiidnservice.normalize() when the hostname contains characters disallowed in uris.
... ns_error_unexpected this exception originates in the normalize() method in nsiidnservice and is thrown when ahost contains characters disallowed in uris.
nsIWebContentHandlerRegistrar
can bypass this by opening about:config and setting preference of gecko.handlerservice.allowregisterfromdifferenthost to true.
...=compose&to=%s as a content or protocol handler'permission denied to add http://mail.live.com/secure/start?action=compose&to=%s as a content or protocol handler' when calling method: [nsiwebcontenthandlerregistrar::registerprotocolhandler] if the host names do match then a confirmation like this will be seen: this domain check can be bypassed by setting the preference of gecko.handlerservice.allowregisterfromdifferenthost to true as in this code here: var {classes: cc, interfaces: ci, utils: cu} = components; cu.import("resource://gre/modules/services.jsm"); var nsiwchr = cc["@mozilla.org/embeddor.implemented/web-content-handler-registrar;1"] .getservice(ci.nsiwebcontenthandlerregistrar); var allowregisterfromdifferenthost = services.prefs.getboolpref('gecko.handlerservic...
...e.allowregisterfromdifferenthost'); if (!allowregisterfromdifferenthost) { services.prefs.setboolpref('gecko.handlerservice.allowregisterfromdifferenthost', true); } var htmlcontentwindow = services.wm.getmostrecentwindow('navigator:browser'); //because we set the preference to true above, we need any window that has a browser, just pass the domwindow and the registerprotocolhandler will get the contentwindow from it nsiwchr.registerprotocolhandler("mailto", "http://mail.live.com/secure/start?action=compose&to=%s", "outlook.com live mail", htmlcontentwindow); if (!allowregisterfromdifferenthost) { //it this variable is false, than we had set the pref to true obviously.
... so lets restore it back to false, which is the default value services.prefs.clearuserpref('gecko.handlerservice.allowregisterfromdifferenthost'); } register a webmail service as mailto handler without contentwindow under construction.
nsIXULTemplateBuilder
there may be more than one <queryset> if multiple queries are desired, and this element is optional if only one query is needed -- in that case the <query> and <rule>s are allowed to be children of the <template> node.
...this allows the query processor to be specific to a particular kind of input data or query syntax, while the template builder remains independent of the kind of data being used.
...the condition syntax allows for common conditional handling; additional filtering may be applied by adding a custom filter to a rule with the builder's addrulefilter() method.
...for convenience, each reference point as well as all results implement the nsixultemplateresult interface, allowing the result objects from each iteration to be used directly as the reference points for the next iteration.
XPCOM
it has multiple language bindings, allowing xpcom components to be used and implemented in javascript, java, and python in addition to c++.
...this article will show you how to use the available interfaces in several mozilla products.aggregating the in-memory datasourcealready_addrefedalready_addrefed in association with nscomptr allows you to assign in a pointer without addrefing it.binary compatibilityif mozilla decides to upgrade to a compiler that does not have the same abi as the current version, any built component may fail.
...this implementation will allow you to get(), set(), define(), and undefine() nsifile.using nsipasswordmanagertechnical review completed.using nsisimpleenumeratorusing the clipboardthis section provides information about cutting, copying, and pasting to and from the clipboard.using the gecko sdkweak referencein xpcom, a weak reference is a special object that contains a pointer to an xpcom object, but doesnot keep that object a...
...it allows developers to link only against the frozen xpcom method symbols and maintain compatibility with multiple versions of xpcom.xpcom guidethese articles provide tutorials and usage documentation for xpcom, including how to use it in your own projects and how to build xpcom components for your firefox add-ons and the like.xpcom ownership guidelines...naturally.
XPIDL
prtime (xpidl unsigned long long typedef, 64 bits) number prtime is in microseconds, while js date assumes time in milliseconds nsresult (xpidl unsigned long typedef, 32 bits) number nsrefcnt (xpidl unsigned long typedef, 32 bits) number size_t (xpidl unsigned long typedef, 32 bits) number voidptr void* void* not allowed charptr char* char** not allowed unicharptr char16_t* char16_t** not allowed nsidref const nsid& nsid* ?
...ring const nsacstring& nsacstring& string full unicode set permitted (translated to utf-8) acstring const nsacstring& nsacstring& string only chars in range \u0000-\u00ff permitted astring const nsastring& nsastring& string full unicode set permitted jsval const jsval& jsval* anything jsid jsid jsid* not allowed promise mozilla::dom::promise* mozilla::dom::promise** promise typedefs in idl are basically as they are in c or c++: you define first the type that you want to refer to and then the name of the type.
...however, the presence of the binaryname property allows the user to select another name to use in native code (to avoid conflicts with other functions).
...the iid_is parameter indicates that the real iid of an nsqiresult parameter may be found in the corresponding parameter, to allow script code to automatically unbox the type.
Mail and RDF
this allows exposure of mailnews-specific data to user interface using rdf templates.
...this allows each template-based widget to maintain view/window-specific data with each datasource.
...this allows the mail code to be mostly free of rdf.
...this design allows each datasource to manage its own observers, and lets each mail session manage a list of folder listeners without necessarily knowing that some of these listeners are rdf-related.
DOM Inspector FAQ - Firefox Developer Tools
the file menu contains approaches which will allow you to inspect a document.
... inspect a url this just focuses the dom inspector's address bar, which allow you to inspect arbitrary documents which can be accessed via a url.
... dom inspector allows you to force the :hover, :active, and :focus pseudo-classes to apply to a given node.
...you should notice the set pseudo-classes menu item, which will allow you to set the content state for the aforementioned pseudo-classes.
DOM Inspector internals - Firefox Developer Tools
at the top of each panel is a toolbar which contains a menu button allowing you to choose which viewer to display from the viewer list, a label displaying the name of the currently active viewer, and another menu button allowing you to issue viewer-specific commands.
...this separation allows for viewers to be self-contained, with a viewer's xul defined in its own document and loaded in its own scope, without fear of collisions in the xul, css, or js.
...tent/utilityoverlay.xul application={92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a} overlay chrome://inspector/content/inspector.xul chrome://communicator/content/tasksoverlay.xul application={92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a} overlay chrome://inspector/content/inspector.xul chrome://browser/content/basemenuoverlay.xul application={ec8030f7-c20a-464f-9b0e-13a3a9e97384} these host-provided overlays allow dom inspector to adopt a look and feel similar to its host application.
... using modular overlays also allows for common xul to be shared across the various documents that make up the dom inspector's ui, although not all overlays are shared by multiple consumers.
Introduction to DOM Inspector - Firefox Developer Tools
this allows you to use the dom inspector without having to use a separate browser window, or without embedding a browser in your application at all.
...the javascript object viewer also allows javascript to be evaluated by selecting the appropriate menuitem in the context menu.
...you can perform actions on the individual items in this list from the context menu and the edit menu, both of which contain menutimes that allow you edit the values of those attributes.
... this interactivity allows you to shrink and grow element size, change icons, and do other layout-tweaking updates—all without actually changing the dom as it is defined in the file on disk.
Deprecated tools - Firefox Developer Tools
description webide allowed you to connect the firefox developer tools to remote browsers, such as firefox for android.
... canvas debugger bugzilla issue: bug 1403938 removed as of firefox 67 description canvas debugger allowed users to inspect the canvas element and see how frequently a given function is called.
... web audio editor bugzilla issue: bug 1403944 removed as of firefox 67 description the web audio editor allowed you to examine an audio context constructed in the page and provided a visualization of its graph.
... shader editor bugzilla issue: bug 1342237 removed as of firefox 67 description the shader editor allowed users to examine and edit the source of the webgl vertex and fragment shaders.
Examine and edit HTML - Firefox Developer Tools
that allows you to find css selectors and xpath expressions occurring within the text.
...this allows you to search for specific elements without the conflict of matching words within the text.
...furthermore it allows for some more advanced searches like finding elements that start with a specific text, for example.
...clicking the marker opens a tooltip listing the event listeners and allows you for each listener to switch to the line of javascript code in the debugger where the listener is defined.
CSS Grid Inspector: Examine grid layouts - Firefox Developer Tools
the grid inspector allows you to examine css grid layouts using the firefox devtools, discovering grids present on a page, examining and modifying them, debugging layout issues, and more.
...allows overlay views to be toggled on and off.
... overlay grid each grid present on a page has an entry in the "overlay grid" section: each entry consists of (from left to right): a checkbox allowing you to toggle the grid overlay for that grid on and off.
... a color picker icon that allows you to change the primary color of the grid overlay.
AddressErrors - Web APIs
try to avoid asking the user to make corrections to things they can't change, and there may be situations in which you need to allow validation errors to be accepted anyway (for example, if you validate addresses against a postal service database and a new home has been built and its address is not yet in the database).
...in the example, we're handling a donation to an organization that will be sending a "thank you" gift to the donor, so it requests shipping information along with allowing the donation payment itself.
... handling address changes the handleaddresschange() method, called when shippingaddresschange events occur, is where we'll look to see if the country is one of those we allow as shipping destinations.
...this lets the payment request api know to present the specified error or errors but to allow the user to keep trying to edit the address.
AudioWorkletProcessor.process - Web APIs
however, plans are already in place to revise the specification to allow the size of the audio blocks to be changed depending on circumstances (for example, if the audio hardware or cpu utilization is more efficient with larger block sizes).
... this size may even be allowed to change over time, so you mustn't look at just the first block and assume the sample buffers will always be the same size.
... returning true forces the web audio api to keep the node alive, while returning false allows the browser to terminate the node if it is neither generating new audio data nor receiving data through its inputs that it is processing.
...a processor implementing such a node should return false from the process method to allow the presence of active input nodes and references to the node to determine whether it can be garbage-collected.
Background Tasks API - Web APIs
window.requestidlecallback() makes it possible to become actively engaged in helping to ensure that the browser's event loop runs smoothly, by allowing the browser to tell your code how much time it can safely use without causing the system to lag.
...using timeouts can ensure that your code runs in a timely manner, but it can also allow you to cause lag or animation stutters by mandating that the browser call you when there's not enough time left for you to run without disrupting performance.
...we're going to do this by creating a fifo queue of tasks, which we'll run as time allows during the idle callback period.
... taskdata is an object which is passed into the task handler as an input parameter, to allow the task to receive custom data.
Content Index API - Web APIs
the content index api allows developers to register their offline enabled content with the browser.
...content indexing allows developers to tell the browser about their specific offline content.
... this allows users to discover and view what is available, whilst giving developers the ability to add and manage this content.
... the content index api is an extension to service workers, which allows developers to add urls and metadata of already cached pages, under the scope of the current service worker.
Element.classList - Web APIs
WebAPIElementclassList
implement the barebones domtokenlist livelyness polyfill if (typeof domtokenlist !== "function") (function(window){ var document = window.document, object = window.object, hasownprop = object.prototype.hasownproperty; var defineproperty = object.defineproperty, allowtokenlistconstruction = 0, skippropchange = 0; function domtokenlist(){ if (!allowtokenlistconstruction) throw typeerror("illegal constructor"); // internally let it through } domtokenlist.prototype.tostring = domtokenlist.prototype.tolocalestring = function(){return this.value}; domtokenlist.prototype.add = function(){ a: for(var v=0, arglen=arguments.length,val=""...
...ropchange = 1, target.classlist = restokenlist, target.classname = strval; skippropchange = 0, restokenlist.length = tokens.length - sub; } } function polyfillclasslist(ele){ if (!ele || !("innerhtml" in ele)) throw typeerror("illegal invocation"); ele.detachevent( "onpropertychange", whenpropchanges ); // prevent duplicate handler infinite loop allowtokenlistconstruction = 1; try{ function protoobj(){} protoobj.prototype = new domtokenlist(); } finally { allowtokenlistconstruction = 0 } var protoobjproto = protoobj.prototype, restokenlist = new protoobj(); a: for(var toks=ele.classname.trim().split(wsre), ci=0, clen=toks.length, sub=0; ci !== clen; ++ci){ for (var inneri=0; inneri !== ci; ++inneri) ...
...if (toks[inneri] === toks[ci]) { sub++; continue a; } this[ci-sub] = toks[ci]; } protoobjproto.length = clen-sub, protoobjproto.value = ele.classname, protoobjproto[" ucl"] = ele; if (defineproperty) { defineproperty(ele, "classlist", { // ie8 & ie9 allow defineproperty on the dom enumerable: 1, get: function(){return restokenlist}, configurable: 0, set: function(newval){ skippropchange = 1, ele.classname = protoobjproto.value = (newval += ""), skippropchange = 0; var toks = newval.trim().split(wsre), oldlen = protoobjproto.length; a: for(var ci = 0, clen = protoobjproto.length = toks.length, sub = 0; ci !== clen; ++ci){ for(var inneri=0; inneri!==ci; ++inneri) if(to...
... a minor note is that in ie6-7, this polyfill uses the window[" ucl"] property on the window object for communicating with the css expressions, the x-uclp css property on all elements, and the element[" ucl"] property on all elements to allow garbage collection and boost performance.
FeaturePolicy - Web APIs
featurepolicy methods featurepolicy.allowsfeature returns a boolean that indicates whether or not a particular feature is enabled in the specified context.
...feature whose name appears on the list might not be allowed by the feature policy of the current execution context and/or might not be accessible because of user's permissions.
... featurepolicy.allowedfeatures returns a list of names of all features supported by the user agent and allowed by the feature policy.
... featurepolicy.getallowlistforfeature returns the allow list for the specified feature.
Fetch API - Web APIs
WebAPIFetch API
this will allow them to be used wherever they are needed in the future, whether it’s for service workers, cache api, and other similar things that handle or modify requests and responses, or any kind of use case that might require you to generate your responses programmatically (that is, the use of computer program or personal programming instructions).
... aborting a fetch browsers have started to add experimental support for the abortcontroller and abortsignal interfaces (aka the abort api), which allow operations like fetch and xhr to be aborted if they have not already completed.
... headers represents response/request headers, allowing you to query them and take different actions depending on the results.
... fetch mixin body provides methods relating to the body of the response/request, allowing you to declare what its content type is and how it should be handled.
FileError - Web APIs
WebAPIFileError
don't run your app from file:// for security reasons, browsers do not allow you to run your app from file://.
...just start chrome with the --allow-file-access-from-files flag.
... invalid_modification_err 9 the modification requested is not allowed.
... no_modification_allowed_err 6 the state of the underlying file system prevents any writing to a file or a directory.
Introduction to the File and Directory Entries API - Web APIs
the synchronous api, on the other hand, allows for simpler programming model, but it must be used with webworkers.
...however, appcache storage isn't locally mutable, and doesn't allow for fine-grained client-side management.
...google chrome, for example, allows temporary storage beyond the 5 mb required in the specifications and supports the quota management api.
... for testing purposes, you can bypass the restriction on chrome by starting the browser with the --allow-file-access-from-files flag.
HTMLIFrameElement - Web APIs
htmliframeelement.allow is a list of origins the the frame is allowed to display content from.
... htmliframeelement.allowfullscreen is a boolean indicating whether the inline frame is willing to be placed into full screen mode.
... htmliframeelement.allowpaymentrequest is a boolean indicating whether the payment request api may be invoked inside a cross-origin iframe.
... living standard the following property has been added: allowfullscreen.
In depth: Microtasks and the JavaScript runtime environment - Web APIs
to support this, it was necessary to find ways to allow for projects to escape the limitations of a single-threaded language.
...this allows the javascript runtime to track the levels of recursion and the return of results through that recursion, but it also means that each time a function recurses, more memory is needed to create the new context.
... solutions the use of web workers, which allow the main script to run other scripts in new threads, help to alleviate this problem.
... this is further alleviated by using asynchronous javascript techniques such as promises to allow the main code to continue to run while waiting for the results of a request.
Headers - Web APIs
WebAPIHeaders
the headers interface of the fetch api allows you to perform various actions on http request and response headers.
... headers.entries() returns an iterator allowing to go through all key/value pairs contained in this object.
... headers.keys() returns an iterator allowing you to go through all keys of the key/value pairs contained in this object.
... headers.values() returns an iterator allowing you to go through all values of the key/value pairs contained in this object.
IDBTransaction.mode - Web APIs
syntax var mycurrentmode = idbtransaction.mode; value an idbtransactionmode object defining the mode for isolating access to data in the current object stores: value explanation readonly allows data to be read but not changed.
... readwrite allows reading and writing of data in existing data stores to be changed.
... versionchange allows any operation to be performed, including ones that delete and create object stores and indexes.
...duplicate items not allowed.</li>'; }; // create an object store on the transaction var objectstore = transaction.objectstore("todolist"); // add our newitem object to the object store var objectstorerequest = objectstore.add(newitem[0]); objectstorerequest.onsuccess = function(event) { // report the success of the request (this does not mean the item // has been stored successfully in the db - for ...
IDBTransaction - Web APIs
(bug 888598) transactions can have one of three modes: constant value description read_only "readonly" (0 in chrome) allows data to be read but not changed.
... read_write "readwrite" (1 in chrome) allows reading and writing of data in existing data stores to be changed.
... version_change "versionchange" (2 in chrome) allows any operation to be performed, including ones that delete and create object stores and indexes.
...duplicate items not allowed.</li>'; }; // create an object store on the transaction var objectstore = transaction.objectstore("todolist"); // add our newitem object to the object store var objectstorerequest = objectstore.add(newitem[0]); objectstorerequest.onsuccess = function(event) { // report the success of the request (this does not mean the item // has been stored successfully in the db - for ...
Key Values - Web APIs
allows typing control characters.
...used to allow generating function key (f1–f15, for instance) characters on keyboards without a dedicated function key area.
...allows issuing special command inputs.
...modifies keystrokes to allow typing upper (or other) case letters, and to support typing punctuation and other special characters.
Media Session API - Web APIs
it does this by providing metadata for display by the user agent of the media your web app is playing, and allows you to create event handlers, to define your own behaviors for a user-agent playback controls.
... the aim of this is allowing users to know what's playing, and to control it, without opening the specific page that launched it.
...for example, to set the current state of the media session to playing: navigator.mediasession.playbackstate = "playing"; interfaces mediametadata allows a web page to provide rich media metadata, for display in a platform ui.
... mediasession allows a web page to provide custom behaviors, for standard media playback interactions.
Navigator - Web APIs
WebAPINavigator
it allows scripts to query it and to register themselves to carry on some activities.
... navigator.geolocation read only returns a geolocation object allowing accessing the location of the device.
... navigator.registercontenthandler() obsolete since gecko 59 allows web sites to register themselves as a possible handler for a given mime type.
... navigator.registerprotocolhandler() allows web sites to register themselves as a possible handler for a given protocol.
Notifications API - Web APIs
the notifications api allows web pages to control the display of system notifications to the end user.
...this should be done in response to a user gesture, such as clicking a button, for example: btn.addeventlistener('click', function() { let promise = notification.requestpermission(); // wait for permission }) this is not only best practice — you should not be spamming users with notifications they didn't agree to — but going forward browsers will explicitly disallow notifications not triggered in response to a user gesture.
... this will spawn a request dialog, along the following lines: from here the user can choose to allow notifications from this origin, or block them.
... in addition, the notifications api spec specifies a number of additions to the serviceworker api, to allow service workers to fire notifications.
Payment Request API - Web APIs
the browser can automatically suggest which card to use based on past usage patterns or restrictions from the merchant (e.g, "we only accept visa or mastercard"), or allow the user to say which is their default/favorite card.
...the paymentrequest allows the web page to exchange information with the user agent while the user provides input to complete the transaction.
... note: the api is available inside cross-origin <iframe> elements only if they have had the allowpaymentrequest attribute set on them.
... merchantvalidationevent represents the browser requiring the merchant (website) to validate themselves as allowed to use a particular payment handler (e.g., registered as allowed to use apple pay).
Push API - Web APIs
WebAPIPush API
this allows apps to react to push messages being received, for example, by displaying a notification (using serviceworkerregistration.shownotification().) each subscription is unique to a service worker.
...firefox allows a limited number (quota) of push messages to be sent to an application, although push messages that generate notifications are exempt from this limit.
... note: as of gecko 44, the allowed quota of push messages per application is not incremented when a new notification fires, when another is still visible, for a period of three seconds.
... pushsubscription provides a subcription's url endpoint, and allows unsubscription from a push service.
RTCConfiguration - Web APIs
it may be passed into the constructor when instantiating a connection, or used with the rtcpeerconnection.getconfiguration() and rtcpeerconnection.setconfiguration() methods, which allow inspecting and changing the configuration while a connection is established.
...you may find in some cases that connections can be established more quickly by allowing the ice agent to start fetching ice candidates before you start trying to connect, so that they're already available for inspection when rtcpeerconnection.setlocaldescription() is called.
...if the policy isn't specified, all is assumed by default, allowing all candidates to be considered.
... this attribute supports providing multiple certificates because even though a given dtls connection uses only one certificate, providing multiple certificates allows support for multiple encryption algorithms.
SVGAngle - Web APIs
WebAPISVGAngle
exceptions on setting: a domexception with code no_modification_allowed_err is raised when the length corresponds to a read-only attribute, or when the object itself is read-only.
... exceptions on setting: a domexception with code no_modification_allowed_err is raised when the length corresponds to a read-only attribute, or when the object itself is read-only.
... a domexception with code no_modification_allowed_err is raised when the length corresponds to a read-only attribute, or when the object itself is read-only.
... a domexception with code no_modification_allowed_err is raised when the length corresponds to a read only attribute or when the object itself is read only.
SVGLength - Web APIs
WebAPISVGLength
exceptions on setting: a domexception with code no_modification_allowed_err is raised when the length corresponds to a read only attribute or when the object itself is read only.
... exceptions on setting: a domexception with code no_modification_allowed_err is raised when the length corresponds to a read only attribute or when the object itself is read only.
... a domexception with code no_modification_allowed_err is raised when the length corresponds to a read only attribute or when the object itself is read only.
... a domexception with code no_modification_allowed_err is raised when the length corresponds to a read only attribute or when the object itself is read only.
Streams API - Web APIs
the streams api allows javascript to programmatically access streams of data received over the network and process them as desired by the developer.
... readablestreamdefaultcontroller represents a controller allowing control of a readablestream's state and internal queue.
... writablestreamdefaultcontroller represents a controller allowing control of a writablestream's state.
... readablebytestreamcontroller represents a controller allowing control of a readablestream's state and internal queue.
URLSearchParams - Web APIs
urlsearchparams.entries() returns an iterator allowing iteration through all key/value pairs contained in this object.
... urlsearchparams.foreach() allows iteration through all values contained in this object via a callback function.
... urlsearchparams.keys() returns an iterator allowing iteration through all keys of the key/value pairs contained in this object.
... urlsearchparams.values() returns an iterator allowing iteration through all values of the key/value pairs contained in this object.
Viewpoints and viewers: Simulating cameras in WebXR - Web APIs
when using webgl to accelerate 2d graphics drawing, the camera is typically placed directly above the center of the scene with the distance and field of view set to allow the entire scene to be presented.
... to zoom using a scaling factor or percentage, you can map 1x (100% of normal size) to the largest value of fov you allow (which leads to the most content being visible), then map your maximum magnification to the maximum value of fov you support and map corresponding values in between.
... representing 3d with webxr webxr takes 3d graphics a step further, allowing them to be presented using special visual hardware such as goggles or a headset to create 3d graphics that appear to actually exist in three dimensions, potentially within the context of the real world (in the case of augmented reality).
...these views are then separately fed to each eye, in order to allow them to collect the data our brain needs in order to construct a 3d image in our minds.
Fundamentals of WebXR - Web APIs
as browser developers built support for webvr and allowed developers to experiment, it became clear that in order to finish an api for virtual environments on the web, it would make more sense to start a new specification than to try to "fix" webvr.
... devices which use transparent glasses to allow the user to see the world, while overlaying the rendered image atop the scene.
... caves a cave automated virtual environment (cave) is an immersive vr environment in which the scene is projected or otherwise displayed on the walls (as well as possibly the ceiling and/or floor), thus completely surrounding the user with the simulation and allowing them to be immersed in the scene.
...opengl (and thus webgl by extension) does not directly offer a camera view, using a library that simulates one on your behalf can make your job much, much easier, especially when building code that allows free movement through your virtual world.
Rendering and the WebXR frame animation callback - Web APIs
fortunately, you can easily compute how much time you're allowed to use between frames as 1/refreshrate seconds.
... that distance (or whatever pupillary distance the xr system is configured to use) is enouigh to allow our minds to see just enough difference due to retinal disparity (the difference in what each retina sees) and the parallax effect to allow our brains to calculate the distance to and depth of objects, thus enabling us to percieve three dimensions despite our retinas only being 2d surfaces.
...this ensures we get into the queue right away, allowing the rest of the time spent in this iteration of the mydrawframe() function to count toward the timing of drawing the next frame.
... limiting the frame rate if you need to intentionally cap your frame rate in order to establish a baseline frame rate to try to maintain while allowing more time for other code to run, you can do so by skipping frames intentionally, on a timed basis.
Example and tutorial: Simple synth keyboard - Web APIs
the keyboard allows you to switch among the standard waveforms as well as one custom waveform, and you can control the master gain using a volume slider beneath the keyboard.
...the range element will typically be presented as a slider control; we configure it to allow any value between 0.0 and 1.0, stepping by 0.01 each position.
... mastergainnode is set to null; during the setup process, it will be configured to contain a gainnode which all playing oscillators will connect to and play through to allow the overall volume to be controlled using a single slider control.
...first, we want to only allow the primary mouse button to trigger notes playing.
Window.open() - Web APIs
WebAPIWindowopen
in general, users usually disable moving and resizing of existing windows because allowing authors' scripts to do so has been abused overwhelmingly in the past and the rare scripts that do not abuse such feature are often wrong, inaccurate when resizing the window.
... 99% of all those scripts disable window resizability and disable scrollbars when in fact they should enable both of these features to allow a cautious and sane fallback mechanism if their calculations are wrong.
... with the built-in popup blockers, you have to check the return value of window.open(): it will be null if the window wasn't allowed to open.
...several corporations allow their employees to surf on the web but under strict security policies: no javascript enabled, no java, no activex, no flash.
Window.prompt() - Web APIs
WebAPIWindowprompt
omeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetpromptchrome full support 1notes full support 1notes notes starting with chrome 46, this method is blocked inside an <iframe> unless its sandbox attribute has the value allow-modals.edge full support 12firefox full support 1ie full support 4notes full support 4notes notes this function has no effect in the modern ui/metro version of internet explorer for windows 8.
...desktop versions of ie do implement this function.opera full support 3notes full support 3notes notes starting with opera 33, this method is blocked inside an <iframe> unless its sandbox attribute has the value allow-modals.safari full support 1webview android full support 1notes full support 1notes notes starting with webview 46, this method is blocked inside an <iframe> unless its sandbox attribute has the value allow-modals.chrome android full support ...
... 18notes full support 18notes notes starting with chrome 46, this method is blocked inside an <iframe> unless its sandbox attribute has the value allow-modals.firefox android full support 4opera android full support 10.1notes full support 10.1notes notes starting with opera 33, this method is blocked inside an <iframe> unless its sandbox attribute has the value allow-modals.safari ios full support 1samsung internet android full support 1.0notes full support 1.
...0notes notes starting with samsung internet 5.0, this method is blocked inside an <iframe> unless its sandbox attribute has the value allow-modals.legend full support full supportsee implementation notes.see implementation notes.
ARIA Screen Reader Implementors Guide - Accessibility
interpreting wai-aria live region markup live changes are hints: in general live region markup is provided by the author as hints, and the assistive technology may allow for global, site or even region-specific settings, as well as heuristics to help with live changes on pages that have no wai-aria hints.
...text to speech and a braille display), then two queues can be maintained to allow for parallel presentation.
... ideas for settings and heuristics allow for a different voice (in text-to-speech) or other varying presentational characteristics to set live changes apart.
... allow global settings to turn off the presentation of live changes, present all live changes, use markup, or be "smart" (use heuristics) details for processing via platform accessibility apis we hope browser manufacturers will work to provide consistent implementations.
ARIA: Main role - Accessibility
skip navigation skip navigation, also known as "skipnav", is a technique that allows an assistive technology user to quickly bypass large sections of repeated content (main navigation, info banners, etc.).
... this allows the user to access the main content of the page faster.
... adding an id attribute to the element with a declaration of role="main" allows it to be a target of a skip navigation link.
... <body> <a href="#main-content">skip to main content</a> <!-- navigation and header content --> <div id="main-content" role="main"> <!-- main page content --> </div> </body> webaim: "skip navigation" links added benefits certain technologies such as browser extensions can generate lists of all landmark roles present on a page, allowing non-screen reader users to also quickly identify and navigate to large sections of the document.
ARIA: Region role - Accessibility
this label will allow an assitive technology user to be able to quickly understand the purpose of each landmark.
...this is done to allow keyboard-only users to scroll regions with overflow text.
... svg role="region" can be declared on areas of svg along with an aria-label to allow individual sections of the svg to be described.
... added benefits certain technologies such as browser extensions can generate lists of all landmark roles present on a page, allowing non-screen reader users to also quickly identify and navigate to large sections of the document.
An overview of accessible web applications and widgets - Accessibility
javascript to update the aria-checked attribute var showtip = function(el) { el.setattribute('aria-hidden', 'false'); } role changes aria allows developers to declare a semantic role for an element that otherwise offers incorrect or no semantics.
... for example, consider an "inline edit" widget: a component that allows users to edit a piece of text in place, without switching contexts.
... the arrow keys should allow for selection or navigation within the widget.
...once keyboard focus is inside the container, the arrow keys should allow the user to navigate between each tab (the <li> elements).
Overview of CSS Shapes - CSS: Cascading Style Sheets
the specification defines three new properties: shape-outside — allows definition of basic shapes shape-image-threshold — sets an opacity threshold value.
... shape-margin — sets a margin around the defined shape defining basic shapes the shape-outside property allows us to a define a shape.
... shapes from the box value shapes can also be created around the box value, therefore you could create your shape on the: border-box padding-box content-box margin-box in the example below you can change the value border-box to any of the other allowed values to see how the shape moves closer or further away from the box.
...this allows the overlay of wrapped content around an image, or the use of an image which is never displayed on the page purely as a method of creating a complex shape without needing to carefully map a polygon.
color-adjust - CSS: Cascading Style Sheets
by default, the browser is allowed to make any adjustments to the element's appearance it determines to be necessary and prudent given the type and capabilities of the output device.
... values economy the user agent is allowed to make adjustments to the element as it deems appropriate and prudent in order to optimize the output for the device it's being rendered for.
... any options the user agent offers the user to allow them to control the use of color and images will take priority over the value of color-adjust.
...not only can the user override the behavior, but each user agent is allowed to decide for itself how to handle color-adjust in any given situation.
<frequency-percentage> - CSS: Cascading Style Sheets
description use in calc() where a <frequency-percentage> is specified as an allowable type, this means that the percentage resolves to a frequency and therefore can be used in a calc() expression.
... examples valid percentage values 90% positive percentage +90% positive percentage with leading + -90% negative percentage — not valid for all properties that use percentages invalid percentage values 90 % no space is allowed between the number and the unit valid frequency values 12hz positive integer 4.3hz non-integer 14khz the unit is case-insensitive, though non-si capitalization is not recommended.
...7 hz no space is allowed between the number and the unit.
... 0 although unitless zero is an allowable <length>, it's an invalid <frequency>.
hanging-punctuation - CSS: Cascading Style Sheets
/* keyword values */ hanging-punctuation: none; hanging-punctuation: first; hanging-punctuation: last; hanging-punctuation: force-end; hanging-punctuation: allow-end; /* two keywords */ hanging-punctuation: first force-end; hanging-punctuation: first allow-end; hanging-punctuation: first last; hanging-punctuation: last force-end; hanging-punctuation: last allow-end; /* three keywords */ hanging-punctuation: first force-end last; hanging-punctuation: first allow-end last; /* global values */ hanging-punctuation: inherit; hanging-punctuation: initial; hanging-punctuation: unset; syntax the hanging-punctuation ...
... two-value syntax uses one of the following: first together with any one of last, allow-end, or force-end last together with any one of first, allow-end, or force-end three-value syntax uses one of the following: first, allow-end, and last first, force-end, and last values none no character hangs.
... allow-end a stop or comma at the end of a line hangs if it does not otherwise fit prior to justification.
... formal definition initial valuenoneapplies toall elementsinheritedyescomputed valueas specifiedanimation typediscrete formal syntax none | [ first | [ force-end | allow-end ] | last ] examples setting opening and closing quotes to hang html <p>“lorem ipsum dolor sit amet, consectetur adipiscing elit.
vertical-align - CSS: Cascading Style Sheets
a negative value is allowed.
...a negative value is allowed.
... negative values are allowed.
... recommendation adds the <length> value and allows it to be applied to elements with a display type of table-cell.
Cross-browser audio basics - Developer guides
preload the preload attribute allows you to specify a preference for how the browser preloads the audio, in other words, which part of the file it downloads when the <audio> element is initialized, and before the play button is pressed.
... metadata: download the audio metadata; this is usually the best option, as it allows you to access and display information such as audio length, and allow the browser to work out which audio file it should use.
... if (myaudio.currenttime > 5) { myaudio.currenttime = 3; } volume the volume property allows us to set the audio volume, as a number between 0 and 1.
... // set the volume at 50% myaudio.volume = 0.5; creating your own custom audio player the javascript media api allows you to create your own custom player.
Rich-Text Editing in Mozilla - Developer guides
starting in firefox 3, mozilla also supports internet explorer's contenteditable attribute which allows any element to become editable or non-editable (the latter for when preventing change to fixed elements in an editable environment).
... similarly, setting contenteditable to "true" allows you to make individual elements of a document editable.
... executing commands when an html document has been switched to designmode, the document object exposes the document.execcommand method which allows one to run commands to manipulate the contents of the editable region.
...internet explorer, however, does not allow javascript to change the current document's designmode.
User input and controls - Developer guides
drag & drop drag & drop allows your application’s users to click and hold the mouse button down over an element, drag it to another location, and release the mouse button to drop the element there.
... here is an example that allows a section of content to be dragged.
... examples tracking multiple touch points at a time this example tracks multiple touch points at a time, allowing the user to draw in a <canvas> with more than one finger at a time.
...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.
<input type="checkbox"> - HTML: Hypertext Markup Language
WebHTMLElementinputcheckbox
a checkbox allows you to select single values for submission in a form (or not).
... note: radio buttons are similar to checkboxes, but with an important distinction — radio buttons are grouped into a set in which only one radio button can be selected at a time, whereas checkboxes allow you to turn single values on and off.
... where multiple controls exist, radio buttons allow one to be selected out of them all, whereas checkboxes allow multiple values to be selected.
... for example, in the following demo we include multiple checkboxes to allow the user to select their interests (see the full version in the examples section).
<input type="month"> - HTML: Hypertext Markup Language
WebHTMLElementinputmonth
<input> elements of type month create input fields that let the user enter a month and year allowing a month and year to be easily entered.
... a string value of any means that no stepping is implied, and any value is allowed (barring other constraints, such as min and max).
... it's far too easy for someone to make adjustments to the html that allow them to bypass the validation, or to remove it entirely.
...the first is a native month input, and the other is a pair of <select> elements that allow choosing a month and year independently, for compatibility with browsers that don't yet support <input type="month">.
<input type="time"> - HTML: Hypertext Markup Language
WebHTMLElementinputtime
a string value of any means that no stepping is implied, and any value is allowed (barring other constraints, such as min and max).
... validation by default, <input type="time"> does not apply any validation to entered values, other than the user agent's interface generally not allowing you to enter anything other than a time value.
... this is helpful (assuming the time input is fully supported by the user agent), but you can't entirely rely on the value to be a proper time string, since it might be an empty string (""), which is allowed.
...it's far too easy for someone to make adjustments to the html that allow them to bypass the validation, or to remove it entirely.
<input type="url"> - HTML: Hypertext Markup Language
WebHTMLElementinputurl
by adding the required attribute, only properly-formed urls are allowed; the input is no longer considered valid when empty.
... <input id="myurl" name="myurl" type="url" placeholder="http://www.example.com"> controlling the input size you can control not only the physical length of the input box, but also the minimum and maximum lengths allowed for the input text itself.
...this doesn't limit the user to those options, but does allow them to select commonly-used urls more quickly.
... it's far too easy for someone to make adjustments to the html that allow them to bypass the validation, or to remove it entirely.
<input type="week"> - HTML: Hypertext Markup Language
WebHTMLElementinputweek
<input> elements of type week create input fields allowing easy entry of a year plus the iso 8601 week number during that year (i.e., week 1 to 52 or 53).
...put> elements, week inputs offer the following attributes: attribute description max the latest year and week to accept as valid input min the earliest year and week to accept as valid input readonly a boolean which, if present, indicates that the user cannot edit the field's contents step the stepping interval (the distance between allowed values) to use for both user interface and constraint validation max the latest (time-wise) year and week number, in the string format discussed in the value section above, to accept.
... a string value of any means that no stepping is implied, and any value is allowed (barring other constraints, such as min and max).
...it's far too easy for someone to make adjustments to the html that allow them to bypass the validation, or to remove it entirely.
Using the application cache - HTML: Hypertext Markup Language
[allow] [never for this site] [not now] the term "offline(-enabled) applications" sometimes refers specifically to applications that the user has allowed to use offline capabilities.
...in the explicit (cache:) section, each line is a valid uri or iri reference to a resource to cache (no wildcard characters are allowed in this sections).
... whitespace is allowed before and after the uri or iri on each line.
... cache manifest files can switch from section to section at will (each section header can be used more than once), and sections are allowed to be empty.
HTML: Hypertext Markup Language
WebHTML
advanced topics cors enabled image the crossorigin attribute, in combination with an appropriate cors header, allows images defined by the <img> element to be loaded from foreign origins and used in a <canvas> element as if they were being loaded from the current origin.
... preloading content with rel="preload" the preload value of the <link> element's rel attribute allows you to write declarative fetch requests in your html <head>, specifying resources that your pages will need very soon after loading, which you therefore want to start preloading early in the lifecycle of a page load, before the browser's main rendering machinery kicks in.
... guide to media types and formats on the web the <audio> and <video> elements allow you to play audio and video media natively within your content without the need for external software support.
... html content categories html is comprised of several kinds of content, each of which is allowed to be used in certain contexts and is disallowed in others.
CSP: plugin-types - HTTP
not setting this allows anything.
... examples disallowing plugins to disallow all plugins, the object-src directive should be set to 'none' which will disallow plugins.
... the plugin-types directive is only used if you are allowing plugins with object-src at all.
... <meta http-equiv="content-security-policy" content="object-src 'none'"> allowing flash content the content security policy content-security-policy: plugin-types application/x-shockwave-flash will allow to load flash objects: <object data="https://example.com/flash" type="application/x-shockwave-flash"></object> allowing java applets to load an <applet> you must specify application/x-java-applet: content-security-policy: plugin-types application/x-java-applet specifications specification status comment content security policy level 3the definition of 'plugin-types' in that specification.
OPTIONS - HTTP
WebHTTPMethodsOPTIONS
request has body no successful response has body yes safe yes idempotent yes cacheable no allowed in html forms no syntax options /index.html http/1.1 options * http/1.1 examples identifying allowed request methods to find out which request methods a server supports, one can use the curl command-line program to issue an options request: curl -x options https://example.org -i the response then contains an allow header that holds the allowed methods: http/1.1 204 no content allow: options, get, head, post cache-control: max-a...
...in this example, the server response says that: access-control-allow-origin the https://foo.example origin is permitted to request the bar.example/resources/post-here/ url via the following: access-control-allow-methods post, get, and options are permitted methods for the url.
... (this header is similar to the allow response header, but used only for cors.) access-control-allow-headers any script inspecting the response is permitted to read the values of the x-pingother and content-type headers.
... http/1.1 204 no content date: mon, 01 dec 2008 01:15:39 gmt server: apache/2.0.61 (unix) access-control-allow-origin: https://foo.example access-control-allow-methods: post, get, options access-control-allow-headers: x-pingother, content-type access-control-max-age: 86400 vary: accept-encoding, origin keep-alive: timeout=2, max=100 connection: keep-alive specifications specification title rfc 7231, section 4.3.7: options hypertext transfer protocol (http/1.1): semantics and content ...
Array.from() - JavaScript
the array.from() static method creates a new, shallow-copied array instance from an array-like or iterable object.
... array.from() has an optional parameter mapfn, which allows you to execute a map() function on each element of the array being created.
... in es2015, the class syntax allows sub-classing of both built-in and user-defined classes.
... you can work around this by inserting the following code at the beginning of your scripts, allowing use of array.from() in implementations that don't natively support it.
JSON - JavaScript
in engines that haven't implemented the proposal, u+2028 line separator and u+2029 paragraph separator are allowed in string literals and property keys in json; but their use in these features in javascript string literals is a syntaxerror.
... consider this example where json.parse() parses the string as json and eval executes the string as javascript: let code = '"\u2028\u2029"' json.parse(code) // evaluates to "\u2028\u2029" in all engines eval(code) // throws a syntaxerror in old engines other differences include allowing only double-quoted strings and having no provisions for undefined or comments.
...the reviver option allows for interpreting what the replacer has used to stand in for other datatypes.
...the replacer option allows for specifying other behavior.
eval() - JavaScript
sday","friday","saturday","sunday"][n%7 || 0]; } function runcodewithdatefunction(obj){ return function('"use strict";return (' + obj + ')')()( date ); } console.log(runcodewithdatefunction( "function(date){ return date(5) }" )) the code above may seem inefficiently slow because of the triple nested function, but let's analyze the benefits of the above efficient method: it allows the code in the string passed to runcodewithdatefunction() to be minified.
... function call overhead is minimal, making the far smaller code size well worth the benefit function() more easily allows your code to utilize the performance buttering "use strict"; the code does not use eval(), making it orders of magnitude faster than otherwise.
... parsing json (converting strings to javascript objects) if the string you're calling eval() on contains data (for example, an array: "[1, 2, 3]"), as opposed to code, you should consider switching to json, which allows the string to use a subset of javascript syntax to represent data.
...for example, trailing commas are not allowed in json, and property names (keys) in object literals must be enclosed in quotes.
Add to Home screen - Progressive web apps (PWAs)
add to home screen (or a2hs for short) is a feature available in modern browsers that allows a user to "install" a web app, ie.
...this guide explains how a2hs is used, and what you need to do as a developer to allow your users to take advantage of it.
... we've written a very simple example web site (see our demo live, and also see the source code) that doesn't do much, but was developed with the necessary code to allow it to be added to a home screen, as well as a service worker to enable it to be used offline.
... adding an install button to make our pwa installable on desktop, we first added a button to our document to allow users to do the installation — this isn't made available automatically on desktop apps, and the installation needs to be triggered by a user gesture: <button class="add-button">add to home screen</button> we then gave it some simple styling: .add-button { position: absolute; top: 1px; left: 1px; } javascript for handling the install at the bottom of our index.js file, we added some j...
Progressive web apps (PWAs)
service workers a service worker is a script that allows intercepting and control of how a web browser handles its network requests and asset caching.
... documentation <-- the temporary automatic list below will be replaced soon --> add to home screenadd to home screen (or a2hs for short) is a feature available in modern browsers that allows a user to "install" a web app, ie.
...this guide explains how a2hs is used, and what you need to do as a developer to allow your users to take advantage of it.how to make pwas installablein this article, we learned about how we can make pwas installable with a properly-configured web manifest, and how the user can then install the pwa with the "add to home screen" feature of their browser.how to make pwas re-engageable using notifications and pushhaving the ability to cache the contents of an app to work offline is a great feature.
... allowing the user to install the web app on their home screen is even better.
d - SVG: Scalable Vector Graphics
WebSVGAttributed
the center of the ellipse used to draw the arc is determined automatically based on the other parameters of the command: rx and ry are the two radii of the ellipse; angle represents a rotation (in degrees) of the ellipse relative to the x-axis; large-arc-flag and sweep-flag allows to chose which arc must be drawn as 4 possible arcs can be drawn out of the other parameters.
... large-arc-flag allows to chose one of the large arc (1) or small arc (0), sweep-flag allows to chose one of the clockwise turning arc (1) or anticlockwise turning arc (0) the coordinate x,y becomes the new current point for the next command.
...the center of the ellipse used to draw the arc is determined automatically based on the other parameters of the command: rx and ry are the two radii of the ellipse; angle represents a rotation (in degrees) of the ellipse relative to the x-axis; large-arc-flag and sweep-flag allows to chose which arc must be drawn as 4 possible arcs can be drawn out of the other parameters.
... large-arc-flag allows a choice of large arc (1) or small arc (0), sweep-flag allows a choice of a clockwise arc (1) or anticlockwise arc (0) the current point gets its x and y coordinates shifted by dx and dy for the next command.
Using shadow DOM - Web Components
y> <section> <img src="dinosaur.png" alt="a red tyrannosaurus rex: a two legged dinosaur standing upright like a human, with small arms, and a large head with lots of sharp teeth."> <p>here we will add a link to the <a href="https://www.mozilla.org/">mozilla homepage</a></p> </section> </body> </html> this fragment produces the following dom structure: shadow dom allows hidden dom trees to be attached to elements in the regular dom tree — this shadow dom tree starts with a shadow root, underneath which can be attached to any elements you want, in the same way as the normal dom.
...the difference is that none of the code inside a shadow dom can affect anything outside it, allowing for handy encapsulation.
...the shadow dom spec has made it so that you are allowed to actually manipulate the shadow dom of your own custom elements.
... many modern browsers implement an optimization for <style> tags either cloned from a common node or that have identical text, to allow them to share a single backing stylesheet.
Introduction to using XPath in JavaScript - XPath
numbervalue stringvalue booleanvalue example the following uses the xpath expression count(//p) to obtain the number of <p> elements in an html document: var paragraphcount = document.evaluate( 'count(//p)', document, null, xpathresult.any_type, null ); alert( 'this document contains ' + paragraphcount.numbervalue + ' paragraph elements' ); although javascript allows us to convert the number to a string for display, the xpath interface will not automatically convert the numerical result if the stringvalue property is requested, so the following code will not work: var paragraphcount = document.evaluate('count(//p)', document, null, xpathresult.any_type, null ); alert( 'this document contains ' + paragraphcount.stringvalue + ' paragraph elements' ); inste...
... node-set types the xpathresult object allows node-sets to be returned in 3 principal different types: iterators snapshots first nodes iterators when the specified result type in the resulttype parameter is either: unordered_node_iterator_type ordered_node_iterator_type the xpathresult object returned is a node-set of matched nodes which will behave as an iterator, allowing us to access the individual nodes contained by using the iteratenext() method of the xpathresult.
...ile (thisnode) { alert( thisnode.textcontent ); thisnode = iterator.iteratenext(); } } catch (e) { alert( 'error: document tree modified during iteration ' + e ); } snapshots when the specified result type in the resulttype parameter is either: unordered_node_snapshot_type ordered_node_snapshot_type the xpathresult object returned is a static node-set of matched nodes, which allows us to access each node through the snapshotitem(itemnumber) method of the xpathresult object, where itemnumber is the index of the node to be retrieved.
... an approach which might work better (and allow namespaces not to be known ahead of time) is described in the next section.
Classes and Inheritance - Archive of obsolete content
data members are properties that allow each instance to have their own state, whereas member functions are properties that allow instances to have behavior.
... inheritance allows classes to inherit state and behavior from an existing classes, known as the base class.
...this allows objects to inherit from more than one class.
content/worker - Archive of obsolete content
properties port object that allows you to: send customized messages to the worker using the port.emit function receive events from the worker using the port.on function url the url of the content.
... events message this event allows the content worker to receive messages from its associated content scripts.
... error this event allows the content worker to react to an uncaught runtime script error that occurs in one of the content scripts.
jpm - Archive of obsolete content
disables the copying of the profile used, which allows one to reuse a profile.
... disables the copying of the profile used, which allows one to reuse a profile.
...this allows you to self-host your add-on so that users can install it without error when signed add-ons are required.
Interaction between privileged and non-privileged pages - Archive of obsolete content
var myextension = { mylistener: function(evt) { alert("received from web page: " + evt.target.getattribute("attribute1") + "/" + evt.target.getattribute("attribute2")); } } document.addeventlistener("myextensionevent", function(e) { myextension.mylistener(e); }, false, true); // the last value is a mozilla-specific value to indicate untrusted content is allowed to trigger the event.
... note: if you're using html5's postmessage() to send a message from unprivileged code to privileged code, adding 'true' to the end of your event listener in your privileged chrome code will allow the message to be received.
...part1", "answers this."); doc.documentelement.appendchild(answerevt); var event = doc.createevent("htmlevents"); event.initevent("myanswerevent", true, false); answerevt.dispatchevent(event); } } document.addeventlistener("myextensionevent", function(e) { myextension.mylistener(e); }, false, true); // the last value is a mozilla-specific value to indicate untrusted content is allowed to trigger the event.
Migrating from Internal Linkage to Frozen Linkage - Archive of obsolete content
#define caseinsensitivecompare pr_true this allows you to use caseinsensitivecompare as the parameter to various string methods that normally accept pr_true under the internal api.
... #define tointeger(prv, radix) tointeger(reinterpret_cast<print32*>(prv), radix) this allows you to pass a pointer to an nsresult to the tointeger method, when it normally accepts a print32.
... #define nscaseinsensitivecstringcomparator() caseinsensitivecompare #define nscaseinsensitivestringcomparator() caseinsensitivecompare these allow you to use the comparators to those apis that normally accept caseinsensitivecompare under the external api.
Migrating raw components to add-ons - Archive of obsolete content
historically, firefox has allowed third party contributions to be added to the application's components/ directory, but beginning with firefox 3.6, this is no longer permitted.
...the firefox extension mechanism allows you to do everything that you could do through direct component drops, but also gives you and your users extra flexibility and more sophisticated versioning support.
...it allows javascript code to load functions from dlls on windows, and should allow you to eliminate your dependence on binary components entirely.
Getting Started with Firefox Extensions - Archive of obsolete content
they allow the application to be customized to fit the personal needs of each user if they need additional features, while keeping the applications small to download.
... firefox provides a very rich and flexible architecture that allows extension developers to add advanced features, customize the user's experience, and completely replace and remove parts of the browser.
... install hello world click the above link and then click "allow" in the pop-up bubble.
Handling Preferences - Archive of obsolete content
this xul page lists all the preferences defined in the firefox installation, allowing you to change them as you please.
...right-clicking on the list reveals several options that allow you to modify preference values and add new ones.
... the prefwindow allows you to use the preferences and preference elements, which facilitate preference handling.
Drag and Drop JavaScript Wrapper - Archive of obsolete content
you should define this function for elements that allow dragged data to be dropped on them.
...we'll allow only one flavour here, that for a string.
...var textobserver = { ondrop : function (event, transferdata, session) { event.target.setattribute("value",transferdata.data); } } the flavour system used allows multiple objects of various types to be dragged at once and also allows alternative forms of the data to be dragged.
Embedding Mozilla in a Java Application using JavaXPCOM - Archive of obsolete content
xulrunner ships with the javaxpcom component, which allows java code to interact with xpcom objects.
... if your code cannot find the gre and keeps throwing filenotfoundexceptions during the getgrepathwithproperties(...) call, check whether you already registered the gre on your system: gre registration the initembedding method kicks off the embedding process, allowing the java application to work with xpcom and mozilla.
...in addition to retrieving and calling methods on xpcom objects, javaxpcom allows the java application to pass java class objects to xpcom methods.
Layout System Overview - Archive of obsolete content
the original design of the layout system allowed for multiple, possibly different, presentations to be supported simultaneously from the same content model.
...the original design provided for a single presentation shell to manage multiple presentation contexts, to allow a single shell to handle multiple presentations.
...specializations of the frame also allow for the management of child frames; this functionality is provided by the container frame.
GRE - Archive of obsolete content
this embedding framework allows applications to locate a compatible gecko runtime and embed it without knowing in advance where that runtime will be installed.
... xulrunner: the new gre xulrunner is the new version of the gre, which not only allows embedding but is capable of bootstrapping entire xul applications such as firefox.
...this allows the embedder to specify what version(s) of gre are appropriate, and to specify any special features the gre must have (currently there are no special features defined).
Styling - Archive of obsolete content
prism allows for some client-side web application styling.
... the web application bundle is allowed to hold a css file named webapp.css (called the webapp style).
...this allows prism webapps to take on an os-specific look.
Supporting private browsing mode - Archive of obsolete content
this allows us to, for example, work with the places database without affecting its contents.
... private browsing notifications there are notifications available that allow you to easily watch for changes to the status of the private browsing mode, including detecting when it turns on and off.
...mode /* you should display some user interface here */ asubject.data = true; // cancel the operation } } }, "private-browsing-cancel-vote", false); note: a well-mannered extension should display some sort of user interface to indicate that private browsing mode will be kept on, and possibly offer the option to cancel whatever operation is preventing the extension from allowing private browsing to be shut off.
The new nsString class implementation (1999) - Archive of obsolete content
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 will allow programmers to use the nsstring api's like a standard char* without incurring the 2-byte per character overhead.
URIs and URLs - Archive of obsolete content
resources are identified by uri "uniform resource identifier" (taken from rfc 2396): uniform uniformity provides several benefits: it allows different types of resource identifiers to be used in the same context, even when the mechanisms used to access those resources may differ; it allows uniform semantic interpretation of common syntactic conventions across different types of resource identifiers; it allows introduction of new types of resource identifiers without interfering with the way that existing identifiers are used; and, it allows the identifiers to be reused in many different contexts...
...due to a loophole in prior specifications (rfc1630), some parsers allow the scheme name to be present in a relative uri if it is the same as the base uri scheme.
...the structure of a registry-based naming authority is specific to the uri scheme, but constrained to the allowed characters for an authority component.
Using Breakpoints in Venkman - Archive of obsolete content
advanced breakpoints venkman allows you to associate a breakpoint with a script that will be executed in the scope of the function when that breakpoint is hit.
... stop regardless of result causes venkman to stop execution after executing the breakpoint script, allowing you to inspect program state.
... the pass exceptions to caller checkbox allows you to pass exceptions thrown by the breakpoint script directly to the caller.
browser.type - Archive of obsolete content
the content that is loaded inside the browser is not allowed to access the chrome above it.
...the content that is loaded inside the browser is not allowed to access the chrome above it.
...the content that is loaded inside the browser is not allowed to access the chrome above it.
Introduction to XUL - Archive of obsolete content
conceptually, the xul language will allow someone with a text editor, given a package of components which can work together, the ability to put together an application by specifying something like this (for an application on an os using menubars across the top of its applications' windows): main window containing menubar area at top across width of window containing menubar (and its contents) toolbar area below menubar across wi...
... the chrome protocol is another mozilla extension allowing the exact location of files involved in the chrome description to be moved without affecting the xul source.
...the frame also has a special attribute called flex, which indicates how much the frame is allowed to stretch to consume available space inside its window.
loadOneTab - Archive of obsolete content
« xul reference home loadonetab( url, referreruri, charset, postdata, loadinbackground, allowthirdpartyfixup ) loadonetab( url, { referreruri: ..., charset: ..., postdata: ..., inbackground: ..., allowthirdpartyfixup: ..., relatedtocurrent: ...
...this method works the same as addtab except for the loadinbackground parameter which allows you to choose whether to open the new tab in foreground or background.
... firefox 3.6 note the second form of this method was added in firefox 3.6; it adds the relatedtocurrent parameter, and allows the parameters to be specified by name, in any order.
OpenClose - Archive of obsolete content
there are several situations when opening a menu is not allowed.
...this allows the position of the popup to be precisely controlled while still being anchored to a specific element.
...this allows a popup to use specific positioning behaviour by using the position, left and top attributes instead.
Multiple Queries - Archive of obsolete content
this method of using multiple queries allows different content to generated for each query.
...it does this by only allowing the match for the earliest query.
...speaking of using a single query, the simple query syntax allows a slight shorthand.
Multiple Rules - Archive of obsolete content
this allows the conditions can be simpler.
... it also allows a common technique where the last rule in a template has no conditions, allowing all remaining results that didn't match earlier rules to match this last rule.
...naturally, this won't work for people with more than two names (joan of arc for instance), but rule conditions allow a number of useful ways to filter results.
Sorting Results - Archive of obsolete content
if you don't want to allow sorting by a certain column, you can leave out the sort attribute.
... only specify this attribute on columns that you wish to allow the user to sort by.
...ax-ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:r="http://www.xulplanet.com/rdf/" xmlns:nc="http://home.netscape.com/nc-rdf#"> <rdf:description rdf:about="http://www.xulplanet.com/ndeakin/images/t/palace.jpg"> <r:date nc:parsetype="date">1125966767295<r:date> </rdf:description> </rdf:rdf> you can also specify parsetype="integer" for numbers which will allow sorting numerically.
Document Object Model - Archive of obsolete content
the script tag does allow code to be contained directly inside of it.
... these functions allow you to get and change the value of an attribute at any time.
...properties are listed below: firstchild reference to the first child node of an element lastchild reference to the last child node of an element childnodes holds a list of the children of an element parentnode reference to the parent of an node nextsibling reference to the next sibling in sequence previoussibling reference to the previous sibling in sequence these properties allow you to navigate through a document is various ways.
Element Positioning - Archive of obsolete content
there are a number of features that allow you to control the size of an element.
... setting minimum and maximum sizes you may want to allow an element to be flexible but constrain the size so that it cannot be larger than a certain size.
...however, buttons (and other elements with a label) have a special attribute called crop that allows you to specify how the text may be cropped if it is too big.
Introduction - Archive of obsolete content
this is done using a feature of xul called an overlay, which allows the ui provided from one source, in this case, the firefox browser, to be merged together with the ui from the extension.
... standalone xulrunner application xulrunner is a packaged version of the mozilla platform which allows you to create standalone xul applications.
...mozilla applications such as firefox provide an extension manager which allows packages to be installed without having to write a lot of complex code.
List Controls - Archive of obsolete content
tbox> <listcols> <listcol/> <listcol/> </listcols> <listitem> <listcell label="george" /> <listcell label="house painter" /> </listitem> <listitem> <listcell label="mary ellen" /> <listcell label="candle maker" /> </listitem> <listitem> <listcell label="roger" /> <listcell label="swashbuckler" /> </listitem> </listbox> header rows list boxes also allow a special header row to be used.
...this attribute will be described in a later section, but here it allows the column to fill all of the remaining space horizontally.
...a variant of the menulist allows editing the text in the field.
Using Remote XUL - Archive of obsolete content
this also means you can't load xul using file:// urls unless you set the preference dom.allow_xul_xbl_for_file to true.
...the remote xul manager extension lets you manage this whitelist, which is maintained using nsipermissionmanager, by creating entries of type "allowxulxbl", like this: components.classes["@mozilla.org/permissionmanager;1"] .getservice(components.interfaces.nsipermissionmanager) .add(uri, 'allowxulxbl', components.interfaces.nsipermissionmanager.allow_action); xul (pronounced like "zool"), which is short for xml-based user interface language, is an xml-based language for describing application interfaces.
...for apache, you can do this by adding the following line to your mime.types file: application/vnd.mozilla.xul+xml .xul alternately, add this line to your httpd.conf file or, if the apache server is configured to allow it, to the .htaccess file in the directory from which the xul file is served: addtype application/vnd.mozilla.xul+xml .xul then restart your web server.
Using the Editor from XUL - Archive of obsolete content
having an id attribute, id="content-frame", allows us to find this element with document.getelementbyid("content-frame"), and to style it from css.
...we are currently only able to have one editor per composer window; in future, relaxing this restriction would allow us to edit all the subdocuments in a frameset at the same time.
...one thing to note about editor initialization is that we pass into the editor's init() method an nsicontent* that corresponds to the root of the content tree that the editor is allowed to work with.
Writing Skinnable XUL and CSS - Archive of obsolete content
this allows the button to blend in as much as possible regardless of where it is used.
...exceptions to this rule must be approved in order to be allowed into the product.
... style="..." is prohibited in xul files without approval any usages of inline style are extremely dangerous, since they are overriding the included skin, and must be approved before their usage will be allowed.
XUL Changes for Firefox 1.5 - Archive of obsolete content
a set of icons will appear across the top of the dialog allowing the user to switch panels.
... <menulist> items in a <menulist> support the description attribute to allow for extra descriptive text to appear beside an item's label.
... draggable tabs the tabbrowser now allows the user to rearrange tabs by dragging them.
arrowscrollbox - Archive of obsolete content
flex="1"> <button label="red"/> <button label="blue"/> <button label="green"/> <button label="yellow"/> <button label="orange"/> <button label="silver"/> <button label="lavender"/> <button label="gold"/> <button label="turquoise"/> <button label="peach"/> <button label="maroon"/> <button label="black"/> </arrowscrollbox> attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortd...
... the disabled attribute is allowed only for form controls.
... properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width disabled type: boolean ...
key - Archive of obsolete content
ArchiveMozillaXULkey
the disabled attribute is allowed only for form controls.
... properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlist...
...this allows keys to match more loosely for modifier keys that aren't relevant, yet still allows specific modifiers to be required.
keyset - Archive of obsolete content
attributes disabled examples <keyset> <key id="sample-key" modifiers="shift" key="r"/> </keyset> attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdi...
... the disabled attribute is allowed only for form controls.
... properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlist...
listhead - Archive of obsolete content
the disabled attribute is allowed only for form controls.
... inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortd...
... inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener()...
listheader - Archive of obsolete content
the disabled attribute is allowed only for form controls.
... inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortd...
... inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, foc...
richlistbox - Archive of obsolete content
the disabled attribute is allowed only for form controls.
... seltype type: one of the values below used to indicate whether multiple selection is allowed.
... value type: string the string attribute allows you to associate a data value with an element.
rows - Archive of obsolete content
ArchiveMozillaXULrows
however, nesting rows elements allows groups of rows to have a separate appearance such as a different border, or separate scrolling may be defined for these rows.
... attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-c...
...ursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getele...
scrollbox - Archive of obsolete content
abel value="02 our fathers brought forth on "/> <label value="03 this continent, a new nation, "/> <label value="04 conceived in liberty, and "/> <label value="05 dedicated to the proposition "/> <label value="06 that all men are created equal."/> </vbox> the next bunch of labels is similar, but if the container doesn't give enough room for it, scroll bars will sprout out of nowhere and allow the user to scroll around the big content in the small view space.
... attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortd...
...irection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), ...
treecell - Archive of obsolete content
attributes editable, label, mode, properties, ref, src, value attributes editable type: boolean allows the contents of individual cells in the column to be changed, especially useful when <treecol type="checkbox">.
... value type: string the string attribute allows you to associate a data value with an element.
... properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlist...
wizard - Archive of obsolete content
set to false to disallow moving to the next page.
...set to false to disallow moving to the previous page.
...the pageid argument allows you to specify the index of the page to which to jump.
XUL Explorer - Archive of obsolete content
double-click or drag-and-drop to insert a snippet file > new allows user to pick any “template” snippet, as well as blank.
...it checks for legal element and attribute names, including allowed attributes for a given element.
...ice” checks such as: using of commands and keys, strings in dtds and so on - xul checker multi-tabbed editor support support wizards to generate common projects - extensions support extension testing using firefox extension test mode venkman support dom inspector support future: support more “best practice” checks such as: more a11y checks, strings in dtds and so on - xul checker allow users to add snippets on the fly add sidebars for more functionality - property sidebar and project sidebar support wizards to generate common projects - xul files, js xpcom, and xulrunner applications for more detailed information, see the xul_explorer:planning#feature_planning_for_xul_explorer.
Gecko Compatibility Handbook - Archive of obsolete content
or, if you are using user-agent detection, you can install an extension in firefox or mozilla which allows you to "spoof" the user-agent strings of the various gecko browsers.
... using the appropriate doctype in an html document allows a web page author to continue to support the older, less compliant browsers while also supporting the newer, more compliant browsers by specifiying special quirks mode layout via the doctype.
...quirks mode allows the use of invalid comments containing two dashes -- while standards and almost standards modes do not.
Extentsions FAQ - Archive of obsolete content
<https://bugzilla.mozilla.org/show_bug.cgi?id=312818> "thunderbird requires domain in addresses and doesn't always add default" there is an extension that allows what you want attached to one of the comments in this bug.
...however, it's functional and does allow for the explorer to be handling the display of the folder contents, and all of the right-click context menu support is present so it should meet my needs.
...it allows bouncing to arbitrary addresses.
NPN_SetValueForURL - Archive of obsolete content
« gecko plugin api reference « browser side plug-in api summary allows a plugin to change the stored information associated with a url, in particular its cookies.
... (while the api theoretically allows the preferred proxy for a given url to be changed, doing so does not have much meaning given how proxies are configured, and is not supported.) syntax #include <npapi.h> typedef enum { npnurlvcookie = 501, npnurlvproxy } npnurlvariable; nperror npn_setvalueforurl(npp instance, npnurlvariable variable, const char *url, const char *value, uint32_t len); parameters this function has the following parameters: instance pointer to the current plug-in instance.
... description this entry point is designed to allow plugins to affect the cookies sent by the browser back to the server.
Why RSS Content Module is Popular - Including HTML Contents - Archive of obsolete content
this greatly bloats the size of contents but is necessary since certain characters are no allowed in xml.
...it is not actually allowed.
... the rss 2.0 specification clearly states that “entity-encoded html is allowed“ and even provides examples showing exactly the syntax above (using cdata and unencoded html).
What is RSS - Archive of obsolete content
netscape's rss 0.91 was only xml-based and added a dtd to allow several entities (commonly found in html).
... <link>http://joe-blow.example.net/log/19</link> </item> <item> <title>black cat spotted</title> <guid>http://joe-blow.example.net/log/18</guid> <pubdate>fri, 13 may 2005 13:13:13 -0500</pubdate> <link>http://joe-blow.example.net/log/18</link> </item> </channel> </rss> those who create internet radio use rss to allow users to access their shows.
... those who create internet television use rss to allow users to access their shows.
Browser Detection and Cross Browser Support - Archive of obsolete content
it also includes compatibility features which allow it to reasonably handle legacy content which was developed for earlier generations of browsers such as netscape navigator 4 as well as features which provide compatibility with internet explorer 5 and 6.
...if you have the need to only allow specific versions of browsers to use your secure site, then the user agent string and the related information from the navigator object can be very useful.
...10px // gecko will allow you to omit the unit only in quirks // mode.
Array comprehensions - Archive of obsolete content
the array comprehension syntax was a javascript expression which allowed you to quickly assemble a new array based on an existing one.
... syntax [for (x of iterable) x] [for (x of iterable) if (condition) x] [for (x of iterable) for (y of iterable) x + y] description inside array comprehensions, these two kinds of components are allowed: for...of and if the for-of iteration is always the first component.
... multiple for-of iterations or if statements are allowed.
Generator comprehensions - Archive of obsolete content
the generator comprehension syntax was a javascript expression which allowed you to quickly assemble a new generator function based on an existing iterable object.
... syntax (for (x of iterable) x) (for (x of iterable) if (condition) x) (for (x of iterable) for (y of iterable) x + y) description inside generator comprehensions, these two kinds of components are allowed: for...of and if the for-of iteration is always the first component.
... multiple for-of iterations or if statements are allowed.
Archived JavaScript Reference - Archive of obsolete content
this property has been removed and no longer works.array comprehensionsthe array comprehension syntax was a javascript expression which allowed you to quickly assemble a new array based on an existing one.
...it has been removed from firefox starting with version 58.generator comprehensionsthe generator comprehension syntax was a javascript expression which allowed you to quickly assemble a new generator function based on an existing iterable object.
... chapter contains information about javascript's version history and implementation status for mozilla/spidermonkey-based javascript applications, such as firefox.number.tointeger()the number.tointeger() method used to evaluate the passed value and convert it to an integer, but its implementation has been removed.object.getnotifier()the object.getnotifer() method was used to create an object that allows to synthetically trigger a change, but has been deprecated and removed in browsers.object.observe()the object.observe() method was used for asynchronously observing the changes to an object.
LiveConnect Overview - Archive of obsolete content
this package defines the following classes: netscape.javascript.jsobject allows java code to access javascript methods and properties.
... netscape.javascript.jsexception allows java code to handle javascript errors.
...this allows your java code to handle errors in javascript code execution which appear in java as exceptions of type jsexception.
Properly Using CSS and JavaScript in XHTML Documents - Archive of obsolete content
in particular: raw < and & characters are not allowed except inside of cdata sections (<![cdata[ ...
... } </script> note that this example is not well formed xhtml since the use of raw < is only allowed as a part of markup in xhtml or xml.
...however, it is possible to combine javascript comments with cdata sections to allow for backward compatibility.
Troubleshooting XForms Forms - Archive of obsolete content
</tr> </xf:repeat> </table> the xhtml modularization does not allow this.
... if you are trying to submit to a different domain than the form is loaded from, make sure that you have allowed cross-domain submission for that specific "form domain".
...if you are developing on your local machine using apache tomcat for example then add the following regular expression on a new line: ^http://localhost:8080/.* use the xforms buddy to view instance data the xforms buddy extension allows you to dynamically view model instance data while the xforms is running in the firefox browser.
XForms Select Element - Archive of obsolete content
introduction allows the user to choose one or more selections from a list of pre-defined items (see the spec).
...this attribute, when set to 'open', allows the user to provide free entry to the list.
...the data binding restriction to simple content may be relaxed when an itemset element is used, which allows the available choices to be obtained from an xforms model.
XForms Select1 Element - Archive of obsolete content
introduction allows the user to choose a single value from a list of pre-defined values (see the spec).
... single-node binding special selection - this attribute, when set to 'open', allows the user to provide free entry to the list.
...the data binding restriction to simple content may be relaxed when an itemset element is used, which allows the available choices to be obtained from an xforms model.
Choosing Standards Compliance Over Proprietary Practices - Archive of obsolete content
as organizations mature, they discover that they need more processes to give them greater control, which allows them to more easily plan and predict.
...pilot had a highly-integrated debugging tool called co-pilot that allowed the xerox development organization to quickly and easily debug issues.
... a significant drawback in allowing divergence across applications is that information must be replicated, altered, or massaged to be processed across the divergent applications.
Popup Window Controls - Archive of obsolete content
mozilla and firefox allow users to control most unsolicited attempts to open new windows such as popup and popunder windows.
... popup window controls configuration using the preference for privacy & security > popup windows, users can: allow all sites to open popup windows except for sites which the user has explicity denied permission what popup windows are suppressed?
...ttempt to open an unsolicited window var popup = window.open('about:blank', 'popup'); if (!popup) { // the user has suppressed the popup } // --> </script> </head> <body> <!-- your page here --> </body> </html> if your popup window is crucial to the operation of your web site you can notify the user and ask them to add your site to the list of sites which are allowed to use unsolicited popup windows.
Windows Media in Netscape - Archive of obsolete content
.ocx.7"); } } catch(e) { // handle error -- no wmp 7 or 9 control // can use wmp 6 also if necessary, but this is legacy software nowadays } if (player) { // windows media player control exists and it is version 7 or 9 // can use wmp 7 or 9 api -- call versioninfo property, only in 7 and 9 var versionstring = player.versioninfo; alert(versionstring); } only geckoactivexobject allows for the use of the windows media player classid as an argument.
... since classids are affiliated with individual activex controls in a unique manner, this allows for unique instantiation of controls.
...for example, a possible regular expression to detect if geckoactivexobject is supported could be: /gecko\/[^)].*\(ax/ embedding the control in web pages: use of the object element netscape 7.1 allows the use of the object element of html to be used to instantiate the windows media player control in the same way it is used in ie.
Developer Tools - MDN Web Docs Glossary: Definitions of Web-related terms
developer tools (or "development tools" or short "devtools") are programs that allow a developer to create, test and debug software.
... current browsers provide integrated developer tools, which allow to inspect a website.
... they let users inspect and debug the page's html, css, and javascript, allow to inspect the network traffic it causes, make it possible to measure it's performance, and much more.
Thread - MDN Web Docs Glossary: Definitions of Web-related terms
this allows slow, complex, or long-running tasks to be executed independently of the main thread, preserving the overall performance of the site or app—as well as that of the browser overall.
... this also allows individuals to take advantage of modern multi-core processors.
...they help minimise the context switching time, enables more efficient communication and allows further use of the multiprocessor architecture.
About Scriptable Interfaces - Interfaces
most of the information of this document is based on http://www.mozilla.org/scriptable/ and creating xpcom components scriptable interfaces interfaces allow xpcom components to expose their functionality to the outside world while hiding the inner details of the component implementation.
... xpconnect xpconnect is a technology that allows scriptable interfaces to be used/implemented from/in javascript scripts.
... python there's an extension extensions/python that bridges the gap between xpcom and python, allowing scriptable interfaces to be used/implemented from/in python scripts.
Advanced styling effects - Learn web development
box shadows box-shadow allows you to apply one or more drop shadows to an element's box.
... blend modes css blend modes allow us to add blend modes to elements that specify a blending effect when two elements overlap — the final color shown for each pixel will be the result of a combination of the original pixel color, and that of the pixel in the layer underneath it.
...when used along with the proprietary -webkit-text-fill-color: transparent; feature, this allows you to clip background images to the shape of the element's text, making for some nice effects.
Backgrounds and borders - Learn web development
positioning the background image the background-position property allows you to choose the position in which the background image appears on the box it is applied to.
... note: background-position is a shorthand for background-position-x and background-position-y, which allow you to set the different axis position values individually.
...if specifying an image, and text will be placed on top of that image, you should also specify a background-color that will allow the text to be legible if the image does not load.
The box model - Learn web development
the properties used in that example are shorthands and allow us to set all four sides of the box at once.
... these shorthands also have equivalent longhand properties, which allow control over the different sides of the box individually.
...<a> is an inline element like <span>; you can use display: inline-block to allow padding to be set on it, making it easier for a user to click the link.
CSS building blocks - Learn web development
along the way you'll come across plenty of exercises to allow you to test your understanding.
... css selectors there are a wide variety of css selectors available, allowing for fine-grained precision when selecting elements to style.
... css values and units every property used in css has a value or set of values that are allowed for that property.
Positioning - Learn web development
previous overview: css layout next positioning allows you to take elements out of the normal document layout flow, and make them behave differently; for example sitting on top of one another, or always remaining in the same place inside the browser viewport.
... introducing positioning the whole idea of positioning is to allow us to override the basic document flow behavior described above, to produce interesting effects.
...this is basically a hybrid between relative and fixed position, which allows a positioned element to act like it is relatively positioned until it is scrolled to a certain threshold point (e.g.
CSS layout - Learn web development
positioning positioning allows you to take elements out of the normal document layout flow, and make them behave differently, for example sitting on top of one another, or always remaining in the same place inside the browser viewport.
... responsive design as more diverse screen sizes have appeared on web-enabled devices, the concept of responsive web design (rwd) has appeared: a set of practices that allows web pages to alter their layout and appearance to suit different screen widths, resolutions, etc.
...media queries are a key part of responsive web design, as they allow you to create different layouts depending on the size of the viewport, but they can also be used to detect other things about the environment your site is running on, for example whether the user is using a touchscreen rather than a mouse.
create fancy boxes - Learn web development
box model tweak the box model alone allows us to do some basic stuff, like adding simple borders, making squares, etc..
...*/ .fancy::before, .fancy::after { /* this is required to be allowed to display the pseudo-elements, event if the value is an empty string */ content: ''; /* we positionnate our pseudo-elements on the left and right sides of the box, but always at the bottom */ position: absolute; bottom : 0; /* this makes sure our pseudo-elements will be below the box content whatever happens.
... the box-shadow property allow us to create inner light and a flat drop shadow effect, but with some little extra work it becomes possible to create a more natural geometry by using pseudo-element and the transform property.
What HTML features promote accessibility? - Learn web development
the tabindex attribute allows you to define this order.
... <a href="somepage.html" accesskey="s">some page</a> skip links to aid tabbing, you can supply links that allow users to jump over chunks of your web page.
... you might want to allow someone to jump over a plethora of navigation links, for example, so they can just read a page’s main content rather than cycle through all of the links.
Client-side form validation - Learn web development
if the information is correctly formatted, the application allows the data to be submitted to the server and (usually) saved in a database; if the information isn't correctly formatted, it gives the user an error message explaining what needs to be corrected, and lets them try again.
... simple start file let's start with a simple example: an input that allows you to choose whether you prefer a banana or a cherry.
... note: a key point here is that setting the novalidate attribute on the form is what stops the form from showing its own error message bubbles, and allows us to instead display the custom error messages in the dom in some manner of our own choosing.
UI pseudo-classes - Learn web development
and the css looks like this: input + span { position: relative; } input + span::after { font-size: 0.7rem; position: absolute; padding: 5px 10px; top: -26px; } input:required + span::after { color: white; background-color: black; content: "required"; left: -70px; } input:out-of-range + span::after { color: white; background-color: red; width: 155px; content: "outside allowable value range"; left: -182px; } this is a similar story to what we had before in the :required example, except that here we've split out the declarations that apply to any ::after content into a separate rule, and given the separate ::after content for :required and :out-of-range states their own content and styling.
...if however, you then change the age entry to one that is out of range, the "outside allowable value range" message then pops up in place of "required".
...the spinner buttons won't let you increment/decrement the value outside the allowable range.
Your first form - Learn web development
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).
..."text" value="by default this element is filled with this text"> on the other hand, if you want to define a default value for a <textarea>, you put it between the opening and closing tags of the <textarea> element, like this: <textarea> by default this element is filled with this text </textarea> the <button> element the markup for our form is almost complete; we just need to add a button to allow the user to send, or "submit", their data once they have filled out the form.
...the main advantage of the <button> element is that the <input> element only allows plain text in its label whereas the <button> element allows full html content, allowing more complex, creative button content.
Tips for authoring fast-loading HTML pages - Learn web development
it allows for efficient page caching; by means of this header, information is conveyed to the user agent about the file it wants to load, such as when it was last modified.
...first, browsers will have no need to perform error-correction when parsing the html (this is aside from the philosophical issue of whether to allow format variation in user input and then programmatically "correct" or normalize it; or whether, instead, to enforce a strict, no-tolerance input format).
... moreover, valid markup allows for the free use of other tools which can pre-process your web pages.
Adding vector graphics to the Web - Learn web development
the svg format allows us to create powerful vector graphics for use on the web.
...these packages allow you to create a variety of illustrations using various graphics tools, and create approximations of photos (for example inkscape's trace bitmap feature.) svg has some additional advantages besides those described so far: text in vector images remains accessible (which also benefits your seo).
... in the last article of this module we will explore responsive images in detail, looking at the tools html has to allow you to make your images work better across different devices.
HTML table advanced features and accessibility - Learn web development
one clear way to do this is by using <thead>, <tfoot>, and <tbody>, which allow you to mark up a header, footer, and body section for the table.
...a table can be a handy tool, for giving us quick access to data and allowing us to look up different values.
...h scope="col">date</th> <th scope="col">evaluation</th> <th scope="col">cost (€)</th> </tr> </thead> and each row could have a header defined like this (if we added row headers as well as column headers): <tr> <th scope="row">haircut</th> <td>hairdresser</td> <td>12/09</td> <td>great idea</td> <td>30</td> </tr> screenreaders will recognize markup structured like this, and allow their users to read out the entire column or row at once, for example.
Making asynchronous programming easier with async and await - Learn web development
the await keyword causes the javascript runtime to pause your code on this line, allowing other code to execute in the meantime, until the async function call has returned its result.
...it does allow other tasks to continue to run in the meantime, but your own code is blocked.
... if you want to use async/await but are concerned about older browser support, you could consider using the babeljs library — this allows you to write your applications using the latest javascript and let babel figure out what changes if any are needed for your user’s browsers.
Introducing asynchronous JavaScript - Learn web development
synchronous javascript to allow us to understand what asynchronous javascript is, we ought to start off by making sure we understand what synchronous javascript is.
... callbacks are versatile — not only do they allow you to control the order in which functions are run and what data is passed between them, they also allow you to pass data to different functions depending on circumstance.
...but web browsers define functions and apis that allow us to register functions that should not be executed synchronously, and should instead be invoked asynchronously when some kind of event occurs (the passage of time, the user's interaction with the mouse, or the arrival of data over the network, for example).
Introduction to events - Learn web development
plus, this allows you to have the same button performing different actions in different circumstances — all you have to do is add or remove event handlers as appropriate.
...the corresponding ondataavailable handler's event object has a data property available containing the recorded audio or video data to allow you to access it and do something with it.
... event delegation bubbling also allows us to take advantage of event delegation — this concept relies on the fact that if you want some code to run when you select any one of a large number of child elements, you can set the event listener on their parent and have events that happen on them bubble up to their parent rather than having to set the event listener on every child individually.
Fetching data from the server - Learn web development
enter ajax this led to the creation of technologies that allow web pages to request small chunks of data (such as html, xml, json, or plain text) and display them only when needed, helping to solve the problem described above.
...these technologies allow web pages to directly handle making http requests for specific resources available on a server and formatting the resulting data as needed before it is displayed.
...xhr allows you to handle this using its onload event handler — this is run when the load event fires (when the response has returned).
Client-side web APIs - Learn web development
provide apis allowing developers to make use of their data (e.g.
...this article provides an introduction to the canvas api, and further resources to allow you to learn more.
... 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.
Aprender y obtener ayuda - Learn web development
some of the articles will be tutorials, to teach you a certain technique or important concept (such as "learn how to create a video player" or "learn the css box model"), and some of the articles will be reference material, to allow you to look up details you may have forgotten (such as "what is the syntax of the css background property"?) mdn web docs is very good for both types — the area you are currently in is great for learning techniques and concepts, and we also have several giant reference sections allowing you to look up any syntax you can't remember.
... also, it might be a good idea to have some sub-goals worked out to allow you to keep track of where you are more easily, for example: html and css basics learnt by summer javascript basics learnt by december example website project built by next april etc.
... in addition, the web has developer tools that allow you to look at the code used to build any site on the web — if you don't have a solution to hand, one good research method is to find websites with similar features in the wild, and find out how they did it.
CSS performance optimization - Learn web development
will-change: opacity, transform; the font-display property applied to the @font-face rule, the font-display property defines how font files are loaded and displayed by the browser, allowing text to appear with a fallback font while a font loads, or fails to load.
... @font-face { font-family: somefont; src: url(/path/to/fonts/somefont.woff) format('woff'); font-weight: 400; font-style: normal; font-display: fallback; } the contain property the contain css property allows an author to indicate that an element and its contents are, as much as possible, independent of the rest of the document tree.
... this allows the browser to recalculate layout, style, paint, size, or any combination of them for a limited area of the dom and not the entire page.
Ember Interactivity: Footer functionality, conditional rendering - Learn web development
footer next, go and find the newly-created todomvc/app/components/footer.js file and update it to the following: import component from '@glimmer/component'; import { inject as service } from '@ember/service'; export default class footercomponent extends component { @service('todo-data') todos; } now we need to go back to our todo-data.js file and add some functionality that will allow us to return the number of incomplete todos (useful for showing how many are left), and clear the completed todos out of the list (which is what the “clear completed” functionality needs).
...te the contents to look like so, to give the todo component access to the service: import component from '@glimmer/component'; import { inject as service } from '@ember/service'; export default class todocomponent extends component { @service('todo-data') todos; } next, go back again to our todo-data.js service file and add the following action just below the previous ones, which will allow us to toggle a completion state for each todo: @action togglecompletion(todo) { todo.iscompleted = !todo.iscompleted; } updating the template to show completed state finally, we will edit the todo.hbs template such that the checkbox's value is now bound to the iscompleted property on the todo, and so that on change, the togglecompletion() method on the todo service is invoked.
...fn allows for partial application, which is similar to bind, but it never changes the invocation context; this is equivalent to using bind with a null first argument.
Ember interactivity: Events, classes and state - Learn web development
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.
...the only ember-specific part of this class is the @tracked decorator — this hooks in to the reactivity system and allows ember to update what you're seeing in your app automatically if the tracked properties change.
...this is a reference to the todo-data service, allowing us to interact with the service instance directly.
Ember resources and troubleshooting - Learn web development
for framework-specific things, there is the ember-inspector add-on, which allows inspection of: routes & controllers components services promises data (i.e: from a remote api — from ember-data, by default) deprecation information render performance for general javascript debugging, check out our guides on javascript debugging as well as interacting with the browser's other debugging tools.
...the intentional minimalism forces certain decisions, and allows for more consistent code, while keeping the template more structural rather than having them filled with bespoke logic.
... more concretely, using mut allows for template-only settings functions to be declared: <checkbox @value={{this.somedata}} @ontoggle={{fn (mut this.somedata) (not this.somedata)}} /> whereas, without mut, a component class would be needed: import component from '@glimmer/component'; import { tracked } from '@glimmer/tracking'; import { action } from '@ember/object'; export default class example extends component { @trac...
React interactivity: Editing, filtering, conditional rendering - Learn web development
this includes allowing you to edit existing tasks, and filtering the list of tasks between all, completed, and incomplete tasks.
... a ui for editing in order to allow users to edit a task, we have to provide a user interface for them to do so.
... render an array of <filterbutton /> elements that allow users to change the active filter between all, completed, and incomplete.
Deployment and next steps - Learn web development
even if you are not planning to adopt it, this article will be useful for allowing you to learn what it has to offer and help you make your own decision.
...all `npm run start` once // the bundle has been generated !production && serve(), // watch the `public` directory and refresh the // browser on changes when not in production !production && livereload('public'), // if we're building for production (npm run build // instead of npm run dev), minify production && terser() ], there are many plugins for rollup that allow you to customize its behavior.
... automatic deployment to gitlab pages for hosting static files there are several online services that allow you to automatically deploy your site whenever you push changes to a git repository.
Introduction to cross browser testing - Learn web development
this may involve writing different code paths that reproduce functionality in different ways aimed at different browsers, or using a polyfill to mimic any missing support using javascript or other technologies, or using a library that allows you to write a single bit of code and then does different things in the background depending on what the browser supports.
... if you haven't got the means to test all those different browser, operating system, and device combinations on physical hardware, you can also make use of emulators (emulate a device using software on your desktop computer) and virtual machines (software that allows you to emulate multiple operating system/software combinations on your desktop computer).
...you can set up your own testing automation system (selenium being the popular app of choice) that could for example load your site in a number of different browsers, and: see if a button click causes something to happen successfully (like for example, a map displaying), displaying the results once the tests are completed take a screenshot of each, allowing you to see if a layout is consistent across the different browsers.
Deploying our app - Learn web development
netlify, amongst other things, also allows you to run pre-deployment tasks, which in our case means that all the production code build processes can be performed inside of netlify and if the build is successful, the website changes will be deployed.
... now we're ready to push our code to github; run the following command now: git push github master at this point you'll be prompted to enter a username and password before git will allow the push to be sent.
...i'll show you how to add an initial test to your project and how to use the test to prevent or to allow the project deployment to happen.
Package management basics - Learn web development
you could manage your own package registry — products like microsoft azure allow you to create proxies to the npm registry (so you can override or lock certain packages), github also offers a package registry service, and there will be likely more options appearing as time goes on.
...we’ll call it parcel-experiment, but you can call it whatever you like: mkdir parcel-experiment cd parcel-experiment next, let's initialise our app as an npm package, which creates a config file — package.json — that allows us to save our configuration details in case we want to recreate this environment later on, or even publish the package to the npm registry (although this is somewhat beyond the scope of this article).
... in addition, the npm (and yarn) commands are clever in that they will search for command line tools that are locally installed to the project before trying to find them through conventional methods (where your computer will normally store and allow software to be found).
Mozilla accessibility architecture
for example, this allows the msaa client to invalidate parts of its own cache or data model based on dom mutation events.
... this architecture allows us to quickly wipe away an entire document's worth of cached nodes when a document goes away, simply by destroying the document accessible's cache.
...the member variables keeping track of the number of children, parent, first child and next sibling allow us to have instant traversal around accessible nodes that have already been visited.
Mozilla's Section 508 Compliance
caveats: 1) although sidebar cannot be customized without a mouse, all sidebar functions that come with the browser are available through other means 2) java and in-page plugins cannot be used with the keyboard, so they must not be installed for keyboard-only users additional features for the keyboard: 1) find as you type allows for quick navigation to links and convenient text searching 2) browse with caret (f7 key toggles) allows users to select arbitrary content with the keyboard and move through content as if inside a readonly editor.
...in these situations mozilla blinks 1 hz, which is within the allowable range and follows the stricter mil-std standard.
... (l) when electronic forms are used, the form shall allow people using assistive technology to access the information, field elements, and functionality required for completion and submission of the form, including all directions and cues.
Software accessibility: Where are we today?
some examples of these assistive devices and software include: screen reading software, which speaks text displayed on the screen using hardware or software text-to-speech, and which allows a blind person to use the keyboard to simulate mouse actions alternate input devices, which allow people with physical disabilities to use alternatives to a keyboard and mouse voice recognition software, which allows a person to simulate typing on a keyboard or selecting with a mouse by speaking into the computer screen magnification software, which allows a low-vision computer user to mor...
...e easily read portions of the screen comprehension software, which allows a dyslexic or learning disabled computer user to see and hear text as it is manipulated on the computer screen in fact, the entire adaptive technology industry has grown up around these issues.
...otherwise, screen magnification programs may be used, which allow zooming in to portions of the screen, while following the mouse or the current focus.
Command line options
user profile -allow-downgrade firefox 67's downgrade protection prevents accidentally starting firefox in a profile running a later version of firefox.
... -new-instance open new instance, not a new window in running instance, which allows multiple copies of application to be open at a time.
... note: since firefox 2.0.0.7, use of the -install-global-extension and -install-global-theme command line arguments have been restricted to only allow installing add-ons that are on local disks or mapped drives.
Debugging on Windows
microsoft child process debugging power tool allows automatically attaching to child processes, such as web content process, gpu process, etc.
... alternatively, if you have generated the visual studio solution, via ./mach build-backend -b visualstudio, opening this solution allows you to run firefox.exe directly in the debugger.
...vc 8 also allows you to set environment variables there.
Configuring Build Options
adding the following line to your mozconfig allows you to change the objdir: mk_add_options moz_objdir=@topsrcdir@/obj-@config_guess@ it is a good idea to have your objdir name start with obj so that mercurial ignores it.
...for example, a mozconfig-dbg: mk_add_options moz_objdir=@topsrcdir@/obj-ff-dbg ac_add_options --enable-debug and a mozconfig-rel-opt: mk_add_options moz_objdir=@topsrcdir@/obj-ff-rel-opt ac_add_options --disable-debug ac_add_options --enable-optimize allow for building both versions by specifiying the configuration via the mozconfig environment variable: $ env mozconfig=/path/to/mozconfig-dbg ./mach build $ env mozconfig=/path/to/mozconfig-rel-opt ./mach build don't forget to set the mozconfig environment variable for the mach run command as well.
... ac_add_options --enable-crashreporter this enables the machinery that allows firefox to write out a minidump files when crashing as well as the tools to process and submit crash reports to mozilla.
Eclipse CDT Manual Setup
the build must be explicitly instructed to output information that allows the directory, where the compiler is being invoked from to be identified (i.e., 'make' must be instructed to output "entering directory..."/"leaving directory..." lines).
...if you're interested in future improvements to eclipse that would allow parallel builds to be run from inside eclipse while still allowing it to obtain the compiler options, see the faq isn't there a better method of build option discovery?
...you should now add the folder containing your firefox binary (note on mac this is inside the .app - so "{your-obj-dir}/dist/nightlydebug.app/contents/macos/" - and since the ui will only allow you to select to the 'dist' folder, you'll need to type the end of the path in manually).
Performance
decoratebutton(button, message.data.num) } tabmm.addmessagelistener("my-addon:paragraph-count", callback); tabmm.loadframescript("data:,sendasyncmessage('my-addon:paragraph-count', {num: content.document.queryselectorall('p').length})", false) } function decoratebutton(button, count) { // do stuff with result } this executes the script only when it is needed and only in one tab and allows it to be garbage-collected immediately after execution.
... if(resultlist.every((r) => r == true)) return ci.nsicontentpolicy.accept; return ci.nsicontentpolicy.reject_request; } }); // more boilerplate code here this example is a (somewhat condensed) content policy which gets triggered for every network request in a child process to either allow or deny the request.
... since the code calls to the parent process to check whether a specific request can be allowed it would slow down all page loads, as web pages generally issue dozens of requests.
Storage access policy: Block cookies from trackers
these heuristics are intended to allow some third-party integrations that are common on the web to continue to function.
...we’ve added a preference that allows you to add custom domains to the tracking protection url classifier.
... faq this cookie policy has the potential to lead to site breakage, but has been designed to allow common third-party integrations to continue to work while preventing cross-site tracking.
Security best practices for Firefox front-end engineers
we use our built-in sanitizer with the following flags: sanitizerallowstyle sanitizerallowcomments sanitizerdropforms sanitizerlogremovals the sanitizer removes all scripts (script tags, event handlers) and form elements (form, input, keygen, option, optgroup, select, button, datalist).
... linter rules against unsanitized dom interaction the security assurance team maintains an eslint rule that disallows unsafe uses of innerhtml and similar dom apis.
... appendix list of disallowed dom apis innerhtml outerhtml insertadjacenthtml() createcontextualfragment() document.write() document.writeln() please take a look at the repository for an updated list ...
Embedding Tips
the nsiauthprompt interface allows the networking layer to pose a user / password prompt to obtain the values needed for authentication.
...are called, allowing the embedder to know what is happening.
...deny the drop by setting the return value of the allowdrop() function.
Roll your own browser: An embedding how-to
(screenshot) xparts: kde extension that allows mozilla to be embedded into the konqueror browser.
...(mozilla blurb) bradsoft's topstyle css builder: implements an internal browser using mozilla activex embedding control.obsolete since gecko 7.0 nxzilla: a set of libraries that allow mozilla to be used with a nanox server.
... activex control: an activex control allowing for embedding the gecko layout engine.obsolete since gecko 7.0 llmozlib & ubrowser: a static library that allows you to embed gecko and render pages to memory.
Extending a Protocol
we need to add the following things: at the top of the file: include protocol pecho; after "manager pbrowser or pinprocess;", add: manages pecho; finally, under parent: add async pecho(); - this is the "constructor" part we talked about before, which will allow us to eventually send messages.
...class echochild final : public pechochild { friend class pechochild; // allows us to participate in reference counting ns_inline_decl_threadsafe_refcounting(echochild, final) public: explicit echochild(); protected: void actordestroy(actordestroyreason awhy) override; // we get sendecho(nscstring& astring) from the superclass.
... additions to navigator.h firstly, let's make sure we create the child actor (echochild) instance, which will allow us to send the message.
CustomizableUI.jsm
the customizableui.jsm javascript code module allows you to interact with customizable buttons and items in firefox's main window ui.
...if you want to use it from a jsm or another context without a window reference, you need to import it yourself: components.utils.import("resource:///modules/customizableui.jsm"); introduction the module is intended for two primary purposes: allow adding, moving and removing customizable widgets.
...note that customizableui won't restore state in the area, allow the user to customize it in customize mode, or otherwise deal with it, until the area has been registered.
Application Translation with Mercurial
mercurial queues allow to revert changes and also pull changes and reapply your local changes.
... transvision offers searching for texts and text ids ("entities" or "keys"), allowing to quickly find translations for already translated texts.
... microsoft's terminology search allows fast lookups of localized technical terms.
Index
it allows mozilla localizers to easily check their work.
...mercurial allows localizers to work locally (on their machines) and then push (an hg term) changes to a remote repository, which usually is hosted on the mozilla servers (hg.mozilla.org).
...repeating the process allows a localizer to create a testable package to see his or her work as they progress to a final version.
Localization content best practices
word order if a string will contain a placeholder, always add the placeholder to the string to allow the localizer to change the word order if necessary.
... design for +50% bear in mind that english strings will likely be a lot shorter than their international equivalents, so you need to leave some space in your ui to allow for this.
...this means that string changes are not allowed to land, and each case must be evaluated before landing.
Localizing with Koala
this will allow you to track changes, export them to remote repositories (first on bitbucket, later on hg.mozilla.org) and revert files to earlier versions in case of errors.
... version control systems add a lot of transparency to your work and allow others to get involved easily, so it's best to commit often (e.g.
...koala supports mercurial and allows you to add and commit files automatically from komodo.
QA phase
you can either: create a langpack, which is installed on top of your mozilla application, or repack the application's binary (aka, a l10n repack), which allows you to install next to your existing mozilla application installation and use separately.
...before a team becomes official, we like to get the localizers comfortable with the hg commands that allow for cloning, pulling, committing, and pushing work to an experimental repository.
... adding changesets adding manifests adding file changes added 1 changesets with 2 changes to 2 files bb/acl: your_id is allowed.
Localization formats
advantages to html good for small projects very simple for web developers gives localizers the exact context of translations a localizer who knows basic html can style translations to make sure translations display correctly...we can allow slight modifications (e.g.
... <h1><?php echo ___("getting started")?></h1> function ___($str) { return $array[$str]; } advantage to .lang simple work-flow allowing the web developer to place the file in svn and it can appear on the staging server .lang syntax is like simplified .po, which many localizers who are familiar with linux and other projects understand mozilla has a basic tool called main.lang checker, which can show any untranslated files to the localizer no need to compile to .mo file so a localizer can see his/her changes more quickly cre...
...ontrez-le en téléchargeant et en imprimant votre " "certificat personnalisé firefox 3 download day." advantages of gettext gettext has very powerful tools to update this site (if you use the actual english strings in msgids, not unique identifier strings like certificate_intro) very established with a large set of powerful tools harder to screw things up because existing tools will not allow localizers to edit the l10n file where they shouldn't separates localizable strings available for localizers for the rest of the code, protecting it from unintended changes disadvantage of gettext .po file needs to be compiled into a .mo file for localizer to see changes using regular diff to see changes to a file is sometimes impossible because the editing tool can save the .po file using...
Profile Manager
a dialog will appear that allows you to specify the profile's name, and optionally the profile's path, and the version of firefox (or other application) that will be used with this profile: launching firefox with a profile to launch firefox with a specific profile, select the profile in the main window, and hit the "start firefox" button: firefox will be launched with that profile, and profile manager will terminate.
... rename - allows you to specify a new name for the profile.
... version - allows you change the default application version to be used with the profile.
AsyncTestUtils extended framework
this allows you to write reasonably normal looking functions instead of having to chain together a whole bunch of functions and callbacks.
...this allows you to get at the nsimsgdbhdr instances directly.
... loghelper.js: this allows rich logging via logsploder.
Cached Monitors
this arrangement allows a cached monitor to be associated with another object without preallocating a monitor for all objects.
... cached monitors functions cached monitors allow the client to associate monitoring protection and state change synchronization in a lazy fashion.
... the monitoring capability is associated with the protected object only during the time it is required, allowing the monitor object to be reused.
NSPR Error Handling
pr_connect_refused_error the peer has refused to allow the connection to be established.
... pr_name_too_long_error filename is longer than allowed by the host operating system.
... pr_max_directory_entries_error attempt to add new filename to directory would exceed the limit allowed.
FIPS Mode - an explanation
it may not do any cryptographic operations that involve the use of cryptographic keys, nor allow any of the keys or certificates it holds to be seen or used, except when a user has successfully authenticated to it.
... 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.
... in normal non-fips mode, the "master password" is optional and is allowed to be a weak short password.
NSS 3.31 release notes
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.
... previously, ssl_versionrangeset and ssl_versionrangesetdefault returned a failure if the requested version range wasn't fully allowed by the systemwide crypto policy.
NSS API Guidelines
this will allow us to modify the size, definition, and format of these data structures in future releases, without interfering with the operation of existing applications that use the security library.
... threadmark code notes the thread id, whenever an arena is marked, and disallows any allocations or marks by any other thread.
... (frees are allowed.) the arena_destructor_list preprocessor definition, and the code it encloses, are an effort to make the following work together: arenas, letting you allocate stuff and then removing them all at once lazy creation of pure-memory objects from asn.1 blobs, for example use of nsspkixcertificate doesn't drag all the code in for all constituent objects, unless they're actually being used our agressive pointer-tracking facility all these are useful, but they don't combine well.
NSS Config Options
nss config options format the specified ciphers will be allowed by policy, but an application may allow more by policy explicitly: config="allow=curve1:curve2:hash1:hash2:rsa-1024..." only the specified hashes and curves will be allowed: config="disallow=all allow=sha1:sha256:secp256r1:secp384r1" only the specified hashes and curves will be allowed, and rsa keys of 2048 or more will be accepted, and dh key exchange with 1024-bit primes or more: config="disallow=all allow=sha1:sha256:secp256r1:secp384r1:min-rsa=2048:min-dh=1024" a policy that enables the aes ciphersuites and the secp256/384 curves: config="allow=aes128-cbc:aes128-gcm::hmac-sha1:sha1:sha256:sha384:rsa:ecdhe-rsa:secp256r1:secp384r1" turn off md5 config="disallow=md5" turn off md5 and sha1 only for ssl confi...
...g="disallow=md5(ssl):sha1(ssl)" disallow values are parsed first, and then allow values, independent of the order in which they appear.
...disable: turn off ciphersuites by default without disallowing them by policy.
NSS tools : crlutil
-a use ascii format or allow the use of ascii format for input and output.
... * add issuer alternative name extension: the issuer alternative names extension allows additional identities to be associated with the issuer of the crl.
...this extension allows users to easily determine when a particular crl supersedes another crl crlnumber non-critical number where: crlnumber: identifies the name of an extension critical: should be set to 0 since this is non-critical extension number: value of long which identifies the sequential number of a crl.
sslcrt.html
manipulating certificates cert_dupcertificate cert_destroycertificate cert_dupcertificate makes a shallow copy of a specified certificate.
...when an application makes a copy of a particular certificate or key structure that already exists in memory, ssl makes a shallow copy--that is, it increments the reference count for that object rather than making a whole new copy.
...if you attempt to do so, the change affects all the shallow copies of that structure and can cause severe problems.
NSS Tools certutil
arguments -a use ascii format or allow the use of ascii format for input or output.
...any size that is a multiple of 8 between the minimum and maximum is allowed.
...this extension allows a certificate's key to be dedicated to supporting specific operations such as ssl server or object signing.
NSS Tools crlutil
-a use ascii format or allow the use of ascii format for input and output.
... add issuer alternative name extension: the issuer alternative names extension allows additional identities to be associated with the issuer of the crl.
...this extension allows users to easily determine when a particular crl supersedes another crl crlnumber non-critical number where: crlnumber: identifies the name of an extension critical: should be set to 0 since this is non-critical extension number: value of long which identifies the sequential number of a crl.
NSS tools : crlutil
MozillaProjectsNSStoolscrlutil
-a use ascii format or allow the use of ascii format for input and output.
... * add issuer alternative name extension: the issuer alternative names extension allows additional identities to be associated with the issuer of the crl.
...this extension allows users to easily determine when a particular crl supersedes another crl crlnumber non-critical number where: crlnumber: identifies the name of an extension critical: should be set to 0 since this is non-critical extension number: value of long which identifies the sequential number of a crl.
NSS tools : signtool
digital signatures allow ssl-enabled clients to perform two important operations: * confirm the identity of the individual, company, or other entity whose digital signature is associated with the files * check whether the files have been tampered with since being signed if you have a signing certificate, you can use netscape signing tool to digitally sign files and package them as a jar file.
... an object-signing certificate is a special kind of certificate that allows you to associate your digital signature with one or more files.
...note that versions 1.1 and later of netscape signing tool correctly recognizes the codebase attribute, allows paths to be expressed for the class and src attributes instead of filenames only, processes link tags and parses html correctly, and offers clearer error messages.
Shumway
it is expected to be included in firefox at some point to allow plugin-free compatibility with swf-based games and animations.
...users who disable flash because of security or performance concerns can still see content through shumway because it cannot be forced to behave worse than javascript (and webgl, etc.) allows.
...several methods exist to allow inspector access to your swf file.
Creating JavaScript jstest reftests
if tests for the new feature proposal do not yet exist in test262 (they might!), contributing to test262 will allow all other javascript implementors to use your tests as well.
...simply testing the exit code does not allow you to distinguish the variety of causes a particular abnormal exit may have.
... a modification will soon be made to the javascript tests to allow an arbitrary string to be output which will be used to post process the test logs to better determine if a test has passed regardless of its exit code.
JS_GetSecurityCallbacks
callback structure struct jssecuritycallbacks { jscspevalchecker contentsecuritypolicyallows; // added in spidermonkey 1.8.5 jssubsumesop subsumes; // added in spidermonkey 31 jscheckaccessop checkobjectaccess; // obsolete since jsapi 29 jsprincipalstranscoder principalstranscoder; // obsolete since jsapi 13 jsobjectprincipalsfinder findobjectprincipals; // obsolete since jsapi 13 }; name type description cont...
...entsecuritypolicyallows jscspevalchecker a pointer to the function which checks if a csp instance wants to disable eval() and friends.
...it allows the embedding to control certain aspects of js code execution based on security settings of the global object the code is executed in.
Shell global objects
otalchunks slicetimebudget markstacklimit highfrequencytimelimit highfrequencylowlimit highfrequencyhighlimit highfrequencyheapgrowthmax highfrequencyheapgrowthmin lowfrequencyheapgrowth dynamicheapgrowth dynamicmarkslice allocationthreshold minemptychunkcount maxemptychunkcount compactingenabled refreshframeslicesenabled relazifyfunctions(...) perform a gc and allow relazification of functions.
...the following keys' string values will be used to determine whether the corresponding types may be serialized (value allow, the default) or not (value deny).
... deterministicgc(true|false) if true, only allow determinstic gcs to run.
Split object
therefore, no function may be allowed to see an inner object that has different jsprincipals.
...spidermonkey arranges this by not allowing js code to see inner objects at all.
...(several objects, such as window.location and window.navigator, are intentionally parented to the outer window object using such apis.) to enforce this rule: apis that allow the caller to pass a scope object always check that object first and fail if any outer objects are on its scope chain.
Mozilla Projects
mccoy is an application that allows add-on authors to provide secure updates to their users.
...this information allows c++ to be automatically rewritten in a precise way.
... web replay web replay allows firefox content processes to record their behavior, replay it later, and rewind to earlier states.
Animated PNG graphics
MozillaTechAPNG
error handling apng is designed to allow incremental display of frames before the entire image has been read.
... other ancillary chunks are allowed to appear among the apng chunks, including between 'fdat' chunks.
... from 0.4 reintroduced num_frames into actl moved sequence_number from adat into fctl changed contents of adat to fctl+idats+fend added clarifications on what's allowed and what isn't renamed actl to actl, fctl to fctl, adat to fdat and fend to fend to comply with the png spec chunk naming requirements from 0.5 added the ihdr and plte crcs to the actl chunk the actl fctl and adat are now copy safe, renamed them to actl, fctl and adat from 0.6 the fdat chunk is no longer a container for other chunks, but rather a replacement for an idat chunk ...
Embedded Dialog API
posing gecko dialogs in embedding applications problem statement an application embedding gecko cannot tightly control its own windows and still allow gecko to be a fully functional web browser.
...but it must be allowed to create additional windows at times perhaps unexpected by the containing appliction.
...its simplest requirements are that the app must allow gecko to create new browser windows and new simple, empty windows.
The Publicity Stream API
this spawns a doorhanger which allows the user to specify which users can view the activity, and (following successful login and authorization with the stream server) registers the activity in a stream at [address].
...possible error codes include: denied - if the user refuses to publicize the activity permissiondenied - if the publicizing site is not allowed to post to the publicity stream networkerror - if the publicity server is unreachable activityparseerror - if the activity contains syntax errors (not proper json) invalidactivity - if the activity contains semantic errors (i.e.
...possible error codes include: denied - if the user does not log in correctly permissiondenied - if the site is not allowed to access the publicity stream networkerror - if the publicity server is unreachable for_apps is a json list of apps that this store has (each represented as its origin url), so that stream events not relating to applications in a given presentation context can be excluded from the return value.
Using XPCOM Components
xpconnect allows interface methods defined via xpidl to be called from javascript, as part of javascript objects that represent instances of components like the cookiemanager.
...this service, which is defined in the basic nsisupports interface and implemented by all xpcom components, allows you to query and switch interfaces on a component as part of the runtime object typing capabilities of xpcom.
... remember, queryinterface allows you to query an object for the interfaces it supports.
Using XPCOM Utilities to Make Things Easier
but they have the advantage of allowing much more rapid development.
... ns_impl_nsgetmodule_with_ctor(name, components, ctor) same as above but allows for a special function to be called when the module is created.
... ns_impl_nsgetmodule_with_dtor(name, components, dtor) same as the first macro but allows for a special function to be called when the module is destroyed.
Language bindings
in order to allow any other language to use the xpcom api, a bridging layer is required.
...tless (boostrapped) extensions, so that you can unload an old version of a code module when a new version of your add-on is installed.components.utils.unwaivexraysundo a previous call to components.utils.waivexrays(), restoring xray vision for the caller.components.utils.waivexrayswaives xray vision for an object, giving the caller a transparent wrapper to the underlying object.javaxpcomjavaxpcom allows for communication between java and xpcom, such that a java application can access xpcom objects, and xpcom can access any java class that implements an xpcom interface.
...the resources here provide information about this language binding and how to use it.pyxpcompyxpcom allows for communication between python and xpcom, such that a python application can access xpcom objects, and xpcom can access any python class that implements an xpcom interface.
Observer Notifications
profile-before-change-qm called to shut down the quotamanager; this is separated from profile-before-change to allow everything inside profile-before-change to continue using it.
... profile-before-change-telemetry called to shut down telemetry, again separated to allow everything before this event to continue using it.
...the channel is available to allow you to modify headers and such.
operator=
return values this operator returns a reference back to the object being modified to allow operator chaining.
... return values this operator returns a reference back to the object being modified to allow operator chaining.
... return values this operator returns a reference back to the object being modified to allow operator chaining.
operator+=
return values this operator returns a reference back to the object being modified to allow operator chaining.
... return values this operator returns a reference back to the object being modified to allow operator chaining.
... return values this operator returns a reference back to the object being modified to allow operator chaining.
operator=
return values this operator returns a reference back to the object being modified to allow operator chaining.
... return values this operator returns a reference back to the object being modified to allow operator chaining.
... return values this operator returns a reference back to the object being modified to allow operator chaining.
imgIContainer
asubimage the area of the image, in pixels, that we are allowed to sample from.
...if the lock count drops to zero, the image is allowed to discard its frame data to save memory.
...in other words, the lock count is not allowed to be negative.
mozIStorageVacuumParticipant
/storage/public/mozistoragevacuumparticipant.idlscriptable components can implement this interface to provide information to allow a database to be periodically vacuumed by the storage service.
...note: if the database is using the wal journal node and the current page size is not the expected one, the journal node will be changed to truncate because wal doesn't allow page size changes.
...return value return true to allow the vacuum operation to proceed, or false if you don't want the database to be vacuumed.
nsIAbCard
prefermailformat unsigned long allowed values are stored in nsiabprefermailformat.
... allowremotecontent boolean allow remote content to be displayed in html mail received from this contact methods getcardvalue() astring getcardvalue(in string name) parameters name the attribute you want the value for.
...we allow the caller to cache the pref value, so we don't have to go to prefs every time.
nsIChromeFrameMessageManager
1.0 66 introduced gecko 2.0 inherits from: nsiframemessagemanager last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview void loadframescript(in astring aurl, in boolean aallowdelayedload); void removedelayedframescript(in astring aurl); methods loadframescript() loads a script into the remote frame.
... void loadframescript( in astring aurl, in boolean aallowdelayedload ); parameters aurl the url of the script to load into the frame; this must be an absolute url, but data: urls are supported.
... aallowdelayedload if true, the script will be loaded when the remote frame becomes available; otherwise, the script will only be loaded if the frame is already available.
nsIClipboard
hasdatamatchingflavors() this method provides a way to give correct ui feedback about, for instance, whether a paste should be allowed.
... supportsselectionclipboard() this method allows clients to determine if the implementation supports the concept of a separate clipboard for selection.
... supportsfindclipboard() this method allows clients to determine if the implementation supports the concept of a separate clipboard for find search strings.
nsIDragService
aactiontype specified which of copy/move/link are allowed.
... aactiontype specified which of copy/move/link are allowed.
... aactiontype specified which of copy/move/link are allowed adragevent the drag gesture event that initiated the drag.
nsIMemoryReporter
1.0 66 introduced gecko 1.9 inherits from: nsisupports last changed in gecko 8.0 (firefox 8.0 / thunderbird 8.0 / seamonkey 2.5) any piece of code that wishes to allow its memory use to be monitored may create an nsimemoryreporter object and then register it by calling nsimemoryreportermanager.registerreporter().
...paths are delimited with '/' characters to allow a hierarchy of memory to be displayed in about:memory.
...this allows a fractional percentage to be shown even though amount is an integer.
nsIMsgWindow
method overview void displayhtmlinmessagepane(in astring title, in astring body, in boolean clearmsghdr); void stopurls(); void closewindow(); attributes attribute type description windowcommands nsimsgwindowcommands this allows the backend code to send commands to the ui, such as clearmsgpane.
... statusfeedback nsimsgstatusfeedback this allows the backend code to send status feedback to the ui.
... msgheadersink nsimsgheadersink this allows the backend code to send message header information to the ui.
nsINavBookmarksService
constants constant value description default_index -1 this is the default index; this value should be used for apis that allow passing in an index where the index is not known or is not required to be specified, such as when appending an item to a folder.
...if this is set to true, ui will not allow the user to add, remove, or reorder children in this folder.
...if this is set to true, ui will not allow the user to add, remove, or reorder children in this folder.
nsIPermission
the nsipermission interface defines a "permission" object, which is used to allow or block objects (for example cookies, images) from certain sites based on user preferences.
... last changed in gecko 2 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) inherits from: nsisupports attributes attribute type description capability pruint32 the permission to set: allow, deny, or unknown (which is the default).
... see nsipermissionmanager.permission_type_constants for allowed values.
nsIPermissionManager
allows access to nsipermission objects.
... allow_action 1 permission is allowed.
... prompt_action 3 prompt user if the permission is allowed.
nsIProtocolProxyService
after filters have been run, any disabled or disallowed proxies will be removed from the list.
...a proxy is disallowed, for example, if it is a http proxy and the nsiprotocolhandler for the queried uri does not permit proxying via http.
... if a nsiprotocolhandler disallows all proxying, then filters will never have a chance to intercept proxy requests for such urls.
nsISound
event_prompt_dialog_open 3 a prompt dialog (one that allows the user to enter data, such as an authentication dialog) is opened.
... event_editor_max_len 7 more characters than the maximum allowed are typed into a text field.
... _moz_promptdialog the system sound when a prompt dialog (one that allows the user to enter data, such as an authentication dialog) is opened.
nsIXPConnect
text, in jsobjectptr ajsobj, in nsiidref aiid, [iid_is(aiid),retval] out nsqiresult result); nsixpconnectjsobjectholder wrapnative(in jscontextptr ajscontext, in jsobjectptr ascope, in nsisupports acomobj, in nsiidref aiid); void wrapnativetojsval(in jscontextptr ajscontext, in jsobjectptr ascope, in nsisupports acomobj, in nswrappercacheptr acache, in nsiidptr aiid, in boolean aallowwrapper, out jsval aval, out nsixpconnectjsobjectholder aholder); attributes attribute type description collectgarbageonmainthreadonly prbool obsolete since gecko 1.9 currentjsstack nsistackframe read only.
...if aallowwrapper, then the returned value will be wrapped in the proper type of security wrapper on top of the xpcwrappednative (if needed).
... void wrapnativetojsval( in jscontextptr ajscontext, in jsobjectptr ascope, in nsisupports acomobj, in nswrappercacheptr acache, in nsiidptr aiid, in boolean aallowwrapper, out jsval aval, out nsixpconnectjsobjectholder aholder ); parameters ajscontext missing description ascope missing description acomobj missing description acache missing description aiid missing description aallowwrapper missing description aval missing description aholder missing description ...
nsIXULTemplateQueryProcessor
the query is expected to consist of either text or dom nodes that, when executed by a call to the generateresults() method, will allow the generation of a list of results.
...a binding allows an additional variable to be set for a result, outside of those defined within the query.
...this allows all levels to be generated using objects that all implement the nsixultemplateresult interface.
Reference Manual
this allows source level debuggers to more easily "follow" the pointer.
...holding an owning reference on the nsiweakreference object allows you to get to this other object when you need to, but does not require it to go on living, just for you.
...getter_addrefs releases the old value, if any, clears it out, and returns a pointer to it, allowing the getter to fill in your nscomptr with a new addrefed value.
Using nsIDirectoryService
this implementation will allow you to get(), set(), define(), and undefine() nsifile.
...apart from this interface there is a function, registerprovider which will allow you to register a nsidirectoryserviceprovider, which implements the getfile callback function: var provider = { getfile : function(prop, persistant) { // return an nsifile }, } components.classes["@mozilla.org/file/directory_service;1"] .getservice(components.interfaces.nsidirectoryservice).registerprovider(provider); when the callback is called, it will be passed the string key, and shoul...
...the persistant flag allows you to specify if you want the nsdirectoryservice to cache this value.
Weak reference
and the call would fail if the pointer were allowed to dangle, therefore, the pointer should be a owning reference.
... what is actually needed in this case, is either out-of-band signaling, where when the observer wants to go away, it unregisters itself from the observable, which then releases its owning reference, allowing the observer to die, or else a new kind of reference.
...queryinterface must satisfy many requirements to allow com to work.
xptcall FAQ
the information in the typelibs allows xpconnect to convert function parameters and build the nsxptcvariant array required to make this call.
... the stubs (or impersonation) facility of xptcall allows for implementing a class which can, at runtime, pretend to be any xpcom interface.
...non-functional stub code exists to allow building xptcall on non-supported platforms.
Mozilla technologies
these services include:viewing and searching mozilla source code onlinesource code for all mozilla projects hosted in the mercurial repositories can be searched and viewed online using searchfox, a fast indexed search engine that runs on aws.xml extrasthe xml extras module contains several features that allow developers to treat xml as data i.e.
...it has multiple language bindings, allowing xpcom components to be used and implemented in javascript, java, and python in addition to c++.xpidlxpidl is an interface description language used to specify xpcom interface classes.xray visiongecko runs javascript from a variety of different sources and at a variety of different privilege levels.xslt 2.0although xslt 2.0 is not natively supported in firefox, it is possible via saxon-b (java)...
... or, more recently, saxon-ce (javascript) to perform xslt 2.0.xtfthe extensible tag framework (xtf) allows adding support for new namespaces using xpcom components to mozilla (written in javascript or c++).
Mail composition back end
this will change in the coming weeks and allow for developers to write javascript to take advantage of the back end services.
...this is something that very well may change as time allows).
...(see send later above) the nsimsgsendlater is the interface that allows the caller to send all of the files previously stored.
Using tab-modal prompts
you can force a prompt to be tab-modal using code like this: var thewindow = gbrowser.contentwindow; let prompt = components.classes["@mozilla.org/prompter;1"] .getservice(components.interfaces.nsipromptfactory) .getprompt(thewindow, components.interfaces.nsiprompt); let bag = prompt.queryinterface(components.interfaces.nsiwritablepropertybag2); bag.setpropertyasbool("allowtabmodal", true); the var "thewindow" is a reference to the dom window.
...for example: var factory = components.classes["@mozilla.org/prompter;1"] .getservice(components.interfaces.nsipromptfactory); var prompt = factory.getprompt(gbrowser.contentwindow, components.interfaces.nsiprompt); var bag = prompt.queryinterface(components.interfaces.nsiwritablepropertybag2); bag.setpropertyasbool("allowtabmodal", true); var promptargs = ["devmo alert", "omg!
...xample below, here we apply the prompt with a checkbox: var window = gbrowser.contentwindow; var promptfact = components.classes['@mozilla.org/prompter;1'].getservice(components.interfaces.nsipromptfactory); var prompt = promptfact.getprompt(window, components.interfaces.nsiprompt); var promptbag = prompt.queryinterface(components.interfaces.nsiwritablepropertybag2); promptbag.setpropertyasbool('allowtabmodal', true); var check = {value: false}; //initial state of checkbox, however if no text is supplied the checkbox is not shown var input = {value: 'pre filled value'}; var ok = prompt.prompt.apply(null, ['title - but not shown in tab modal', 'text goes here', input, 'check text, if no text, checkbox is not shown', check]); //this here is just an alert, showing the values of the prompt prom...
Flash Activation: Browser Comparison - Plugins
the user can click on the flash object or the location bar icon to activate flash: users have the choice to allow flash just for the current session, or to remember their choice: google chrome in-page ui is displayed when the site attempts to use flash without fallback content: a user can click the plugin element to show a prompt for allowing flash: if the site provides fallback content for an object element, chrome will display that content and will not prompt the user to enable flash.
... a user can click the information icon on the left side of the location bar on any site to open the site information and allow flash on that site: microsoft edge in-page ui is displayed when the site attempts to use flash.
...the user can click the flash object to show activation options: users have the choice to allow flash just for the current session, or to remember their choice: site authoring tips if a flash element is very small, hidden, or covered by other content, users will probably not notice that flash is required and will become confused.
Accessibility Inspector - Firefox Developer Tools
the accessibility inspector provides a means to access important information exposed to assistive technologies on the current page via the accessibility tree, allowing you to check what's missing or otherwise needs attention.
... if you don't wish to allow the accessibility features to be automatically enabled, you can use the configuration editor (also known as about:config) to define the preference devtools.accessibility.auto-init.enabled, and set it to false.
... accessibility picker like the element picker button on the page inspector, the accessibility tab's element picker button allows you to hover and select ui items on the current page highlight objects in the accessibility tree.
Debugger.Frame - Firefox Developer Tools
this allows the code using each debugger instance to place whatever properties it likes on its debugger.frame instances, without worrying about interfering with other debuggers.) when the debuggee pops a stack frame (say, because a function call has returned or an exception has been thrown from it), the debugger.frame instance referring to that frame becomes inactive: its live property becomes false, and a...
...even though the debuggee and debugger share the same javascript stack, frames pushed for spidermonkey’s calls to handler methods to report events in the debuggee are never considered visible frames.) invocation functions and “debugger” frames aninvocation function is any function in this interface that allows the debugger to invoke code in the debuggee: debugger.object.prototype.call, debugger.frame.prototype.eval, and so on.
...(this is not like a with statement:code may access, assign to, and delete the introduced bindings without having any effect on thebindings object.) this method allows debugger code to introduce temporary bindings that are visible to the given debuggee code and which refer to debugger-held debuggee values, and do so without mutating any existing debuggee environment.
Debugger.Object - Firefox Developer Tools
this allows the code using each debugger instance to place whatever properties it likes on its own debugger.object instances, without worrying about interfering with other debuggers.
...(this is not like a with statement:code may access, assign to, and delete the introduced bindings without having any effect on thebindings object.) this method allows debugger code to introduce temporary bindings that are visible to the given debuggee code and which refer to debugger-held debuggee values, and do so without mutating any existing debuggee environment.
... this method pierces the membrane of debugger.object instances meant to protect debugger code from debuggee code, and allows debugger code to access debuggee objects through the standard cross-compartment wrappers, rather than via debugger.object’s reflection-oriented interfaces.
Debugger.Object - Firefox Developer Tools
this allows the code using each debugger instance to place whatever properties it likes on its own debugger.object instances, without worrying about interfering with other debuggers.
...(this is not like a with statement:code may access, assign to, and delete the introduced bindings without having any effect on thebindings object.) this method allows debugger code to introduce temporary bindings that are visible to the given debuggee code and which refer to debugger-held debuggee values, and do so without mutating any existing debuggee environment.
... this method pierces the membrane of debugger.object instances meant to protect debugger code from debuggee code, and allows debugger code to access debuggee objects through the standard cross-compartment wrappers, rather than via debugger.object's reflection-oriented interfaces.
Console messages - Firefox Developer Tools
this is a security risk that allows user login credentials to be stolen.
...this is a security risk that allows user login credentials to be stolen.
...this is a security risk that allows user login credentials to be stolen.
AudioNode.connect() - Web APIs
WebAPIAudioNodeconnect
this is allowed only if there is at least one delaynode in the cycle.
...this parameter is not allowed if the destination is an audioparam.
... return value if the destination is a node, connect() returns a reference to the destination audionode object, allowing you to chain multiple connect() calls.
Broadcast Channel API - Web APIs
the broadcast channel api allows basic communication between browsing contexts (that is, windows, tabs, frames, or iframes) and workers on the same origin.
...this disconnects the object from the underlying channel, allowing garbage collection.
... // disconnect the channel bc.close(); conclusion the broadcast channel api's self-contained interface allows cross-context communication.
Applying styles and colors - Web APIs
0, 112.5, 150, 37.5); // draw semi transparent rectangles for (var i = 0; i < 10; i++) { ctx.fillstyle = 'rgba(255, 255, 255, ' + (i + 1) / 10 + ')'; for (var j = 0; j < 4; j++) { ctx.fillrect(5 + i * 14, 5 + j * 37.5, 14, 27.5); } } } <canvas id="canvas" width="150" height="150"></canvas> draw(); screenshotlive sample line styles there are several properties which allow us to style lines.
... more exactly, the miter limit is the maximum allowed ratio of the extension length (in the html canvas, it is measured between the outside corner of the joined edges of the line and the common endpoint of connecting segments specified in the path) to half the line width.
... it can equivalently be defined as the maximum allowed ratio of the distance between the inside and outside points of jonction of edges, to the total line width.
Channel Messaging API - Web APIs
the 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, passing messages between one another through two-way channels (or pipes) with a port at each end.
... messageport controls the ports on the message channel, allowing sending of messages from one port and listening out for them arriving at the other.
... portcollection an array of messageports; an experimental solution to allow broadcasting of a message to multiple ports simultaneously.
DOMError - Web APIs
WebAPIDOMError
error types type description indexsizeerror the index is not in the allowed range (e.g.
... nomodificationallowederror the object can not be modified.
... namespaceerror the operation is not allowed by namespaces in xml invalidaccesserror the object does not support the operation or argument.
DOMTokenList - Web APIs
domtokenlist.entries() returns an iterator, allowing you to go through all key/value pairs contained in this object.
... domtokenlist.keys() returns an iterator, allowing you to go through all keys of the key/value pairs contained in this object.
... domtokenlist.values() returns an iterator, allowing you to go through all values of the key/value pairs contained in this object.
DataTransfer.dropEffect - Web APIs
example this example shows the use of the dropeffect and effectallowed properties.
... </p> </div> <div id="target" ondrop="drop_handler(event);" ondragover="dragover_handler(event);">drop zone</div> css content div { margin: 0em; padding: 2em; } #source { color: blue; border: 1px solid black; } #target { border: 1px solid black; } javascript content function dragstart_handler(ev) { console.log("dragstart: dropeffect = " + ev.datatransfer.dropeffect + " ; effectallowed = " + ev.datatransfer.effectallowed); // add this element's id to the drag payload so the drop handler will // know which element to add to its tree ev.datatransfer.setdata("text", ev.target.id); ev.datatransfer.effectallowed = "move"; } function drop_handler(ev) { console.log("drop: dropeffect = " + ev.datatransfer.dropeffect + " ; effectallowed = " + ev.datatransfer.effectallowed)...
...; ev.preventdefault(); // get the id of the target and add the moved element to the target's dom var data = ev.datatransfer.getdata("text"); ev.target.appendchild(document.getelementbyid(data)); } function dragover_handler(ev) { console.log("dragover: dropeffect = " + ev.datatransfer.dropeffect + " ; effectallowed = " + ev.datatransfer.effectallowed); ev.preventdefault(); // set the dropeffect to move ev.datatransfer.dropeffect = "move" } specifications specification status comment html living standardthe definition of 'dropeffect' in that specification.
DirectoryEntrySync - Web APIs
no_modification_allowed_err this is a permission issue.
... no_modification_allowed_err this is a permission issue.
... [todo: explain more ] no_modification_allowed_err one of the following is not writable: the directory, its parent directory, and some of the content in the directory.
Using files from web applications - Web APIs
the multiple attribute on the input element allows the user to select multiple files.
... using a label element to trigger a hidden file input element to allow opening the file picker without using javascript (the click() method), a <label> element can be used.
...this allows us to select all of the images the user has chosen for uploading using document.queryselectorall(), like this: function sendfiles() { const imgs = document.queryselectorall(".obj"); for (let i = 0; i < imgs.length; i++) { new fileupload(imgs[i], imgs[i].file); } } line 2 fetches a nodelist, called imgs, of all the elements in the document with the css class obj.
FileHandle API - Web APIs
the filehandle api allows for the manipulating of files, including creating files and modifying their content (unlike the file api).
... 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.
...such an object is basically a domrequest with an extra power: it allows to monitor the progress of an operation.
FormData - Web APIs
WebAPIFormData
formdata.entries() returns an iterator allowing to go through all key/value pairs contained in this object.
... formdata.keys() returns an iterator allowing to go through all keys of the key/value pairs contained in this object.
... formdata.values() returns an iterator allowing to go through all values contained in this object.
Using the Gamepad API - Web APIs
this information is intended to allow you to find a mapping for the controls on the device as well as display useful feedback to the user.
... timestamp: this returns a domhighrestimestamp representing the last time the data for this gamepad was updated, allowing developers to determine if the axes and button data have been updated from the hardware.
... using button information let's look at a simple example that displays connection information for one gamepad (it ignores subsequent gamepad connections) and allows you to move a ball around the screen using the four gamepad buttons on the right hand side of the gamepad.
Dragging and Dropping Multiple Items - Web APIs
setting and getting with indices the mozsetdataat() method allows you to add multiple items during a dragstart event.
...to reject the items, either don't cancel the dragover event, or set the effectallowed property to none.
...this allows a drop to occur on that element.
IDBIndex.unique - Web APIs
WebAPIIDBIndexunique
the unique read-only property returns a boolean that states whether the index allows duplicate keys.
... syntax var isunique = idbindex.unique; value a boolean: value effect true the current index does not allow duplicate values for a key.
... false the current index allows duplicate key values.
IDBObjectStore.createIndex() - Web APIs
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.
... objectparameters optional an idbindexparameters object, which can include the following properties: attribute description unique if true, the index will not allow duplicate values for a single key.
... locale currently firefox-only (43+), this allows you to specify a locale for the index.
IDBObjectStoreSync - Web APIs
constants mode constants constant value description read_only 1 modification operations are not allowed on this object store.
... read_write 0 modification operations are allowed on this object store.
... unique if true, keys in the index must be unique; if false, duplicate keys are allowed.
MediaStream Image Capture API - Web APIs
in addition to capturing data, it also allows you to retrieve information about device capabilities such as image size, red-eye reduction and whether or not there is a flash and what they are currently set to.
... conversely, the api allows the capabilities to be configured within the constraints what the device allows.
...the example below simply says give me whatever video device is available, though the getusermedia() method allows more specific capabilities to be requested.
Using the MediaStream Recording API - Web APIs
it allows you to record snippets of audio and then play them back.
...why was css2 layout so awkward?" it allows you do a calculation to determine the computed value of a css unit, mixing different units in the process.
... const mediarecorder = new mediarecorder(stream); there are a series of methods available in the mediarecorder interface that allow you to control recording of the media stream; in web dictaphone we just make use of two, and listen to some events.
Media Capabilities API - Web APIs
the media capabilities api allows developers to determine decoding and encoding abilities of the device, exposing information such as whether media is supported and whether playback should be smooth and power efficient, with real time feedback about playback to better enable adaptive streaming, and access to display property information.
... mediadecodingconfiguration defines the valid values for allowed types of media when the media configuration is submitted as the parameter for mediacapabilities.decodinginfo().
... mediaencodingconfiguration defines the valid values for allowed types of media when the media configuration is submitted as the parameter for mediacapabilities.encodinginfo().
NDEFWriter.write() - Web APIs
WebAPINDEFWriterwrite
signal -- optional abortsignal that allows to cancell this write operation.
... notallowederror the permission for this operation was rejected or overwrite is false and there are already records on the tag.
... notreadableerror the ua is not allowed to access underlying nfc adapter (e.g., due to user preference).
Navigator.getBattery() - Web APIs
note: old versions of some user agents might allow use of this feature in insecure contexts.
... notallowederror note: no user agent currently throws this exception, but the specification describes the following behaviors: this document is not allowed to use this feature.
... for example, it might not be explicitly allowed or restricted via feature-policy battery feature.
Navigator.msLaunchUri() - Web APIs
to help protect a user's privacy, windows displays a prompt for the user to allow the service or app to be launched.
...if a handler doesn't exist, and the developer doesn't provide a nohandlercallback, then internet explorer displays a dialog that asks the user if they want to allow the action.
... if the user allows it, the user is then prompted to look in the windows store for an app to handle the protocol.
NodeList - Web APIs
WebAPINodeList
nodelist.entries() returns an iterator, allowing code to go through all key/value pairs contained in the collection.
... nodelist.keys() returns an iterator, allowing code to go through all the keys of the key/value pairs contained in the collection.
... (in this case, the keys are numbers starting from 0.) nodelist.values() returns an iterator allowing code to go through all values (nodes) of the key/value pairs contained in the collection.
Using the Notifications API - Web APIs
this is a common requirement when an api tries to interact with something outside a web page — at least once, the user needs to specifically grant that application permission to present notifications, thereby letting the user control which apps/sites are allowed to display notifications.
...this is not only best practice — you should not be spamming users with notifications they didn't agree to — but going forward browsers will explicitly disallow notification permission requests not triggered in response to a user gesture.
...https), and you can no longer allow notification permissions to be requested from cross-origin <iframe>s.
PannerNode.PannerNode() - Web APIs
the default is 1, and negative values are not allowed.
...the default is 10000, and non-positive values are not allowed.
...the default is 1, and negative values are not allowed.
Pointer Lock API - Web APIs
more than that, the api is useful for any applications that require significant mouse input to control movements, rotate objects, and change entries, for example allowing users to control the viewing angle simply by moving the mouse around without any button clicking.
...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.
...the ability to avoid this limitation, in the form of the attribute/value combination <iframe sandbox="allow-pointer-lock">, is expected to appear in chrome soon.
Response.redirected - Web APIs
see the example disallowing redirects, which shows this being done.
...note, however, that this isn't as safe as outright rejecting redirects if they're unexpected, as described under disallowing redirects below.
...ome-picture.jpg").then(function(response) { let elem = document.getelementbyid("warning-message-box"); if (response.redirected) { elem.innerhtml = "unexpected redirect"; } else { elem.innerhtml = ""; } return response.blob(); }).then(function(imageblob) { let imgobjecturl = url.createobjecturl(imageblob); document.getelementbyid("img-element-id").src = imgobjecturl; }); disallowing redirects because using redirected to manually filter out redirects can allow forgery of redirects, you should instead set the redirect mode to "error" in the init parameter when calling fetch(), like this: fetch("awesome-picture.jpg", { redirect: "error" }).then(function(response) { return response.blob(); }).then(function(imageblob) { let imgobjecturl = url.createobjecturl(imageblob); ...
SVGStyleElement - Web APIs
svg 1.1 defined that a domexception is raised with code no_modification_allowed_err on an attempt to change the value of a read-only attribute.
... svg 1.1 defined that a domexception is raised with code no_modification_allowed_err on an attempt to change the value of a read-only attribute.
... svg 1.1 defined that a domexception is raised with code no_modification_allowed_err on an attempt to change the value of a read-only attribute.
SpeechRecognitionError.error - Web APIs
not-allowed the user agent disallowed any speech input from occurring for reasons of security, privacy or user preference.
... service-not-allowed the user agent disallowed the requested speech recognition service, either because the user agent doesn't support it or because of reasons of security, privacy or user preference.
... in this case it would allow another more suitable speech recognition service to be used instead.
SpeechRecognitionErrorEvent.error - Web APIs
not-allowed the user agent disallowed any speech input from occurring for reasons of security, privacy or user preference.
... service-not-allowed the user agent disallowed the requested speech recognition service, either because the user agent doesn't support it or because of reasons of security, privacy or user preference.
... in this case it would allow another more suitable speech recognition service to be used instead.
Using readable streams - Web APIs
consuming a fetch as a stream the fetch api allows you to fetch resources across the network, providing a modern alternative to xhr.
...the readablestream() constructor allows you to do this via a syntax that looks complex at first, but actually isn’t too bad.
...the second object is optional, and allows you to specify a custom queuing strategy to use for your stream.
Color masking - Web APIs
so, by masking off the blue and green channels, you are only allowing the red component of pixels to be updated, and therefore it is as if you were looking through a red tinted glass.
... color masking allows us to demonstrate some basics of color theory.
...it allows us to setup webgl in a single initialization phase, and then just execute drawing commands for each frame.
WebGL model view projection - Web APIs
the obvious question is "why the extra dimension?" it turns out that this addition allows for lots of nice techniques for manipulating 3d data.
... this added dimension introduces the notion of perspective into the coordinate system; with it in place, we can map 3d coordinates into 2d space—thereby allowing two parallel lines to intersect as they recede into the distance.
... to start playing with this idea the previous example can be modified to allow for the use of the w component.
Writing WebSocket client applications - Web APIs
this should use the url scheme wss://, although some software may allow you to use the insecure ws:// for local connections.
... the constructor will throw a securityerror if the destination doesn't allow access.
...most browsers now only allow secure websocket connections, and no longer support using them in insecure contexts.
Geometry and reference spaces in WebXR - Web APIs
xrreferencespace unbounded a tracking space which allows the user total freedom of movement, possibly over extremely long distances from their origin point.
...if the user's xr hardware permits them to move about their real-world space, and you are able to do so, it may be useful to use a bounded-floor reference space, which lets you specifically define the boundaries of the area in which passage is allowed and safe.
...for example, there's simply no way for a basic headset such as a gearvr device to be made to work in an app that requires support for allowing the user to walk around the environment by tracking their real-world movements.
Starting up and shutting down a WebXR session - Web APIs
there may be options available to allow you to experiment with webxr even if you don't have a compatible system, however.
... if the session couldn't be created for some reason—such as feature policy disallowing its use or the user declining to grant permission to use the headset—the promise gets rejected.
... in the end, the worlddata object is returned to the caller to allow the main code to reference the data it needs later.
Web Authentication API - Web APIs
many websites already have pages that allow users to register new accounts or sign in to an existing account, and the web authentication api acts as a replacement or supplement to those on those existing webpages.
...phically random number sent from a server 0x8c, 0x0a, 0x26, 0xff, 0x22, 0x91, 0xc1, 0xe9, 0xb9, 0x4e, 0x2e, 0x17, 0x1a, 0x98, 0x6a, 0x73, 0x71, 0x9d, 0x43, 0x48, 0xd5, 0xa7, 0x6a, 0x15, 0x7e, 0x38, 0x94, 0x52, 0x77, 0x97, 0x0f, 0xef ]).buffer } }; // sample arguments for login var getcredentialdefaultargs = { publickey: { timeout: 60000, // allowcredentials: [newcredential] // see below challenge: new uint8array([ // must be a cryptographically random number sent from a server 0x79, 0x50, 0x68, 0x71, 0xda, 0xee, 0xee, 0xb9, 0x94, 0xc3, 0xc2, 0x15, 0x67, 0x65, 0x26, 0x22, 0xe3, 0xf3, 0xab, 0x3b, 0x78, 0x2e, 0xd5, 0x6f, 0x81, 0x26, 0xe2, 0xa6, 0x01, 0x7d, 0x74, 0x50 ]).buffer }, }; // register / ...
... var idlist = [{ id: cred.rawid, transports: ["usb", "nfc", "ble"], type: "public-key" }]; getcredentialdefaultargs.publickey.allowcredentials = idlist; return navigator.credentials.get(getcredentialdefaultargs); }) .then((assertion) => { console.log("assertion", assertion); }) .catch((err) => { console.log("error", err); }); mozilla demo website and its source code.
Web Locks API - Web APIs
the web locks api allows scripts running in one tab or worker to asynchronously acquire a lock, hold it while work is performed, then release it.
... while held, no other script executing in the same origin can acquire the same lock, which allows a web app running in multiple tabs or workers to coordinate work and the use of resources.
... signal: an abortsignal can be passed in, allowing a lock request to be aborted.
Web Workers API - Web APIs
the advantage of this is that laborious processing can be performed in a separate thread, allowing the main (usually the ui) thread to run without being blocked/slowed down.
...they will also allow access to push notifications and background sync apis.
... worker represents a running worker thread, allowing you to pass messages to the running worker code.
Window.print() - Web APIs
WebAPIWindowprint
romeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetprintchrome full support 1notes full support 1notes notes starting with chrome 46, this method is blocked inside an <iframe> unless its sandbox attribute has the value allow-modals.edge full support 12firefox full support 1ie full support 5opera full support 6notes full support 6notes notes starting with opera 33, this method is blocked inside a...
...n <iframe> unless its sandbox attribute has the value allow-modals.safari full support 1.1webview android full support 1notes full support 1notes notes starting with webview 46, this method is blocked inside an <iframe> unless its sandbox attribute has the value allow-modals.chrome android full support 18notes full support 18notes notes starting with chrome 46, this method is blocked inside an <iframe> unless its sandbox attribute has the value allow-modals.firefox android no support nonotes no support ...
... nonotes notes see bug 1247609.opera android full support 10.1notes full support 10.1notes notes starting with opera 33, this method is blocked inside an <iframe> unless its sandbox attribute has the value allow-modals.safari ios full support 1samsung internet android full support 1.0notes full support 1.0notes notes starting with samsung internet 5.0, this method is blocked inside an <iframe> unless its sandbox attribute has the value allow-modals.legend full support full support ...
XRReferenceSpace - Web APIs
for xr systems that allow the user to physically move around, such as those that track movement with a real-world camera, this boundary establishes the edges of the area the user is able to move around in, whether due to physical obstacles or due to limitations of the xr hardware.
... xrreferencespace unbounded a tracking space which allows the user total freedom of movement, possibly over extremely long distances from their origin point.
...*/ }); the other situation in which you may need to acquire a new reference space is if you need to move the origin to a new position; this is commonly done, for example, when your project allows the user to move through the environment using input devices such as the keyboard, mouse, touchpad, or game controls that are not connected through the xr device.
Introduction - Web APIs
this would allow the same style to be reused for multiple content, as well as simplify maintenance and allow a quick (only modify one file) way to change the look of content.
... xsl (extensible stylesheet language) transformations are composed of two parts: xsl elements, which allow the transformation of an xml tree into another markup tree and xpath, a selection language for trees.
...this allows xslt to add, remove and reorganize elements from the original xml document and thus allows more fine-grain control of the resulting document's structure.
ARIA Test Cases - Accessibility
window-eyes window-eyes should allow the user to change row/col header reading modes with ctrl+shift+h, whether the user is in browse or forms mode.
... juicy studio -- real world example this site -- another real world example application with inner document -- the only landmark here is the document, since role="application" as at the root expected at behavior: screen readers should not include the root accessible object in a page in the list of landmarks screen readers should provide keys to allow users to traverse a list of landmarks or next/prev landmark keys screen readers should support nested landmarks, and multiple landmarks of the same time screen readers should announce the number of landmarks at page load, if they exist on the page screen readers should announce landmarks as users navigate into them (test in all screen reader modes) 8 (jg) are their any landmark role equivalen...
... (leopard) pass n/a pass pass zoomtext - - - - orca - - - - describedby aria-describedby aria-describedby with display: none aria-describedby with visibility: hidden aria-describedby on img's with role="button" expected at behavior: when the textfield is focused, this description should be spoken after the label "minutes": "allows you to specify the number of minutes of inactivity after which your computer should shut down." (al) the describedby text should be spoken whether it is hidden or not.
Accessibility: What users can do to browse more safely - Accessibility
gif scrubber gif scrubber is a chrome extension that allows you to control gifs like a video player.
... there is a github repository for it at https://github.com/0ui/gif-scrubber beeline reader beeline reader has a browser extension that allows you to set up for grayscale and dyslexi font, among other things take advantage operating system accessibility features most operating systems such as windows 10, have accessibility options that are surprisingly powerful.
...in the screenshot below, you can see an example of windows 10 accessibility settings allowing for color filters to be selected.
Web Accessibility: Understanding Colors and Luminance - Accessibility
luckily, css media queries level 5 will be a game-changer in accessibility initiatives, because it will allow users to select settings that accomodate their needs best.
... the rgb color model is extended to include “alpha” -- rgba -- to allow specification of the opacity of a color.
...these queries will allow users to choose contrast levels that is right for them, and enable them to adjust these levels depending upon where they are, and what kind of screen they are using.
Understandable - Accessibility
the html5 <audio> element can be used to create a control that allows the reader to play back an audio file containing the correct pronounciation, and it also makes sense to include a textual pronounciation guide after difficult words, in the same way that you find in dictionary entries.
... reversible — for any view where data can be entered, provide an equivalent view that allows you to edit or even delete an entry, as appropriate.
... checking data — as covered in 3.3.1, a combination of client-side and server-side validation should be used to detect errors and display helpful messages to the user to allow them to correct their inputs.
::first-letter (:first-letter) - CSS: Cascading Style Sheets
allowable properties only a small subset of css properties can be used with the ::first-letter pseudo-element: all font properties : font, font-style, font-feature-settings, font-kerning, font-language-override, font-stretch, font-synthesis, font-variant, font-variant-alternates, font-variant-caps, font-variant-east-asian, font-variant-ligatures, font-variant-numeric, font-variant-position, font-we...
... working draft generalizes allowed properties to typesetting, text decoration, inline layout properties, opacity, and box-shadow.
... candidate recommendation allows the use of text-shadow with ::first-letter.
::first-line (:first-line) - CSS: Cascading Style Sheets
allowable properties only a small subset of css properties can be used with the ::first-line pseudo-element: all font-related properties: font, font-kerning, font-style, font-variant, font-variant-numeric, font-variant-position, font-variant-east-asian, font-variant-caps, font-variant-alternates, font-variant-ligatures, font-synthesis, font-feature-settings, font-language-override, font-weight, fon...
... generalizes allowed properties to typesetting, text decoration, and inline layout properties and opacity.
... candidate recommendation allows the use of text-shadow with ::first-letter.
font-stretch - CSS: Cascading Style Sheets
the font-stretch css descriptor allows authors to specify a normal, condensed, or expanded face for the fonts specified in the @font-face rule.
...negative values are not allowed for this property.
...rule@font-faceinitial valuenormalcomputed valueas specified formal syntax <font-stretch-absolute>{1,2}where <font-stretch-absolute> = normal | ultra-condensed | extra-condensed | condensed | semi-condensed | semi-expanded | expanded | extra-expanded | ultra-expanded | <percentage> examples setting a percentage range for font-stretch the following find a local open sans font or import it, and allow using the font for normal, semi-condensed and semi-expanded states.
font-style - CSS: Cascading Style Sheets
the font-style css descriptor allows authors to specify font styles for the fonts specified in the @font-face rule.
... oblique with angle range selects a font classified as oblique, and additionally specifies a range of allowable angle for the slant of the text.
... note that a range is only supported when the font-style is oblique; for font-style: normal or italic, no second value is allowed.
@font-face - CSS: Cascading Style Sheets
font-feature-settings allows control over advanced typographic features in opentype fonts.
... font-variation-settings allows low-level control over opentype or truetype font variations, by specifying the four letter axis names of the features to vary, along with their variation values.
... by allowing authors to provide their own fonts, @font-face makes it possible to design content without being limited to the so-called "web-safe" fonts (that is, the fonts which are so common that they're considered to be universally available).
@media - CSS: Cascading Style Sheets
WebCSS@media
name summary notes any-hover does any available input mechanism allow the user to hover over elements?
... height height of the viewport hover does the primary input mechanism allow the user to hover over elements?
...o> examples testing for print and screen media types @media print { body { font-size: 10pt; } } @media screen { body { font-size: 13px; } } @media screen, print { body { line-height: 1.2; } } @media only screen and (min-width: 320px) and (max-width: 480px) and (resolution: 150dpi) { body { line-height: 1.4; } } introduced in media queries level 4 is a new range syntax that allows for less verbose media queries when testing for any feature accepting a range, as shown in the below examples: @media (height > 600px) { body { line-height: 1.4; } } @media (400px <= width <= 700px) { body { line-height: 1.4; } } for more examples, please see using media queries.
Using URL values for the cursor property - CSS: Cascading Style Sheets
this allows specifying arbitrary images as mouse cursors — any image format supported by gecko can be used.
... for example, the following value would be allowed: cursor: url(foo.cur), url(http://www.example.com/bar.gif), auto; this will first try loading foo.cur.
..., ]* <keyword> it allows specifying the coordinates of the cursor's hotspot, which will be clamped to the boundaries of the cursor image.
Using multi-column layouts - CSS: Cascading Style Sheets
the css multi-column layout module extends the block layout mode to allow the easy definition of multiple columns of text.
... unfortunately this is impossible to do with css and html without forcing column breaks at fixed positions, or severely restricting the markup allowed in the text, or using heroic scripting.
...therefore, if the height is constrained, by setting the css height or max-height properties on a multi-column block, each column is allowed to grow to that height and no further before adding new column.
Backwards Compatibility of Flexbox - CSS: Cascading Style Sheets
the idea of these prefixes was to allow implementations of the spec to be tested and explored by browser engineers and web developers alike without clashing with other implementations.
... display: table- the css table display properties are potentially very useful as a fallback, due to the fact that they allow design patterns such as full height columns and vertical centering and work back as far as internet explorer 8.
...both display: table-cell and display: inline-block allow for the use of this property.
Relationship of flexbox to other layout methods - CSS: Cascading Style Sheets
flexbox provides access to properties that allow the alignment of items on their cross axis and justification of items on the main axis.
...as already described in the basic concepts article, flex items can be allowed to wrap but, once they do so, each line becomes a flex container of its own.
... by adding display: contents to the wrapper around the nested elements, you can see that that item has disappeared from the layout, allowing the two sub-children to be laid out as if they were direct children of the flex container.
Using media queries - CSS: Cascading Style Sheets
name summary notes any-hover does any available input mechanism allow the user to hover over elements?
... height height of the viewport hover does the primary input mechanism allow the user to hover over elements?
...furthermore, you can combine multiple media queries into a comma-separated list; this allows you to apply the same styles in different situations.
Shorthand properties - CSS: Cascading Style Sheets
as missing values are replaced by their initial value, it is impossible to allow inheritance of individual properties by omitting them.
...can be simplified as: border: 1px solid #000; margin and padding properties shorthand versions of margin and padding values work similarly; the margin property allows for shorthand values to be specified using one, two, three, or four values.
...the live example below allows you to play with the css and see what happens when you make changes.
Syntax - CSS: Cascading Style Sheets
WebCSSSyntax
the basic goal of the cascading stylesheet (css) language is to allow a browser engine to paint elements of the page with specific features, like colors, positioning, or decorations.
...not all pairs of properties and values are allowed and each property defines what are the valid values.
... css allows this by associating conditions with declarations blocks.
Using CSS custom properties (variables) - CSS: Cascading Style Sheets
custom properties allow a value to be stored in one place, then referenced in multiple other places.
... { color: white; background-color: var(--main-bg-color); margin: 10px; width: 100px; } .five { background-color: var(--main-bg-color); } <div> <div class="one"></div> <div class="two">text <span class="five">- more text</span></div> <input class="three"> <textarea class="four">lorem ipsum</textarea> </div> this leads to the same result as the previous example, yet allows for one canonical declaration of the desired property value; very useful if you want to change the value across the entire page later.
... note: the syntax of the fallback, like that of custom properties, allows commas.
Value definition syntax - CSS: Cascading Style Sheets
the definition syntax describes which values are allowed and the interactions between them.
... bold, as it isn't a keyword allowed as value of any of the entity.
... exclamation point (!) the exclamation point multiplier after a group indicates that the group is required, and must produce at least one value; even if the grammar of the items within the group would otherwise allow the entire contents to be omitted, at least one component value must not be omitted.
background-repeat - CSS: Cascading Style Sheets
round as the allowed space increases in size, the repeated images will stretch (leaving no gaps) until there is room (space left >= half of the image width) for another one to be added.
... when the next image is added, all of the current ones compress to allow room.
... candidate recommendation adds support for multiple background images, the two-value syntax allowing distinct repetition behavior for the horizontal and vertical directions, the space and round keywords, and for backgrounds on inline-level elements by precisely defining the background painting area.
<color> - CSS: Cascading Style Sheets
it was essentially added to allow developers to override an inherited solid color.
... many designers find hsl more intuitive than rgb, since it allows hue, saturation, and lightness to each be adjusted independently.
...entering a valid color into the input causes the <div> to adopt that color, allowing you to test our color values.
cursor - CSS: Cascading Style Sheets
WebCSScursor
bug 275173: on windows and mac os x, no-drop is the same as not-allowed.
... not-allowed the requested action will not be carried out.
..., ]* [ auto | default | none | context-menu | help | pointer | progress | wait | cell | crosshair | text | vertical-text | alias | copy | move | no-drop | not-allowed | e-resize | n-resize | ne-resize | nw-resize | s-resize | se-resize | sw-resize | w-resize | ew-resize | ns-resize | nesw-resize | nwse-resize | col-resize | row-resize | all-scroll | zoom-in | zoom-out | grab | grabbing ] ] examples setting cursor types .foo { cursor: crosshair; } .bar { cursor: zoom-in; } /* a fallback keyword value is required when using a url */ .baz { cursor: u...
Adapting to the new two-value syntax of display - CSS: Cascading Style Sheets
in order to better describe this behavior, the display property has been refactored to allow for two values — an outer and inner value — to be set on it, as well as the single values we are used to.
...the reason we tend to use it is to allow padding to push inline items away from an element, when creating navigation items for example, or when wanting to add a background with padding to an inline element as in the example below.
... values of: inline-block inline-table inline-flex inline-grid if a supporting browser comes across these as single values then it treats them the same as the two-value versions: inline flow-root inline table inline flex inline grid so all of the current situations are neatly covered, meaning that we maintain compatibility of existing and new sites that use the single values, while allowing the spec to evolve.
<easing-function> - CSS: Cascading Style Sheets
however, certain properties will restrict the output if it goes outside an allowable range.
... for example, a color component greater than 255 or smaller than 0 will be clipped to the closest allowed value (255 and 0, respectively).
...the most useful of these functions are given a keyword that allows them to be easily referenced.
env() - CSS: Cascading Style Sheets
WebCSSenv
originally provided by the ios browser to allow developers to place their content in a safe area of the viewport, the safe-area-inset-* values defined in the specification can be used to help ensure content is visible even to viewers using non‑rectangular displays.
...) examples the below example makes use of the optional second parameter of env(), which allows you to provide a fallback value in case the environment variable is not available.
...env(safe-area-inset-bottom, 50px); /* 50px because ua properties are case sensitive */ padding: env(x, 50px 20px); /* as if padding: '50px 20px' were set because x is not a valid environment variable */ padding: env(x, 50px, 20px); /* ignored because '50px, 20px' is not a valid padding value and x is not a valid environment variable */ the syntax of the fallback, like that of custom properties, allows commas.
max() - CSS: Cascading Style Sheets
WebCSSmax
the max() function can be used anywhere a <length>, <frequency>, <angle>, <time>, <percentage>, <number>, or <integer> is allowed.
... formal syntax max( <calc-sum># )where <calc-sum> = <calc-product> [ [ '+' | '-' ] <calc-product> ]*where <calc-product> = <calc-value> [ '*' <calc-value> | '/' <number> ]*where <calc-value> = <number> | <dimension> | <percentage> | ( <calc-sum> ) examples setting a minimum size for a font another use case for css functions is allow a font size to grow while ensuring it is at least a mimum size, enabling responsive font sizes while ensuring legibility.
...this ensure it is legible and ensures accessibility <h1>this text is always legible, but doesn't change size</h1> <h1 class="responsive">this text is always legible, and is responsive, to a point</h1> think of the max() function as finding the minimum value allowed for a property.
EXSLT
there are a number of modules; those that are supported by firefox are listed below: common (exsl)the exslt common package provides basic functions that expand upon the capabilities of xslt.math (math)the exslt math package provides functions for working with numeric values and comparing nodes.regular expressions (regexp)the exslt regular expressions package provides functions that allow testing, matching, and replacing text using javascript style regular expressions.sets (set)the exslt sets package offers functions that let you perform set manipulation.strings (str)the exslt strings package provides functions that allow the manipulation of strings.
... functions math:highest() math:lowest() math:max() math:min() regular expressions the exslt regular expressions package provides functions that allow testing, matching, and replacing text using javascript style regular expressions.
... functions set:difference() set:distinct() set:intersection() set:has-same-node() set:leading() set:trailing() strings the exslt strings package provides functions that allow the manipulation of strings.
Web Audio playbackRate explained - Developer guides
the playbackrate property of the <audio> and <video> elements allows us to change the speed, or rate, at which a piece of web audio or video is playing.
...p> </form> and apply some javascript to it: window.onload = function () { var v = document.getelementbyid("myvideo"); var p = document.getelementbyid("pbr"); var c = document.getelementbyid("currentpbr"); p.addeventlistener('input',function(){ c.innerhtml = p.value; v.playbackrate = p.value; },false); }; finally, we listen for the input event firing on the <input> element, allowing us to react to the playback rate control being changed.
... so defaultplaybackrate allows us to set the playback rate before playing the media, while playbackrate allows us to change it during media playback.
Making content editable - Developer guides
these are object resizing on <img>, <table>, and absolutely-positioned elements; inline table editing to add or remove rows and columns; and the grabber that allows moving of absolutely-positioned elements.
... if you want to use a different paragraph separator, the above browsers all support document.execcommand, which provides a defaultparagraphseparator command to allow you to change it.
...you can enable them by setting the preferences shown below using about:config: user_pref("capability.policy.policynames", "allowclipboard"); user_pref("capability.policy.allowclipboard.sites", "https://www.mozilla.org"); user_pref("capability.policy.allowclipboard.clipboard.cutcopy", "allaccess"); user_pref("capability.policy.allowclipboard.clipboard.paste", "allaccess"); example: a simple but complete rich text editor <!doctype html> <html> <head> <title>rich text editor</title> <script type="text/javascript"> var odoc,...
Using HTML sections and outlines - Developer guides
next up, older ie versions do not allow styling of unsupported elements, unless you create an instance of them in the dom.
... you can add a specific script to allow this, as seen below: <!--[if lt ie 9]> <script> document.createelement("article"); document.createelement("aside"); document.createelement("footer"); document.createelement("header"); document.createelement("nav"); document.createelement("section"); document.createelement("time"); </script> <![endif]--> as a last precaution, you could also add an explicit <noscript> element inside the <head> element to warn any users that have javascript disabled that your page relies on javascript: <noscript> <p><strong>this web page requires javascript to be enabled.</strong></p> <p>javascript is an object-oriented computer programming language commonly used to create interactive effects within web browsers.</p> <p><a href="...
...https://goo.gl/koeeaj">how to enable javascript?</a></p> </noscript> this leads to the following code to allow the support of the html5 sections and headings elements in non-html5 browsers, even for internet explorer (8 and older), with a proper fallback for the case where this latter browser is configured not to use scripting: <!--[if lt ie 9]> <script> document.createelement("article"); document.createelement("aside"); document.createelement("footer"); document.createelement("header"); document.createelement("nav"); document.createelement("section"); document.createelement("time"); </script> <![endif]--> <noscript> <p><strong>this web page requires javascript to be enabled.</strong></p> <p>javascript is an object-oriented computer programming language ...
HTML attribute: step - HTML: Hypertext Markup Language
WebHTMLAttributesstep
the value can must be a positive number - integer or float -- or the special value any, which means no stepping is implied, and any value is allowed (barring other constraints, such as min and max).
... the default stepping value for number inputs is 1, allowing only integers to be entered, unless the stepping base is not an integer.
...if providing instructions outside of labels, which allows more flexible positioning and design, consider using aria-labelledby or aria-describedby.
Date and time formats used in HTML - HTML: Hypertext Markup Language
while user interfaces may allow entry of dates using other calendars, the underlying value always uses the gregorian calendar.
...no values outside that range are allowed.
... while this format allows for time zones between -23:59 and +23:59, the current range of time zone offsets is -12:00 to +14:00, and no time zones are currently offset from the hour by anything other than 00, 30, or 45 minutes.
Standard metadata names - HTML: Hypertext Markup Language
WebHTMLElementmetaname
it is a comma-separated list of the values below: values for the content of <meta name="robots"> value description used by index allows the robot to index the page (default).
... all follow allows the robot to follow the links on the page (default).
... some crawler robots, like google, yahoo and bing, support the same values for the http header x-robots-tag; this allows non-html documents like images to use these rules.
<script>: The Script element - HTML: Hypertext Markup Language
WebHTMLElementscript
this attribute allows the elimination of parser-blocking javascript where the browser would have to load and evaluate scripts before continuing to parse.
...to allow error logging for sites which use a separate domain for static media, use this attribute.
... this attribute allows the elimination of parser-blocking javascript where the browser would have to load and evaluate scripts before continuing to parse.
<textarea> - HTML: Hypertext Markup Language
WebHTMLElementtextarea
the html <textarea> element represents a multi-line plain-text editing control, useful when you want to allow users to enter a sizeable amount of free-form text, for example a comment on a review or feedback form.
... the above example demonstrates a number of features of <textarea>: an id attribute to allow the <textarea> to be associated with a <label> element for accessibility purposes a name attribute to set the name of the associated data point submitted to the server when the form is submitted.
... rows and cols attributes to allow you to specify an exact size for the <textarea> to take.
Link types - HTML: Hypertext Markup Language
list of the defined link types and their significance in html link type description allowed in these elements not allowed in these elements alternate if the element is <link> and the rel attribute also contains the stylesheet type, the link defines an alternative style sheet; in that case the title attribute must be present and not be the empty string.
... this allows for bookmarking a single article in a page containing multiple articles, such as on a monthly summary blog page, or a blog aggregator.
... <link> <a>, <area>, <form> dns-prefetch hints to the browser that a resource is needed, allowing the browser to do a dns lookup and protocol handshaking before a user clicks the link.
Using HTTP cookies - HTTP
WebHTTPCookies
domain attribute the domain attribute specifies which hosts are allowed to receive the cookie.
... allowing users to opt out of receiving some or all cookies.
... allowing users to use the bulk of your service without receiving cookies.
CSP: trusted-types - HTTP
this allows authors to define rules guarding writing values to the dom and thus reducing the dom xss attack surface to small, isolated parts of the web application codebase, facilitating their monitoring and code review.
... syntax content-security-policy: trusted-types; content-security-policy: trusted-types <policyname>; content-security-policy: trusted-types <policyname> <policyname> 'allow-duplicates'; <domstring> any string can be a trusted type policy name.
... 'allow-duplicates' allows for creating policies with a name that was already used examples todo polyfill a polyfill for trusted types is available on github.
Content-Security-Policy-Report-Only - HTTP
the http content-security-policy-report-only response header allows web developers to experiment with policies by monitoring (but not enforcing) their effects.
...it uses the following policy, disallowing everything but stylesheets from cdn.example.com.
...stylesheets are only allowed to be loaded from cdn.example.com, yet the website tries to load one from its own origin (http://example.com).
SameSite cookies - HTTP
the samesite attribute of the set-cookie http response header allows you to declare if your cookie should be restricted to a first-party or same-site context.
... values the samesite attribute accepts three values: lax cookies are allowed to be sent with top-level navigations and will be sent along with get request initiated by third party website.
... none cookies will be sent in all contexts, i.e sending cross-origin is allowed.
Trailer - HTTP
WebHTTPHeadersTrailer
the trailer response header allows the sender to include additional fields at the end of chunked messages in order to supply metadata that might be dynamically generated while the message body is sent, such as a message integrity check, digital signature, or post-processing status.
... the te request header needs to be set to "trailers" to allow trailer fields.
...these header fields are disallowed: message framing headers (e.g., transfer-encoding and content-length), routing headers (e.g., host), request modifiers (e.g., controls and conditionals, like cache-control, max-forwards, or te), authentication headers (e.g., authorization or set-cookie), or content-encoding, content-type, content-range, and trailer itself.
PATCH - HTTP
WebHTTPMethodsPATCH
to find out whether a server supports patch, a server can advertise its support by adding it to the list in the allow or access-control-allow-methods (for cors) response headers.
... another (implicit) indication that patch is allowed, is the presence of the accept-patch header, which specifies the patch document formats accepted by the server.
... request has body yes successful response has body yes safe no idempotent no cacheable no allowed in html forms no syntax patch /file.txt http/1.1 example request patch /file.txt http/1.1 host: www.example.com content-type: application/example if-match: "e0023aa4e" content-length: 100 [description of changes] response a successful response is indicated by any 2xx status code.
HTTP Public Key Pinning (HPKP) - HTTP
some browsers might allow other hashing algorithms than sha-256 in the future.
...this allows for changing the server's public key without breaking accessibility for clients that have already noted the pins.
...this header only sends reports to the report-uri specified in the header and does still allow browsers to connect to the webserver even if the pinning is violated.
HTTP range requests - HTTP
http range requests allow to send only a portion of an http message from a server to a client.
... multipart ranges the range header also allows you to get multiple ranges at once in a multipart document.
... comparison to chunked transfer-encoding the transfer-encoding header allows chunked encoding, which is useful when larger amounts of data are sent to the client and the total size of the response is not known until the request has been fully processed.
Redirections in HTTP - HTTP
[1] the specification did not intend to allow method changes, but there are existing user agents that do change their method.
... [2] the specification did not intend to allow method changes, but there are existing user agents that do change their method.
...in this case, the response is a 303 (see other) redirect that links to a page indicating that the action has been scheduled, and eventually informs about its progress, or allows to cancel it.
Functions - JavaScript
providing a name allows the function to refer to itself, and also makes it easier to identify the function in a debugger's stack traces: const factorial = function fac(n) { return n < 2 ?
...javascript allows for the nesting of functions and grants the inner function full access to all the variables and functions defined inside the outer function (and all other variables and functions that the outer function has access to).
... rest parameters the rest parameter syntax allows us to represent an indefinite number of arguments as an array.
Grammar and types - JavaScript
together, these also bring object literals and class declarations closer together, and allow object-based design to benefit from some of the same conveniences.
...(this is similar to string interpolation features in perl, python, and more.) optionally, a tag can be added to allow the string construction to be customized, avoiding injection attacks, or constructing higher-level data structures from string contents.
...this allows for many new features, including multiline strings!
Introduction - JavaScript
there are also more advanced server side versions of javascript such as node.js, which allow you to add more functionality to a website than simply downloading files (such as realtime collaboration between multiple computers).
...for example, client-side extensions allow an application to place elements on an html form and respond to user events such as mouse clicks, form input, and page navigation.
...for example, server-side extensions allow an application to communicate with a database, provide continuity of information from one invocation to another of the application, or perform file manipulations on a server.
Iterators and generators - JavaScript
it allows creation of a simple range iterator which defines a sequence of integers from start (inclusive) to end (exclusive) spaced step apart.
...generator functions provide a powerful alternative: they allow you to define an iterative algorithm by writing a single function whose execution is not continuous.
... for (let value of ['a', 'b', 'c']) { console.log(value); } // "a" // "b" // "c" [...'abc']; // ["a", "b", "c"] function* gen() { yield* ['a', 'b', 'c']; } gen().next(); // { value: "a", done: false } [a, b, c] = new set(['a', 'b', 'c']); a; // "a" advanced generators generators compute their yielded values on demand, which allows them to efficiently represent sequences that are expensive to compute (or even infinite sequences, as demonstrated above).
JavaScript modules - JavaScript
this is because there is only one default export allowed per module, and we know that randomsquare is it.
...this allows you to dynamically load modules only when they are needed, rather than having to load everything up front.
... this new functionality allows you to call import() as a function, passing it the path to the module as a parameter.
Inheritance and the prototype chain - JavaScript
allows the direct setting of __proto__ in a way that is one-time-only so that the browser can better optimize the object.
... also allows the creation of objects without a prototype via object.create(null).
...allows the dynamic manipulation of an objects prototype and can even force a prototype on a prototype-less object created with object.create(null).
SyntaxError: a declaration in the head of a for-of loop can't have an initializer - JavaScript
this is not allowed in for-of loops.
...this is not allowed in for-of loops.
... you might want a for loop that does allow an initializer.
RangeError - JavaScript
the rangeerror object indicates an error when a value is not in the set or range of allowed values.
... description a rangeerror is thrown when trying to pass a value as an argument to a function that does not allow a range that includes the value.
... this can be encountered when: passing a value that is not one of the allowed string values to string.prototype.normalize(), or when attempting to create an array of an illegal length with the array constructor, or when passing bad values to the numeric methods number.prototype.toexponential(), number.prototype.tofixed() or number.prototype.toprecision().
Planned changes to shared memory - JavaScript
if they are set, postmessage() on window objects and dedicated workers will function and allow for memory sharing.
... webassembly shared memory the webassembly threads proposal allows webassembly.memory objects to be created with a new shared constructor flag.
...just as sharedarraybuffer and its methods are unconditionally enabled (and only sharing between threads is gated on the new headers), the webassembly atomic instructions are also unconditionally allowed.
parseInt() - JavaScript
leading and trailing spaces are allowed.
... the ecmascript 5 specification of the function parseint no longer allows implementations to treat strings beginning with a 0 character as octal values.
... this differs from ecmascript 3, which merely discouraged (but allowed) octal interpretation.
Lexical grammar - JavaScript
for numeric literals, underscores (_, u+005f) can be used as separators: // separators in decimal numbers 1_000_000_000_000 1_050.95 // separators in binary numbers 0b1010_0001_1000_0101 // separators in octal numbers 0o2_2_5_6 // separators in hex numbers 0xa0_b0_c0 // separators in bigints 1_000_000_000_000_000_000_000n note these limitations: // more than one underscore in a row is not allowed 100__000; // syntaxerror // not allowed at the end of numeric literals 100_; // syntaxerror // can not be used after leading 0 0_1; // syntaxerror object literals see also object and object initializer for more information.
... prior to the proposal to make all json text valid ecma-262, u+2028 <ls> and u+2029 <ps>, were also disallowed from appearing unescaped in string literals.
...a semicolon is inserted before, when a line terminator or "}" is encountered that is not allowed by the grammar.
Object initializer - JavaScript
function havees2015duplicatepropertysemantics() { 'use strict'; try { ({prop: 1, prop: 2}); // no error thrown, duplicate property names allowed in strict mode return true; } catch(e) { // error thrown, duplicates prohibited in strict mode return false; } } method definitions a property of an object can also refer to a function or a getter or setter method.
...that allows you to put an expression in brackets [], that will be computed and used as the property name.
... shallow-cloning (excluding prototype) or merging objects is now possible using a shorter syntax than object.assign().
Expressions and operators - JavaScript
...obj spread syntax allows an expression to be expanded in places where multiple arguments (for function calls) or multiple elements (for array literals) are expected.
... [a, b] = [1, 2] {a, b} = {a:1, b:2} destructuring assignment allows you to assign the properties of an array or object to variables using syntax that looks similar to array or object literals.
... comma operator , the comma operator allows multiple expressions to be evaluated in a single statement and returns the result of the last expression.
MathML attribute reference - MathML
the values block and inline are allowed.
... unimplemented overflow <math> if an expression is too long to fit in the allowed width, this attribute sets the preferred handling.
... scriptminsize <mstyle> specifies a minimum font size allowed due to changes in scriptlevel.
Authoring MathML - MathML
n hasmathmlsupport() { var div = document.createelement("div"), box; div.innerhtml = "<math><mspace height='23px' width='77px'/></math>"; document.body.appendchild(div); box = div.firstchild.firstchild.getboundingclientrect(); document.body.removechild(div); return math.abs(box.height - 23) <= 1 && math.abs(box.width - 77) <= 1; } alternatively, the following ua string sniffing will allow to detect the rendering engines with native mathml support (gecko and webkit).
... note that ua string sniffing is not the most reliable method and might break from version to version: var ua = navigator.useragent; var isgecko = ua.indexof("gecko") > -1 && ua.indexof("khtml") === -1 && ua.indexof('trident') === -1; var iswebkit = ua.indexof('applewebkit') > -1 && ua.indexof('chrome') === -1; mathematical fonts in order to get a good layout or to allow different style, it's important to have mathematical fonts available.
... latexmathml is a similar script that allows to parse more latex commands.
MathML documentation index - MathML
WebMathMLIndex
19 <mmultiscripts> mathml, mathml reference, mathml:element, mathml:script and limit schemata the mathml <mmultiscripts> element allows you to create tensor-like objects.
...however, it is also allowed to have arbitrary text in it which is actually a numeric quantity, for example "eleven".
... 34 <mtable> mathml, mathml reference, mathml:element, mathml:tabular math the mathml <mtable> element allows you to create tables or matrices.
Performance budgets - Web Performance
the warning level allows you to be proactive and plan any tech debt, while not blocking development or deploys.
... bundlesize, allows you to define and run file size checks in your ci pipeline.
...they are meant to reflect your ongoing goals but allow risks and experiments.
How to make PWAs installable - Progressive web apps (PWAs)
previous overview: progressive next in the last article, we read about how the example application, js13kpwa, works offline thanks to its service worker, but we can go even further and allow users to install the web app on mobile and desktop browers that support doing so.
... these technologies allow the app to be launched directly from the device's home screen, rather than the user having to open the browser and then navigate to the site by using a bookmark or typing the url.
... requirements to make the web site installable, it needs the following things in place: a web manifest, with the correct fields filled in the web site to be served from a secure (https) domain an icon to represent the app on the device a service worker registered, to allow the app to work offline (this is required only by chrome for android currently) currently, only the chromium-based browsers such as chrome, edge, and samsung internet require the service worker.
Making PWAs work offline with Service workers - Progressive web apps (PWAs)
installation the api allows us to add event listeners for key events we are interested in — the first one is the install event: self.addeventlistener('install', (e) => { console.log('[service worker] install'); }); in the install listener, we can initialize the cache and add files to it for offline use.
...this is very useful, as it allows us to intercept requests and respond to them with custom responses.
...this allows us to respond to every single request with any response we want: prepared by the service worker, taken from cache, modified if needed.
Web API reference - Web technology reference
WebReferenceAPI
document object model the dom is an api that allows access to and modification of the current document.
... it allows manipulation of document node and element.
... device apis this set of apis allows access to various hardware features available to web pages and applications.
SVG Core Attributes - SVG: Scalable Vector Graphics
WebSVGAttributeCore
value: any valid language id; animatable: no tabindex the tabindex svg attribute allows you to control whether an element is focusable and to define the relative order of the element for the purposes of sequential focus navigation.
... value type: <iri>; animatable: no xml:lang it is a universal attribute allowed in all xml dialects to mark up the natural human language that an element contains.
... it's almost identical in usage to html's lang, but in conforming xml 1.0 documents, it does not allow the use of a null attribute value (xml:lang="") to indicate an unknown language.
SVG 2 support in Mozilla - SVG: Scalable Vector Graphics
a copy of any list item being inserted that is already in another list implementation status unknown crossorigin attribute for <image> and <script> elements not implemented yet (at least for <image>; bug 1240357) rendering model change notes svg root and <foreignobject> not overflow:hidden in ua style sheet implementation status unknown allow overflow: auto; to clip and show scroll bars implementation status unknown allow overflow: scroll; to show scroll bars on <svg> elements implementation status unknown basic data types and interfaces change notes dommatrix or dommatrixreadonly instead of svgmatrix implementation status unknown domrect or domrectreadonly instead of svgrect...
...() not implemented (bug 778654) svgelement.tabindex implemented (bug 778654) document.activeelement implementation status unknown globaleventhandlers on svgelement implementation status unknown options dictionary attribute for svggraphicselement.getbbox() implemented behind the preference svg.new-getbbox.enabled (bug 999964, bug 1019326) allow leading and trailing whitespace in <length>, <angle>, <number> and <integer> implementation status unknown form feed (u+000c) in whitespace implementation status unknown svgelement.xmlbase, svgelement.xmllang and svgelement.xmlspace removed implementation status unknown svgviewspec removed implementation status unknown svgelement.style removed im...
....usecurrentview not removed yet (bug 1174097) svgunknownelement not implemented (bug 1239218) lang attribute without namespace implemented (bug 721920) svgsvgelement.viewport removed never implemented xml:base attribute removed implementation status unknown reorder descendent elements of <switch> having systemlanguage attribute according to allowreorder smil attribute implementation status unknown made <tspan> and <textpath> graphics elements implementation status unknown allow x, y, width, and height on <symbol> implementation status unknown made <use> element shadow trees consistent with shadow dom spec implementation status unknown role mapping of <a> element depending on whether it is a ...
SVG Filters Tutorial - SVG: Scalable Vector Graphics
filters svg allows us to use similar tools as the bitmap description language such as the use of shadow, blur effects or even merging the results of different filters.
...between the filter tags, we can define the primitives that allow us to implement the desired effect.
...<femerge> primitive contains the nodes <femergenode> taking as input the result offsetblur , this will allow it to appear below the sourcegraphic implementation of more primitives <defs> <filter id="drop-shadow"> <fegaussianblur in="sourcealpha" stddeviation="3" result="blur"/> <feoffset in="blur" dx="4" dy="4" result="offsetblur"/> </filter> <femerge> <femergenode in="offsetblur"/> <femergenode in="sourcegraphic"/> </femerge> </defs> ...
Mixed content - Web security
note: since firefox 55, the loading of mixed content is allowed on http://127.0.0.1/ (see bug 903966).
... chrome allows mixed content on http://127.0.0.1/ and http://localhost/.
... safari does not allow any mixed content.
WebAssembly Concepts - WebAssembly
be readable and debuggable — webassembly is a low-level assembly language, but it does have a human-readable text format (the specification for which is still being finalized) that allows code to be written, viewed, and debugged by hand.
...instead, it is designed to complement and work alongside javascript, allowing web developers to take advantage of both languages' strong points: javascript is a high-level language, flexible and expressive enough to write web applications.
... note: there are future plans to allow webassembly to call web apis directly.
Cross-domain Content Scripts - Archive of obsolete content
d-on's package.json under the "cross-domain-content" key, which itself lives under the "permissions" key: "permissions": { "cross-domain-content": ["http://example.org/", "http://example.com/"] } the domains listed must include the scheme and fully qualified domain name, and these must exactly match the domains serving the content - so in the example above, the content script will not be allowed to access content served from https://example.com/.
... wildcards are not allowed.
Contributor's Guide - Archive of obsolete content
data members are properties that allow each instance to have their own state, whereas member functions are properties that allow instances to have behavior.
... inheritance allows classes to inherit state and behavior from an existing classes, known as the base class.
/loader - Archive of obsolete content
dules/commonjs/toolkit/foo.js // toolkit/foo/bar -> resource://gre/modules/commonjs/toolkit/foo/bar.js 'toolkit/': 'resource://gre/modules/commonjs/toolkit/', // resolev all other non-relative module requirements as follows: // devtools/gcli -> resource:///modules/devtools/gcli.js // panel -> resource:///modules/panel.js '': 'resource:///modules/', // allow relative urls and resolve them to add-on root: // ./main -> resource://my-addon/root/main.js './': 'resource://my-addon/root/' } }); the order of keys in paths is irrelevant since they are sorted by keys from longest to shortest to allow overlapping mapping.
...it is used as a subject for observer notification to allow use of the observer service for defining hooks reacting on the unload of a specific loader.
content/loader - Archive of obsolete content
loader adds code to initialize and validate a set of properties for managing content scripts: contenturl contentscript contentscriptfile contentscriptwhen contentscriptoptions allow when certain of these properties are set, the loader emits a propertychange event, enabling its users to take the appropriate action.
... allow permissions for the content, with the following keys: ...
content/symbiont - Archive of obsolete content
allow object permissions for the content, with the following keys: script boolean whether or not to execute script in the content.
... allow permissions for the content, with a single boolean key called script which defaults to true and indicates whether or not to execute scripts in the content.
net/xhr - Archive of obsolete content
functions forceallowthirdpartycookie(xhr) force relevant cookies to be sent with this xmlhttprequest even if normally they would not be.
... parameters xhr: xmlhttprequest the xmlhttprequest to allow third-party cookies for.
HTML to DOM - Archive of obsolete content
("iframe"); // iframe (or browser on older firefox) frame.setattribute("id", "sample-frame"); frame.setattribute("name", "sample-frame"); frame.setattribute("type", "content"); frame.setattribute("collapsed", "true"); document.getelementbyid("main-window").appendchild(frame); // or // document.documentelement.appendchild(frame); // set restrictions as needed frame.webnavigation.allowauth = false; frame.webnavigation.allowimages = false; frame.webnavigation.allowjavascript = false; frame.webnavigation.allowmetaredirects = true; frame.webnavigation.allowplugins = false; frame.webnavigation.allowsubframes = false; // listen for load frame.addeventlistener("load", function (event) { // the document of the html in the dom var doc = event.originaltarget; //...
... <vbox hidden="false" height="0"> <iframe type="content" src="" name="donkey-browser" hidden="false" id="donkey-browser" height="0"/> </vbox> then, in your extension's "load" event handler: onload: function() { donkeybrowser = document.getelementbyid("donkey-browser"); if (donkeybrowser) { donkeybrowser.style.height = "0px"; donkeybrowser.webnavigation.allowauth = true; donkeybrowser.webnavigation.allowimages = false; donkeybrowser.webnavigation.allowjavascript = false; donkeybrowser.webnavigation.allowmetaredirects = true; donkeybrowser.webnavigation.allowplugins = false; donkeybrowser.webnavigation.allowsubframes = false; donkeybrowser.addeventlistener("domcontentloaded", function (e) { donkeyfire.donkeybrowser_onpageload(e); }, true); ...
JS XPCOM - Archive of obsolete content
ructor("@mozilla.org/file/local;1", "nsifile", "initwithpath"); var file = new nsfile(filepath); they can also be created and initialized manually: var file = components.classes["@mozilla.org/file/local;1"] .createinstance(components.interfaces.nsifile); file.initwithpath(filepath); this creates a new instance of the object with contract id @mozilla.org/file/local;1 and allows you to call methods from the nsifile interface on it.
...with the preferences service from the previous example we can do the following: var preferences = preferences.queryinterface(components.interfaces.nsiprefbranch2); this allows you to use the methods in the nsiprefbranch2 interface.
JavaScript Debugger Service - Archive of obsolete content
in firefox versions prior to gecko 33 (firefox 33 / thunderbird 33 / seamonkey 2.30), the javascript debugger service (or simply jsd) used to be an xpcom component that allows the tracking of javascript while it was being executed in the browser.
...eturns false // it is not well-known why debughook sometimes fails to trigger jsd.debughook = { onexecute: function(frame, type, rv) { stacktrace = ""; for (var f = frame; f; f = f.callingframe) { stacktrace += f.script.filename + "@" + f.line + "@" + f.functionname + "\n"; } dump(stacktrace); return components.interfaces.jsdiexecutionhook.return_continue; } }; filters jsd also allows the use of filters to track which scripts should trigger the hooks.
Rosetta - Archive of obsolete content
nevertheless, the increasing computational power of modern browsers together with the introduction of typed arrays in ecmascript allow us, in theory, to build full virtual machines in pure ecmascript.
...it relies on the fact that unrecognized mime types will be simply ignored: this allows us to manually parse them.
Displaying web content in an extension without security issues - Archive of obsolete content
for example, "chrome://foo/content/foo.xhtml" will have full privileges, "http://example.com/foo.xhtml" will be allowed to access example.com, "file:///c:/foo.xhtml" will be allowed to read files from disk (with some restrictions).
...it won’t harm disabling everything else as well unless it is really required: frame.docshell.allowauth = false; frame.docshell.allowimages = false; frame.docshell.allowjavascript = false; frame.docshell.allowmetaredirects = false; frame.docshell.allowplugins = false; frame.docshell.allowsubframes = false; but what about interactivity, for example if you want a certain reaction to mouse clicks?
Downloading JSON and JavaScript in extensions - Archive of obsolete content
so the extension will not be allowed to move out of the amo sandbox.
...json is about state and does not allow functions to be decoded.
Inline options - Archive of obsolete content
options file the xul allowed for the inline options is limited to a few new tags.
...you must also specify the optionstype as 2: <em:optionsurl>chrome://myaddon/content/name_of_my_file_to_use_for_inline_opts.xul</em:optionsurl> <em:optionstype>2</em:optionstype> your chrome.manifest file should contain the following, otherwise the path chrome://myaddon/content/name_of_my_file_to_use_for_inline_opts.xul will not exist content myaddon ./ this method allows you to maintain compatibility with previous versions of firefox by adding an override to your chrome.manifest: ...
Jetpack Processes - Archive of obsolete content
messaging facilities that allow them to communicate with their parent chrome process are the only means by which they can be endowed with any real power.
...to prevent such memory leaks, a process can either invalidate a handle, immediately preventing it from being passed as a message argument, or it can unroot the handle, allowing it to be passed as a message argument until all references to it are removed, at which point it is garbage collected.
Chapter 4: Using XPCOM—Implementing advanced processes - Archive of obsolete content
after getting an element with the nsisimpleenumerator.getnext() method, use the queryinterface method to get the interface, which allows you to handle each element as a window object.
... manipulating files using xpcom xpcom provides a number of interfaces allowing you to perform file manipulations without concern for whether you are running on windows, mac os x, or linux.
Adding sidebars - Archive of obsolete content
they allow you to stack content on top of other content and switch between different sections easily.
...it allows you to decompose complex ui into individual layers, broadening the layout possibilities.
Connecting to Remote Content - Archive of obsolete content
unlike javascript, the json format doesn't allow any kind of code that can be run, only data.
...do not allow event handlers or any other kinds of code to be passed through your parsers.
JavaScript Object Management - Archive of obsolete content
this allows you to manipulate and possibly change elements in the window without the user noticing the changes.
...a clear example of this is the fact that there are no private or public keywords that allow you to protect object members.
Security best practices in extensions - Archive of obsolete content
frame.docshell.allowimages = false; frame.docshell.allowjavascript = false; frame.docshell.allowplugins = false; there are more examples listed in the document listed above in this section.
... non-chrome urls in chrome xul or html such as the following example are not allowed: <script type="text/javascript" src="http://mysite.greatsite.com/js/wow-content.js" /> in general, scripts that are from remote sources that run in the chrome context are not acceptable, as many times the source of the script can never be 100% guaranteed, and they are vulnerable to man-in-the-middle attacks.
Setting up an extension development environment - Archive of obsolete content
it even allows the running of simultaneous versions, at the same time.
... development preferences there is a set of development preferences that, when enabled, allows you to view more information about application activity, thus making debugging easier.
Using the Stylesheet Service - Archive of obsolete content
the stylesheet service allows extensions to manage user and ua stylesheets without having to touch usercontent.css or userchrome.css files.
... note that ua stylesheets are allowed to do certain unsafe things that user stylesheets are not allowed to do.
Underscores in class and ID Names - Archive of obsolete content
the css1 specification, published in its final form in 1996, did not allow for the use of underscores in class and id names unless they were "escaped." an escaped underscore would look something like this: p.urgent\_note {color: maroon;} this was not well supported by browsers at the time, however, and the practice has never caught on.
... internet explorer 4.x and 5.x for windows erroneously allowed underscores, and so were both non-conformant on this point until the errata was published.
Source Navigator - Archive of obsolete content
but on the other hand mxr can only allow you to type in the name for it to generate a long list of occurances.
...this shows the "auto-create project" dialog: which allows you to decide your filename of the project file (which ends in .proj) and your source directory/directories that you want to import into the project.
Source code directories overview - Archive of obsolete content
.png, .gif), allowing drop-in java virtual machines (called oji, for "open java interface"), supporting plug-ins and reading various compression formats (e.g.
...xpcom is the mechanism that allows mozilla to export interfaces and have them automatically available to javascript scripts, to microsoft com and to regular mozilla c code.
Download Manager improvements in Firefox 3 - Archive of obsolete content
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.
... download manager interfaces nsidownloadmanager gives applications and extensions access to the download manager, allowing them to add and remove files to the download list, retrieve information about past and present downloads, and request notifications as to the progress of downloads.
Repackaging Firefox - Archive of obsolete content
components/partnerbookmarks.js from the cck extension, and it allows us to drop in default bookmarks at profile creation.
...they allow for upgrades to be delivered by mozilla specifically for your distribution, if need be, and because of that they are the most important preferences you need to set.
Creating a Help Content Pack - Archive of obsolete content
nesting as described above works exactly the same no matter how deeply or shallowly nested your entry is.
... viewing your content pack in the help viewer to launch the help viewer with your content pack, you need to have chrome://help/content/contexthelp.js loaded into the xul file that provides the ui to open the help viewer: <script type="application/javascript" src="chrome://help/content/contexthelp.js"/> this will allow you to access all of the viewer functions.
JavaScript crypto - Archive of obsolete content
using the mozilla crypto object from javascript mozilla defines a special javascript object to allow web pages access to certain cryptographic-related services.
...this allows the page to automatically login and logout based on the presence of the smartcard.
Metro browser chrome tests - Archive of obsolete content
the metro browser chrome test suite is an automated testing framework designed to allow testing of the immersive version of firefox for windows 8 and above using javascript.
... it currently allows you to run javascript code in the same scope as the immersive browser and report results using the same functions as the mochitest test framework.
Mozilla Crypto FAQ - Archive of obsolete content
export regulations in january 2000 to allow export of source code for open source software implementing encryption, the major remaining legal obstacle to mozilla crypto development was the fact that rsa security, inc., held a u.s.
... this form of licensing was chosen to allow the released personal security manager and network security services source code to be used in as many contexts as possible; for example, the psm and nss code can be used in mozilla under mpl terms, and can also be used in gnu and other projects under gpl terms.
Plug-n-Hack Phase1 - Archive of obsolete content
plug-n-hack (pnh) phase 1 allows easier integration and defines how security tools can advertise their capabilities to browsers.
...for testing); plug-n-hack requires tool and service manifests to be served from the same origin as the api endpoints but, for testing purposes, ringleader (the firefox addon implementation of the browser component) allows you to set a preference to relax or disable origin checks.
Plug-n-Hack Phase2 - Archive of obsolete content
the next phase of plug-n-hack (pnh) is still being planned but is intended to allow browsers to advertise their capabilities to security tools.
... this will allow the tools to obtain information directly from the browser, and even use the browser as an extension of the tool.
Scripting - Archive of obsolete content
prism allows for some client-side web application customization.
... the web application bundle is allowed to hold a javascript file named webapp.js (called the webapp script).
Prism - Archive of obsolete content
prism supports a simple styling system that allows the user to add css files to the webapp bundle.
... scripting prism allows for some client-side web application customization.
Proxy UI - Archive of obsolete content
(wpad) network.proxy.type=4 manual proxy configuration (manual) network.proxy.type=1 automatic proxy configuration url (pac) network.proxy.type=2 manual manual allows the entry of a proxy server hostname name and server.
...selecting an enabled item sets the menu selection and the proxy mode (network.proxy.type) selecting a disabled item is not allowed.
Remote XUL - Archive of obsolete content
this also means you can't load xul using file:// urls unless you set the preference dom.allow_xul_xbl_for_file to true.
...the remote xul manager extension lets you manage this whitelist, which is maintained using nsipermissionmanager, by creating entries of type "allowxulxbl", like this: components.classes["@mozilla.org/permissionmanager;1"] .getservice(components.interfaces.nsipermissionmanager) .add(uri, 'allowxulxbl', components.interfaces.nsipermissionmanager.allow_action); see using remote xul.
Tamarin build documentation - Archive of obsolete content
running tamarin tests see running tamarin acceptance tests and running tamarin performance tests building tamarin windows mobile utilities the tamarin windows mobile utilities allows the existing acceptance and performance testsuites to be run on a windows mobile device connected to a windows desktop machine by activesync or windows mobile device center (for windows vista and windows 7).
... tamarin buildbot tryserver the tryserver/sandbox is setup to allow users to push any code changes that they would like to have tested in the automated build/test process prior to actually pushing the changes.
Tamarin mercurial commit hook - Archive of obsolete content
[n]: note that the prompt gives you the options to abort the commit (no), allow the tab (or other violation) on that particular line, or allow the violation for all lines in that file.
... this allows you to reuse the commit message after fixing the issue by using the -l (--logfile) option: hg commit -l /reporoot/.hg/commit.save notes at the moment this is a local-only hook and is not enforced on the server.
Treehydra Manual - Archive of obsolete content
ree(fn) { print("function " + decl_name(fn)); // fn is a function_decl let cfg = function_decl_cfg(fn); for (let bb in cfg_bb_iterator(cfg)) { print(" basic block " + bb_label(cfg, bb)); for (let isn in bb_isn_iterator(bb)) { print(" " + isn_display(isn)); } } } post-inlining gimple cfgs treehydra can be positioned after any pass, allowing you access various levels of gimple.
...(this allows a simple version of interprocedural analysis.) at this point, gcc is using a different internal structure, so treehydra uses a different callback, process_cgraph.
Using gdb on wimpy computers - Archive of obsolete content
if you don't allow those libraries to be loaded then gdb will not be able to properly debug threads on linux.
...from there you can allow the program to continue running.
Event Handlers - Archive of obsolete content
since xbl handlers usually constitute the default actions for a widget, this allows authors in the bound document to write events that potentially suppress the default actions taken by the xbl handlers.
...this allows xbl authors to easily define handlers for right-click, or for left double-click, without having to write script on the same handler to differentiate those cases.
Install script template - Archive of obsolete content
/** doron rosenberg -- doronatnospamallowedherenetscape.com arun k.
... ranganathan -- aruneratnospamallowedherenetscape.com petter ericson -- petteratnospamallowedherecycore.com this is an install.js file that does the following -- 1.
textbox.type - Archive of obsolete content
for more information about autocomplete textboxes, see the autocomplete documentation (xpfe [thunderbird/seamonkey]) (firefox) number a textbox that only allows the user to enter numbers.
...there are several attributes that allow the number textbox to be configured, including decimalplaces, min, max, increment, wraparound, hidespinbuttons, and textbox.value.
Building accessible custom components in XUL - Archive of obsolete content
the start_edit function replaces the label with a textbox, which allows the user to change the cell value.
...this would allow xul developers to add a single spreadsheet element to their xul applications (for example), with rowheader, columnheader, and cell elements as children, without requiring them to manage the accessibility support for each spreadsheet control.
Uploading and Downloading Files - Archive of obsolete content
http file upload some web sites allow one to upload a file.
...this is simpler but it doesn't allow sending additional data and web servers usually need special configuration to support put operations.
addTab - Archive of obsolete content
ArchiveMozillaXULMethodaddTab
« xul reference home addtab( url, referreruri, charset, postdata, owner, allowthirdpartyfixup ) addtab( url, {referreruri: ..., charset: ..., postdata: ..., owner: ..., allowthirdpartyfixup: ..., relatedtocurrent: ...
... firefox 3.6 note the second form of this method was added in firefox 3.6; it allows you to specify the parameters by name, in any order.
Menus - Archive of obsolete content
clicking the button will display the menu, allowing a command to be selected.
...this allows the menu bar to be shared between each window without having to duplicate code.
PopupKeys - Archive of obsolete content
this allows items within the menu to be navigated with the cursor keys.
...this allows the focus to be shifted to elements within the panel.
Containment Properties - Archive of obsolete content
this allows you to iterate over a non-container.
...effectively, the containment attribute allows you to specify additional predicates that provide children.
Result Generation - Archive of obsolete content
this allows for a fairly efficient means of updating results when, for instance, a new statement is added to the rdf graph.
... rather than rebuild the entire template, the algorithm allows only specific parts of the network of information to be re-examined.
Special Condition Tests - Archive of obsolete content
templates have a means of allowing a rule to match only if the generated content would be inserted inside an element with a particular tag name.
...this allows you to recurse down to larger levels without needing additional rules.
XML Assignments - Archive of obsolete content
this element allows the use of additional xpath expressions to get more data from the xml data.
...it allows us to declare additional variables that may be used in the action body.
Tree Widget Changes - Archive of obsolete content
it should return true if a drop is allowed on a row.
... treechildren::-moz-tree-cell-text { cursor: pointer; } this allows you to create separate cursors for cells.
Adding HTML Elements - Archive of obsolete content
plain text will only be displayed when placed inside an html element that would normally allow you to display text (such as a p tag).
... text outside of one will not be displayed, unless the xul element the text is inside allows this (the description element, for example).
Creating a Window - Archive of obsolete content
note: the local xul document can be opened in the browser as mentioned above only if |dom.allow_xul_xbl_for_file| preference in "about:config" has been set to |true| .
... the extension developer's extension contains an xul editor that allows you to type in xul code and see the results in real-time from within mozilla!
Creating a Wizard - Archive of obsolete content
buttons appear at the bottom of the dialog to allow navigation between pages.
...this allows you to validate the input entered on each page before the user continues.
Install Scripts - Archive of obsolete content
the install script is even flexible enough to allow you to uninstall files.
... the second method allows you to assign a destination on a per-file (or directory) basis.
Keyboard Shortcuts - Archive of obsolete content
usually, a keyboard shortcut will be allowed at any time and you can check to see whether it should do something using a script.
...you might use this to check for allowed characters in a field.
Localization - Archive of obsolete content
xul and xml provide entities which are a convenient way of allowing localization.
...xml has a syntax which allows you to declare custom entities.
Persistent Data - Archive of obsolete content
xul allows you to save the state of any element.
...persist attribute to allow the saving of state, you simply add a persist attribute to the element which holds a value you want to save.
Using Spacers - Archive of obsolete content
applications that need to support multiple platforms and languages usually have their windows laid out with lots of space to allow for this.
...we'll talk more about this in the next section but it essentially allows you to divide a window into a series of boxes that hold elements.
XBL Attribute Inheritance - Archive of obsolete content
inherited attributes xbl allows us to build composite widgets while hiding their actual implementation.
...this allows both the flexibility of the textbox and the label of the button to be different for each use of the binding.
XBL Example - Archive of obsolete content
navigation buttons along the bottom will allow the user to cycle through the objects while a text widget between the buttons will display the current page.
...the label element could be changed to a field where the user could enter the page to go to, or a popup could be added to allow selection of the page from a menu.
action - Archive of obsolete content
examples example needed attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortd...
...irection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), ge...
assign - Archive of obsolete content
inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortd...
...irection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), ...
bbox - Archive of obsolete content
ArchiveMozillaXULbbox
examples (example needed) attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top,...
... uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagna...
binding - Archive of obsolete content
properties object, predicate, subject examples fixme: (example needed) attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortd...
... inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlisten...
bindings - Archive of obsolete content
examples (example needed) attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortd...
... properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlist...
box - Archive of obsolete content
ArchiveMozillaXULbox
examples <box orient="horizontal"> <label value="zero"/> <box orient="vertical"> <label value="one"/> <label value="two"/> </box> <box orient="horizontal"> <label value="three"/> <label value="four"/> </box> </box> attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortd...
...irection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), ...
broadcaster - Archive of obsolete content
examples (example needed) attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortd...
...irection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), ...
broadcasterset - Archive of obsolete content
examples (example needed) attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, templa...
...te, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyc...
column - Archive of obsolete content
attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortd...
...irection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), ...
columns - Archive of obsolete content
attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortd...
...irection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), ...
command - Archive of obsolete content
the disabled attribute is allowed only for form controls.
... properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlist...
conditions - Archive of obsolete content
examples (example needed) attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortd...
...irection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), ...
datepicker - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] a datepicker allows the user to enter a date.
... the disabled attribute is allowed only for form controls.
deck - Archive of obsolete content
ArchiveMozillaXULdeck
inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortd...
... inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlist...
description - Archive of obsolete content
the disabled attribute is allowed only for form controls.
... value type: string the string attribute allows you to associate a data value with an element.
dropmarker - Archive of obsolete content
examples properties accessibletype attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortd...
... inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, foc...
grid - Archive of obsolete content
ArchiveMozillaXULgrid
<textbox id="user"/> </row> <row> <label value="group"/> <menulist> <menupopup> <menuitem label="accounts"/> <menuitem label="sales" selected="true"/> <menuitem label="support"/> </menupopup> </menulist> </row> </rows> </grid> </groupbox> attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortd...
...irection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), ...
grippy - Archive of obsolete content
examples (example needed) attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style,...
... template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelem...
groupbox - Archive of obsolete content
properties accessibletype examples <groupbox> <caption label="settings"/> <radiogroup> <radio label="black and white"/> <radio label="colour"/> </radiogroup> <checkbox label="enabled"/> </groupbox> attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortd...
... inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, foc...
hbox - Archive of obsolete content
ArchiveMozillaXULhbox
example <!-- two button on the right --> <hbox> <spacer flex="1"/> <button label="connect"/> <button label="ping"/> </hbox> attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortd...
...irection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), ...
listcell - Archive of obsolete content
the disabled attribute is allowed only for form controls.
... inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlist...
listcol - Archive of obsolete content
tbox> <listhead> <listheader label="first"/> <listheader label="last"/> </listhead> <listcols> <listcol flex="1"/> <listcol/> </listcols> <listitem> <listcell label="buck"/> <listcell label="rogers"/> </listitem> <listitem> <listcell label="john"/> <listcell label="painter"/> </listitem> </listbox> attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortd...
...irection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), ...
listcols - Archive of obsolete content
example <!-- creates a two column listbox --> <listbox> <listcols> <listcol flex="1"/> <listcol flex="1"/> </listcols> <listitem> <listcell label="buck"/> <listcell label="rogers"/> </listitem> <listitem> <listcell label="john"/> <listcell label="painter"/> </listitem> </listbox> attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortd...
...irection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), ...
listitem - Archive of obsolete content
the disabled attribute is allowed only for form controls.
... value type: string the string attribute allows you to associate a data value with an element.
member - Archive of obsolete content
properties child, container examples (example needed) attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortd...
... inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlist...
menulist - Archive of obsolete content
the disabled attribute is allowed only for form controls.
... value type: string the string attribute allows you to associate a data value with an element.
observes - Archive of obsolete content
inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortd...
...irection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), ...
page - Archive of obsolete content
ArchiveMozillaXULpage
examples (example needed) attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width ...
... properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens...
popupset - Archive of obsolete content
examples <popupset> <menupopup id="clipmenu"> <menuitem label="cut"/> <menuitem label="copy"/> <menuitem label="paste"/> </menupopup> </popupset> <label value="right click for popup" context="clipmenu"/> attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortd...
...irection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), ...
preferences - Archive of obsolete content
inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortd...
...irection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods void firechangedevent(in domelement preference); creates and dispatches a changed (non-bubbling) event to the specified preference element.
progressmeter - Archive of obsolete content
inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortd...
... inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlist...
query - Archive of obsolete content
ArchiveMozillaXULquery
inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortd...
...irection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), ...
queryset - Archive of obsolete content
attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inhe...
...rited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuser...
radio - Archive of obsolete content
ArchiveMozillaXULradio
the disabled attribute is allowed only for form controls.
... value type: string the string attribute allows you to associate a data value with an element.
radiogroup - Archive of obsolete content
the disabled attribute is allowed only for form controls.
... value type: string the string attribute allows you to associate a data value with an element.
resizer - Archive of obsolete content
inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortd...
...irection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), ...
richlistitem - Archive of obsolete content
the disabled attribute is allowed only for form controls.
... value type: string the string attribute allows you to associate a data value with an element.
row - Archive of obsolete content
ArchiveMozillaXULrow
attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortd...
...irection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), ...
script - Archive of obsolete content
inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortd...
...irection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), ...
scrollbar - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] when a container's contents which are larger that the size of the container, scroll bars may be placed at the side of the container to allow the user to scroll around in the container.
... properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlist...
scrollcorner - Archive of obsolete content
examples (example needed) attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width prope...
...rties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getf...
separator - Archive of obsolete content
inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortd...
...irection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), ...
spacer - Archive of obsolete content
examples <box> <button label="left"/> <spacer flex="1"/> <button label="right"/> </box> attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortd...
...irection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), ...
spinbuttons - Archive of obsolete content
attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortd...
...irection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), ...
splitter - Archive of obsolete content
properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlist...
...(however, because of bug 513597, only specifying both minheight and minwidth attributes, or specifying min-height or min-width in css, actually works to allow overflow.) ...
stack - Archive of obsolete content
ArchiveMozillaXULstack
--> </hbox> </stack> attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortd...
...irection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), ...
statusbar - Archive of obsolete content
properties accessibletype examples <statusbar> <statusbarpanel label="left panel"/> <spacer flex="1"/> <progressmeter mode="determined" value="82"/> <statusbarpanel label="right panel"/> </statusbar> attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortd...
... inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, ...
<statusbarpanel> - Archive of obsolete content
inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlist...
... statusbarpanel-menu-iconic use this class to have an image appear on the statusbarpanel, and also allow a popup menu.
tabpanel - Archive of obsolete content
examples (example needed) attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, stat...
...ustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattrib...
template - Archive of obsolete content
inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortd...
...irection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), ...
textnode - Archive of obsolete content
inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortd...
...irection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), ...
toolbargrippy - Archive of obsolete content
properties accessible examples (example needed) attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortd...
... inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute()...
toolbaritem - Archive of obsolete content
bus" selected="true"/> <menuitem label="train"/> </menupopup> </menulist> </toolbaritem> <toolbaritem id="sample-toolbutton-unified"> <toolbarbutton id="myext-button1" class="toolbarbutton-1" label="label1" /> <toolbarbutton id="myext-button2" class="toolbarbutton-1" label="labe2l" /> </toolbaritem> attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortd...
...irection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), ...
toolbarpalette - Archive of obsolete content
examples <toolbarpalette id="browsertoolbarpalette"> <toolbarbutton id="toolbarpalette-button" class="toolbarbutton-class" label="&mylabel;" tooltiptext="&mytiptext;" oncommand="somefunction()"/> </toolbarpalette> attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortd...
...irection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), ...
toolbarseparator - Archive of obsolete content
properties accessibletype examples <toolbox> <toolbar> <toolbarbutton label="button 1"/> <toolbarseparator /> <toolbarbutton label="button 2"/> </toolbar> </toolbox> attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortd...
... inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, g...
toolbarset - Archive of obsolete content
examples (example needed) attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-c...
...ursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelement...
toolbarspacer - Archive of obsolete content
properties accessibletype examples (example needed) attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties ...
... inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribut...
toolbarspring - Archive of obsolete content
properties accessibletype examples (example needed) attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width pro...
... inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), geteleme...
treechildren - Archive of obsolete content
inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortd...
...irection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), ...
treecols - Archive of obsolete content
inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortd...
... inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, foc...
treerow - Archive of obsolete content
inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortd...
...irection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), ...
treeseparator - Archive of obsolete content
inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortd...
...irection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), ...
triple - Archive of obsolete content
inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortd...
...irection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), ...
vbox - Archive of obsolete content
ArchiveMozillaXULvbox
example <!-- two labels at bottom --> <vbox> <spacer flex="1"/> <label value="one"/> <label value="two"/> </vbox> attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortd...
...irection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), ...
where - Archive of obsolete content
ArchiveMozillaXULwhere
inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortd...
...irection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), ...
calICalendarViewController - Archive of obsolete content
implementing a calicalendarviewcontroller allows for these actions to be performed in a manner consistent with the rest of the application in which the calicalendarview is included.
...otherwise, a dialog should be display allowing the user to modify the fields.
nsIContentPolicy - Archive of obsolete content
this interface can be very useful if you are developing a content-aware plugin (blocking ads or altering the look of content, for example), or if you want to stop or allow user-browsed urls.
...for instance, shouldprocess could be used to allow a response from a server to be handled or ignored depending on the mime type of the response.
2006-11-10 - Archive of obsolete content
william vanderpol asks, regarding remote xul applications, if is it possible (or does it exist?) to have an extension that will allow chrome access to certain specified url's?
...benjamin smedberg has been "working on some xptcall refactoring which will allow us to expose xptcall via a frozen api (and c linkage)".
Table Reflow Internals - Archive of obsolete content
a text run) user defined - currently only used for fixed positioned frames kinds of reflows incremental reflow (continued) reflower not allowed to change available size of reflowee reflow commands get coalesced to streamline processing style change a target changed stylistic if there is a target, otherwise every frame may need to respond parent of target usually turns it into an incremental reflow with a style changed command type table frames nstableouter frame ↙ ↘ nstable frame...
...incremental and style change reflows are not allowed.
Building a Theme - Archive of obsolete content
you can link to it and allow people to download and install it.
...in addition, mozilla add-ons allows users to comment and provide feedback on your theme.
-ms-content-zoom-limit - Archive of obsolete content
initial valueas each of the properties of the shorthand:-ms-content-zoom-limit-max: 400%-ms-content-zoom-limit-min: 100%applies tonon-replaced block-level elements and non-replaced inline-block elementsinheritednopercentagesas each of the properties of the shorthand:-ms-content-zoom-limit-max: the largest allowed zoom factor.
...smaller values zoom out.-ms-content-zoom-limit-min: the smallest allowed zoom factor.
-ms-hyphenate-limit-zone - Archive of obsolete content
negative values are not allowed.
... negative values are not allowed.
-ms-ime-align - Archive of obsolete content
ime candidate lists are positioned on the screen with sufficient size to allow basic text input.
... in the case of -ms-ime-align: after, an ime might adjust the candidate window and keyboard input behavior to provide a better user experience, such as using a horizontal candidate list and allowing some keys to be sent to the app for suggestion list navigation.
::-ms-fill - Archive of obsolete content
all allowable properties except animation-name apply to a determinate progress bar.
... allowable properties only the following css properties can be used in a rule with ::-ms-fill in its selector.
Accessing XML children - Archive of obsolete content
operator allows you to change its value.
...for instance <pets> <dog color="brown">fido</dog> <cat color="grey">fluffy</cat> </pets> e4x allows you to access the attributes of a particular element with the .@ operator.
ArrayBuffer.transfer() - Archive of obsolete content
description the arraybuffer.transfer() method allows you to grow and detach arraybuffer objects.
...er(buf1, 80); buf1.bytelength; // 0 but if you use the polyfill then the value is still 40 buf2.bytelength; // 80 new int32array(buf2)[0]; // 42 var buf3 = arraybuffer.transfer(buf2, 0); buf2.bytelength; // 0 but if you use the polyfill then the value is still 80 buf3.bytelength; // 0 polyfill you can partially work around this by inserting the following code at the beginning of your scripts, allowing use of much of the functionality of transfer() in browsers that do not natively support it.
New in JavaScript 1.8.5 - Archive of obsolete content
bug 492849 object.isextensible() determines if extending of an object is allowed.
...bug 429507 new ecmascript5 features get and set operators now allows the identifier to be numeric or a string.
New in JavaScript 1.8 - Archive of obsolete content
allowing you to simply create generators (which were introduced in javascript 1.7).
... typically you would have to create a custom function which would have a yield in it, but this addition allows you to use array comprehension-like syntax to create an identical generator statement.
LiveConnect Reference - Archive of obsolete content
javascript-to-java these classes allow a java object to access javascript code.
...javascript objects are wrapped in an instance of the class jsobject and passed to java, allowing java to manipulate javascript objects.
RFE to the Custom Controls Interfaces - Archive of obsolete content
sixformsaccessors - serves to get/set the value of the instance data node that the xforms element is bound to as well as getting the various states of that node nsixformsdelegate - used to obtain the nsixformsaccessors interface nsixformsuiwidget - used by the xforms processor to update the value/state of an xforms element when its bound node's value/state is changed our current mechanism that allows authors to build custom controls assumes that the controls will be bound to instance nodes of simple content type.
... this means that the bound node is not allowed to contain element nodes.
XForms Upload Element - Archive of obsolete content
visually, the upload control is shown as a file picker dialog that hides disallowed (filtered) file types.
... representations the xforms upload element is represented by visually combining three widgets: a text field that shows the uri of the selected file, a button to open the file picker dialog which allows the user to select a file, and a button to clear the text field and the reference to the file from the bound node (xhtml only).
Describing microformats in JavaScript - Archive of obsolete content
this allows an address to be marked as being, for example, a work address for receiving parcels.
...this allows multiple lines of address information to be contained in the street-address array.
Archive of obsolete content
the new mozilla xpcom architecture allows xpcom components be scriptable via a different mechanism called xpconnect.
...this short guide will allow you to learn more about web services.
Index - Game development
mozilla's a-frame framework provides a markup language allowing us to build 3d vr landscapes using a system familiar to web developers, which follows game development coding principles; this is useful for quickly and successfully building prototypes and demos, without having to write a lot of javascript or glsl.
...in gecko, async compilation allows the javascript engine to compile the asm.js off the main thread when the game is loading and cache the generated machine code so that the game doesn't need to be compiled on subsequent loads (starting in firefox 28).
Explaining basic 3D theory - Game development
applying textures onto objects during the fragment processing stage of the rendering pipeline allows us to adjust it by wrapping and filtering it if necessary.
... texture wrapping allows us to repeat the 2d image around the 3d object.
Building up a basic demo with A-Frame - Game development
mozilla's a-frame framework provides a markup language allowing us to build 3d vr landscapes using a system familiar to web developers, which follows game development coding principles; this is useful for quickly and successfully building prototypes and demos, without having to write a lot of javascript or glsl.
... the controls are already working: you can use the mouse for looking around and the keyboard for movement (try the w, a, s, and d keys.) there's even an "enter vr mode" button in the bottom right corner of the screen, to allow you to shift to full screen, stereoscopic image viewing if you have the necesary vr hardware set up and ready.
Building up a basic demo with Three.js - Game development
imagine a normal camera view, versus a fish eye effect, which allows a lot more to be seen.
...it's not too near, or too far, and the sizes of the objects allow them to stay on the scene, within the given field of view.
Desktop gamepad controls - Game development
on-screen instructions when the game is started, some introductory text is shown that shows you available controls — we are already detecting if the game is launched on desktop or mobile then showing a relevant message for the device, but we can go even further, to allow for the presence of a gamepad: create() { // ...
...le and desktop, and adding gamepad controls is just as straightforward — in the update() function, we check to see if the current state status is paused — if so, the relevant actions are enabled: if(gamepadapi.buttons.pressed('start')) { this.managepause(); } if(gamepadapi.buttons.pressed('back')) { this.stateback(); } similarly, when the gameover state status is active, then we can allow the user to restart the game instead of continuing it: if(gamepadapi.buttons.pressed('start')) { this.staterestart(); } if(gamepadapi.buttons.pressed('back')) { this.stateback(); } when the game over screen is visible, the start button restarts the game while the back button helps us get back to the main menu.
Implementing controls using the Gamepad API - Game development
this article looks at implementing an effective, cross-browser control system for web games using the gamepad api, allowing you to control your web games using console game controllers.
...eventually, extra drivers and plugins allowed us to use console gamepads with desktop games — either native games or those running in the browser.
asm.js - Game development
it is a very small, strict subset of javascript that only allows things like `while`, `if`, numbers, top-level named functions, and other simple constructs.
... it does not allow objects, strings, closures, and basically anything that requires heap allocation.
Plug-in Development Overview - Gecko Plugin API Reference
string 2 can contain the name of the plug-in, thus allowing the name the user sees to be different from the name of the file on disk.
... random-access mode: the browser allows the plug-in to request specific ranges of bytes from anywhere in the stream.
CSS Object Model (CSSOM) - MDN Web Docs Glossary: Definitions of Web-related terms
cssom api the css object model is also a set of apis allowing the manipulation of css from javascript.
...it allows users to read and modify the css style dynamically.
IMAP - MDN Web Docs Glossary: Definitions of Web-related terms
more recent than pop3, imap allows folders and rules on the server.
... unlike pop3, imap allows multiple simultaneous connections to one mailbox.
MVC - MDN Web Docs Glossary: Definitions of Web-related terms
so for example, our shopping list could have input forms and buttons that allow us to add or delete items.
...however, these days, more of the logic is pushed to the client with the advent of client-side data stores, and xmlhttprequest allowing partial page updates as required.
Preflight request - MDN Web Docs Glossary: Definitions of Web-related terms
for example, a client might be asking a server if it would allow a delete request, before sending a delete request, by using a preflight request: options /resource/foo access-control-request-method: delete access-control-request-headers: origin, x-requested-with origin: https://foo.bar.org if the server allows it, then it will respond to the preflight request with an access-control-allow-methods response header, which lists delete: http/1.1 204 no content c...
...onnection: keep-alive access-control-allow-origin: https://foo.bar.org access-control-allow-methods: post, get, options, delete access-control-max-age: 86400 the preflight response can be optionally cached for the requests created in the same url using access-control-max-age header like in the above example.
Quality values - MDN Web Docs Glossary: Definitions of Web-related terms
it is a special syntax allowed in some http headers and in html.
...nevertheless, with the same quality, more specific values have priority over less specific ones: text/html;q=0.8,text/*;q=0.8,*/*;q=0.8 value priority text/html 0.8 (but totally specified) text/* 0.8 (partially specified) */* 0.8 (not specified) some syntax, like the one of accept, allow additional specifiers like text/html;level=1.
WebSockets - MDN Web Docs Glossary: Definitions of Web-related terms
websocket is a protocol that allows for a persistent tcp connection between server and client so they can exchange data at any time.
...through websocket, servers can pass data to a client without prior client request, allowing for dynamic content updates.
Safe - MDN Web Docs Glossary: Definitions of Web-related terms
browsers can call safe methods without fearing to cause any harm to the server; this allows them to perform activities like pre-fetching without risk.
...in particular, an application should not allow get requests to alter its state.
Mobile accessibility - Learn web development
global and local menus talkback allows you to access global and local context menus, wherever you have navigated to on the device.
... using the rotor when voiceover is turned on, you have a navigation feature called the rotor available to you, which allows you to quickly choose from a number of common useful options.
Test your skills: WAI-ARIA - Learn web development
assuming you are not able to change the elements used, how can you allow screenreader users to recognize this as a list?
... wai-aria 2 in our second wai-aria task, we present a simple search form, and we want you to add in a couple of wai-aria features to improve its accessibility: how can you allow the search form to be called out as a separate landmark on the page by screenreaders, to make it easily findable?
Cascade and inheritance - Learn web development
the live example below allows you to play with the css and see what happens when you make changes.
... the effect of css location finally, it is also useful to note that the importance of a css declaration depends on what stylesheet it is specified in — it is possible for users to set custom stylesheets to override the developer's styles, for example the user might be visually impaired, and want to set the font size on all web pages they visit to be double the normal size to allow for easier reading.
Images, media, and form elements - Learn web development
different browsers are inconsistent in how much styling and customization they allow for such items.
... styling text input elements elements that allow for text input, such as <input type="text">, specific types such as <input type="email">, and the <textarea> element are quite easy to style and tend to behave just like other boxes on your page.
Beginner's guide to media queries - Learn web development
media queries are a key part of responsive web design, as they allow you to create different layouts depending on the size of the viewport, but they can also be used to detect other things about the environment your site is running on, for example whether the user is using a touchscreen rather than a mouse.
... orientation one well-supported media feature is orientation, which allows us to test for portrait or landscape mode.
Practical positioning examples - Learn web development
</aside> to start with here we've got a <label> element and an <input> element — <label> elements are normally used to associate a text label with a form element for accessibility purposes (allowing a screen user to see what description goes with what form element).
...transitions are an interesting feature that allow you to make changes between states happen smoothly, rather than just going "on", "off" abruptly.
Getting started with CSS - Learn web development
it contains an <em>emphasized</em> element.</p> <ul> <li>item one</li> <li>item two</li> <li>item <em>three</em></li> </ul> </body> </html> note: if you are reading this on a device or an environment where you can't easily create files, then don't worry — live code editors are provided below to allow you to write example code right here in the page.
...take a look at the page for list-style-type and you will find an interactive example at the top of the page to try some different values in, then all allowable values are detailed further down the page.
What is CSS? - Learn web development
overview: first steps next css (cascading style sheets) allows you to create great-looking web pages, but how does it work under the hood?
...css properties have different allowable values, depending on which property is being specified.
How do you upload your files to a web server? - Learn web development
github github allows you to publish websites via github pages (gh-pages).
...an extension of the http protocol to allow more advanced file management.
How do I use GitHub Pages? - Learn web development
it allows you to upload code repositories for storage in the git version control system.
...github has a very useful feature called github pages, which allows you to publish website code live on the web.
What are hyperlinks? - Learn web development
back in 1989, tim berners-lee, the web's inventor, spoke of the three pillars on which the web stands: url, an address system that keeps track of web documents http, a transfer protocol to find documents when given their urls html, a document format allowing for embedded hyperlinks as you can see in the three pillars, everything on the web revolves around documents and how to access them.
... deeper dive as we said, a link is a text string tied to a url, and we use links to allow easy jumping from one document to another.
HTML forms in legacy browsers - Learn web development
graceful degradation is web developer's best friend graceful degradation and progressive enhancement are development patterns that allow you to build great stuff by supporting a wide range of browsers at the same time.
...modernizr is a library that allows you to test the availability of functionality in order to act accordingly.
Test your skills: Basic controls - Learn web development
allow the user to pick multiple files at once.
... allow the file picker to accept jpg and png images only.
Web forms — Working with user data - Learn web development
web forms are a very powerful tool for interacting with users — most commonly they are used for collecting data from users, or allowing them to control a user interface.
...(see also using formdata objects.) css property compatibility table for form controls this last article provides a handy reference allowing you to look up what css properties are compatible with what form elements.
HTML basics - Learn web development
the class attribute allows you to give the element a non-unique identifier that can be used to target it (and any other elements with the same class value) with style information and other things.
... headings heading elements allow you to specify that certain parts of your content are headings — or subheadings.
Using data attributes - Learn web development
data-* attributes allow us to store extra information on standard, semantic html elements without other hacks such as non-standard attributes, extra properties on dom, or node.setuserdata().
...using the css selectors and javascript access here this allows you to build some nifty effects without having to write your own display routines.
Creating hyperlinks - Learn web development
hyperlinks allow us to link documents to other documents or resources, link to specific parts of documents, or make apps available at a web address.
...the most commonly used of these are "subject", "cc", and "body" (which is not a true header field, but allows you to specify a short content message for the new email).
Getting started with HTML - Learn web development
the disabled elements typically have a grayed-out appearance.) for example: <input type="text" disabled="disabled"> as shorthand, it is acceptable to write this as follows: <!-- using the disabled attribute prevents the end user from entering text into the input box --> <input type="text" disabled> <!-- text input is allowed, as it doesn't contain the disabled attribute --> <input type="text"> for reference, the example above also includes a non-disabled form input element.the html from the example above produces this result: omitting quotes around attribute values if you look at code for a lot of other sites, you might come across a number of strange markup styles, including attribute values without quotes.
...the purpose of comments is to allow you to include notes in the code to explain your logic or coding.
HTML text fundamentals - Learn web development
among the various techniques used, they provide an outline of the document by reading out the headings, allowing their users to find the information they need quickly.
...html provides various semantic elements to allow us to mark up textual content with such effects, and in this section, we'll look at a few of the most common ones.
What’s in the head? Metadata in HTML - Learn web development
when you click on an existing list item, a dialog box will pop up allowing you to change the item's text.
...your html document will be indexed more effectively by search engines if its language is set (allowing it to appear correctly in language-specific results, for example), and it is useful to people with visual impairments using screen readers (for example, the word "six" exists in both french and english, but is pronounced differently.) you can also set subsections of your document to be recognised as different languages.
Multimedia and Embedding - Learn web development
from <object> to <iframe> — other embedding technologies at this point we'd like to take somewhat of a sideways step, looking at a couple of elements that allow you to embed a wide variety of content types into your webpages: the <iframe>, <embed> and <object> elements.
... <iframe>s are for embedding other web pages, and the other two allow you to embed pdfs, svg, and even flash — a technology on its way out, but which you may still see semi-regularly.
Asynchronous JavaScript - Learn web development
handling async operations gracefully with promises promises are a comparatively new feature of the javascript language that allow you to defer further actions until after the previous action has completed, or respond to its failure.
...the former allows standard functions to implicitly behave asynchronously with promises, whereas the latter can be used inside async functions to wait for promises before the function continues.
Functions — reusable blocks of code - Learn web development
previous overview: building blocks next another essential concept in coding is functions, which allow you to store a piece of code that does a single task inside a defined block, and then call that code whenever you need it using a single short command — rather than having to type out the same code multiple times.
... the javascript language has many built-in functions to allow you to do useful things without having to write all that code yourself.
Manipulating documents - Learn web development
document.queryselector() is the recommended modern approach, which is convenient because it allows you to select elements using css selectors.
... active learning: a dynamic shopping list to round off the article, we'd like to set you a little challenge — we want to make a simple shopping list example that allows you to dynamically add items to the list using a form input and button.
Video and Audio APIs - Learn web development
html5 video and audio the <video> and <audio> elements allow us to embed video and audio into web pages.
... the htmlmediaelement api part of the html5 spec, the htmlmediaelement api provides features to allow you to control video and audio players programmatically — for example htmlmediaelement.play(), htmlmediaelement.pause(), etc.
Arrays - Learn web development
some useful array methods in this section we'll look at some rather useful array-related methods that allow us to split strings into array items and vice versa, and add new items into arrays.
...from the code area (tab inserts a tab character).</p> <textarea id="code" class="playable-code" style="height: 370px; width: 95%"> const list = document.queryselector('.output ul'); const searchinput = document.queryselector('.output input'); const searchbtn = document.queryselector('.output button'); list.innerhtml = ''; let myhistory = []; searchbtn.onclick = function() { // we will only allow a term to be entered if the search input isn't empty if (searchinput.value !== '') { // number 1 // empty the list so that we don't display duplicate entries // the display is regenerated every time a search term is entered.
Basic math in JavaScript — numbers and operators - Learn web development
these are very useful, as they allow us to make decisions in our code, and they are used every time we want to make a choice of some kind.
... in the next article, we'll explore text and how javascript allows us to manipulate it.
Handling text — strings in JavaScript - Learn web development
since the web is a largely text-based medium designed to allow humans to communicate and share information, it is useful for us to have control over the words that appear on it.
... html provides structure and meaning to our text, css allows us to precisely style it, and javascript contains a number of features for manipulating strings, creating custom welcome messages and prompts, showing the right text labels when needed, sorting terms into the desired order, and much more.
JavaScript object basics - Learn web development
the last two items are functions that allow the object to do something with that data, and are referred to as the object's methods.
...as an example, the notifications api — which allows modern browsers to fire system notifications — requires you to instantiate a new object instance using the constructor for each notification you want to fire.
Inheritance in JavaScript - Learn web development
this function basically allows you to call a function defined somewhere else, but in the current context.
... you might also be interested in checking out some of the new ecmascript features that allow us to do inheritance more cleanly in javascript (see classes).
Working with JSON - Learn web development
this allows you to construct a data hierarchy, like so: { "squadname": "super hero squad", "hometown": "metro city", "formed": 2016, "secretbase": "super tower", "active": true, "members": [ { "name": "molecule man", "age": 29, "secretidentity": "dan jukes", "powers": [ "radiation resistance", "turning tiny", "radiation blast" ] }, ...
...this is a very useful javascript object that allows us to make network requests to retrieve resources from a server via javascript (e.g.
Object building practice - Learn web development
the resulting constant (ctx) is the object that directly represents the drawing area of the canvas and allows us to draw 2d shapes on it.
...the color of the fill is set to semi-transparent, rgba(0,0,0,0.25), to allow the previous few frames to shine through slightly, producing the little trails behind the balls as they move.
Measuring performance - Learn web development
performance apis when writing code for the web, there are a large number of web apis available that allow you to create your own performance measuring tools.
...these interfaces allows the accurate measurement of the time it takes for javascript tasks to complete.
Multimedia: Images - Learn web development
and finally, should you want to include animated images into your page, then know that safari allows using video files within <img> and <picture> elements.
... these also allow you to add in an animated webp for all other modern browsers.
Multimedia: video - Learn web development
playsinline is required for mobile safari, allowing videos to play without forcing fullscreen mode.
... consider streaming video streaming allows the proper video size and bandwidth (based on network speed) to be delivered to the end user.
Properly configuring server MIME types - Learn web development
some other web browsers, such as microsoft® internet explorer, try to allow for misconfigured web servers and applications by guessing what the correct mime type should be.
... gecko 1.9.1.11 (firefox 3.5.11) and gecko 1.9.2.5 (firefox 3.6.5) also implement this security fix, but to improve compatibility, there was a temporary heuristic that allows the load if the first line in the style sheet appears to be a well-formed css construct; the heuristic has been removed in firefox 4, and you have to properly set the text/css mime types to have your css pages recognized.
Routing in Ember - Learn web development
because that application template is the entry point to our todo app, we'll need to make some changes to allow for routing.
...add the following below the existing getters: get completed() { return this.todos.filter(todo => todo.iscompleted); } models now we need to add models to our route javascript files to allow us to easily return specific data sets to display in those models.
Componentizing our React app - Learn web development
that second bullet is especially valuable: making a component out of common ui elements allows you to change your code in one place and see those changes everywhere that component is used.
... to fix this, we need to return a <todo /> component from our map() function — remember that jsx allows us to mix up javascript and markup structures!
Beginning our React todo list - Learn web development
previous overview: client-side javascript frameworks next let's say that we’ve been tasked with creating a proof-of-concept in react – an app that allows users to add, edit, and delete tasks they want to work on, and also mark tasks as complete without deleting them.
... the form will allow us to make tasks; the buttons will let us filter them; the heading and list are our way to read them.
Vue conditional rendering: editing existing todos - Learn web development
to do this, we will take advantage of vue's conditional rendering capabilities — namely v-if and v-else — to allow us to toggle between the existing todo item view, and an edit view where you can update todo item labels.
...we'll do this in our app, as it will allow us to replace the code that displays our to-do item with the edit form.
Creating our first Vue component - Learn web development
vue templates are currently only allowed a single root element — one element needs to wrap everything inside the template section (this will change when vue 3 comes out).
...listing props as an object allows you to specify default values, mark props as required, perform basic object typing (specifically around javascript primitive types), and perform simple prop validation.
Adding a new todo form: Vue events, methods, and models - Learn web development
what we really need next is the ability to allow our users to enter their own todo items into the app, and for that we'll need a text <input>, an event to fire when the data is submitted, a method to fire upon submission to add the data and rerender the list, and a model to control the data.
...let's create a new component that will allow us to add a new to-do item.
Strategies for carrying out testing - Learn web development
emulators emulators are basically programs that run inside your computer and emulate a device or particular device conditions of some kind, allowing you to do some of your testing more conveniently than having to find a particular combination of hardware/software to test.
... virtual machines virtual machines are applications that run on your desktop computer and allow you to run emulations of entire operating systems, each compartmentalized in its own virtual hard drive (often represented by a single large file existing on the host machine's hard drive).
Tools and testing - Learn web development
on top of that, we still need to keep cross-browser support in the forefront of our minds, and make sure that our code follows best practices that allow our projects to work across different browsers and devices that our users are using to browse the web, and be usable by people with disabilities.
... git and github all developers will use some kind of version control system (vcs), a tool to allow them to collaborate with other developers on a project without danger of them overwriting each other's work, and roll back to previous versions of the code base if a problem is discovered later on.
Learn web development
web forms — working with user data web forms are a potent tool for interacting with users — most commonly, they are used for collecting data from users, or allowing them to control a user interface.
... if you prefer to copy the repo in a more flexible way that allows for automatic updates, you can follow the more complex instructions: install git on your machine.
Mozilla Plugin Accessibility
the new plugin api will allow plugins to bubble unused keypresses to the browser.
... this will allow keyboard users to still access menus, close the current page, scroll, move back and forward in history, etc.
Multiprocess on Windows
when an incoming rpc invokes a method on an interceptor, the interceptor dispatches a callback that allows us to do whatever we want with that request.
...there is also a mozilla::mscom::getter_addrefs() function that allows these pointers to receive outparams.
Index
found 689 pages: # page tags and summary 1 add-ons add-ons, extension, extensions, landing, mozilla add-ons allow developers to extend and modify the functionality of firefox.
... 684 themes add-ons, look & feel, themes themes allow you to change the look and feel of the user interface and personalize it to your tastes.
Add-ons
add-ons allow developers to extend and modify the functionality of firefox.
... other types of add-ons in addition to extensions, there are a few other add-on types that allow users to customize firefox.
Adding a new event
this type of event allows c++ code to handle it easier.
...e.g., if your event shouldn't cause dom event, you need to modify widgetevent::isallowedtodispatchdomevent().
Browser chrome tests
the browser chrome test suite is an automated testing framework designed to allow testing of application chrome windows using javascript.
... it currently allows you to run javascript code in the same scope as the main firefox browser window and report results using the same functions as the mochitest test framework.
Cookies Preferences in Mozilla
m 0-65535, rfc 2109 and 2965 require this to be at least 300 network.cookie.maxperhost default value: 50 configures the maximum amount of cookies to be stored per host valid range is from 0-65535, rfc 2109 and 2965 require this to be at least 20 network.cookie.disablecookieformailnews default value: true true = do not accept any cookies from within mailnews or from mail-style uris false = allow cookies in these situations this preference is applicable to all versions of seamonkey.
...earlier versions of thunderbird only allowed cookies on rss feeds.
Debugging on Mac OS X
this is due to notarization requiring hardened runtime to be enabled with the com.apple.security.get-task-allow entitlement disallowed.
...at this time, developers can obtain a hardened runtime build with the com.apple.security.get-task-allow entitlement allowed by submitting a try build and downloading the dmg generated by the "rpk" shippable build job.
How Mozilla's build system works
a backslash as the last character on a line allows the variable definition to be continued on the next line.
...the terminating $(null) is a method for consistency; it allows you to add and remove lines without worrying about whether the last line has an ending backslash or not.
Obsolete Build Caveats and Tips
install this microsoft hotfix to allow linking to work correctly.
... for gecko 11 or below: you could also download the windows vista sdk and follow the instructions there to allow you to build against it.
Cross Process Object Wrappers
add-on code is still allowed to use cpows "unsafely".
...by making the chrome process block on the content process, cpows break this principle and allow unresponsive content process to make the whole browser unresponsive.
Firefox and the "about" protocol
bout:about provides an overview of all about: pages available for your current firefox version about:addons add-ons manager about:buildconfig displays the configuration and platform used to build firefox about:cache displays information about the memory, disk, and appcache about:checkerboard switches to the checkerboarding measurement page, which allows to detect checkerboarding issues about:config provides a way to inspect and change firefox preferences and settings about:compat lists overriding site compatability fixes, linked to specific bug issues.
... about:crashes lists all crashes, which happened during the runtime of firefox (in case the user enabled the crash reporter) about:credits lists all contributors to the firefox project about:debugging switches to the developer tools debugging page, which allows you to debug add-ons, tabs and service workers about:devtools summarizes the developer tools and provides links to documentation for each tool about:downloads displays all downloads done within firefox about:home start page of firefox when opening a new window about:license displays licensing information about:logo firefox logo about:memory provides a way to display memory usage, save it as report and run the gc and cc abo...
Embedding the editor
xbl creates an nseditorboxobject for each <editor> tag, and allows javascript to access properties of this box object (such as the nsieditorshell).
...this needs to be changed to allow embedders to provide their own, possibly native ui.
How Mozilla determines MIME Types
this should allow reliable detection of all image types mozilla supports.
...this allows extensions to register additional mappings.
How to implement a custom autocomplete search component
the component uses the autocompletesearchparam attribute or searchparam property to allow the developer to define the default directory otherwise only paths beginning with / or ~/ will be autocompleted.
... like this: <textbox id="text1" type="autocomplete" autocompletesearch="simple-autocomplete" showcommentcolumn="true" autocompletesearchparam='[{"value":"mark","comment":"cool dude"},{"value":"mary","comment":"nice lady"},{"value":"jimmy","comment":"very uncool guy"},{"value":"jimbo","comment":null}]' /> the component uses the autocompletesearchparam attribute or searchparam property to allow the developer to define a set of data to use for autocompletion.
IME handling guide
although, this can be disabled with "dom.compositionevent.allow_control_characters" pref.
...unfortunately, it's not allowed to use syncronous communication from chrome process to a remote process.
JavaScript Tips
the properties are: align allowevents contextmenu datasources dir flex height id left maxheight maxwidth minheight minwidth observes orient pack persist ref statustext top tooltip tooltiptext width xul also maps the ordinal attribute but this defaults to "1" if it is not present.
...however in addition to locating elements by tag name xul also allows you to locate an element by attribute, starting at any element in the document.
NetUtil.jsm
nsichannel newchannel( awhattoload, [optional] aorigincharset, [optional] abaseuri ); parameters return value an nsichannel allowing access to the specified data source.
...the returned method will allow access to the specified data.
Task.jsm
method overview function async(atask); promise spawn(atask); properties attribute type description result read only constructor constructs a special exception that, when thrown inside a legacy generator function, allows the associated task to be resolved with a specific value.
...this allows you to call the function with arguments.
Bootstrapping a new locale
hg allows localizers to work locally on their machines and then "push" changes to their official mozilla repository.
... working with bit bucket before a team becomes official, we like to get the localizers comfortable with the hg commands that allow for cloning, pulling, committing, and pushing work to an experimental repository.
Mozilla Content Localized in Your Language
this allows localization text to expand and not be truncated or resolved through ellipsis.
... title on the final page (meaning no more click through) should allow enough room to display full text.
Localization sign-off reviews
allows us to understand how each l10n team is performing their localization work.
... allows us to discover potential bugs within l10n tools.
Localization technical reviews
allows us to understand how each l10n team is performing their localization work.
... allows us to discover potential bugs within l10n tools.
MathML Demo: <mmultiscripts> - attach prescripts and tensor indices to a base
a mathml mmultiscripts object allows you to build tensor-like objects.
...displays a mathml mmultiscripts objects allows you to build tensor-like objects.
Mozilla Style System
the methods on nsistyleruleprocessor allow the front end to ask the back ends for the style data that applies to a given element or pseudo-element, in the form of style rules.
...the style contexts then provide the api for computed style data by allowing retrieval of a set of style structs, each of which contains the computed values of a set of css properties.
Investigating leaks using DMD heap scan mode
firefox’s dmd heap scan mode tracks the set of all live blocks of malloc-allocated memory and their allocation stacks, and allows you to log these blocks, and the values stored in them, to a file.
...the allowed values here are the same as those returned by xre_getprocesstype(), so adjust as needed.
JS::PerfMeasurement
perfmeasurement::all in a constructor call, this special value means "measure everything that can possibly be measured." perfmeasurement::num_measurable_events this constant equals the total number of events defined by the api - not necessarily the total number of events that a particular os allows you to measure.
... (at time of writing, linux allows all the above events to be measured, and we don't have back ends for any other operating system.
Memory reporting
on platforms that allow it, they count the actual memory in use, including "slop" bytes caused by the heap allocator rounding up request sizes (a.k.a.
...the amallocsizeof parameter allows mozilla::mallocsizeof functions with dmd-specific hooks to be passed in when they are used by memory reporters, but functions without such hooks (such as moz_malloc_size_of) can also be passed in when they are used in other circumstances.
Reporting a Performance Problem
there will be a button in the top right labeled 'publish' which will allow you to upload this profile and once completed will write out a link.
...gecko profiler allows you to share a link with the profile.
about:memory
the use of trees allows measurements to be broken down into further categories, sub-categories, sub-sub-categories, etc., to arbitrary depth, as needed.
... sub-trees with names like "(2 tiny)" are artificial nodes inserted to allow insignificant sub-trees to be collapsed by default.
A brief guide to Mozilla preferences
this file allows preference locking via the lock_pref() function.
...this allows system administrators to know quickly if there is a configuration error in the installation.
PRIntervalTime
important note the counters used for interval times are allowed to overflow.
...interval has expired ...> as long as the interval and the elapsed time (now - epoch) do not exceed half the namespace allowed by a printervaltime (231-1), the expression shown above provides the expected result even if the signs of now and epoch differ.
PR_InitializeNetAddr
description pr_initializenetaddr allows the assignment of special network address values and the port number, while also setting the state that indicates the version of the address being used.
...this allows the caller to change the network address' port number assignment without affecting the host address.
NSS Certificate Download Specification
netscape certificate sequence: this is another pkcs#7 object format, and like the signeddata format, it allows multiple certificates to be imported together.
...this is intended to allow people or cas to post their e-mail certificates on web pages for download by other users who want to send them encrypted mail.
HTTP delegation
the api should allow nss to use the http client either asynchronously or synchronously.
...therefore the api should allow for keep-alive (persistent) http connections.
HTTP delegation
the api should allow nss to use the http client either asynchronously or synchronously.
...therefore the api should allow for keep-alive (persistent) http connections.
NSS Key Log Format
distributors can re-enable it at compile time though (using the nss_allow_sslkeylogfile=1 make variable) which is done for the official firefox binaries.
... exporter_secret: the hex-encoded exporter secret (for tls 1.3, used for 1-rtt keys in older quic drafts) the rsa form allows ciphersuites using rsa key-agreement to be logged and was the first form supported by wireshark 1.6.0.
NSS_3.12_release_notes.html
orithmid (see cryptohi.h) new macros for camellia support (see blapit.h): nss_camellia nss_camellia_cbc camellia_block_size new macros for rsa (see blapit.h): rsa_max_modulus_bits rsa_max_exponent_bits new macros in certt.h: x.509 v3 ku_encipher_only cert_max_serial_number_bytes cert_max_dn_bytes pkix cert_rev_m_do_not_test_using_this_method cert_rev_m_test_using_this_method cert_rev_m_allow_network_fetching cert_rev_m_forbid_network_fetching cert_rev_m_allow_implicit_default_source cert_rev_m_ignore_implicit_default_source cert_rev_m_skip_test_on_missing_source cert_rev_m_require_info_on_missing_source cert_rev_m_ignore_missing_fresh_info cert_rev_m_fail_on_missing_fresh_info cert_rev_m_stop_testing_on_fresh_info cert_rev_m_continue_testing_on_fresh_info cert_rev_mi_test_each_method...
...bug 349011: please stop exporting these crmf_ symbols bug 397178: crash when entering chrome://pippki/content/resetpassword.xul in url bar bug 403822: pkix_pl_ocsprequest_create can leave some members uninitialized bug 403910: cert_findusercertbyusage() returns wrong certificate if multiple certs with same subject available bug 404919: memory leak in sftkdb_readsecmoddb() (sftkmod.c) bug 406120: allow application to specify ocsp timeout bug 361025: support for camellia cipher suites to tls rfc4132 bug 376417: pk11_generatekeypair needs to get the key usage from the caller.
NSS 3.14 release notes
to better support tls 1.1 and future versions of tls, a new version range api was introduced to allow applications to specify the desired minimum and maximum versions.
...applications may use this callback to inform libpkix whether or not candidate certificate chains meet application-specific security policies, allowing libpkix to continue discovering certificate paths until it can find a chain that satisfies the policies.
NSS 3.15.2 release notes
bug 884178 - add pk11_cipherfinal macro bugs fixed in nss 3.15.2 bug 734007 - sizeof() used incorrectly bug 900971 - nssutil_readsecmoddb() leaks memory bug 681839 - allow ssl_handshakenegotiatedextension to be called before the handshake is finished.
...it is no longer necessary to call nss_setdomesticpolicy because all cipher suites are now allowed by default.
NSS 3.16.4 release notes
notable changes in nss 3.16.4 the following 1024-bit root ca certificate was restored to allow more time to develop a better transition strategy for affected sites.
...the inclusion of the intermediate certificate is a temporary measure to allow those sites to function, by allowing them to find a trust path to another 2048-bit root ca certificate.
NSS 3.19.2.1 release notes
bug 1205157 (nspr, cve-2015-7183): a logic bug in the handling of large allocations would allow exceptionally large allocations to be reported as successful, without actually allocating the requested memory.
... this may allow attackers to bypass security checks and obtain control of arbitrary memory.
NSS 3.19.4 release notes
bug 1205157 (nspr, cve-2015-7183): a logic bug in the handling of large allocations would allow exceptionally large allocations to be reported as successful, without actually allocating the requested memory.
... this may allow attackers to bypass security checks and obtain control of arbitrary memory.
NSS 3.20.1 release notes
bug 1205157 (nspr, cve-2015-7183): a logic bug in the handling of large allocations would allow exceptionally large allocations to be reported as successful, without actually allocating the requested memory.
... this may allow attackers to bypass security checks and obtain control of arbitrary memory.
NSS 3.20 release notes
new functions in ssl.h ssl_dhegroupprefset - configure the set of allowed/enabled dhe group parameters that can be used by nss for a server socket.
... a new api ssl_dhegroupprefset has been added to nss, which allows a server application to select one or multiple of the embedded dhe parameters as the preferred parameters.
NSS 3.24 release notes
nss softoken has also been updated to allow nss to run in fips level 1 (no password).
...to enable the functionality in optimized builds, you must define the symbol nss_allow_sslkeylogfile when building nss.
NSS 3.25 release notes
removed the limitation that allowed nss to only support certificate_verify messages that used the same signature hash algorithm as the prf when using tls 1.2 client authentication.
... new functions in nssckfw.h nssckfwslot_getslotid nssckfwsession_getfwslot nssckfwinstance_destroysessionhandle nssckfwinstance_findsessionhandle notable changes in nss 3.25 an ssl socket can no longer be configured to allow both tls 1.3 and ssl v3.
NSS 3.28 release notes
ssl_signatureschemeprefset allows an application to set which signature schemes should be supported in tls and to specify the preference order of those schemes.
... ssl_signatureschemeprefget allows an application to learn the currently supported and enabled signature schemes for a socket.
NSS 3.44 release notes
n nss test certificates, use @example.com (not @bogus.com) 1538479 - post-handshake messages after async server authentication break when using record layer separation 1521578 - x25519 support in pk11pars.c 1540205 - freebl build fails with -dnss_disable_chachapoly 1532312 - post-handshake auth doesn't interoperate with openssl 1542741 - certutil -f crashes with segmentation fault 1546925 - allow preceding text in try comment 1534468 - expose chacha20 primitive 1418944 - quote cc/cxx variables passed to nspr 1543545 - allow to build nss as a static library 1487597 - early data that arrives before the handshake completes can be read afterwards 1548398 - freebl_gtest not building on linux/mac 1548722 - fix some coverity warnings 1540652 - softoken/sdb.c: logically dead code 1549413 ...
...- android log lib is not included in build 1537927 - ipsec usage is too restrictive for existing deployments 1549608 - signature fails with dbm disabled 1549848 - allow building nss for ios using gyp 1549847 - nss's sqlite compilation warnings make the build fail on ios 1550041 - freebl not building on ios simulator 1542950 - macos cipher test timeouts this bugzilla query returns all the bugs fixed in nss 3.44: https://bugzilla.mozilla.org/buglist.cgi?resolution=fixed&classification=components&query_format=advanced&product=nss&target_milestone=3.44 compatibility nss 3.44 shared libraries are backward compatible with all older nss 3.x shared libraries.
NSS 3.47 release notes
notable changes in nss 3.47 bug 1152625 - support aes hw acceleration on armv8 bug 1267894 - allow per-socket run-time ordering of the cipher suites presented in clienthello bug 1570501 - add cmac to freebl and pkcs #11 libraries bugs fixed in nss 3.47 bug 1459141 - make softoken cbc padding removal constant time bug 1589120 - more cbc padding tests bug 1465613 - add ability to distrust certificates issued after a certain date for a specified root cert bug 1588557 - bad debug statemen...
...g 1581024 - heap overflow in nss utility "derdump" bug 1582343 - soft token mac verification not constant time bug 1578238 - handle invald tag sizes for ckm_aes_gcm bug 1576295 - check all bounds when encrypting with seed_cbc bug 1580286 - nss rejects tls 1.2 records with large padding with sha384 hmac bug 1577448 - create additional nested s/mime test messages for thunderbird bug 1399095 - allow nss-try to be used to test nspr changes bug 1267894 - libssl should allow selecting the order of cipher suites in clienthello bug 1581507 - fix unportable grep expression in test scripts bug 1234830 - [cid 1242894][cid 1242852] unused values bug 1580126 - fix build failure on aarch64_be while building freebl/gcm bug 1385039 - build nspr tests as part of nss continuous integration bug 158139...
nss tech note8
the objectives were to make the server session cache faster, and to fix bugs that caused corruption in multi-process servers, and also to allow separate virtual servers to have their own session caches.
... the new approach was to use shared memory for the server session cache, and to allow multiple different server session caches to coexist.
Overview of NSS
the secure sockets layer (ssl) protocol allows mutual authentication between a client and server and the establishment of an authenticated and encrypted connection.
...every nss release is backward compatible with previous releases, allowing nss users to upgrade to the new nss shared libraries without recompiling or relinking their applications.
PKCS11 FAQ
MozillaProjectsNSSPKCS11FAQ
other certificates on the token are also loaded (to allow building certificate chains), but it's not necessary to include the full chain, as long as the full chain is available in the regular certificate database.
... what must an x.509 certificate include to allow it to be recognized as an email certificate for use with s/mime?
NSS Key Functions
when an application makes a copy of a particular certificate or key structure that already exists in memory, ssl makes a shallow copy--that is, it increments the reference count for that object rather than making a whole new copy.
...if you attempt to do so, the change affects all the shallow copies of that structure and can cause severe problems.
NSS functions
d later sec_pkcs7includecertchain mxr 3.2 and later sec_pkcs7iscontentempty mxr 3.2 and later sec_pkcs7setcontent mxr 3.4 and later sec_pkcs7verifydetachedsignature mxr 3.4 and later sec_pkcs7verifysignature mxr 3.2 and later secmime_decryptionallowed mxr 3.4 and later pkcs #12 functions the public functions listed here perform pkcs #12 operations required by some of the nss tools and other applications.
... later sec_pkcs12decodervalidatebags mxr 3.2 and later sec_pkcs12decoderverify mxr 3.2 and later sec_pkcs12destroyexportcontext mxr 3.2 and later sec_pkcs12enablecipher mxr 3.2 and later sec_pkcs12encode mxr 3.2 and later sec_pkcs12isencryptionallowed mxr 3.2 and later sec_pkcs12setpreferredcipher mxr 3.2 and later ...
NSS tools : modutil
herenableflags{0x0001} files { unix/fort.so { relativepath{%root%/lib/fort.so} absolutepath{/usr/local/netscape/lib/fort.so} filepermissions{555} } xplat/instr.html { relativepath{%root%/docs/inst.html} absolutepath{/usr/local/netscape/docs/inst.html} filepermissions{555} } } } irix:6.2:mips { equivalentplatform { sunos:5.5.1:sparc } } } script grammar the script is basic java, allowing lists, key-value pairs, strings, and combinations of all of them.
...nss has some flexibility that allows applications to use their own, independent database engine while keeping a shared database and working around the access issues.
NSS tools : pk12util
this allows the certificates to be fed to another application that supports .p12 files.
...nss has some flexibility that allows applications to use their own, independent database engine while keeping a shared database and working around the access issues.
sslintro.html
upgraded documentation may be found in the current nss reference overview of an ssl application chapter 1 overview of an ssl application ssl and related apis allow compliant applications to configure sockets for authenticated, tamper-proof, and encrypted communications.
... callbacks and helper functions allow you to specify such things as how authentication is accomplished and what happens if it fails.
sslkey.html
when an application makes a copy of a particular certificate or key structure that already exists in memory, ssl makes a shallow copy--that is, it increments the reference count for that object rather than making a whole new copy.
...if you attempt to do so, the change affects all the shallow copies of that structure and can cause severe problems.
ssltyp.html
when an application makes a copy of a particular certificate structure that already exists in memory, ssl makes a shallow copy--that is, it increments the reference count for that object rather than making a whole new copy.
...if you attempt to do so, the change affects all the shallow copies of that structure and can cause severe problems.
TLS Cipher Suite Discovery
tls does not allow all possible combinations of choices from those categories to be used.
... instead, tls allows only certain well-defined combinations of those choices, known as cipher suites, defined in the ietf rfc standards.
NSS Tools certutil-tasks
allow for sorting by name and trust.
... allow listing and lookup of keys by index and nickname.
NSS Tools pk12util
the tool allows you to import certificates and keys from pkcs #12 files into nss or export them and also list certificates and keys in such files.
...password based encryption is used to protect private keys on export to a pkcs #12 file and also the entire package when allowed.
NSS tools : modutil
MozillaProjectsNSStoolsmodutil
ocal/netscape/lib/fort.so} filepermissions{555} } xplat/instr.html { relativepath{%root%/docs/inst.html} absolutepath{/usr/local/netscape/docs/inst.html} filepermissions{555} } } } irix:6.2:mips { equivalentplatform { sunos:5.5.1:sparc } } } script grammar the script is basic java, allowing lists, key-value pairs, strings, and combinations of all of them.
...nss has some flexibility that allows applications to use their own, independent database engine while keeping a shared database and working around the access issues.
NSS tools : pk12util
this allows the certificates to be fed to another application that supports .p12 files.
...nss has some flexibility that allows applications to use their own, independent database engine while keeping a shared database and working around the access issues.
Necko Architecture
handlers & channels nsichannel provides a data access interface which allows you to read or write data from or to a uri.
...streams provide a generic interface to the data and allow for many underlying implementations that permit multiple data sources to be used.
Rhino Examples
sample scripts the unique.js script allows printing unique lines from a file.
...sharing the global scope allows both information to be shared across threads, and amortizes the cost of context.initstandardobjects by only performing that expensive operation once.
SpiderMonkey compartments
javascript objects (including javascript functions, which are objects also) are only allowed to touch objects in the same compartment.
...this allows the garbage collecting of individual compartments, in addition to global collection.
SpiderMonkey Internals: Thread Safety
*/ js_endrequest(cx); js_clearcontextthread(cx); it isn't a bottleneck; multiple threads are allowed to be in requests on the same jsruntime at once.
...this allows allocation to avoid locking most of the time (a significant speed win).
JSAPI User Guide
if so, then the exception might yet be caught, so spidermonkey does nothing and returns false, allowing the exception to propagate.
...then it determines whether to allow the operation to proceed.
JS::Value
(note that both -0 and +0 are allowed, and the latter may sometimes be stored using the int32_t representation.) js::value further provides these methods combining various aspects of the above methods: js::objectornullvalue(jsobject*) returns an object value corresponding to the given non-null pointer, or a null value if the pointer is null.
...the now-deprecated jsval methods allowed jsval_to_object(val) when jsval_is_null(val), but this was a source of constant bugs.
JSDeletePropertyOp
if no error occurred, but the deletion attempt wasn't allowed (perhaps because the property was non-configurable), set *succeeded to false and return true.
... if no error occurred and the deletion wasn't disallowed (this is *not* the same as saying that a deletion actually occurred -- deleting a non-existent property, or an inherited property, is allowed -- it's just pointless), set *succeeded to true and return true.
JSErrorReport
ismuted bool the web platform allows scripts to be loaded from arbitrary cross-origin sources.
... this allows an attack by which a malicious website loads a sensitive file (say, a bank statement) cross-origin (using the user's cookies), and sniffs the generated syntax errors (via a window.onerror handler) for juicy morsels of its contents.
JS_FS
js_fninfo allows the simple adding of jsjitinfos.
...the _sym variants allow defining a function with a symbol key rather than a string key.
JS_GetGCParameter
when the gc is in "high frequency" mode (see above) then, the heap will be allowed to grow between collections according to these four parameters.
... jsgc_min_last_ditch_gc_period / "minlastditchgcperiod" the minimum time to allow between triggering last ditch gcs in seconds.
JS_SetNativeStackQuota
spidermonkey allows for a distinction between system code (such as gcs, which may incidentally be triggered by script but are not strictly performed on behalf of such script), trusted script (as determined by js_settrustedprincipals), and untrusted script.
... each kind of code may have a different stack quota, allowing embedders to keep higher-priority machinery running in the face of scripted stack exhaustion by something else.
JS_SuspendRequest
suspends the calling thread's current request, if any, to allow the thread to block or perform time-consuming calculations.
...this allows the runtime to perform garbage collection if needed and allows other threads to access objects that the calling thread had locked.
SpiderMonkey 1.8.5
multithreaded programs are allowed, but each thread must operate on objects in a separate compartment, isolated from the other threads.
...strings js_comparestrings received a new function signature with bug 609440, allowing us to correctly propagate exceptions when the underlying functions to retrieve the characters in the string failed.
Running Automated JavaScript Tests
for a smoke test or if you are not changing language-level functionality, you may wish to use jstests.py path_to_js_shell --exclude=test262 other options allow you to show the test command lines being run, command output and return codes, run tests named in a given file, exclude tests named in a given file, hide the progress bar, change the timeout, run skipped tests, print output in tinderbox format, run a test in the debugger, or run tests in valgrind.
... the --jitflags option allows you to test the js executable with different flags.
Security and the jar protocol
however, if a site allows file uploads, zip files are typically treated as relatively innocuous by web sites in that situation, since they're not executable.
... so starting with gecko 1.8.0.15 and 1.8.1.10, the jar: protocol is only allowed if the mime type of the file is application/java-archive.
A Web PKI x509 certificate primer
this allows for a certificate to be used for more than one fqdn, for example you can have a certificate that is valid for both a.example.com and b.example.com basic constraints this allows certificates to be asserted as issuing certificates (it is mandatory for ca certificates).
...this type of hierarchy allows for a relatively simple long term root to be distributed to clients, and some flexibility on the intermediate cert so that you can change parameters based on best practices and security research.
Signing Mozilla apps for Mac OS X
these types of accounts only allow for the "agent" role to create developer ids.
... --keychain /path/to/keychain lets you specify which keychain contains the signing certificate specified by your-signing-identity, rather than allowing the codesign to search the keychain list.
XUL Accessibility
e="it's label for control" control="control" /> <hbox role="grouping" id="control" /> get tooltiptext attribute if the element is anonymous child of the element that is the direct child of toolbaritem element or the element is direct child of toolbaritem element then title attribute of toolbaritem element is used (currently it's used in firefox ui only) if the element has aria role and the role allows to aggregate name from subtree of element then generate name from subtree of the element description the following rules to generate accessible description are applied: check aria-describedby attribute, description is generated from elements pointed by aria-describedby attribute <description id="descr1">label1</description> <description id="descr2">label2</description> <textbox aria-describ...
... <description value="it's label for control" control="control" /> <hbox role="grouping" id="control" /> get tooltiptext attribute value if the aria role is used and it allows to have accessible value then aria-valuetext or aria-valuenow are used if the element is xlink then value is generated from link location actions if the element is xlink then jump action is exposed if the element has registered click event handler then click action is exposed xul elements notification used to display an informative message.
Places utilities for JavaScript
showminimaladdmultibookmarkui() show an "add bookmarks" dialog to allow the adding of a folder full of bookmarks corresponding to the objects in the urilist.
... markpageasfollowedbookmark(string aurl) checkurlsecurity() allows opening of javascript/data uri only if the given node is bookmarked (see bug 224521).
Preferences API
preferences api allows you to save and read strings, numbers, booleans, and references to files to the preferences store.
... you can also create a xul-based options window easily to allow user modify some preferences.
XPCOM changes in Gecko 2.0
documentation will be updated as time allows to remove references to interfaces being "frozen" or "unfrozen." component registration the way xpcom components are registered changed in gecko 2.
...this was always intended to be a short-term workaround to allow extensions to continue to work while their authors updated their code to use xpcnativewrappers.
Creating the Component Code
this interface provides yet another abstraction of the nsifactory object, and may allow for multiple nsifactory objects.
...the registerself call allows your component to tell xpcom exactly what it supports.
Components.utils.Sandbox
principal the security principal defined for a sandbox determines what code running in that sandbox will be allowed to do.
...this helps to improve memory usage by allowing sandboxes to be discarded when that zone goes away.
Components.utils
exportfunction() export a javascript function from a more-privileged to a less-privileged scope, allowing it to be called in the less-privileged scope.
... getcomponentsforscope() this seemingly-paradoxical api allows privileged code to explicitly give unprivileged code a reference to its own components object (whereas it's normally hidden away on a scope chain visible only to xbl methods).
JavaXPCOM
javaxpcom allows for communication between java and xpcom, such that a java application can access xpcom objects, and xpcom can access any java class that implements an xpcom interface.
... embedding mozilla in a java application using javaxpcom xulrunner ships with the javaxpcom component, which allows java code to interact with xpcom objects.
XPCShell Reference
-v version this allows you to specify a specific version of js to use, and should be set to an integral value specified by the jsversion enumerated type.
... load(scriptfilename) load() allows you to load and run a script from the command line.
XPCOM glue classes
ns convertasciitoutf16 externalclass declarationns convertutf16toutf8 externalclass declarationns convertutf8toutf16 externalclass declarationns lossyconvertutf16toascii externalclass declarationns_convertasciitoutf16class declarationns_convertutf16toutf8class declarationns_convertutf8toutf16class declarationns_lossyconvertutf16toasciiclass declarationns_overridens_override is a macro which allows c++ code in mozilla to specify that a method is intended to override a base class method.
...these routines allow easy access to xpcom's global nsimemory implementation without having to go through the service manager to get it.nspromiseflatcstringclass declarationnspromiseflatstringclass declarationnsrefptrrefptr (formerly known as nsrefptr, see bug 1207245) is a general class to implement reference counting pointers for objects.
amIWebInstaller
toolkit/mozapps/extensions/amiwebinstaller.idlscriptable this interface is used to allow web pages to start installing add-ons.
... areferer the uri of the web page for which to see if installation is allowed.
mozIStorageProgressHandler
this allows you to monitor the progress and possibly display status information to the user.
... return value return true to abort the request or false to allow it to continue.
nsIAboutModule
if it is, web pages and so forth will be allowed to link to this about: uri.
... allow_script (1 << 1) a flag that indicates whether script should be enabled for the given about: uri even if it's disabled in general.
nsIAccessibleStates
more than 1 allowed.
... state_selected 0x00000002 the object is selected, that is it indicates this object is the child of an object that allows its children to be selected and that this child is one of those children that has been selected.
nsIChannelPolicy
1.0 66 introduced gecko 2.0 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) this interface exists to allow the content policy mechanism to function properly during channel redirects.
...attributes attribute type description contentsecuritypolicy nsisupports a nsicontentsecuritypolicy object to determine if the load should be allowed.
nsIChromeRegistry
this is useful because chrome urls are allowed to be specified in "shorthand", leaving the "file" portion off.
...this is useful because chrome urls are allowed to be specified in "shorthand", leaving the "file" portion off.
nsIContentSecurityPolicy
t shouldload(in unsigned long acontenttype, in nsiuri acontentlocation, in nsiuri arequestorigin, in nsisupports acontext, in acstring amimetypeguess, in nsisupports aextra); short shouldprocess(in unsigned long acontenttype, in nsiuri acontentlocation, in nsiuri arequestorigin, in nsisupports acontext, in acstring amimetype, in nsisupports aextra); attributes attribute type description allowseval boolean whether this policy allows eval and eval-like functions such as settimeout("code string", time).
... allowsinlinescript boolean whether this policy allows in-page script.
nsIContentViewer
istabmodalpromptallowed boolean read only.
... return value true if the document will allow unloading; otherwise false.
nsICookiePermission
in nsiuri auri, in nsichannel achannel); boolean cansetcookie(in nsiuri auri, in nsichannel achannel, in nsicookie2 acookie, inout boolean aissession, inout print64 aexpiry); nsiuri getoriginatinguri(in nsichannel achannel); void setaccess(in nsiuri auri, in nscookieaccess aaccess); constants constant value description access_default 0 nscookieaccess's access default value access_allow 1 nscookieaccess's access allow value access_deny 2 nscookieaccess's access deny value access_session 8 additional values for nscookieaccess, which are not directly used by any methods on this interface, but are nevertheless convenient to define here.
... return value one of the nscookieaccess values: access_default, access_allow, or access_deny.
nsIDOMXULElement
allowevents boolean true if the element's allowevents attribute is the string "true", otherwise false.
...gets or creates a box object for the element; browser, editor, iframe, listbox, menu, menupopup, scrollbox, tooltip and tree elements receive specialized box objects allowing access to additional properties not normally available from script.
nsIDownloadManager
also notifies observers of the "download-manager-remove-download" topic with a null subject to allow any download manager consumers to react to the removals.
... also notifies observers of the "download-manager-remove-download" topic with the download id as the subject to allow any download manager consumers to react to the removal.
nsIEditorSpellCheck
subsequent calls iterate through all suggestions, allowing you to build a list.
...this function allows the caller to force the default immediately.
nsIHttpChannelInternal
forceallowthirdpartycookie boolean force relevant cookies to be sent with this load even if normally they would not be.
... httpupgrade() allows for the use of http to bootstrap another protocol via the rfc 2616 upgrade request header in conjunction with a 101 level response.
nsIINIParserWriter
nsiiniparserwriter xpcom/ds/nsiiniparser.idlscriptable allows writing to an ini-format configuration file.
... 1.0 66 introduced gecko 1.9.2 inherits from: nsisupports last changed in gecko 13.0 (firefox 13.0 / thunderbird 13.0 / seamonkey 2.10) this interface provides methods that allow writing to ini-format configuration files.
nsIJumpListBuilder
the default number of allowed items in a jump list is ten.
...applications do not have control over the number of items allowed in jump lists; excess items added are dropped by the system.
nsIMIMEInputStream
it also allows automatic creation of the content-length header.
...not allowed to be changed once the stream has been started to be read.
nsIMarkupDocumentViewer
inherits from: nsisupports last changed in gecko 7.0 (firefox 7.0 / thunderbird 7.0 / seamonkey 2.4) method overview void scrolltonode(in nsidomnode node); void sizetocontent(); attributes attribute type description allowplugins boolean if true, plugins are allowed within the doc shell.
... hintcharacterset acstring hintcharactersetsource print32 minfontsize long the minimum font size to allow.
nsIMsgFilterCustomAction
ilter type (manual, offlinemail, etc.) * * @return errormessage a localized message to display if invalid * set to null if the actionvalue is valid */ autf8string validateactionvalue(in autf8string actionvalue, in nsimsgfolder actionfolder, in nsmsgfiltertypetype filtertype); /* allow duplicate actions in the same filter list?
...*/ attribute boolean allowduplicates; /* * the custom action itself * * generally for the apply method, folder-based methods give correct * results and are preferred if available.
nsINavHistoryContainerResultNode
childrenreadonly boolean false if the node's list of children can be modified (by adding or removing children, or rearranging them), or true if the user interface should not allow the list of children to be altered.
... containeropen boolean set this to true to allow descent into this container.
nsINavHistoryQueryOptions
expandqueries boolean when set, allows items with "place:" uris to appear as containers, with the container's contents filled in from the stored query.
...to specify the tag you need to add a folder=tag_folder_id to the query, and only one folder is allowed.
nsITelemetry
toolkit/components/telemetry/nsitelemetry.idlscriptable a service to gather performance data that can be tracked over time to allow generating histograms.
... canrecordextended boolean a flag indicating if telemetry is allowed to record extended data.
nsITraceableChannel
netwerk/base/public/nsitraceablechannel.idlscriptable this interface is used to allow intercepting of http traffic.
...each listener call through to the previous listener for every call, in order to establish a call chain to allow all interested parties a chance to act on each event.
nsITransport
this interface allows the consumer of the stream to be notified when the stream can again be read.
...this interface allows the consumer of the stream to be notified when the stream can again accept more data.
nsIURI
netwerk/base/public/nsiuri.idlscriptable this is an interface for an uniform resource identifier with internationalization support, offering attributes that allow setting and querying the basic components of a uri, and methods for performing basic operations on uris.
... note: this is an optimization, allowing you to check the scheme of the uri without having to get the scheme and do the comparison yourself; this saves memory allocations.
nsIUTF8ConverterService
autf8string convertstringtoutf8( in acstring astring, in string acharset, in boolean askipcheck, in boolean aallowsubstitution ); parameters astring a string to ensure its utf8ness.
... aallowsubstitution when true, allow the decoder to substitute invalid input sequences by replacement characters.
nsIUpdateTimerManager
can instead register an update-timer category with comma-separated values as a single string representing the timer, like this: _xpcom_categories: [{ category: "update-timer", value: "contractid," + "method," + "id," + "preference," + "interval" }], this allows you to schedule the timer without actually having to instantiate the component; instead, the component is instantiated when the timer is triggered.
... preference the preference for the timer interval; this allows a preference to override the default interval.
nsIWebNavigation
load_flags_allow_third_party_fixup 8192 this flag specifies that the uri may be submitted to a third-party server for correction.
... load_flags_allow_popups 32768 this flag specifies that the load should not be subject to popup blocking checks.
nsIXPCScriptable
t_checkaccess 1 << 12 want_call 1 << 13 want_construct 1 << 14 want_hasinstance 1 << 15 want_trace 1 << 16 use_jsstub_for_addproperty 1 << 17 use_jsstub_for_delproperty 1 << 18 use_jsstub_for_setproperty 1 << 19 dont_enum_static_props 1 << 20 dont_enum_query_interface 1 << 21 dont_ask_instance_for_scriptable 1 << 22 classinfo_interfaces_only 1 << 23 allow_prop_mods_during_resolve 1 << 24 allow_prop_mods_to_prototype 1 << 25 dont_share_prototype 1 << 26 dont_reflect_interface_names 1 << 27 want_equality 1 << 28 want_outer_object 1 << 29 want_inner_object 1 << 30 reserved 1 << 31 the high order bit is reserved for consumers of these flags.
... it allows the object to implement the for..in enumeration in javascript.
nsIAbCard/Thunderbird3
in a big change from the original nsiabcard, properties are now stored in a hash table instead of as attributes on the interface, allowing it to be more flexible.
...lularnumbertype jobtitle, department, company _aimscreenname dates: anniversaryyear, anniversarymonth, anniversaryday birthyear, birthmonth, birthday webpage1 (work), webpage2 (home) custom1, custom2, custom3, custom4 notes integral properties: lastmodifieddate popularityindex prefermailformat (see nsiabprefermailformat) boolean properties: allowremotecontent inherits from: nsiabitem method overview nsivariant getproperty(in autf8string name, in nsivariant defaultvalue); [noscript] astring getpropertyasastring(in string name); [noscript] autf8string getpropertyasautf8string(in string name); [noscript] pruint32 getpropertyasuint32(in string name); [noscript] boolean getpropertyasbool(in...
Storage
the latter will allow all ongoing transactions to complete before closing the connection, and will optionally notify you via callback when the connection is closed.
...this function allows you to enumerate all the results produced by the statement.
wrappedJSObject
meet wrappedjsobject xpconnect lets you bypass its wrappers and access the underlying js object directly using the wrapper.wrappedjsobject property if the wrapped object allows this.
... nsixpcsecuritymanager allows access (see the source code comments for details; this is usually not an issue for mozilla extensions and applications) this means that in order to access the js object implementing our component directly, we must modify the component.
Xptcall Porting Guide
the win32 version is somewhat tighter because the __declspec(naked) feature allows for very small stubs.
... however, the __stdcall requires the callee to clean up the stack, so it is imperative that the interface information scheme allow the code to determine the correct stack pointer fixup for return without fail, else the process will crash.
XUL Overlays
MozillaTechXULOverlays
attaching a script to an overlay to execute a script when an overlay is applied, use a <script> element: <script src="overlay.js"/> if you need to set the version of javascript, you can set the type attribute: <script type="application/x-javascript;version=1.8" src="overlay.js"/> ui reuse with overlays one of the biggest benefits of using overlays is that it allows you to reuse groups of elements that appear frequently in the ui.
... the overlay mechanism allows you to merge elements into existing subtrees, but it also allows you to store common ui elements in overlay files and merge them into any base files that use them.
Declaring and Using Callbacks
in these cases, js-ctypes allows you to pass a regular javascript function as the callback.
... this is very powerful, since it allows native code to transparently call into javascript.
js-ctypes
js-ctypes allows application and extension code to call back and forth to native code written in c.
...unlike binary xpcom components, it allows developers to ship a single binary for use with multiple versions of firefox.
Browser Side Plug-in API - Plugins
npn_getvalue allows the plug-in to query the browser for information.
... npn_setvalueforurl allows a plug-in to change the stored information associated with a url, in particular its cookies.
Initialization and Destruction - Plugins
you can assign more than one mime type to a plug-in, which could potentially allow the plug-in to respond to data streams of different types with different interfaces and behavior.
...e, the following embed element has the standard attributes src, height, and width and the private attribute loop: <embed src="movie.avi" height="100" width="100" loop="true"> with the embed element in the example, the browser passes the values in argv to the plug-in instance: argc = 4 argn = { "src", "height", "width", "loop" } argv = { "movie.avi", "100", "100", "true" } the saved parameter allows an instance of a plug-in to save its data and, when the instance is destroyed, pass the data to the next instance of the plug-in at the same url.
Plug-in Basics - Plugins
in particular, the object element allows you to invoke another object if the browser cannot support the object invoked by the element.
...the browser ignores these nonstandard attributes when parsing the html, but it passes all attributes to the plug-in, allowing the plug-in to examine the list for any private attributes that could modify its behavior.
Plug-in Development Overview - Plugins
string 2 can contain the name of the plug-in, thus allowing the name the user sees to be different from the name of the file on disk.
... random-access mode: the browser allows the plug-in to request specific ranges of bytes from anywhere in the stream.
Plug-in Side Plug-in API - Plugins
npp_getvalue allows the browser to query the plug-in for information.
... np_getvalue allows the browser to query the plug-in for information.
Gecko Plugin API Reference - Plugins
npn_getvalue allows the plug-in to query the browser for information.
... npn_setvalueforurl allows a plug-in to change the stored information associated with a url, in particular its cookies.
Plugin Roadmap for Firefox - Plugins
users choose which sites are allowed to activate each plugin.
... august 2017 starting with firefox 55 in august 2017, users must choose which sites are allowed to activate the flash plugin.
Browser Console - Firefox Developer Tools
beginning with firefox 68, the browser console allows you to show or hide messages from the content process (i.e.
... components.utils.import("resource://gre/modules/console.jsm"); console.log("hello from firefox code"); //output messages to the console learn more: console api reference console.jsm source code in the mozilla dxr hudservice there is also the hudservice which allows access to the browse console.
Debugger.Source - Firefox Developer Tools
the text generation is disabled if the debugger has the allowwasmbinarysource property set, the "[wasm]" value will be returned in this case.
... binary if the instance refers to webassembly code and the debugger has the allowwasmbinarysource property set, a uint8array that contains the webassembly bytecode.
Aggregate view - Firefox Developer Tools
if we click the star-triangle, we'll see all four array instances: for each instance, you can see the retained size and shallow size of that instance.
... in this case, you can see that the first three arrays have a fairly large shallow size (5% of the total heap usage) and a much larger retained size (26% of the total).
Dominators - Firefox Developer Tools
this article provides an introduction to the concepts of reachability, shallow versus retained size, and dominators, as they apply in garbage-collected languages like javascript.
... shallow and retained size this gives rise to a distinction between two ways to look at the size of an object: shallow size: the size of the object itself retained size: the size of the object itself, plus the size of other objects that are kept alive by this object often, objects will have a small shallow size but a much larger retained size, through the references they contain to other objects.
Throttling - Firefox Developer Tools
the network monitor allows you to throttle your network speed to emulate various connection speeds so you can see how your app will behave under different connection types.
... throttling the toolbar includes a throttling dropdown, which allows you to throttle your network speed to emulate various different network speed conditions.
Page inspector 3-pane mode - Firefox Developer Tools
when activated, this allows you to see the following simultaneously: the html pane on the left hand side, as usual.
... having the css rules in their own pane is very useful because it allows you to not only inspect your html and edit the css applied to it, but also see the effect this has on css features such as computed styles and grids in real time.
Edit fonts - Firefox Developer Tools
variable fonts, or opentype font variations, define a new font file format that allows the font designer to include multiple variations of a typeface inside a single font file.
... variable fonts make it easy to vary font characteristics in a much more granular fashion because their allowable ranges are defined by axes of variation (see introducing the 'variation axis' for more information).
Style Editor - Firefox Developer Tools
source maps enable the tools to map back from the generated css to the original syntax, so they can display, and allow you to edit, files in the original syntax.
... this means that if you use, for example, sass, then the style editor will show you, and allow you to edit, sass files, rather than the css that is generated from them: for this to work, you must: use a css preprocessor that understands the source map revision 3 proposal.
Validators - Firefox Developer Tools
checky checky adds a submenu to your netscape or mozilla context menu that allows you to run whatever page you're on through one of (currently) 18 different online validaton and analysis services.
... accessibility services lynx viewer checks a web page using lynx visualization and allows validation of accessibility features original document information last updated date: august 16th, 2002 copyright © 2001-2003 netscape.
AbortController - Web APIs
the abortcontroller interface represents a controller object that allows you to abort one or more web requests as and when desired.
...this associates the signal and controller with the fetch request and allows us to abort it by calling abortcontroller.abort(), as seen below in the second event listener.
AbortSignal - Web APIs
the abortsignal interface represents a signal object that allows you to communicate with a dom request (such as a fetch) and abort it if required via an abortcontroller object.
...this associates the signal and controller with the fetch request and allows us to abort it by calling abortcontroller.abort(), as seen below in the second event listener.
AudioNode - Web APIs
WebAPIAudioNode
audionode.connect() allows us to connect the output of this node to be input into another node, either as audio data or as the value of an audioparam.
... audionode.disconnect() allows us to disconnect the current node from another one it is already connected to.
BeforeInstallPromptEvent - Web APIs
this is provided for user agents that want to present a choice of versions to the user such as, for example, "web" or "play" which would allow the user to chose between a web version or an android version.
... methods beforeinstallpromptevent.prompt() allows a developer to show the install prompt at a time of their own choosing.
Blob.type - Web APIs
WebAPIBlobtype
var i, fileinput, files, allowedfiletypes; // fileinput is a htmlinputelement: <input type="file" multiple id="myfileinput"> fileinput = document.getelementbyid("myfileinput"); // files is a filelist object (simliar to nodelist) files = fileinput.files; // our application only allows gif, png, and jpeg images allowedfiletypes = ["image/png", "image/jpeg", "image/gif"]; for (i = 0; i < files.length; i++) { // test if file.type is an al...
... if (allowedfiletypes.indexof(files[i].type) > -1) { // file type matched is one of allowed file types.
Bluetooth.getDevices() - Web APIs
the getdevices() method of bluetooth interface of web bluetooth api exposes the bluetooth devices this origin is allowed to access.
... note: this method returns a bluetoothdevice for each device the origin is currently allowed to access, even the ones that are out of range or powered off.
BroadcastChannel - Web APIs
it allows communication between different documents (in different windows, tabs, frames or iframes) of the same origin.
... broadcastchannel.close() closes the channel object, indicating it won't get any new messages, and allowing it to be, eventually, garbage collected.
CSS.registerProperty() - Web APIs
the css.registerproperty() method registers custom properties, allowing for property type checking, default values, and properties that do or do not inherit their value.
... registering a custom property allows you to tell the browser how the custom property should behave; what are allowed types, whether the custom property inherits its value, and what the default value of the custom property is.
CSSStyleDeclaration.setProperty() - Web APIs
priority optional is a domstring allowing the "important" css priority to be set.
...the following values are accepted: string value "important" keyword undefined string empty value "" return value undefined exceptions domexception (nomodificationallowederror): if the property or declaration block is read only.
CSS Object Model (CSSOM) - Web APIs
the css object model is a set of apis allowing the manipulation of css from javascript.
...it allows users to read and modify css style dynamically.
Using the CSS Painting API - Web APIs
registerpaint('headerhighlight', class { /* define if alphatransparency is allowed alpha is set to true by default.
... */ paint(ctx) { ctx.fillstyle = 'hsla(55, 90%, 60%, 1.0)'; ctx.fillrect(0, 15, 200, 20); /* order: x, y, w, h */ } }); in this class example we have defined a single context option with the contextoptions() function: we returned a simple object stating alpha transparency is allowed.
CSS Painting API - Web APIs
the css painting api — part of the css houdini umbrella of apis — allows developers to write javascript functions that can draw directly into an element's background, border, or content.
... concepts and usage essentially, the css painting api contains functionality allowing developers to create custom values for paint(), a css <image> function.
Using the CSS properties and values API - Web APIs
the css properties and values api — part of the css houdini umbrella of apis — allows the registration of css custom properties, allowing for property type checking, default values, and properties that do or do not inherit their value.
... registering a custom property registering a custom property allows you to tell the browser how the custom property should behave; what are allowed types, whether the custom property inherits its value, and what the default value of the custom property is.
CSS Properties and Values API - Web APIs
the css properties and values api — part of the css houdini umbrella of apis — allows developers to explicitly define their css custom properties, allowing for property type checking, default values, and properties that do or do not inherit their value.
... examples the following uses css.registerproperty in javascript to type a css custom properties, --my-color, as a color, give it a default value, and not allow it to inherit its value: window.css.registerproperty({ name: '--my-color', syntax: '<color>', inherits: false, initialvalue: '#c0ffee', }); the same registration can take place in css using the following @property: @property --my-color { syntax: '<color>'; inherits: false; initial-value: #c0ffee; } specifications specification status comment css proper...
CSS Typed Object Model API - Web APIs
css typed om both allows for the performant manipulation of values assigned to css properties while enabling maintainable code that is both more understand and easier to write.
... cssstylevalue.parse(property, csstext) the parse() method of the cssstylevalue interface allows a cssnumericvalue to be constructed from a css string.
Cache.matchAll() - Web APIs
WebAPICachematchAll
options optional an options object allowing you to set specific control options for the matching performed.
... ignoremethod: a boolean that, when set to true, prevents matching operations from validating the request http method (normally only get and head are allowed.) it defaults to false.
CanvasRenderingContext2D.drawImage() - Web APIs
this allows scaling of the drawn image.
...this allows scaling of the drawn image.
CanvasRenderingContext2D.getImageData() - Web APIs
to avoid securityerror being thrown in this situation, configure cors to allow the source image to be used in this way.
... see allowing cross-origin use of images and canvas.
Finale - Web APIs
WebAPICanvas APITutorialFinale
svg scalable vector graphics let you describe images as sets of vectors (lines) and shapes in order to allow them to scale smoothly regardless of the size at which they're drawn.
... web audio the web audio api provides a powerful and versatile system for controlling audio on the web, allowing developers to choose audio sources, add effects to audio, create audio visualizations, apply spatial effects (such as panning) and much more.
Hit regions and accessibility - Web APIs
the hit region api allows you to define an area of your canvas and provides another possibility to expose interactive content on a canvas to accessibility tools.
... it allows you to make hit detection easier and lets you route events to dom elements.
Using channel messaging - Web APIs
the 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, or two documents via a sharedworker) to communicate directly, passing messages between one another through two-way channels (or pipes) with a port at each end.
... message channels on the other hand can provide a secure channel that allows you to pass data between different browsing contexts.
Clients - Web APIs
WebAPIClients
an options argument allows you to control the types of clients returned.
... clients.claim() allows an active service worker to set itself as the controller for all clients within its scope.
Clipboard.read() - Web APIs
WebAPIClipboardread
example after using navigator.permissions.query() to find out if we have (or if the user will be prompted to allow) "clipboard-read" access, this example fetches the data currently on the clipboard.
... navigator.permissions.query({name: "clipboard-read"}).then(result => { // if permission to read the clipboard is granted or if the user will // be prompted to allow it, we proceed.
Constraint validation API - Web APIs
concepts and usage certain html form controls, such as <input>, <select> and <textarea>, can restrict the format of allowable values, using attributes like required and pattern to set basic constraints.
... note: firefox supported a proprietary error attribute — x-moz-errormessage — for many versions, which allowed you set custom error messages in a similar way.
Credential Management API - Web APIs
these capabilities allow users to sign in without typing passwords, see the federated account they used to sign in to a site, and resume a session without the explicit sign-in flow of an expired session.
... subdomain-shared credentials later version of the spec allow credentials to be retrieved from a different subdomain.
CredentialsContainer.get() - Web APIs
this method collects credentials by calling the "collectfromcredentialstore" method for each credential type allowed by the options argument.
...the options include criteria that the credentials are required or allowed to have, and options for interacting with the user.
DOMMatrixReadOnly - Web APIs
the dommatrix interrface—which is based upon dommatrixreadonly—adds mutability, allowing you to alter the matrix after creating it.
... this interface should be available inside web workers, though some implementations doesn't allow it yet.
DataTransfer.getData() - Web APIs
html content <div id="div1" ondrop="drop(event)" ondragover="allowdrop(event)"> <span id="drag" draggable="true" ondragstart="drag(event)">drag me to the other box</span> </div> <div id="div2" ondrop="drop(event)" ondragover="allowdrop(event)"></div> css content #div1, #div2 { width:100px; height:50px; padding:10px; border:1px solid #aaaaaa; } javascript content function allowdrop(allowdropevent) { allowdropevent.target.style.color ...
...= 'blue'; allowdropevent.preventdefault(); } function drag(dragevent) { dragevent.datatransfer.setdata("text", dragevent.target.id); dragevent.target.style.color = 'green'; } function drop(dropevent) { dropevent.preventdefault(); var data = dropevent.datatransfer.getdata("text"); dropevent.target.appendchild(document.getelementbyid(data)); document.getelementbyid("drag").style.color = 'black'; } result specifications specification status comment html living standardthe definition of 'getdata()' in that specification.
EventTarget.addEventListener() - Web APIs
example of options usage html <div class="outer"> outer, once & none-once <div class="middle" target="_blank"> middle, capture & none-capture <a class="inner1" href="https://www.mozilla.org" target="_blank"> inner1, passive & preventdefault(which is not allowed) </a> <a class="inner2" href="https://developer.mozilla.org/" target="_blank"> inner2, none-passive & preventdefault(not open new page) </a> </div> </div> css .outer, .middle, .inner1, .inner2 { display: block; width: 520px; padding: 15px; margin: 15px; text-decoration: none; } .outer { border: 1px solid red; color: red; } .middle { border: 1px solid g...
...the benefits are as follows: it allows adding more than a single handler for an event.
File.getAsBinary() - Web APIs
WebAPIFilegetAsBinary
summary the getasbinary method allows to access the file's data in raw binary format.
... example // fileinput is an htmlinputelement: <input type="file" id="myfileinput" multiple> var fileinput = document.getelementbyid("myfileinput"); // files is a filelist object (similar to nodelist) var files = fileinput.files; // object for allowed media types var accept = { binary : ["image/png", "image/jpeg"], text : ["text/plain", "text/css", "application/xml", "text/html"] }; var file; for (var i = 0; i < files.length; i++) { file = files[i]; // if file type could be detected if (file !== null) { if (accept.binary.indexof(file.type) > -1) { // file is a binary, which we accept var data = file.getasbinary...
FileException - Web APIs
invalid_modification_err 9 the modification requested is not allowed.
... no_modification_allowed_err 6 the state of the underlying file system prevents any writing to a file or a directory.
FileList - Web APIs
WebAPIFileList
using the file list all <input> element nodes have a files attribute of type filelist on them which allows access to the items in this list.
... <!doctype html> <html> <head> </head> <body> <!--multiple is set to allow multiple files to be selected--> <input id="myfiles" multiple type="file"> </body> <script> var pullfiles=function(){ // love the query selector var fileinput = document.queryselector("#myfiles"); var files = fileinput.files; // cache files.length var fl = files.length; var i = 0; while ( i < fl) { // localize file var in the loop var file = files[...
Using the Frame Timing API - Web APIs
frame observers the performance observer interfaces allow an application to register an observer for specific performance event types.
... firefox performance tool firefox's performance tool allows the developer to record a piece of the user's interaction and the data obtained during the recording is used to create a profile of the browser's activity.
Guide to the Fullscreen API - Web APIs
for example, <iframe> elements have the allowfullscreen attribute in order to opt-in to allowing their content to be displayed in fullscreen mode.
... document.fullscreenenabled the fullscreenenabled property tells you whether or not the document is currently in a state that would allow fullscreen mode to be requested.
GamepadButton - Web APIs
the gamepadbutton interface defines an individual button of a gamepad or other controller, allowing access to the current state of different types of buttons available on the control device.
...in this simple example i've just allowed either.
Using the Geolocation API - Web APIs
the callback function is called multiple times, allowing the browser to either update your location as you move, or provide a more accurate location as different techniques are used to geolocate you.
... this object allows you to specify whether to enable high accuracy, a maximum age for the returned position value (up until this age it will be cached and reused if the same position is requested again; after this the browser will request fresh position data), and a timeout value that dictates how long the browser should attempt to get the position data for, before it times out.
Geolocation API - Web APIs
the geolocation api allows the user to provide their location to web applications if they so desire.
...the user's operating system will prompt the user to allow location access the first time it is requested.
Audio() - Web APIs
determining when playback can begin there are three ways you can tell when enough of the audio file has loaded to allow playback to begin: check the value of the readystate property.
... the event-based approach is best: myaudioelement.addeventlistener("canplaythrough", event => { /* the audio is now playable; play it if permissions allow */ myaudioelement.play(); }); memory usage and management if all references to an audio element created using the audio() constructor are deleted, the element itself won't be removed from memory by the javascript runtime's garbage collection mechanism if playback is currently underway.
HTMLHyperlinkElementUtils - Web APIs
these utilities allow to deal with common features like urls.
... htmlhyperlinkelementutils.href this a stringifier property that returns a usvstring containing the whole url, and allows the href to be updated.
HTMLImageElement.sizes - Web APIs
the htmlimageelement property sizes allows you to specify the layout width of the image for each of a list of media conditions.
... note: the source size value must not be specified as a percentage of the container size; that is, lengths such as 50% or 100% are not allowed, as there would be uncertainty as to what the specified value is a percentage of.
HTMLMediaElement.play() - Web APIs
possible errors include: notallowederror the user agent (browser) or operating system doesn't allow playback of media in the current context or situation.
... if the user agent is configured not to allow automatic or script-initiated playback of media, calling play() will cause the returned promise to be immediately rejected with a notallowederror.
HTMLOptionsCollection - Web APIs
oke="#d4dde4" stroke-width="2px" /><text x="286" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">htmloptionscollection</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties name type description length unsigned long as optionally allowed by the spec, this property isn't read-only.
...mozilla allows this, while other implementations could potentially throw a domexception.
HTMLSelectElement.disabled - Web APIs
syntax edit aselectelement.disabled = abool; example html <label> allow drinks?
... <input id="allow-drinks" type="checkbox"/> </label> <label for="drink-select">drink selection:</label> <select id="drink-select" disabled> <option value="1">water</option> <option value="2">beer</option> <option value="3">pepsi</option> <option value="4">whisky</option> </select> javascript var allowdrinkscheckbox = document.getelementbyid("allow-drinks"); var drinkselect = document.getelementbyid("drink-select"); allowdrinkscheckbox.addeventlistener("change", function(event) { if (event.target.checked) { drinkselect.disabled = false; } else { drinkselect.disabled = true; } }, false); result specifications specification status comment html living standardthe definition of 'disabled' in that specification.
HTMLTableCellElement - Web APIs
this value is only allowed if the cell is in a column group.
...this value is only allowed if the cell is in a row group.
Using microtasks in JavaScript with queueMicrotask() - Web APIs
in order to allow microtasks to be used by third-party libraries, frameworks, and polyfills, the queuemicrotask() method is exposed on the window and worker interfaces through the windoworworkerglobalscope mixin.
...they're a highly specialized feature of modern browser-based javascript development, allowing you to schedule code to jump in front of other things in the long set of things waiting to happen on the user's computer.
The HTML DOM API - Web APIs
event handlers for document events defined by the html standard to allow access to mouse and keyboard events, drag and drop, media control, and more.
...this way, the structural features implemented by the node interface are also available to html elements, allowing them to be nested within each other, created and deleted, moved around, and so forth.
History - Web APIs
WebAPIHistory
the history interface allows manipulation of the browser session history, that is the pages visited in the tab or frame that the current page is loaded in.
... scrollrestoration allows web applications to explicitly set default scroll restoration behavior on history navigation.
Working with the History API - Web APIs
this allows a wider variety of objects to be safely passed.
...this allows a wider variety of objects to be safely passed.
IDBCursorSync - Web APIs
not_allowed_err if the underlying index or object store does not support updating the record because it is open in the read_only or snapshot_read mode, or if an index record cannot be changed because the underlying index is auto-populated.
... remove() deletes the record at the cursor's position, without changing the cursor's position void delete ( ) raises (databaseexception); exceptions this method can raise an idbdatabaseexception with the following code: not_allowed_err if the underlying index or object store does not support updating the record because it is open in the read_only or snapshot_read mode.
IDBDatabaseException - Web APIs
non_transient_err 2 an operation was not allowed on an object.
... not_allowed_err 6 an operation was called on an object where it is not allowed or at a time when it is not allowed.
IndexedDB API - Web APIs
idbobjectstore represents an object store that allows access to a set of data in an indexeddb database, looked up via primary key.
... idbindex also allows access to a subset of data in an indexeddb database, but uses an index to retrieve the record(s) rather than the primary key.
LargestContentfulPaint - Web APIs
may not be available if the element is a cross-origin image loaded without the timing-allow-origin header.
...(note: `rendertime` may not be available on // image elements loaded cross-origin without the `timing-allow-origin` header.) lcp = lastentry.rendertime || lastentry.loadtime; }); po.observe({type: 'largest-contentful-paint', buffered: true}); // send data to the server.
MediaRecorder.onerror - Web APIs
securityerror the mediastream is configured to disallow recording.
...try again later."); break; case securityerror: shownotification("recording the specified source " + "is not allowed due to security " + "restrictions."); break; default: shownotification("a problem occurred while trying " + "to record the video."); break; } }; /* this would be a good place to create a worker to handle writing the buffers to disk periodically */ recorder.start(100); /* 100ms time slices per buffe...
MediaRecorderErrorEvent.error - Web APIs
invalidstateerror an operation was attempted in a context in which it isn't allowed, or a request has been made on an object that's deleted or removed.
... securityerror the mediastream is configured to disallow recording.
MediaTrackSupportedConstraints.frameRate - Web APIs
checking the value of this property lets you determine if the user agent allows constraining the video track configuration by frame rate.
...if the property isn't present, the user agent doesn't allow specifying limits on the frame rate for video tracks.
Media Source API - Web APIs
mse allows us to replace the usual single track src value fed to media elements with a reference to a mediasource object, which is a container for information like the ready state of the media for being played, and references to multiple sourcebuffer objects that represent the different chunks of media that make up the entire stream.
... the two most common use cases for dash involve watching content “on demand” or “live.” on demand allows a developer to take their time transcoding the assets into multiple resolutions of various quality.
NDEFReader.scan() - Web APIs
WebAPINDEFReaderscan
signal -- optional abortsignal that allows to cancell this scan() operation.
... notallowederror the permission for this operation was rejected.
Navigator.mozIsLocallyAvailable() - Web APIs
the navigator.mozislocallyavailable() method allows add-ons to determine whether or not a given resource is available.
... ifoffline allows you to specify whether or not the offline resources cache should be checked; specify true to consider the offline resources cache.
Web-based protocol handlers - Web APIs
web-based protocol handlers allow web-based applications to participate in the process too.
... when a browser executes this code, it should display a prompt to the user, asking permission to allow the web application to register as a handler for the protocol.
Navigator.registerProtocolHandler() - Web APIs
this will be displayed to the user, such as prompting “allow this site to handle [scheme] links?” or listing registered handlers in the browser’s settings.
... the user will be notified that your code asked to register the protocol handler, so that they can decide whether or not to allow it.
NavigatorID.userAgent - Web APIs
opera 6+ allows users to set the browser identification string via a menu.
... safari and icab allow users to change the browser user agent string to predefined internet explorer or netscape strings via a menu.
Node - Web APIs
WebAPINode
obsolete methods node.getuserdata() allows a user to get some domuserdata from the node.
... node.setuserdata() allows a user to attach, or remove, domuserdata to the node.
Notification.requestPermission() - Web APIs
} we no longer show a live sample on this page, as chrome and firefox no longer allow notification permissions to be requested from cross-origin <iframe>s, with other browsers to follow.
...this is not only best practice — you should not be spamming users with notifications they didn't agree to — but going forward browsers will explicitly disallow notifications not triggered in response to a user gesture.
Notification - Web APIs
} we no longer show a live sample on this page, as chrome and firefox no longer allow notification permissions to be requested from cross-origin <iframe>s, with other browsers to follow.
...this is not only best practice — you should not be spamming users with notifications they didn't agree to — but going forward browsers will explicitly disallow notifications not triggered in response to a user gesture.
OES_texture_float - Web APIs
limitation: linear filtering linear filtering on floating-point textures is not allowed with this extension.
... floating-point color buffers this extension implicitly enables the webgl_color_buffer_float extension (if supported), which allows rendering to 32-bit floating-point color buffers.
OES_texture_float_linear - Web APIs
the oes_texture_float_linear extension is part of the webgl api and allows linear filtering with floating-point pixel types for textures.
... linear filtering the oes_texture_float extension alone does not allow linear filtering with floating-point textures.
OES_texture_half_float - Web APIs
limitation: linear filtering linear filtering on half floating-point textures is not allowed with this extension.
... half floating-point color buffers this extension implicitly enables the ext_color_buffer_half_float extension (if supported), which allows rendering to 16-bit floating point formats.
OES_texture_half_float_linear - Web APIs
the oes_texture_half_float_linear extension is part of the webgl api and allows linear filtering with half floating-point pixel types for textures.
... linear filtering the oes_texture_half_float extension alone does not allow linear filtering with half floating-point textures.
PaymentResponse - Web APIs
methods paymentresponse.retry() secure context if something is wrong with the payment response's data (and there is a recoverable error), this method allows a merchant to request that the user retry the payment.
...allows the developer to revalidate any requested user data (e.g., the phone number or the email address) if it changes.
Payment processing concepts - Web APIs
validated merchants are allowed to interface with a payment handler.
...if the merchant doesn't successfully validate, it's not allowed to use the payment handler.
Using Performance Timeline - Web APIs
the standard also includes interfaces that allow an application to be notified when specific performance events occur.
...1", "mark-1", "mark-2"); var pelist = performance.getentries(); var pe = pelist[0]; if (pe.tojson === undefined) { log ("performanceentry.tojson() is not supported"); return; } // print the performanceentry object var json = pe.tojson(); var s = json.stringify(json); log("performanceentry.tojson = " + s); } performance observers the performance observer interfaces allow an application to register an observer for specific performance event types, and when one of those event types is recorded, the application is notified of the event via the observer's callback function that was specified at the time, the observer was created.
Performance Timeline - Web APIs
the standard also includes interfaces that allow an application to define performance observer callbacks that are notified when specific performance events are added to the browser's performance timeline.
... performance observers the performance observer interfaces allow an application to register an observer for specific performance event types, and when one of those event types is recorded, the application is notified of the event via the observer's callback function that was specified when the observer was created.
Permissions API - Web APIs
concepts and usage historically different apis handle their own permissions inconsistently — for example the notifications api allows for explicit checking of permission status and requesting permission, whereas the geolocation api doesn't (which causes problems if the user denied the initial permission request).
... the permissions api provides the tools to allow developers to implement a better user experience as far as permissions are concerned.
Pointer events - Web APIs
pointer capture pointer capture allows the events for a pointer to be retargeted to a particular element other than the normal hit test result of the pointer's location.
... pointer capture pointer capture allows events for a particular pointer event to be re-targeted to a particular element instead of the normal hit test at a pointer's location.
PublicKeyCredentialRequestOptions - Web APIs
publickeycredentialrequestoptions.allowcredentials optional an array of credentials descriptor which restricts the acceptable existing credentials for retrieval.
... examples var options = { challenge: new uint8array([/* bytes sent from the server */]), rpid: "example.com", /* will only work if the current domain is something like foo.example.com */ userverification: "preferred", timeout: 60000, // wait for a minute allowcredentials: [ { transports: "usb", type: "public-key", id: new uint8array(26) // actually provided by the server }, { transports: "internal", type: "public-key", id: new uint8array(26) // actually provided by the server } ], extensions: { uvm: true, // rp wants to know how the user was verified loc: false, txauthsimple: "could y...
RTCDataChannel - Web APIs
values allowed by the websocket.binarytype property are also permitted here: "blob" if blob objects are being used or "arraybuffer" if arraybuffer objects are being used.
...these labels are not required to be unique.maxpacketlifetime read only the read-only rtcdatachannel property maxpacketlifetime returns the amount of time, in milliseconds, the browser is allowed to take to attempt to transmit a message, as set when the data channel was created, or null.maxretransmits read only the read-only rtcdatachannel property maxretransmits returns the maximum number of times the browser should try to retransmit a message before giving up, as set when the data channel was created, or null, which indicates that there is no maximum.negotiated read only the read-on...
RTCInboundRtpStreamStats.pliCount - Web APIs
this may trigger the sender to send a full frame in order to allow the receiver to re-synchronize, since lost data may be an irrecoverable situation for decoding media.
... however, the primary purpose of this message is to allow the sender to consider techniques to mitigate network performance issues.
RTCOutboundRtpStreamStats.pliCount - Web APIs
usage notes upon receiving a pli packet, the sender may have responded by sending a full frame to the remote peer to allow it to re-synchronize with the media.
... however, the primary purpose of a pli packet is to allow the rtcrtpsender for which this rtcoutboundrtpstreamstats object provides statistics to consider techniques to mitigate network performance issues.
RTCPeerConnection.restartIce() - Web APIs
the webrtc api's rtcpeerconnection interface offers the restartice() method to allow a web application to easily request that ice candidate gathering be redone on both ends of the connection.
... this simplifies the process by allowing the same method to be used by either the caller or the receiver to trigger an ice restart.
RTCPeerConnection - Web APIs
t browser versions have implemented it.removetrack()the rtcpeerconnection.removetrack() method tells the local end of the connection to stop sending media from the specified track, without actually removing the corresponding rtcrtpsender from the list of senders as reported by rtcpeerconnection.getsenders().restartice()the webrtc api's rtcpeerconnection interface offers the restartice() method to allow a web application to easily request that ice candidate gathering be redone on both ends of the connection.setconfiguration() the rtcpeerconnection.setconfiguration() method sets the current configuration of the rtcpeerconnection based on the values included in the specified rtcconfiguration object.
... "checking" the ice agent has been given one or more remote candidates and is checking pairs of local and remote candidates against one another to try to find a compatible match, but has not yet found a pair which will allow the peer connection to be made.
RTCRtpEncodingParameters - Web APIs
maxbitrate an unsigned long integer indicating the maximum number of bits per second to allow for this encoding.
... maxframerate a double-precision floating-point value specifying the maximum number of frames per second to allow for this encoding.
RTCRtpSendParameters.encodings - Web APIs
maxbitrate an unsigned long integer indicating the maximum number of bits per second to allow for this encoding.
... maxframerate a double-precision floating-point value specifying the maximum number of frames per second to allow for this encoding.
RTCRtpStreamStats.pliCount - Web APIs
this may trigger the sender to send a full frame in order to allow the receiver to re-synchronize, since lost data may be an irrecoverable situation for decoding media.
... however, the primary purpose of this message is to allow the sender to consider techniques to mitigate network performance issues.
ReportingObserver() - Web APIs
observer: a reference to the same reportingobserver object, allowing for recursive report collection, etc.
... options optional an reportingobserveroptions object allowing you to set the options for creating the object.
Reporting API - Web APIs
the callback runs when observation starts an options dictionary that allows you to specify the type of reports to collect, and whether the reports that were generated before the observer was able to be created should be observable (buffered: true).
... reporting api dictionaries reportingobserveroptions allows options to be set in the constructor when creating a reporting observer.
Resize Observer API - Web APIs
the resize observer api provides a solution to exactly these kinds of problems, and more besides, allowing you to easily observe and respond to changes in the size of an element’s content or border box in a performant way.
...a callback function set up inside the constructor then runs every time the size changes, providing access to the new dimensions and allowing you to do anything you like in response to those changes.
SVGMarkerElement - Web APIs
exceptions: a domexception with code no_modification_allowed_err is raised when the object itself is read only.
... exceptions: a domexception with code no_modification_allowed_err is raised when the object itself is read only.
Screen Wake Lock API - Web APIs
it allows for a simple platform based solution which up until now could only be achieved via workarounds which were potentially power hungry.
... you acquire a wakelocksentinel object by calling the navigator.wakelock.request() promise based method that resolves if the platform allows it.
Selection.rangeCount - Web APIs
gecko browsers allow multiple selections across table cells.
... firefox allows to select multiple ranges in the document by using ctrl+click (unless the click within an element with display: table-cell).
Sensor APIs - Web APIs
if (event.error.name === 'notallowederror') { // branch to code for requesting permission.
... const sensor = new absoluteorientationsensor(); sensor.start(); sensor.onerror = event => { if (event.error.name === 'securityerror') console.log("no permissions to use absoluteorientationsensor."); }; the following table describes for each sensor type, the name required for the permissions api, the <iframe> element's allow attribute and the feature-policy directive.
ServiceWorkerGlobalScope - Web APIs
additionally, synchronous requests are not allowed from within a service worker — only asynchronous requests, like those initiated via the fetch() method, can be used.
... methods serviceworkerglobalscope.skipwaiting() allows the current service worker registration to progress from waiting to active state while service worker clients are using it.
ServiceWorkerRegistration.showNotification() - Web APIs
syntax ​serviceworkerregistration.shownotification(title, [options]); parameters title the title that must be shown within the notification options optional an object that allows configuring the notification.
... tag: an id for a given notification that allows you to find, replace, or remove the notification using a script if necessary.
Service Worker API - Web APIs
they will also allow access to push notifications and background sync apis.
...it contains information about the request and resulting response, and provides the fetchevent.respondwith() method, which allows us to provide an arbitrary response back to the controlled page.
Using the Storage Access API - Web APIs
usage notes the storage access api is designed to allow embedded content to request access to storage that would otherwise be blocked when a user’s browser is set to block all third-party cookies.
... first of all, if the <iframe> is sandboxed, the embedding website needs to add the allow-storage-access-by-user-activation sandbox token to allow storage access requests to be successful, along with allow-scripts and allow-same-origin to allow it to call the api, and execute in an origin that can have cookies: <iframe sandbox="allow-storage-access-by-user-activation allow-scripts allow-same-origin"> ...
SyncManager.register() - Web APIs
the available options are: allowonbattery: a boolean that determines whether synchronization is allowed when the user agent is on a battery-powered device.
... idlerequired: a boolean that determines whether synchronization is allowed when the user agent's device is idle.
TextRange - Web APIs
WebAPITextRange
the selection interface should be used first, if the browser allows it.
...according to the standard, a window / document may have multiple non adjacent selection, but only firefox can select multiple ranges through ctrl; generally, only one selected textrange is allowed in ie.
Touch events - Web APIs
example this example tracks multiple touchpoints at a time, allowing the user to draw in a <canvas> with more than one finger at a time.
...this behavior is not well defined in the touch events spec and results in different behavior for different browsers (i.e., ios will prevent zooming but still allow panning with both fingers; android will allow zooming but not panning; opera and firefox currently prevent all panning and zooming.) currently, it's not recommended to depend on any particular behavior in this case, but rather to depend on meta viewport to prevent zooming.
UIEvent.cancelBubble - Web APIs
it is set to false by default, allowing the event to bubble up the dom, if it is a bubbleable event.
...not all events are allowed to bubble up the dom.
WakeLock.request() - Web APIs
WebAPIWakeLockrequest
the request() method of the wakelock interface returns a promise that resolves with a wakelocksentinel object, which allows control over screen dimming and locking.
... exceptions notallowederror thrown when wake lock is not available, which can happen because: document is not allowed to use screen wake lock due to screen-wake-lock policy.
WebGLRenderingContext.lineWidth() - Web APIs
the maximum minimum width is allowed to be 1.0.
... the minimum maximum width is also allowed to be 1.0.
WebGLRenderingContext.pixelStorei() - Web APIs
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.
... glenum gl.browser_default_webgl gl.browser_default_webgl, gl.none webgl when using a webgl 2 context, the following values are available additionally: constant description type default value allowed values (for param) specified in gl.pack_row_length number of pixels in a row.
Using textures in WebGL - Web APIs
this will allow non-power-of-two (npot) textures at the expense of mipmapping, uv wrapping, uv tiling, and your control over how the device will handle your texture.
... // gl.nearest is also allowed, instead of gl.linear, as neither mipmap.
WebGL best practices - Web APIs
g); } for (const [vs, fs, prog] of programs) { if (!gl.getprogramparameter(prog, gl.link_status)) { console.error('link failed: ' + gl.getprograminfolog(prog)); console.error('vs info-log: ' + gl.getshaderinfolog(vs)); console.error('fs info-log: ' + gl.getshaderinfolog(fs)); } } khr_parallel_shader_compile for non-blocking compile/link status while we've described a pattern to allow browsers to compile and link in parallel, normally checking compile_status or link_status blocks until the compile or link completes.
...(rpaf explainer) this allows as much time as possible for rendering each frame.
WebRTC connectivity - Web APIs
ideally, candidates are udp (since it's faster, and media streams are able to recover from interruptions relatively easily), but the ice standard does allow tcp candidates as well.
... ice allows candidates to represent connections over either tcp or udp, with udp generally being preferred (and being more widely supported).
Introduction to WebRTC protocols - Web APIs
ice interactive connectivity establishment (ice) is a framework to allow your web browser to connect with peers.
...it needs to bypass firewalls that would prevent opening connections, give you a unique address if like most situations your device doesn’t have a public ip address, and relay data through a server if your router doesn’t allow you to directly connect with peers.
Writing WebSocket servers - Web APIs
you can use this header for security (checking for same origin, automatically allowing or denying, etc.) and send a 403 forbidden if you don't like what you see.
...websockets defines a protocol and a simple way to send data, but an extension such as compression could allow sending the same data but in a shorter format.
Web Video Text Tracks Format (WebVTT) - Web APIs
example 12 - karaoke style text 1 00:16.500 --> 00:18.500 when the moon <00:17.500>hits your eye 1 00:00:18.500 --> 00:00:20.500 like a <00:19.000>big-a <00:19.500>pizza <00:20.000>pie 1 00:00:20.500 --> 00:00:21.500 that's <00:00:21.000>amore the following tags are the html tags allowed in a cue and require opening and closing tags (e.g., <b>text</b>).
... css pseudo-classes css pseudo classes allow us to classify the type of object which we want to differentiate from other types of objects.
Using bounded reference spaces - Web APIs
if it does, it likely has a system in place to allow the user to specify or select the boundaries to apply if a bounded space is to be used.
...by their very nature, bounded reference spaces have special hardware requirements, since they need to allow for the user to physically move around in space while their movements are tracked.
Inputs and input sources - Web APIs
then we pass the event through to realselecthandler() to allow the event to be processed as normal.
...in this scenario, you iterate over the list of input sources and their profiles to gather information about each input source, then present a user interface describing each input, allowing the user to assign uses to each of them.
WebXR permissions and security - Web APIs
once that check is passed, the request to enter immersive-vr mode is allowed if all of the following are true: the requestsession() call was issued by code executing within the handler for a user event, or the from the startup code for a user-launched web application.
... inline presentation when you request an xrsession with the mode set to inline, and any features are required or requested, the browser will only allow the session to be created if the call to requestsession() was made by code which is executing expressly due to user intent.
WebXR Device API - Web APIs
each view has an offset used to shift the position of the view relative to the camera, in order to allow for creating stereographic effects.
...for example, if the position and/or orient extensions to the webgl api the webgl api is extended by the webxr specification to augment the webgl context to allow it to be used to render views for display by a webxr device.
Web Animations API Concepts - Web APIs
now we’ve got the waapi for future animation specifications to piggyback on, allowing them to to remain consistent and play well together.
...(read more about how to use element.animate() in using the web animations api.) uses the api allows for the creation of dynamic animations that can be updated on the fly as well as more straightforward, declarative animations like those css creates.
Web Audio API best practices - Web APIs
browser vendors decided that web audio contexts should not be allowed to automatically play audio; they should instead be started by a user.
... user control if your website or application contains sound, you should allow the user control over it, otherwise again, it will become annoying.
Window.mozAnimationStartTime - Web APIs
this value should be used instead of, for example, date.now(), because this value will be the same for all animations started in this window during this refresh interval, allowing them to remain in sync with one another.
... this also allows javascript-based animations to remain synchronized with css transitions and smil animations triggered during the same refresh interval.
WindowOrWorkerGlobalScope.fetch() - Web APIs
keepalive the keepalive option can be used to allow the request to outlive the page.
... signal an abortsignal object instance; allows you to communicate with a fetch request and abort it if desired via an abortcontroller.
WindowOrWorkerGlobalScope.setInterval() - Web APIs
code an optional syntax allows you to include a string instead of a function, which is compiled and executed every delay milliseconds.
...also, es2015 supports arrow functions, with lexical this allowing us to write setinterval( () => this.mymethod) if we're inside myarray method.
WindowOrWorkerGlobalScope.setTimeout() - Web APIs
code an alternative syntax that allows you to include a string instead of a function, which is compiled and executed when the timer expires.
... // prints "one" after 2.5 seconds arrow functions are a possible alternative, too: settimeout(() => {myarray.mymethod()}, 2.0*1000); // prints "zero,one,two" after 2 seconds settimeout(() => {myarray.mymethod('1')}, 2.5*1000); // prints "one" after 2.5 seconds another possible way to solve the "this" problem is to replace the host settimeout() and setinterval() global functions with ones that allow passing a this object and set it in the callback using function.prototype.call, e.g.: // enable setting 'this' in javascript timers var __nativest__ = window.settimeout, __nativesi__ = window.setinterval; window.settimeout = function (vcallback, ndelay /*, argumenttopass1, argumenttopass2, etc.
XMLHttpRequest.setRequestHeader() - Web APIs
note: for your custom fields, you may encounter a "not allowed by access-control-allow-headers in preflight response" exception when you send requests across domains.
... in this situation, you need to set up the access-control-allow-headers in your response header at server side.
XPathEvaluator - Web APIs
the xpathevaluator interface allows to compile and evaluate xpath expressions.
... xpathevaluator.creatensresolver() adapts any dom node to resolve namespaces allowing the xpath expression to be evaluated relative to the context of the node where it appeared within the document.
XREnvironmentBlendMode - Web APIs
values opaque the rendered image is drawn without allowing any pass-through imagery.
... additive primarily used by ar devices with transparent lenses which directly allow reality to pass through to the user's eyes, the additive blending mode is designed to be used in a situation in which the device has no control over the background and its brightness, since that isn't being digitally controlled.
XRSession.environmentBlendMode - Web APIs
permitted values are: opaque the rendered image is drawn without allowing any pass-through imagery.
... additive primarily used by ar devices with transparent lenses which directly allow reality to pass through to the user's eyes, the additive blending mode is designed to be used in a situation in which the device has no control over the background and its brightness, since that isn't being digitally controlled.
XRSession: selectend event - Web APIs
this snippet is the core of an event handler to allow the user to grab objects in the scene and move them around.
... in this case, a single function is used to handle all three events, allowing them to share certain code that's the same regardless of which of the three events is received.
XRSession: selectstart event - Web APIs
this snippet is the core of an event handler to allow the user to grab objects in the scene and move them around.
... in this case, a single function is used to handle all three events, allowing them to share certain code that's the same regardless of which of the three events is received.
XRSession: squeezeend event - Web APIs
this snippet is the core of an event handler to allow the user to grab objects in the scene and move them around.
... in this case, a single function is used to handle all three events, allowing them to share certain code that's the same regardless of which of the three events is received.
XRSession: squeezestart event - Web APIs
this snippet is the core of an event handler to allow the user to grab objects in the scene and move them around.
... in this case, a single function is used to handle all three events, allowing them to share certain code that's the same regardless of which of the three events is received.
XRView.eye - Web APIs
WebAPIXRVieweye
usage notes the primary purpose of this property is to allow the correct area of any pre-rendered stereo content to be presented to the correct eye.
... let viewport = gllayer.getviewport(view); gl.viewport(viewport.x, viewport.y, viewport.width, viewport.height); renderscene(gl, view); } } for each of the views, the value of eye is checked and if it's either left or right, we check to see if the body.lefteye.injured or body.righteye.injured property is true; if so, we call a function updateinjury() on that eye to do things such as allow a bit of healing to occur, track the progress of a poison effect, or the like, as appropriate for the game's needs.
Using the alert role - Accessibility
this allows the developer to reiterate information that has become more relevant or urgent to the user.
... if an alert also provides interactive controls (such as form controls that allow the user to rectify a problem, or an "ok" button that discards the alert) the alertdialog role should be used instead.
Using the slider role - Accessibility
the slider role is used for markup that allows a user to select a value from within a given range.
... <label for="fader">volume</label> <input type="range" id="fader" min="1" max="100" value="50" step="1" aria-valuemin="1" aria-valuemax="100" aria-valuenow="50" oninput="outputupdate(value)"> <output for="fader" id="volume">50</output> the following code snippet allows you to return the output as it is updated by user input: function outputupdate(vol) { document.queryselector('#volume').value = vol; } example 2: text values sometimes, a slider is used to choose a value that is not, semantically, a number.
ARIA: Complementary role - Accessibility
this label will allow an assistive technology user to be able to quickly understand the purpose of each landmark.
... added benefits certain technologies such as browser extensions can generate lists of all landmark roles present on a page, allowing non-screen reader users to also quickly identify and navigate to large sections of the document.
ARIA: contentinfo role - Accessibility
this label will allow assitive technology users to quickly understand the purpose of each landmark.
... added benefits certain technologies such as browser extensions can generate lists of all landmark roles present on a page, allowing non-screen reader users to also quickly identify and navigate to large sections of the document.
ARIA: form role - Accessibility
this name will allow an assitive technology user to be able to quickly understand the purpose of the form landmark.
... added benefits certain technologies such as browser extensions can generate lists of all landmark roles present on a page, allowing non-screen reader users to also quickly identify and navigate to large sections of the document.
ARIA: gridcell role - Accessibility
aria-colindex is being used to describe the rows' position and allows a person using assistive technology to infer that certain rows have been removed: <div role="grid" aria-colcount="6"> <div role="rowgroup"> <div role="row"> <div role="columnheader" aria-colindex="1">first name</div> <div role="columnheader" aria-colindex="2">last name</div> <div role="columnheader" aria-colindex="5">city</div> <div role="columnheader" aria-colinde...
... by referencing the parent elements with roles of rowheader or columnheader applied to them via aria-describedby, it allows assistive technology to understand the position and relationship of the gridcell element to the rest of the table-style grouping of content.
ARIA: Navigation Role - Accessibility
this label will allow an assitive technology user to be able to quickly understand the purpose of each landmark.
... added benefits certain technologies such as browser extensions can generate lists of all landmark roles present on a page, allowing non-screen reader users to also quickly identify and navigate to large sections of the document.
ARIA: search role - Accessibility
this label will allow an assitive technology user to be able to quickly understand the purpose of each landmark.
... added benefits certain technologies such as browser extensions can generate lists of all landmark roles present on a page, allowing non-screen reader users to also quickly identify and navigate to large sections of the document.
ARIA: table role - Accessibility
if a table maintains a selection state, has two-dimensional navigation, or allows the user to rearrange cell order use grid or treegrid instead.
...if the interaction provides for the selection state of individual cells, if left to right and top to bottom navigation is provided, or if the user interface allows the rearranging of cell order or otherwise changing individual cell order such as through drag and drop, use grid or treegrid instead.
Alerts - Accessibility
this notifies the user of the error, but allows for them continue modifying the form without losing focus (caused by the “onblur” handler in javascript's default ‘alert’ function).
...because this is not allowed by the windows api specs, and possibly others.
Architecture - Accessibility
this allows at's to find its position within that text, because the hyperlink interface exposes a start and end index.
...to get around this problem, mozilla allows the magic value of -2 to be passed into accessibletext/accessiblehypertext methods that take a character offset.
Web accessibility for seizures and physical reactions - Accessibility
light-level from w3c's draft document, media queries level 5 section on light-level: "the light-level media feature is used to query about the ambient light-level in which the device is used, to allow the author to adjust style of the document in response." this will be a godsend to those who have motor-skills problems, or for some with cognitive difficulties, who cannot find the right "button" to change their screen settings.
...the literal property is intended to identify text or images as non-literal and allows the author to explain non-literal text and images to users.
Text labels and names - Accessibility
there are many situations in which a control, dialog, or other website feature should be given a descriptive name or label to allow users of assistive technologies to understand what its purpose is and to be able to understand and operate it correctly.
... 2.4.9 link purpose (link only) (aaa) a mechanism is available to allow the purpose of each link to be identified from link text alone, except where the purpose of the link would be ambiguous to users in general.
-webkit-mask-repeat-x - CSS: Cascading Style Sheets
round as the allowed space increases in size, the repeated images will stretch (leaving no gaps) until there is room for another one to be added.
... when the next image is added, all of the current ones compress to allow room.
-webkit-mask-repeat-y - CSS: Cascading Style Sheets
round as the allowed vertical space increases in size, the repeated images will stretch (leaving no gaps) until there is room for another one to be added.
... when the next image is added, all of the current ones compress to allow room.
:host-context() - CSS: Cascading Style Sheets
in other words, this allows a custom element, or anything within that custom element's shadow dom, to apply different styles based on its position within the outer dom or classes/attributes applied to ancestor elements.
... another typical use would be to allow inner elements to react to classes or attributes on any anscestor elements - for example, applying a different text color when a .dark-theme class is applied to <body>.
font-weight - CSS: Cascading Style Sheets
the font-weight css descriptor allows authors to specify font weights for the fonts specified in the @font-face rule.
...fied formal syntax <font-weight-absolute>{1,2}where <font-weight-absolute> = normal | bold | <number <a href="/docs/css/value_definition_syntax#brackets" title="brackets: enclose several entities, combinators, and multipliers to transform them as a single component">[1,1000]> examples setting normal font weight in a @font-face rule the following finds a local open sans font or import it, and allows using the font for normal font weights.
CSS Containment - CSS: Cascading Style Sheets
the aim of the css containment specification is to improve performance of web pages by allowing developers to isolate a subtree of the page from the rest of the page.
...therefore this property gives you a nice way to explain to the browser this fact, and allow it to make performance optimizations based on that knowledge.
Controlling Ratios of Flex Items Along the Main Axis - CSS: Cascading Style Sheets
try changing the flex-grow factor from 1 to 0 in this live example to see the different behavior: giving items different flex-grow factors our understanding of how flex-grow works with flex-basis allows us to have further control over our individual item sizes by assigning items different flex-grow factors.
...with flex-shrink set to 0 the items are not allowed to shrink and so they overflow the box.
Mastering Wrapping of Flex Items - CSS: Cascading Style Sheets
single-dimensional layout explained as we have seen from the above examples if our items are allowed to grow and shrink, when there are fewer items in the last row or column then those items grow to fill the available space.
...if there is only one item, and that item is allowed to grow, it will fill the axis just as if you had a single item flex container.
Ordering Flex Items - CSS: Cascading Style Sheets
this allows authors to manipulate the visual presentation while leaving the source order intact for non-css uas and for linear models such as speech and sequential navigation.” - ordering and orientation if your items were links or some other element that the user could tab to, then the tabbing order would be the order that these items appear in the document source — not your visual order.
...used carefully the order property can allow for some useful common patterns to be easily implemented.
Flow Layout and Overflow - CSS: Cascading Style Sheets
this will act like overflow: hidden however it does not allow for programmatic scrolling, the box becomes non-scrollable.
...the specification would allow a string of content or a regular ellipsis to be inserted.
OpenType font features guide - CSS: Cascading Style Sheets
lining and oldstyle figures fractions, ordinals, and slashed zero east asian (font-variant-east-asian) this allows access to various alternate forms of glyphs within a font.
...(meaning that if kerning is on by default, it will still be on even with a value of none being supplied here.) font feature settings font-feature-settings is the 'low level syntax' that allows explicit access to every named available opentype feature.
CSS Motion Path - CSS: Cascading Style Sheets
motion path is a css module that allows authors to animate any graphical object along a custom path.
...at your disposal, which wasn't ideal and only allowed for simple movements.
Using CSS transitions - CSS: Cascading Style Sheets
this allows the creation of complex transitions.
...you can specify a single duration that applies to all properties during the transition, or multiple values to allow each property to transition over a different period of time.
CSS Layout cookbook - CSS: Cascading Style Sheets
flexbox, margin breadcrumb navigation creating a list of links to allow the visitor to navigate back up through the page hierarchy.
... grid layout grid wrapper for aligning grid content within a central wrapper, while also allowing items to break out.
Linear-gradient Generator - CSS: Cascading Style Sheets
lineargradienttool.init(); }); window.addeventlistener("load", function() { lineargradienttool.init(); }); var lineargradienttool = (function lineargradienttool() { 'use strict'; var radian = 180 / math.pi; var inv_radian = math.pi / 180; var units = {'%': 1, 'px' : 0}; /*========== dom methods ==========*/ function getelembyid(id) { return document.getelementbyid(id); } function allowdropevent(e) { e.preventdefault(); } function createclasselement(tag, classname, parent) { var elem = document.createelement(tag); elem.classname = classname; if (parent) parent.appendchild(elem); return elem; }; function trackmouse(elem, callback, startfunc, endfunc) { startfunc = startfunc || function(e) {}; endfunc = endfunc || function(e) {}; elem.addeventlistener('mouse...
...xis.style.left = (lg_axes.length - 1) * 60 + 'px'; axis.addeventlistener('click', function() { activateaxisshortcut(axis); var axisid = this.getattribute('axisid') | 0; activateaxis(axisid); }); axis.addeventlistener('dragstart', function (e) { dragelem = this; e.datatransfer.setdata('axisid', this.getattribute('axisid')); }); axis.addeventlistener('dragover', allowdropevent); axis.addeventlistener('drop', function swap(e) { if (dragelem === this) return; var from = getorderid(e.datatransfer.getdata('axisid')); var to = getorderid(this.getattribute('axisid')); var swap = lg_axes[from]; lg_axes[from] = lg_axes[to]; lg_axes[to] = swap; var left = dragelem.offsetleft; dragelem.style.left = this.offsetleft + 'px'; t...
<angle-percentage> - CSS: Cascading Style Sheets
syntax refer to the documentation for <angle> and <percentage> for details of the individual syntaxes allowed by this type.
... use in calc() where an <angle-percentage> is specified as an allowable type, this means that the percentage resolves to an angle and therefore can be used in a calc() expression.
background-size - CSS: Cascading Style Sheets
negative values are not allowed.
...negative values are not allowed.
box-lines - CSS: Cascading Style Sheets
WebCSSbox-lines
if a value of multiple is specified, however, then the box is allowed to expand to multiple lines (that is, multiple rows or columns) in order to accommodate all of its children.
... formal definition initial valuesingleapplies tobox elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax single | multiple examples simple usage example in the original version of the spec, box-lines allowed you to specify that you wanted your flex container's children to wrap onto multiple lines.
box-shadow - CSS: Cascading Style Sheets
box-shadow generator is an interactive tool allowing you to generate a box-shadow.
...negative values are not allowed.
box-sizing - CSS: Cascading Style Sheets
this means that when you set width and height, you have to adjust the value you give to allow for any border or padding that may be added.
... on the other hand, when using position: relative or position: absolute, use of box-sizing: content-box allows the positioning values to be relative to the content, and independent of changes to border and padding sizes, which is sometimes desirable.
calc() - CSS: Cascading Style Sheets
WebCSScalc
it can be used anywhere a <length>, <frequency>, <angle>, <time>, <percentage>, <number>, or <integer> is allowed.
... the * and / operators do not require whitespace, but adding it for consistency is both allowed and recommended.
contain - CSS: Cascading Style Sheets
WebCSScontain
the contain css property allows an author to indicate that an element and its contents are, as much as possible, independent of the rest of the document tree.
... this allows the browser to recalculate layout, style, paint, size, or any combination of them for a limited area of the dom and not the entire page, leading to obvious performance benefits.
cross-fade() - CSS: Cascading Style Sheets
the two following are lines (almost) identical: cross-fade( url(red.png), url(yellow.png), url(blue.png)); /* all three will be 33.3333% opaque */ cross-fade( url(red.png) 33.33%, url(yellow.png) 33.33%, url(blue.png) 33.33%); older, implemented syntax cross-fade( <image, <image>, <percentage> ) the specification for the cross-fade() function allows for multiple images and for each image to have transparency values independent of the other values.
...the original syntax, which has been implemented in some browsers, only allowed for two images, with the sum of the transparency of those two images being exactly 100%.
display - CSS: Cascading Style Sheets
WebCSSdisplay
the <display-legacy> methods allow the same results with single keyword values, and should be favoured by developers until the two keyword values are better supported.
...below that, we have a select menu that allows you to apply different display values to the containers, allowing you to compare and contrast how the different values affect the element's layout, and that of their children.
drop-shadow() - CSS: Cascading Style Sheets
syntax drop-shadow(offset-x offset-y blur-radius color) the drop-shadow() function accepts a parameter of type <shadow> (defined in the box-shadow property), with the exception that the inset keyword and spread parameters are not allowed.
...negative values are not allowed.
<filter-function> - CSS: Cascading Style Sheets
examples filter function comparison this example provides a simple graphic, along with a select menu to allow you to choose between the different types of filter function, and a slider to allow you to vary the values used inside the filter function.
... updating the controls updates the filter effect in real time, allowing you to investigate the effects of different filters.
font-variation-settings - CSS: Cascading Style Sheets
weight (wght) the following live example's css can be edited to allow you to play with font weight values.
... slant (slnt) the following live example's css can be edited to allow you to play with font slant/oblique values.
<frequency> - CSS: Cascading Style Sheets
WebCSSfrequency
7 hz no space is allowed between the number and the unit.
... 0 although unitless zero is an allowable <length>, it's an invalid <frequency>.
<length-percentage> - CSS: Cascading Style Sheets
syntax refer to the documentation for <length> and <percentage> for details of the individual syntaxes allowed by this type.
...{ /* length-percentage examples */ width: 75%; height: 200px; margin: 3rem; padding: 1%; border-radius: 10px 10%; font-size: 250%; line-height: 1.5em; /* length examples */ text-shadow: 1px 1px 1px red; border: 5px solid red; letter-spacing: 3px; /* percentage example */ text-size-adjust: 20%; } result use in calc() where a <length-percentage> is specified as an allowable type, this means that the percentage resolves to a length and therefore can be used in a calc() expression.
<length> - CSS: Cascading Style Sheets
WebCSSlength
note: some properties allow negative <length>s, while others do not.
... this allows you to compare and contrast the effect of different length units.
mask-repeat - CSS: Cascading Style Sheets
round as the allowed space increases in size, the repeated images will stretch (leaving no gaps) until there is room for another one to be added.
... when the next image is added, all of the current ones compress to allow room.
mask-size - CSS: Cascading Style Sheets
WebCSSmask-size
negative lengths are not allowed.
...negative percentages are not allowed.
<number> - CSS: Cascading Style Sheets
WebCSSnumber
+-12.2 only one leading +/- is allowed.
... 12.1.1 only one decimal point is allowed.
overflow - CSS: Cascading Style Sheets
WebCSSoverflow
no scrollbars are provided, and no support for allowing the user to scroll (such as by dragging or using a scroll wheel) is allowed.
... working draft changed syntax to allow one or two keywords instead of only one css level 2 (revision 1)the definition of 'overflow' in that specification.
<position> - CSS: Cascading Style Sheets
this is not allowed in other properties that use <position>.
... recommendation allows combination of a keyword with a <length> or <percentage> value.
<string> - CSS: Cascading Style Sheets
WebCSSstring
recommendation explicit definition; allows 6-digit unicode escaped characters.
... recommendation implicit definition; allows 4-digit unicode escaped characters.
<time> - CSS: Cascading Style Sheets
WebCSStime
+0s zero with a leading + and a unit -0ms zero with a leading - and a unit invalid times 0 although unitless zero is allowed for <length>s, it's invalid for <time>s.
...7 ms no space is allowed between the number and the unit.
<transform-function> - CSS: Cascading Style Sheets
examples transform function comparison the following example provides a 3d cube created from dom elements and transforms, and a select menu allowing you to choose different transform functions to transform the cube with, so you can compare the effects of the different types.
...the cube's starting state is slightly rotated using transform3d(), to allow you to see the effect of all the transforms.
unicode-bidi - CSS: Cascading Style Sheets
the unicode-bidi property overrides this algorithm and allows the developer to control the text embedding.
... this value allows the display of data that is already formatted using a tool following the unicode bidirectional algorithm.
Video player styling basics - Developer guides
this "data-state" idea is also used for setting the current state of buttons within the video control set, which allows specific state styling.
...on is then called by the relevant event handlers: video.addeventlistener('play', function() { changebuttonstate('playpause'); }, false); video.addeventlistener('pause', function() { changebuttonstate('playpause'); }, false); stop.addeventlistener('click', function(e) { video.pause(); video.currenttime = 0; progress.value = 0; // update the play/pause button's 'data-state' which allows the correct button image to be set via css changebuttonstate('playpause'); }); mute.addeventlistener('click', function(e) { video.muted = !video.muted; changebuttonstate('mute'); }); you might have noticed that there are new handlers where the play and pause events are reacted to on the video.
Creating and triggering events - Developer guides
for example, the event could be created as follows: const event = new customevent('build', { detail: elem.dataset.time }); this will then allow you to access the additional data in the event listener: function eventhandler(e) { console.log('the time is: ' + e.detail); } the old-fashioned way the older approach to creating events uses apis inspired by java.
...elem.dispatchevent(event); event bubbling it is often desirable to trigger an event from a child element, and have an ancestor catch it; optionally, with data: <form> <textarea></textarea> </form> const form = document.queryselector('form'); const textarea = document.queryselector('textarea'); // create a new event, allow bubbling, and provide any data you want to pass to the "detail" property const eventawesome = new customevent('awesome', { bubbles: true, detail: { text: () => textarea.value } }); // the form element listens for the custom "awesome" event and then consoles the output of the passed text() method form.addeventlistener('awesome', e => console.log(e.detail.text())); // as the user types, the t...
DOM onevent handlers - Developer guides
in order to allow multiple handlers to be installed for the same event on a given object, you can call its addeventlistener() method, which manages a list of handlers for the given event on the object.
... when an event occurs that applies to an element, each of its event handlers is called to allow them to handle the event, one after another.
Touch events (Mozilla experimental) - Developer guides
this api allowed you to track the movement of the user's finger on a touch screen, monitoring the raw touch events generated by the system.
... although touch events were based on — and work similarly to — mouse events, each event included an identifier that allowed you to track multiple fingers moving on the screen at the same time.
Index - Developer guides
WebGuideIndex
14 web audio playbackrate explained apps, audio, media, video, playbackrate the playbackrate property of the <audio> and <video> elements allows us to change the speed, or rate, at which a piece of web audio or video is playing 15 writing web audio api code that works in every browser api you probably have already read the announcement on the web audio api coming to firefox, and are totally excited and ready to make your until-now-webkit-only sites work with firefox, which uses the unprefixed version of the spec.
...it adds metadata and private-use data structures, including predefined fields allowing foundries and vendors to provide license information if desired.
A hybrid approach - Developer guides
this keeps the complexity of altering content on the server side, but still allows our layouts to benefit from the flexibility and future-readiness of responsive design.
... using user-agent detection specifically for content and not layout also allows you to have a single url for each piece of content, so that the content can adapt its layout to the user’s browser.
HTML attribute: max - HTML: Hypertext Markup Language
WebHTMLAttributesmax
if the max attribute is valid and a non-empty value is greater than the maximum allowed by the max attribute, constraint validation will prevent form submission.
... if the value exceeds the max value allowed, the validitystate.rangeoverflow will be true, and the the control will be matched by the :out-of-range and :invalid pseudo-classes.
HTML attribute: multiple - HTML: Hypertext Markup Language
the user can choose multiple files from the file picker in any way that their chosen platform allows (e.g.
...when using the multiple attribute, inform the user that multiple values are allowed and provide directions on how to provide multiple values, such as "separate email addresses with a comma." setting size="1" on a multiple select can make it appear as a single select in some browsers, but then it doesn't expand on focus, harming usability.
DASH Adaptive Streaming for HTML 5 Video - HTML: Hypertext Markup Language
this means that it allows for a video stream to switch between bit rates on the basis of network performance, in order to keep a video playing.
... it will be replaced by an implementation of the media source extensions api which will allow support for dash via javascript libraries such as dash.js.
<embed>: The Embed External Content element - HTML: Hypertext Markup Language
WebHTMLElementembed
this must be an absolute value; percentages are not allowed.
...this must be an absolute value; percentages are not allowed.
<input type="image"> - HTML: Hypertext Markup Language
WebHTMLElementinputimage
multipart/form-data uses the formdata api to manage the data, allowing for files to be submitted to the server.
...this allows you to specify a frame for the image using the width and height attributes to set aside space in the layout, then adjust where within that space the image is located and how (or if) it is scaled to occupy that space.
<input type="radio"> - HTML: Hypertext Markup Language
WebHTMLElementinputradio
where multiple controls exist, radio buttons allow one to be selected out of them all, whereas checkboxes allow multiple values to be selected.
... it's fairly uncommon to actually want to allow the form to be submitted without any of the radio buttons in a group selected, so it is usually wise to have one default to the checked state.
<input type="range"> - HTML: Hypertext Markup Language
WebHTMLElementinputrange
a string value of any means that no stepping is implied, and any value is allowed (barring other constraints, such as min and max).
... the default stepping value for range inputs is 1, allowing only integers to be entered, unless the stepping base is not an integer; for example, if you set min to -10 and value to 1.5, then a step of 1 will allow only values such as 1.5, 2.5, 3.5,...
<input type="text"> - HTML: Hypertext Markup Language
WebHTMLElementinputtext
it's far too easy for someone to make adjustments to the html that allow them to bypass the validation, or to remove it entirely.
... making input required you can use the required attribute as an easy way of making entering a value required before form submission is allowed: <form> <div> <label for="uname">choose a username: </label> <input type="text" id="uname" name="name" required> <span class="validity"></span> </div> <div> <button>submit</button> </div> </form> div { margin-bottom: 10px; position: relative; } input + span { padding-right: 30px; } input:invalid+span:after { position: absolute; content: '✖'; padding-left: 5px; } inp...
<meta>: The Document-level Metadata element - HTML: Hypertext Markup Language
WebHTMLElementmeta
the attribute is named http-equiv(alent) because all the allowed values are names of particular http headers: content-security-policy allows page authors to define a content policy for the current page.
... content policies mostly specify allowed server origins and script endpoints which help guard against cross-site scripting attacks.
<noframes>: The Frame Fallback element - HTML: Hypertext Markup Language
WebHTMLElementnoframes
a <noframes> element can contain any html elements that are allowed within the body of an html document, with the exception of the <frameset> and <frame> elements, since using frames when they aren't supported doesn't make sense.
... <frameset cols="50%,50%"> <frame src="https://developer.mozilla.org/en/html/element/frameset" /> <frame src="https://developer.mozilla.org/en/html/element/frame" /> <noframes><p>it seems your browser does not support frames or is configured to not allow them.</p></noframes> </frameset> specifications specification status comment html5the definition of 'noframes' in that specification.
<tr>: The Table Row element - HTML: Hypertext Markup Language
WebHTMLElementtr
not even the table section elements are used; instead, the browser is allowed to determine this automatically.
... technical summary content categories none permitted content zero or more <td> and/or <th> elements; script-supporting elements (<script> and <template>) are also allowed tag omission start tag is mandatory.
contenteditable - HTML: Hypertext Markup Language
if so, the browser modifies its widget to allow editing.
... note that although its allowed values include true and false, this attribute is an enumerated one and not a boolean one.
id - HTML: Hypertext Markup Language
in contrast to the class attribute, which allows space-separated values, elements can only have one single id value.
... note: using characters except ascii letters, digits, '_', '-' and '.' may cause compatibility problems, as they weren't allowed in html 4.
itemprop - HTML: Hypertext Markup Language
note: the rules above disallow ":" characters in non-url values because otherwise they could not be distinguished from urls.
...space characters are disallowed because otherwise the values would be parsed as multiple tokens.
Preloading content with rel="preload" - HTML: Hypertext Markup Language
using as to specify the type of content to be preloaded allows the browser to: prioritize resource loading more accurately.
...these can accept media types or full-blown media queries, allowing you to do responsive preloading!
Choosing between www and non-www URLs - HTTP
but even so, you can still have the other domain working: http allows two techniques so that it is clear for your users, or search engines, which domain is the canonical one, while still allowing the non-canonical domain to work and provide the expected pages.
...there are two techniques below to allow the non-canonical domain to work still.
Configuring servers for Ogg media - HTTP
html <audio> and <video> elements allow media presentation without the need for the user to install any plug-ins or other software to do so.
... another probelm with allowing http compression for media streaming: apache servers don't send the content-length response header if gzip encoding is used.
CSP: block-all-mixed-content - HTTP
syntax content-security-policy: block-all-mixed-content; examples content-security-policy: block-all-mixed-content; <meta http-equiv="content-security-policy" content="block-all-mixed-content"> to disallow http assets on a more granular level, you can also set individual directives to https:.
... for example, to disallow nonsecure http images: content-security-policy: img-src https: specifications specification status comment mixed contentthe definition of 'block-all-mixed-content' in that specification.
Expect-CT - HTTP
ct requirements can be satisfied via any one of the following mechanisms: x.509v3 certificate extension to allow embedding of signed certificate timestamps issued by individual logs a tls extension of type signed_certificate_timestamp sent during the handshake supporting ocsp stapling (that is, the status_request tls extension) and providing a signedcertificatetimestamplist when a site enables the expect-ct header, they are requesting that the browser check that any certificate for that site appears in public ct logs.
...certificates before march 2018 were allowed to have a lifetime of 39 months, those will all be expired in june 2021.
Large-Allocation - HTTP
these windows must remain in the same process as their opener, as they can communicate, meaning that we cannot allow them to switch processes.
...this is for the same reason as above, namely that they can communicate and thus we cannot allow them to switch processes.
Public-Key-Pins-Report-Only - HTTP
the http public-key-pins-report-only response header was used to send reports of pinning violation to the report-uri specified in the header but, unlike public-key-pins still allows browsers to connect to the server if the pinning is violated.
...some browsers might allow other hashing algorithms than sha-256 in the future.
Server-Timing - HTTP
header type response header forbidden header name no syntax the syntax of the server-timing header allows you to communicate metrics in different ways: server metric name only, metric with value, metric with value and description, and metric with description.
...this interface is restricted to the same origin, but you can use the timing-allow-origin header to specify the domains that are allowed to access the server metrics.
Set-Cookie - HTTP
it does help satisfying the requirements about which characters are allowed for <cookie-value> though.
... multiple host/domain values are not allowed, but if a domain is specified, then subdomains are always included.
X-Frame-Options - HTTP
the x-frame-options http response header can be used to indicate whether or not a browser should be allowed to render a page in a <frame>, <iframe>, <embed> or <object>.
... allow-from uri this is an obsolete directive that no longer works in modern browsers.
HTTP Messages - HTTP
WebHTTPMessages
data and header frames are separated, this allows header compression.
... several streams can be combined together, a process called multiplexing, allowing more efficient underlying tcp connections.
POST - HTTP
WebHTTPMethodsPOST
as described in the http 1.1 specification, post is designed to allow a uniform method to cover the following functions: annotation of existing resources posting a message to a bulletin board, newsgroup, mailing list, or similar group of articles; adding a new user through a signup modal; providing a block of data, such as the result of submitting a form, to a data-handling process; extending a database through an append operation.
... request has body yes successful response has body yes safe no idempotent no cacheable only if freshness information is included allowed in html forms yes syntax post /test example a simple form using the default application/x-www-form-urlencoded content type: post /test http/1.1 host: foo.example content-type: application/x-www-form-urlencoded content-length: 27 field1=value1&field2=value2 a form using the multipart/form-data content type: post /test http/1.1 host: foo.example content-type: multipart/form-data;boundary="boundary" --boundary content-disposition: form-data; name="field1" value1 --boundary content-disposition: form-data; name="field2"; filename="example.txt" value2 --boundary-- specifica...
Protocol upgrade mechanism - HTTP
note also that http/2 explicitly disallows the use of this mechanism; it is specific to http/1.1.
...this means that a typical request that includes upgrade would look something like: get /index.html http/1.1 host: www.example.com connection: upgrade upgrade: example/1, foo/2 other headers may be required depending on the requested protocol; for example, websocket upgrades allow additional headers to configure details about the websocket connection as well as to offer a degree of security in opening the connection.
A typical HTTP session - HTTP
WebHTTPSession
note: the client-server model does not allow the server to send data to the client without an explicit request for it.
...as there is no content-length provided in an http header, this data block is presented empty, marking the end of the headers, allowing the server to process the request the moment it receives this empty line.
HTTP
WebHTTP
cors allows web developers to control how their site reacts to cross-site requests.
... csp directives the content-security-policy response header fields allows web site administrators to control resources the user agent is allowed to load for a given page.
CSS Houdini
the css typed om exposes css values as typed javascript objects to allow their performant manipulation.
... css painting api developed to improve the extensibility of css — allows developers to write javascript functions that can draw directly into an element's background, border, or content via the paint() css function.
Closures - JavaScript
this has obvious parallels to object-oriented programming, where objects allow you to associate data (the object's properties) with one or more methods.
... emulating private methods with closures languages such as java allow you to declare methods as private, meaning that they can be called only by other methods in the same class.
Control flow and error handling - JavaScript
' + `${document.form1.threechar.value} is not valid.`); return false; } } switch statement a switch statement allows a program to evaluate an expression and attempt to match the expression's value to a case label.
...(server-side javascript allows you to access files.) if an exception is thrown while the file is open, the finally block closes the file before the script fails.
Loops and iteration - JavaScript
this expression usually initializes one or more loop counters, but the syntax allows an expression of any degree of complexity.
... example in the example below, the function contains a for statement that counts the number of selected options in a scrolling list (a <select> element that allows multiple selections).
Meta programming - JavaScript
« previousnext » starting with ecmascript 2015, javascript gains support for the proxy and reflect objects allowing you to intercept and define custom behavior for fundamental language operations (e.g.
... proxies introduced in ecmascript 6, proxy objects allow you to intercept certain operations and to implement custom behaviors.
Unicode property escapes - JavaScript
unicode property escapes regular expressions allows for matching characters based on their unicode properties.
...the script and script_extensions unicode properties allow regular expression to match characters according to the script they are mainly used with (script) or according to the set of scripts they belong to (script_extensions).
Regular expressions - JavaScript
advanced searching with flags regular expressions have six optional flags that allow for functionality like global and case insensitive searching.
... regexp.prototype.multiline s allows .
JavaScript technologies overview - JavaScript
webworkers allows parallel computation.
... websockets allows low-level bidirectional communication.
SyntaxError: invalid regular expression flag "x" - JavaScript
s allow .
... let obj = { url: '/docs/web' }; valid regular expression flags see the table above for the six valid regular expression flags that are allowed in javascript.
TypeError: can't access dead object - JavaScript
the javascript exception "can't access dead object" occurs when firefox disallows add-ons to keep strong references to dom objects after their parent document has been destroyed to improve in memory usage and to prevent memory leaks.
... to improve in memory usage and to prevent memory leaks, firefox disallows add-ons to keep strong references to dom objects after their parent document has been destroyed.
SyntaxError: applying the 'delete' operator to an unqualified name is deprecated - JavaScript
message syntaxerror: calling delete on expression not allowed in strict mode (edge) syntaxerror: applying the 'delete' operator to an unqualified name is deprecated (firefox) syntaxerror: delete of an unqualified identifier in strict mode.
...in strict mode, an attempt to delete a variable will throw an error and is not allowed.
SyntaxError: for-in loop head declarations may not have initializers - JavaScript
this is not allowed in for-of loops in strict mode.
...the for loop allows you to set an initializer then as well: var arr = [ "a", "b", "c" ] for (var i = 2; i < arr.length; i++) { console.log(arr[i]); } // "c" ...
SyntaxError: missing name after . operator - JavaScript
these will allow you to compute an expression.
...square brackets allow computed property access.
RangeError: precision is out of range - JavaScript
there was an out of range precision argument in one of these methods: number.prototype.toexponential() number.prototype.tofixed() number.prototype.toprecision() the allowed range for these methods is usually between 0 and 20 (or 21).
... however, the ecmascript specification allows to extend this range.
arguments.callee - JavaScript
(adapted from a stack overflow answer by olliej) early versions of javascript did not allow named function expressions, and for this reason you could not make a recursive function expression.
...ise be necessary.) the other major issue is that the recursive call will get a different this value, e.g.: var global = this; var sillyfunction = function(recursed) { if (!recursed) { return arguments.callee(true); } if (this !== global) { alert('this is: ' + this); } else { alert('this is the global'); } } sillyfunction(); ecmascript 3 resolved these issues by allowing named function expressions.
Functions - JavaScript
function parameters default parameters default function parameters allow formal parameters to be initialized with default values if no value or undefined is passed.
... rest parameters the rest parameter syntax allows representing an indefinite number of arguments as an array.
Array.prototype.concat() - JavaScript
if all valuen parameters are omitted, concat returns a shallow copy of the existing array on which it is called.
... the concat method does not alter this or any of the arrays provided as arguments but instead returns a shallow copy that contains copies of the same elements combined from the original arrays.
Array.prototype.slice() - JavaScript
the slice() method returns a shallow copy of a portion of an array into a new array object selected from start to end (end not included) where start and end represent the index of items in that array.
...it returns a shallow copy of elements from the original array.
Atomics - JavaScript
if waiting is not allowed in the calling agent then it throws an error exception.
... (most browsers will not allow wait() on the browser's main thread.) atomics.xor() computes a bitwise xor on the value at the specified index of the array with the provided value.
Intl.RelativeTimeFormat() constructor - JavaScript
the "auto" value allows to not always have to use numeric values in the output.
...this allows to not always have to use numeric values in the output.
Intl - JavaScript
bcp 47 also allows for extensions, each consisting of a single digit or letter (other than "x") and one or more two- to eight-letter or digit tags, all separated by hyphens.
... this extension allows applications to encode information for their own private use, that will be ignored by all intl operations.
JSON.stringify() - JavaScript
replacer optional a function that alters the behavior of the stringification process, or an array of string and number that serve as an allowlist for selecting/filtering the properties of the value object to be included in the json string.
...az":"quux"}' var b = json.stringify({ baz: "quux", foo: "bar" }) //'{"baz":"quux","foo":"bar"}' console.log(a !== b) // true // some memoization functions use json.stringify to serialize arguments, // which may cause a cache miss when encountering the same object like above example of using json.stringify() with localstorage in a case where you want to store an object created by your user and allowing it to be restored even after the browser has been closed, the following example is a model for the applicability of json.stringify(): // creating an example of json var session = { 'screens': [], 'state': true }; session.screens.push({ 'name': 'screena', 'width': 450, 'height': 250 }); session.screens.push({ 'name': 'screenb', 'width': 650, 'height': 350 }); session.screens.push({ 'name':...
Math.imul() - JavaScript
description math.imul() allows for 32-bit integer multiplication with c-like semantics.
...asmjs allows for jist-optimizers to more easily implement internal integers in javascript.
Object.defineProperty() - JavaScript
description this method allows a precise addition to or modification of a property on an object.
...this method allows these extra details to be changed from their defaults.
Object.freeze() - JavaScript
the following example shows that a frozen object is not constant (freeze is shallow).
... what is "shallow freeze"?
Object - JavaScript
object.isextensible() determines if extending of an object is allowed.
... object.prototype.__nosuchmethod__ allows a function to be defined that will be executed when an undefined object member is called as a method.
Promise - JavaScript
it allows you to associate handlers with an asynchronous action's eventual success value or failure reason.
...each step is commented and allows you to follow the promise and xhr architecture closely.
Reflect.deleteProperty() - JavaScript
the static reflect.deleteproperty() method allows to delete properties.
... description the reflect.deleteproperty method allows you to delete a property on an object.
RegExp.prototype.dotAll - JavaScript
to allow it to match astral characters, the "u" (unicode) flag should be used.
... using both flags in conjunction allows the dot to match any unicode character, without exceptions.
String.prototype.anchor() - JavaScript
also, the html specification no longer allows the <a> element to have a name attribute, so this method doesn't even create valid markup.
...also, the html specification no longer allows the <a> element to have a name attribute, so this method doesn't even create valid markup.
TypedArray.from() - JavaScript
typedarray.from() has the optional parameter mapfn, which allows you to execute a map() function on each element of the typed array (or subclass object) that is being created.
... polyfill you can partially work around this by inserting the following code at the beginning of your scripts, allowing use of much of the functionality of from() in implementations that do not natively support it.
TypedArray.prototype.slice() - JavaScript
the slice() method returns a shallow copy of a portion of a typed array into a new typed array object.
...it returns a shallow copy of elements from the original typed array.
WebAssembly.Instance - JavaScript
instance objects contain all the exported webassembly functions that allow calling into webassembly code from javascript.
... instance properties instance.prototype.exports returns an object containing as its members all the functions exported from the webassembly module instance, to allow them to be accessed and used by javascript.
encodeURIComponent() - JavaScript
// the following are not required for percent-encoding per rfc5987, // so we can allow for a little better readability over the wire: |`^ replace(/%(?:7c|60|5e)/g, unescape); } // here is an alternative to the above function function encoderfc5987valuechars2(str) { return encodeuricomponent(str).
...// i.e., %27 %28 %29 %2a (note that valid encoding of "*" is %2a // which necessitates calling touppercase() to properly encode) // the following are not required for percent-encoding per rfc5987, // so we can allow for a little better readability over the wire: |`^ replace(/%(7c|60|5e)/g, (str, hex) => string.fromcharcode(parseint(hex, 16))); } specifications specification ecmascript (ecma-262)the definition of 'encodeuricomponent' in that specification.
Iteration protocols - JavaScript
the iterable protocol the iterable protocol allows javascript objects to define or customize their iteration behavior, such as what values are looped over in a for...of construct.
... doing so allows an iterator to be consumed by the various syntaxes expecting iterables.
Spread syntax (...) - JavaScript
spread syntax (...) allows an iterable such as an array expression or string to be expanded in places where zero or more arguments (for function calls) or elements (for array literals) are expected, or an object expression to be expanded in places where zero or more key-value pairs (for object literals) are expected.
... shallow-cloning (excluding prototype) or merging of objects is now possible using a shorter syntax than object.assign().
class expression - JavaScript
class expressions allow you to redefine (re-declare) classes without throwing a syntaxerror.
... 'use strict'; let foo = class {}; // constructor property is optional foo = class {}; // re-declaration is allowed typeof foo; // returns "function" typeof class {}; // returns "function" foo instanceof object; // true foo instanceof function; // true class foo {} // throws syntaxerror (class declarations do not allow re-declaration) examples a simple class expression this is just a simple anonymous class expression which you can refer to using the variable foo.
<mmultiscripts> - MathML
the mathml <mmultiscripts> element allows you to create tensor-like objects.
...prescripts are optional and are separated by the empty tag <mprescripts/> (only one <mprescripts /> element is allowed, otherwise you will get an duplicatemprescripts error in the error console and "invalid-markup" in your rendering).
<mn> - MathML
WebMathMLElementmn
however, it is also allowed to have arbitrary text in it which is actually a numeric quantity, for example "eleven".
...the following values are allowed: normal (default value) ; example bold ; example italic ; example bold-italic ; example double-struck ; example bold-fraktur ; example script ; example bold-script ; example fraktur ; example sans-serif ; example bold-sans-serif ; example sans-serif-italic ; example sans-serif-bold-italic ; example monospace ; example initial ; مثال tailed ; ...
<mstyle> - MathML
WebMathMLElementmstyle
the values before, after and duplicate are allowed.
... scriptminsize specifies a minimum font size allowed due to changes in scriptlevel.
Performance fundamentals - Web Performance
javascript is a dynamically-typed language, and the web platform allows loading code, html, css, images, and other resources dynamically.
...css media queries allow these compromises to be restricted only to devices that need them.
Optimizing startup performance - Web Performance
this allows html parsers to continue processing the document, instead of having to wait until the scripts have been downloaded and executed before continuing.
... emscripten provides an api to help with this refactoring; for example, you can use emscripten_push_main_loop_blocker() to establish a function to be executed before the main thread is allowed to continue.
Web Performance
javascript performance best practices javascript, when used properly, can allow for interactive and immersive web experiences — or it can significantly harm download time, render time, in-app performance, battery life, and user experience.
...c rail real user monitoring resource timing round trip time (rtt) server timing speculative parsing speed index ssl synthetic monitoring tcp handshake tcp slow start time to first byte time to interactive tls transmission control protocol (tcp) tree shaking web performance documents yet to be written javascript performance best practices javascript, when used properly, can allow for interactive and immersive web experiences ...
Installing and uninstalling web apps - Progressive web apps (PWAs)
web application installation is a feature available in modern browsers that allows users to choose to easily and conveniently “install” a web application on their device so they can access it in the same way they would any other installed app.
... the install user experience we've written a very simple example web site (see our demo live, and also see the source code) that doesn't do much, but was developed with the necessary code to allow it to be installed, as well as a service worker to enable it to be used offline.
Introduction to progressive web apps - Progressive web apps (PWAs)
pwas are web apps developed using a number of specific technologies and standard patterns to allow them to take advantage of both web and native app features.
...progressive enhancement and responsive design already allow us to build mobile friendly websites.
How to make PWAs re-engageable using Notifications and Push - Progressive web apps (PWAs)
allowing the user to install the web app on their home screen is even better.
... from the server-side, the whole process has to be encrypted with public and private keys for security reasons — allowing everyone to send push messages unsecured using your app would be a terrible idea.
Graphic design for responsive sites - Progressive web apps (PWAs)
css media queries allow us to serve different css rules dependant on viewport dimensions, and you should consider using mobile first media queries where possible.
... css as well as adding programmatic graphical effects to links (and anywhere else you might want them), css3 also allows you to write declarative animations and transitions.
SVG Conditional Processing Attributes - SVG: Scalable Vector Graphics
value: false|true; animatable: no requiredextensions list all the browser specific capabilities that must be supported by the borwser to be allowed to render the associated element.
... value: a list of space-separated uri; animatable: no requiredfeatures deprecated since svg 2 list all the features, as defined is the svg 1.1 specification, that must be supported by the borwser to be allowed to render the associated element..
SVG Presentation Attributes - SVG: Scalable Vector Graphics
value: auto|baseline|before-edge|text-before-edge|middle|central|after-edge|text-after-edge|ideographic|alphabetic|hanging|mathematical|inherit; animatable: yes baseline-shift it allows repositioning of the dominant-baseline relative to the dominant-baseline of the parent text content element.
... value: ltr|rtl|inherit; animatable: yes display it allows to control the rendering of graphical or container elements.
Specification Deviations - SVG: Scalable Vector Graphics
nevertheless, to allow mozilla to more cleanly share internal 'class' and 'style' related code, we will implement these attributes on all svg elements as of firefox 3.
...extending the 'class' attribute to apply to all svg elements will allow svg authors to use the selectors api to select any svg element based on class.
Paths - SVG: Scalable Vector Graphics
WebSVGTutorialPaths
while creating complex paths using an xml editor or text editor is not recommended, understanding how they work will allow to identify and repair display issues in svgs.
... <svg width="190" height="160" xmlns="http://www.w3.org/2000/svg"> <path d="m 10 80 q 52.5 10, 95 80 t 180 80" stroke="black" fill="transparent"/> </svg> both curves produce similar results, although the cubic one allows greater freedom in exactly what the curve looks like.
SVG fonts - SVG: Scalable Vector Graphics
again, you can use arbitrary svg to define the glyph, which allows for great effects in supporting user agents.
... option: use css @font-face you can use @font-face to reference remote (and not so remote) fonts: <font id="super_sans"> <!-- and so on --> </font> <style type="text/css"> @font-face { font-family: "super sans"; src: url(#super_sans); } </style> <text font-family="super sans">my text uses super sans</text> option: reference a remote font the above mentioned font-face-uri element allows you to reference an external font, hence allowing greater re-usability: <font> <font-face font-family="super sans"> <font-face-src> <font-face-uri xlink:href="fonts.svg#super_sans" /> </font-face-src> </font-face> </font> « previousnext » ...
Types of attacks - Web security
(click-jacking is sometimes called "user interface redressing", though this is a misuse of the term "redress".) cross-site request forgery (csrf) cross-site scripting (xss) cross-site scripting (xss) is a security exploit which allows an attacker to inject into a website malicious client-side code.
...this could allow an attacker to bypass csrf protection or hijack a session after the user logs in.
Tutorials
these resources are created by forward-thinking companies and web developers who have embraced open standards and best practices for web development and that provide or allow translations, through an open content license such as creative commons.
... quick guide to implement web fonts (with @font-face) the @font-face feature from css3 allows you to use custom typefaces on the web in an accessible, manipulatable, and scalable way.
Using custom elements - Web Components
high-level view the controller of custom elements on a web document is the customelementregistry object — this object allows you to register a custom element on the page, return information on what custom elements are registered, etc.
... many modern browsers implement an optimization for <style> tags either cloned from a common node or that have identical text, to allow them to share a single backing stylesheet.
<xsl:sort> - XSLT: Extensible Stylesheet Language Transformations
WebXSLTElementsort
the allowable values are "upper-first" and "lower-first".
...the allowable values are "text" and "number" with "text" being the default.
Index - XSLT: Extensible Stylesheet Language Transformations
WebXSLTIndex
the example allows sorting the content multiple times, alternating between ascending and descending order.
... 28 <xsl:copy> element, reference, xslt, copy the <xsl:copy> element transfers a shallow copy (the node and any associated namespace node) of the current node to the output document.
XSLT: Extensible Stylesheet Language Transformations
WebXSLT
transforming xml with xslt xslt allows a stylesheet author to transform a primary xml document in two significant ways: manipulating and sorting the content, including a wholesale reordering of it if so desired, and transforming the content into a different format.
... specifying parameters using processing instructions firefox allows stylesheet parameters to be specified when using the <?xml-stylesheet?> processing instruction.
Caching compiled WebAssembly modules - WebAssembly
caching via indexeddb indexeddb is a transactional database system that allows you to store and retrieve structured data on the client-side.
...any subsequent call to instantiatecachedurl() will then clear out the entire cache, allowing you to avoid using out-of-date modules.
Index - WebAssembly
it is also designed to run alongside javascript, allowing both to work together.
... 4 compiling an existing c module to webassembly c++, compiling, emscripten, webassembly, wasm a core use-case for webassembly is to take the existing ecosystem of c libraries and allow developers to use them on the web.
Compiling an Existing C Module to WebAssembly - WebAssembly
a core use-case for webassembly is to take the existing ecosystem of c libraries and allow developers to use them on the web.
...you just need to add -s allow_memory_growth=1 to your compilation command.
2015 MDN Fellowship Program - Archive of obsolete content
they enable the creation of effective offline experiences and wiill also allow access to push notifications and background sync apis.
Builder - Archive of obsolete content
the add-on builder was a web-based development environment that allowed developers to create add-ons using the sdk apis, but without needing to use the jpm command line tool.
Communicating With Other Scripts - Archive of obsolete content
lf").data; var pagemod = require("sdk/page-mod"); pagemod.pagemod({ include: "http://my-domain.org/listen.html", contentscriptfile: data.url("talk.js") }); the "talk.js" content script uses window.postmessage() to send the message to the page: // content-script (talk.js) window.postmessage("message from content script", "http://my-domain.org/"); the second argument may be '*' which will allow communication with any domain.
Interacting with page scripts - Archive of obsolete content
= require("sdk/self").data; var pagemod = require("sdk/page-mod"); pagemod.pagemod({ include: "http://my-domain.org/listen.html", contentscriptfile: data.url("talk.js") }); the "talk.js" content script uses window.postmessage() to send the message to the page: // talk.js window.postmessage("message from content script", "http://my-domain.org/"); the second argument may be '*' which will allow communication with any domain.
Content Scripts - Archive of obsolete content
a message-passing api allows the main code and content scripts to communicate with each other this complete add-on illustrates all of these principles.
Private Properties - Archive of obsolete content
since xpcom allows the user to do virtually anything, security is very important.
XUL Migration Guide - Archive of obsolete content
in that directory you can keep your "content", "locale", and "skin" subdirectories: this allows you to refer to objects in these directories from "chrome.manifest" using a relative path, like "chrome/content".
event/core - Archive of obsolete content
the event/core module allows the creation of apis to broadcast and subscribe to events.
lang/functional - Archive of obsolete content
wrap(fn, wrapper) returns the first function passed as an argument to the second, allowing you to adjust arguments, run code before and after, and conditionally execute the original function.
remote/parent - Archive of obsolete content
multiprocess firefox restricts the things that code running in child processes is allowed to do.
test/assert - Archive of obsolete content
equal(actual, expected, message) tests shallow, coercive equality with ==: assert.equal(1, 1, "test that one is one"); parameters actual : object the actual result.
ui/button/action - Archive of obsolete content
a special shortcut allows you to pass the string "window" or "tab" to select the currently active window or tab.
ui/button/toggle - Archive of obsolete content
a special shortcut allows you to pass the string "window" or "tab" to select the currently active window or tab.
util/list - Archive of obsolete content
removelistitem(list, item) function removes an item from a list list an ordered collection (also known as a sequence) disallowing duplicate elements.
Low-Level APIs - Archive of obsolete content
event/core the event/core module allows the creation of apis to broadcast and subscribe to events.
cfx to jpm - Archive of obsolete content
requiring local modules suppose your add-on is structured into separate modules: my-addon lib main.js utils.js when you want to use the "utils" module in "main.js", you should use a path relative to "main.js", and prefix the path with "./" to indicate that it's a relative path: var utils = require("./utils"); however, with cfx you are also allowed to omit the "./": var utils = require("utils"); // this will not work with jpm!
jpmignore - Archive of obsolete content
using .jpmignore to allow files everything in your add-on directory will be included in the xpi file you make with jpm xpi.
Chrome Authority - Archive of obsolete content
a future manifest format may move the declaration portion out to a separate file, to allow for more fine-grained expression of authority.
Localization - Archive of obsolete content
placeholders the l10n module supports placeholders, allowing you to insert a string which should not be localized into one which is.
Drag & Drop - Archive of obsolete content
if the file types are present in the drag data, the function returns that dropping the data is allowed.
File I/O - Archive of obsolete content
// file is the given directory (nsifile) var entries = file.directoryentries; var array = []; while(entries.hasmoreelements()) { var entry = entries.getnext(); entry.queryinterface(components.interfaces.nsifile); array.push(entry); } reading from a file read into a stream or a string this will allow you to read a file without locking up the ui thread while reading.
Forms related code snippets - Archive of obsolete content
onth, span.zdp-decrease-year { float: left; margin-right: 2px; } span.zdp-increase-month, span.zdp-increase-year { float: right; margin-left: 2px; } td.zdp-active-cell { padding: 1px 3px; cursor: pointer; color: #000000; text-align: center; vertical-align: middle; } td.zdp-active-cell:hover { background-color: #999999; cursor: pointer; } td.zdp-empty-cell { cursor: not-allowed; } </style> </head> <body> <form name="myform"> <p> from: <input type="text" readonly class="date-picker" name="date-from" /> to: <input type="text" readonly class="date-picker" name="date-to" /> </p> </form> </body> </html> note: the current implementation of const (constant statement) is not part of ecmascript 5.
Miscellaneous - Archive of obsolete content
tvalue.length); element.value = beforetext + snippet + aftertext; element.focus(); //put the cursor after the inserted text element.setselectionrange(selectionend, selectionend); } inserttext(document.getelementbyid("example"), "the text to be inserted"); disabling javascript programmatically // disable js in the currently active tab from the context of browser.xul gbrowser.docshell.allowjavascript = false; if this isn't your browser, you should save the value and restore it when finished.
On page load - Archive of obsolete content
progress listeners allow extensions to be notified of events associated with documents loading in the browser and with tab switching events.
Page Loading - Archive of obsolete content
page loading on page load how to execute code each time a new page is loaded in browser/mail progress listeners progress listeners allow extensions to be notified of events associated with documents loading in the browser and with tab switching events.
Post data to window - Archive of obsolete content
posting data to the current tab there is a convenience method in global scope (in firefox, chrome://browser/content/browser.js): loaduri(auri, areferrer, apostdata, aallowthirdpartyfixup); posting data to a new window window.opendialog('chrome://browser/content', '_blank', 'all,dialog=no', auri, aflags, areferrer, apostdata); ...
Preferences - Archive of obsolete content
this interface is described as: // "nsiprefbranch2 allows clients to observe changes to pref values." // this is only necessary prior to gecko 13 if (!("addobserver" in this.branch)) this.branch.queryinterface(components.interfaces.nsiprefbranch2); // finally add the observer.
Progress Listeners - Archive of obsolete content
progress listeners progress listeners allow extensions to be notified of events associated with documents loading in the browser and with tab switching events.
JavaScript timers - Archive of obsolete content
but there are some javascript native functions (timers) which allow us to delay the execution of arbitrary instructions: settimeout() setinterval() setimmediate() requestanimationframe() the settimeout() function is commonly used if you wish to have your function called once after the specified delay.
View Source for XUL Applications - Archive of obsolete content
apagedescriptor (optional) a "descriptor" that allows the source to be retrieved from the network cache.
xml:base support in old browsers - Archive of obsolete content
these two functions aim to allow some support for xml:base.
getAttributeNS - Archive of obsolete content
ry to get an xmlns for the 'xml' prefix return thisitem.getattribute('xml:'+nsatt); // prefix must be 'xml' per the specs } var attrs2, result; var attrs = thisitem.attributes; var prefixatt = new regexp('^(.*):'+nsatt.replace(/\./g, '\\.')+'$'); // e.g., xlink:href // find any prefixes with the local-name being searched (escape period since only character (besides colon) allowed in an xml name which needs escaping) for (var j = 0; j < attrs.length; j++) { // thisitem's atts // e.g., abc:href, xlink:href while (((result = prefixatt.exec(attrs[j].nodename)) !== null) && thisitem.nodename !== '#document' && thisitem.nodename !== '#document-fragment') { var xmlnsprefix = new regexp('^xmlns:'+result[1]+'$'); // e.g., xmnls:xl, xm...
Code snippets - Archive of obsolete content
nevertheless, the increasing computational power of modern browsers together with the introduction of typed arrays in ecmascript allow us, in theory, to build full virtual machines in pure ecmascript.
Custom about: URLs - Archive of obsolete content
{ return components.id(`{${aboutpage_id}}`); } static get classdescription() { return aboutpage_description; } static get contractid() { return `@mozilla.org/network/protocol/about;1?what=${aboutpage_word}`; } static get queryinterface() { return xpcomutils.generateqi([ci.nsiaboutmodule]); } constructor() { object.freeze(this); } geturiflags(auri) { return ci.nsiaboutmodule.allow_script; } newchannel(auri, asecurity_or_aloadinfo) { let channel; if (services.vc.compare(services.appinfo.version, '47.*') > 0) { const uri = services.io.newuri(aboutpage_uri, null, null); // greater than or equal to firefox48 so asecurity_or_aloadinfo is aloadinfo channel = services.io.newchannelfromuriwithloadinfo(uri, asecurity_or_aloadinfo); } else { ...
Default Preferences - Archive of obsolete content
mozilla provides a simple way of shipping default settings by allowing default preferences.
Deploying a Plugin as an Extension - Archive of obsolete content
this allows the plugin to be treated like other firefox extensions; it can be upgraded, disabled, or uninstalled using the firefox user interface.
Extension Theming Guidelines - Archive of obsolete content
custom themes may then register a replacement for your skin package allowing them to provide their own styles for all of your content.
Extension Etiquette - Archive of obsolete content
they allow for easy identification among other extensions in the extensions manager.
How to convert an overlay extension to restartless - Archive of obsolete content
the resource:// protocol actually bleeds into content which allows webpages to detect installed add-ons using the protocol, which is not particularly fantastic (just the static file contents, not any loaded script/data).
Installing Extensions and Themes From Web Pages - Archive of obsolete content
hash: aevent.target.getattribute("hash"), tostring: function () { return this.url; } }; this specifies the display name (foo) for use in the confirmation dialog, the url to the extension (which is the link href, recall), the icon url to display in the confirmation dialog, a hash of the xpi file contents (to protect against corrupted downloads), and a tostring function which will allow this code to work with versions of firefox 0.8 and earlier.
Listening to events in Firefox extensions - Archive of obsolete content
it is used to detect when a webpage attempts to refresh itself and allow the user to block the attempt.
Multiple item extension packaging - Archive of obsolete content
this also allows displaying of signing information for the multiple item package.
Offering a context menu for form controls - Archive of obsolete content
overlay the content the first thing to do is to establish an overlay over the chrome for the window in which you want to allow context menus on form controls.
Adding menus and submenus - Archive of obsolete content
menu types checkbox menu items you can make a menuitem "checkable" to allow the user to enable/disable options using the menu.
Appendix C: Avoiding using eval in Add-ons - Archive of obsolete content
someexistingobject.someproperty = "abc"; // we already demonstrated with with functions in a previous example alternative: object.defineproperty() for most objects it is possible to (re-)define properties with the object.defineproperty() api, which allows to not override values, but also lets you define getters and setters.
Appendix D: Loading Scripts - Archive of obsolete content
flexibility: the sub-script loader can load scripts into a variety of different namespaces for a wide variety of uses, and as of gecko 2 allows the character set of the script to be specified.
Appendix F: Monitoring DOM changes - Archive of obsolete content
dom mutation events were introduced to html several years ago in order to allow web applications to monitor changes to the dom by other scripts.
Introduction - Archive of obsolete content
it is this very powerful platform that has allowed such a fast growth of the development community surrounding mozilla and firefox.
Local Storage - Archive of obsolete content
they allow you to automatically generate xul content using information from a datasource, and automatically update the content once the datasource changes.
Mozilla Documentation Roadmap - Archive of obsolete content
xulplanet allowed you to navigate between interfaces and their related components, which makes locating components very easy.
Setting Up a Development Environment - Archive of obsolete content
it allows you to cancel them and even replace payload data before it is sent.
Useful Mozilla Community Sites - Archive of obsolete content
it allows you to upload, search and download all types of add-ons for mozilla applications.
Signing an extension - Archive of obsolete content
signing a firefox extension with a windows authenticode ssl certificate / key - note that some cas do not allow (or support) to divert an authenticode certificate to object signing.
Supporting search suggestions in search plugins - Archive of obsolete content
this allows firefox to verify that the suggestions match the current search term.
Promises - Archive of obsolete content
these apis allow asynchronous operation to be achieved with a coding style similar to synchronous variants.
Updating addons broken by private browsing changes - Archive of obsolete content
nsidownloadmanager/nsidownload: integer download ids (and specifically the id property of nsidownload) are deprecated, and don't allow access to private downloads.
MMgc - Archive of obsolete content
each instance manages its own set of objects; objects are not allowed to reference objects in other gc instances.
Bypassing Security Restrictions and Signing Code - Archive of obsolete content
early versions of firefox allowed web sites to segregate principals using signed scripts, and request extra permissions for scopes within signed scripts using a function called enableprivelege.
cert_override.txt - Archive of obsolete content
domainname:port : port 443 for https (ssl) hash algorithm oid sha1-256: oid.2.16.840.1.101.3.4.2.1 (most used) sha-384: oid.2.16.840.1.101.3.4.2.2 sha-512: oid.2.16.840.1.101.3.4.2.3 certificate fingerprint using previous hash algorithm one or more characters for override type: m : allow mismatches in the hostname u : allow untrusted certs (whether it's self signed cert or a missing or invalid issuer cert) t : allow errors in the validity time, for example, for expired or not yet valid certs certificate's serial number and the issuer name as a base64 encoded string ...
Environment variables affecting crash reporting - Archive of obsolete content
additionally, on mac os x, you can set an application default setting to allow apple's crash reporter tool to run alongside the breakpad crash reporter.
Images, Tables, and Mysterious Gaps - Archive of obsolete content
the best solution may be to ensure that images are always in a cell by themselves, thus allowing authors to make them block-level, but as always this will depend on the author's design.
Monitoring WiFi access points - Archive of obsolete content
this capability was introduced primarily to allow wifi-based location services to be used by geolocation services.
Notes on HTML Reflow - Archive of obsolete content
the purpose of the dirty reflow is to allow these individual reflows to be coalesced intelligently.
Same-origin policy for file: URIs - Archive of obsolete content
starting in gecko 1.9, files are allowed to read only certain other files.
Using XML Data Islands in Mozilla - Archive of obsolete content
internet explorer had an "xml data islands" feature that allows web authors include xml data inline in html documents using the <xml> tag.
Autodial for Windows NT - Archive of obsolete content
mozilla 1.1 also includes a fix to bug 157733, which allows our interaction with the autodial service to work a little more reliably.
How Mozilla finds its configuration files - Archive of obsolete content
the value contained in this key is a litteral value, no variables (such as %userprofile%/mozprofile) allowed.
How Thunderbird and Firefox find their configuration files - Archive of obsolete content
the value contained in this key is a litteral value, no variables (such as %userprofile%/mozprofile) allowed.
Locked config settings - Archive of obsolete content
this file also needs to be "called" from c:\program files\mozilla.org\mozilla\defaults\pref\all.js by appending the following line at the end: pref("general.config.filename", "mozilla.cfg"); note: newer versions of mozilla or firefox store the all.js file in greprefs rather than defaults\pref the moz-byteshift.pl script allows to encode...: moz-byteshift.pl -s 13 <mozilla.cfg.txt >mozilla.cfg ...
BlackConnect - Archive of obsolete content
blackconnect was a blackwood subproject, trying to build a java-to-xpcom bridge to allow interoperability between java and xpcom components.
Bookmark Keywords - Archive of obsolete content
that's pretty interesting on its own, but mozilla takes it a step further by allowing the user to define an "entry point" for added information.
Enabling the behavior - updating the status periodically - Archive of obsolete content
this allows users to get relatively frequent updates about tinderbox without overloading the tinderbox server or slowing down mozilla with requests.
Finding the file to modify - Archive of obsolete content
the dom inspector is a tool bundled with mozilla that allows you to examine the dom of web pages and xul windows.
Making it into a static overlay - Archive of obsolete content
thus it allows us to define the exact position of our element relative to the other statusbarpanel elements within statusbar.
In-Depth - Archive of obsolete content
mozilla css properties mozilla.org created their own css properties to allow them to use the technology for the ui of mozilla.
DTrace - Archive of obsolete content
dtrace is sun microsystem's dynamic tracing framework that allows developers to instrument a program with probes that have little to no effect on performance when not in use and very little when active.
Dehydra Function Reference - Archive of obsolete content
optional: code is an integer parameter that allows warnings to be enabled(-wfoo) and disabled(-wno-) on the gcc commandline.
Dehydra Object Reference - Archive of obsolete content
the variantof property allows access to the original type object.
Dehydra - Archive of obsolete content
it was also useful to find bugs in source code as it allows for much more error checking than c++ is capable of by itself.
Drag and Drop Example - Archive of obsolete content
this allows us to place the new element at the position where the mouse button was released.
Drag and drop events - Archive of obsolete content
firefox 3 adds two new events that allow you to determine when drag operations begin and end.
Drag and Drop - Archive of obsolete content
the drag and drop interface many user interfaces allow one to drag particular objects around within the interface.
Editor Embedding Guide - Archive of obsolete content
nscomptr<nsieditingsession> editingsession; nsiwebbrowser->do_getinterface(getter_addrefs(editingsession)); if (editingsession) editingsession->makewindoweditable(domwindow, "html", pr_true); the valid editor types are: "text" (similar to notepad or a textarea; does not allow for html) "textmail" (similar to "text" but html can be inserted; intended for plaintext mail usage and handling of citations) "html" (this is the default type if no type is specified; it allows for all html tags to be inserted) "htmlmail" (this is much like "html" except there are a few editing rules/behaviors that differ such as splitting of mail quotes) editor commands you need to call c...
Documentation for BiDi Mozilla - Archive of obsolete content
in some circumstances, even on a platform with bidi capability, the layout code has to reverse text fragments or to allow for the fact that they are displayed in reverse.
Using microformats - Archive of obsolete content
microformats allow web sites to provide semantic data to the browser in order to make it possible to present summaries of the information on a page without having to know how to parse the document itself.
JavaScript Client API - Archive of obsolete content
depending of what type of data you're working with, you might already have guids built into your data that you can make use of (note that guids must be allowed to change and should be url friendly).
Help Viewer - Archive of obsolete content
help viewer: allows information to be shown to the user inside mozilla.
Isp Data - Archive of obsolete content
introduction these files allow for adding to the new account wizard a new option, and help with, among other things, deployment of custom thunderbird.
importUserCertificates - Archive of obsolete content
it allows the ca or ra to indicate to the client whether to force the user to back up a newly issued certificate (pkcs #12).
popChallengeResponse - Archive of obsolete content
this will allow -- the client to find the appropriate key to do the decryption.
Content - Archive of obsolete content
execute callbacks when certain pages are opened siteboost allows a jetpack to empower a domain with extended abilities beyond those native to web pages ...
Extenders - Archive of obsolete content
manifest chief mechanism for allowing advanced api use within your jetpack superpowers similar to libraries, superpowers are for adding deeper platform coupling for your jetpack sandboxes safely abstracts library interoperability issues so you don't have to worry about them future api interface method for including not yet finalized functionality in your jetpack ...
Me - Archive of obsolete content
ArchiveMozillaJetpackMetaMe
the namespace currently lives in the future and must be imported before it is used: jetpack.future.import("me"); methods onfirstrun(funcfunction)jetpack.me.onfirstrun() allows jetpacks to be notified after they are successfully installed.
Settings - Archive of obsolete content
the jetpack.storage.settings namespace allows jetpacks to specify user-configurable settings.
Settings - Archive of obsolete content
the jetpack.storage.settings namespace allows jetpacks to specify user-configurable settings.
Menu - Archive of obsolete content
ArchiveMozillaJetpackUIMenu
jetpack's menu api allows features to access and modify the browser's built-in menus.
Selection - Archive of obsolete content
jetpack.import.future("selection");jetpack.selection.text = 'hello';jetpack.selection.html = '<b>hello</b>'; methods onselection(func function)this method allows you to execute an event function when a selection is made.
Selection - Archive of obsolete content
jetpack.import.future("selection"); jetpack.selection.text = 'hello'; jetpack.selection.html = '<b>hello</b>'; methods onselection(func function)this method allows you to execute an event function when a selection is made.
slideBar - Archive of obsolete content
they allow quick access to a wide range of both temporary and permanent information at the side of your browser window.
slideBar - Archive of obsolete content
they allow quick access to a wide range of both temporary and permanent information at the side of your browser window.
Selection - Archive of obsolete content
ArchiveMozillaJetpackdocsUISelection
jetpack.import.future("selection"); jetpack.selection.text = 'hello'; jetpack.selection.html = '<b>hello</b>'; methods onselection(func function)this method allows you to execute an event function when a selection is made.
jspage - Archive of obsolete content
ction(){new cookie(this.key,$merge(this.options,{duration:-1})).write("");return this;}});cookie.write=function(b,c,a){return new cookie(b,a).write(c); };cookie.read=function(a){return new cookie(a).read();};cookie.dispose=function(b,a){return new cookie(b,a).dispose();};var swiff=new class({implements:[options],options:{id:null,height:1,width:1,container:null,properties:{},params:{quality:"high",allowscriptaccess:"always",wmode:"transparent",swliveconnect:true},callbacks:{},vars:{}},toelement:function(){return this.object; },initialize:function(l,m){this.instance="swiff_"+$time();this.setoptions(m);m=this.options;var b=this.id=m.id||this.instance;var a=document.id(m.container); swiff.callbacks[this.instance]={};var e=m.params,g=m.vars,f=m.callbacks;var h=$extend({height:m.height,width:m.width}...
Message Summary Database - Archive of obsolete content
this allows us to store watch/ignore information on a thread object, and avoids having to generate threading information whenever a folder is open.
Monitoring downloads - Archive of obsolete content
firefox 3 introduces new api that allows any number of listeners to observe downloads.
Extensions - Archive of obsolete content
installing prism supports a basic add-on user interface which allows a user to manage extensions.
New Skin Notes - Archive of obsolete content
just so that (perhaps) this might revive the topic, a side bar shouldn't exceed 16% to allow proper viewing at 800 pixels width ideally in my opinion, i find strange that i'm the only person not too fond of large side bars (or side bars at all, for that matter :) considering that in most articles we scroll down to read the text, and that the side bar scrolls as well, the links aren't there anymore, but the width remains wasted anyway.
PyDOM - Archive of obsolete content
this allows you to use python code (almost) anywhere you can use javascript.
RDF Datasource How-To - Archive of obsolete content
the first question that you must answer is "should i use an existing vocabulary, or invent my own?" a reasonable answer is, "use an existing vocabulary unless you absolutely must invent your own." this will allow your datasource to be integrated with other datasources with a minimum of effort.
Remotely debugging Firefox for Metro - Archive of obsolete content
ant to set these optional preferences: devtools.debugger.force-local = false (if you want to connect from a different machine over the network) devtools.debugger.remote-host (to change the tcp hostname where firefox will listen for connections) devtools.debugger.remote-port (to change the tcp port number where firefox will listen for connections) devtools.debugger.prompt-connection = false (allow connections without displaying a confirmation prompt.
Remote debugging - Archive of obsolete content
it allows you to see the crash in a debugger even after the program has long exited.
Safely loading URIs - Archive of obsolete content
to solve this problem, gecko provides methods that allow the caller to check whether it's safe to load a particular uri.
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.
Abc Assembler Tests - Archive of obsolete content
if you wish to allow use of your version of this file only * under the terms of either the gpl or the lgpl, and not to allow others to * use your version of this file under the terms of the mpl, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the gpl or the lgpl.
Tamarin Acceptance Test Template - Archive of obsolete content
if you wish to allow use of your version of this file only * under the terms of either the gpl or the lgpl, and not to allow others to * use your version of this file under the terms of the mpl, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the gpl or the lgpl.
Cmdline tests - Archive of obsolete content
the testsuite allows more flexibility by coding scripts in python allowing any executable to run, sending commands to stdin, and asserting output using regular expressions.
Tuning Pageload - Archive of obsolete content
content.interrupt.parsing this preference, when true, means that the content sink can tell the parser to stop for now and return to the event loop, which allows layout and painting to happen.
Using cross commit - Archive of obsolete content
cross-commit is a script that allows a single patch to be easily checked in on multiple branches.
Venkman - Archive of obsolete content
this allows the user interface be written in javascript and xul, which allows venkman to be fully cross-platform.
When To Use ifdefs - Archive of obsolete content
this code is all going to be moved elsewhere (most of it to toolkit/ or suite/), but for the time being most application-specific ifdefs are allowed because we can't help it.
Anonymous Content - Archive of obsolete content
since neither of these events constitutes a mouseover or mouseout of the file control itself, the events are not allowed to flow to the file control.
XBL - Archive of obsolete content
xbl 2.0 (w3c candidate recommendation) was developed to address problems found in xbl 1.0 and to allow for implementations in a broader range of web browsers.
Using XPInstall to Install Plugins - Archive of obsolete content
caveat: certain versions of mozilla-based browsers (such as netscape 6.x) treat the use of the equals character ("=") as an illegal token and thus do not allow invocation of initinstall with strings containing "=".
getLastError - Archive of obsolete content
this method allows you to defer checking for error codes each time you call addfile or adddirectory until the last addfile or adddirectory call.
loadResources - Archive of obsolete content
this method is used to internationalize installation scripts by allowing the installer to retrieve localized string values from a separate file.
Methods - Archive of obsolete content
also allows custom button labels and a checkbox.
WinProfile Object - Archive of obsolete content
the two methods of the winprofile object, getstring and writestring, allow you to read and write the data in the key/value pairs of a windows .ini file.
XPJS Components Proposal - Archive of obsolete content
the xpconnectcomponents object allows access to the whole repository of native and js xpcom components, so this is not as isolated an environment as it might at first sound.
XTech 2006 Presentations - Archive of obsolete content
layout algorithm improvements for web user interfaces (slides, slides as one page) - david baron a discussion of problems with existing standards and potential improvements in two areas: layout systems for user interfaces (rather than documents) and mechanisms for reordering content to allow the author to use good markup and appropriate layout.
A XUL Bestiary - Archive of obsolete content
this special option allows you to create and access chromes independent of the mozilla browser and begins to suggest some possibilities for xul-as-platform beyond the simple restyling of the browser.
accelerated - Archive of obsolete content
« xul reference homeaccelerated type: booleanset this attribute to true to allow hardware layer managers to accelerate the window.
accesskey - Archive of obsolete content
this allows a label of 'open…' with an accesskey of 'a', to have a generated label of 'open (a)…'.
coalesceduplicatearcs - Archive of obsolete content
this attribute, if true, which is the default, allows a datasource to negate an earlier assertion.
disabled - Archive of obsolete content
the disabled attribute is allowed only for form controls.
drawintitlebar - Archive of obsolete content
this allows the window to draw in the title bar.
fullscreenbutton - Archive of obsolete content
« xul reference home fullscreenbutton type: boolean set this attribute to true to display a button in the window chrome to allow the user to switch the window into full screen mode.
hidespinbuttons - Archive of obsolete content
« xul reference home hidespinbuttons type: boolean if true, the number box does not have arrow buttons next to it to allow the user to adjust the value.
homepage - Archive of obsolete content
« xul reference home homepage type: url this attribute allows you to set a homepage for the browser element.
maxlength - Archive of obsolete content
« xul reference home maxlength type: integer the maximum number of characters that the textbox allows to be entered.
mousethrough - Archive of obsolete content
the mousethrough attribute is typically used in conjunction with a stack to allow elements to be stacked above other elements yet allow mouse events to be sent to lower elements.
multiline - Archive of obsolete content
if false, the textbox only allows entry of one line.
popup.position - Archive of obsolete content
this allows you to place the popup on one side of a button.
primary - Archive of obsolete content
the attribute also controls whether the column picker allows the user to deselect this column.
seltype - Archive of obsolete content
« xul reference home seltype type: one of the values below used to indicate whether multiple selection is allowed.
treecell.editable - Archive of obsolete content
« xul reference home editable type: boolean allows the contents of individual cells in the column to be changed, especially useful when <treecol type="checkbox">.
treecol.editable - Archive of obsolete content
« xul reference home editable type: boolean allows the contents of cells in the column to be changed, especially useful when type="checkbox".
treecol.width - Archive of obsolete content
specifying widths for your columns causes gecko to allow the tree to be scrolled horizontally if it is wider than the available space.
value - Archive of obsolete content
« xul reference home value type: string the string attribute allows you to associate a data value with an element.
width - Archive of obsolete content
<vbox width="30" align="start" style="background-color: red;"> <label value="vbox xul width 10px red"/> </vbox> note: when used on treecol objects, the width attribute can be used to allow a tree to be scrolled horizontally if the column widths add up to be wider than the containing object.
Attribute (XUL) - Archive of obsolete content
« xul reference home acceltext accessible accesskey activetitlebarcolor afterselected align allowevents allownegativeassertions alternatingbackground alwaysopenpopup attribute autocheck autocompleteenabled autocompletepopup autocompletesearch autocompletesearchparam autofill autofillaftermatch autoscroll beforeselected buttonaccesskeyaccept buttonaccesskeycancel buttonaccesskeydisclosure buttonaccesskeyextra1 buttonaccesskeyextra2 buttonaccesskeyhelp buttonalign buttondir buttondisabledaccept buttonlabelaccept buttonlabelcancel buttonlabeldisclosure buttonlabelextra1 buttonlabelextra2 buttonlabelhelp buttonorient buttonpack buttons checked checkstate clicktoscroll class closebutton closemenu coalesceduplicatearcs collapse collapsed col...
Accessing Files - Archive of obsolete content
this allows files to used in a portable way.
IO - Archive of obsolete content
ArchiveMozillaXULFileGuideIO
open and save dialogs you can show a dialog to the user to allow them to select a file to open or enter a filename for saving.
Moving, Copying and Deleting Files - Archive of obsolete content
this allows an entire directory and its contents to be copied from one location to another.
findbar - Archive of obsolete content
properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width browser type: browser element lets you s...
International characters in XUL JavaScript - Archive of obsolete content
however, you can use unicode escapes – the earlier example rewritten using them would be: var text = "ein sch\u00f6nes beispiel eines mehrsprachigen textes: \u65e5\u672c\u8a9e"; an alternative might be to use property files via nsistringbundle or the xul <stringbundle> element; this would allow for localization of the xul.
advance - Archive of obsolete content
ArchiveMozillaXULMethodadvance
the pageid argument allows you to specify the index of the page to which to jump.
loadTabs - Archive of obsolete content
the properties of params are following: boolean inbackground boolean replace boolean allowthirdpartyfixup tab targettab number newindex object postdatas number usercontextid ...
loadURIWithFlags - Archive of obsolete content
in addition to the flags allowed for the reloadwithflags method, the following flags are also valid: load_flags_is_refresh: this flag is used when the url is loaded because of a meta tag refresh or redirect.
openSubDialog - Archive of obsolete content
usually this method would be used to allow the user to configure advanced options.
Namespaces - Archive of obsolete content
it holds and allows disambiguation of items having the same name." if you are familiar with c++ namespaces, java packages, perl packages, or python module importing, you are already familiar with the namespace concept.
Extensions - Archive of obsolete content
this allows the menu to have different commands for different types of targets.
MenuButtons - Archive of obsolete content
for instance, in the following example, pressing the 'view' button will open a menu which allows the user to select from a set of radio menuitems.
MenuItems - Archive of obsolete content
this allows the user to discover what shortcut keys are available by looking at the menus.
MoveResize - Archive of obsolete content
arrows will appear on the ends of the menu to allow a user to scroll through the items.
PopupEvents - Archive of obsolete content
<menu label="edit"> <menupopup onpopupshowing="if (gdisallowed) event.preventdefault();"> <menuitem label="undo"/> <menuitem label="redo"/> </menupopup> </menu> in this example, a global variable gdisallowed is checked and the preventdefault method is called.
Positioning - Archive of obsolete content
this allows the script and xul code to coordinate in different ways as to how the popup should be opened.
Popup Guide - Archive of obsolete content
for example, a popup search field could be used to allow searching and will disappear when a search term has been entered.
builderView - Archive of obsolete content
the builder provides access to the rdf resources for each row in the tree, and allows sorting the data by column.
canAdvance - Archive of obsolete content
set to false to disallow moving to the next page.
canRewind - Archive of obsolete content
set to false to disallow moving to the previous page.
is24HourClock - Archive of obsolete content
with a 12-hour clock, an extra field allows the user to pick between am and pm.
maxLength - Archive of obsolete content
« xul reference maxlength type: integer the maximum number of characters that the textbox allows to be entered.
view - Archive of obsolete content
ArchiveMozillaXULPropertyview
functions available in the view allow one to retrieve the data within the cells, and determine which rows are nested within others.
Property - Archive of obsolete content
« xul reference accessible accessibletype accesskey align allnotifications allowevents alwaysopenpopup amindicator applocale autocheck autofill autofillaftermatch boxobject browsers builder builderview buttons canadvance cangoback cangoforward canrewind checked checkstate child children classname clickselectsall clientheight clientwidth collapsed color columns command commandmanager completedefaultindex container contentdocument contentprincipal contenttitle contentview contentvieweredit contentviewerfile contentwindow contextmenu control controller controllers crop current currentindex currentitem currentnotification currentpage currentpane currentset currenturi customt...
statusbarpanel-menu-iconic - Archive of obsolete content
« xul reference home statusbarpanel-menu-iconic use this class to have an image appear on the statusbarpanel, and also allow a popup menu.
Additional Navigation - Archive of obsolete content
this will allow us to associate additional properties to each category and more easily navigate the graph in a template.
Additional Template Attributes - Archive of obsolete content
this allows you to share the same template among two different parts of the user interface.
Bindings - Archive of obsolete content
this allows a match to occur even if the description is not specified.
Building Menus With Templates - Archive of obsolete content
this allows for better performance as the entire content of a complex menu does not need to be created until the user needs to use the menu.
Filtering - Archive of obsolete content
a menulist is used to allow one to select either a specific country, or select all to show all of the photos.
Introduction - Archive of obsolete content
the template syntax allows for different rules to generate different content based on particular criteria as well as set attribute values from returned results.
RDF Query Syntax - Archive of obsolete content
since ?relateditem isn't known, the builder will allow any value for the node the arrow points to, and will look in the datasource for all possible values.
SQLite Templates - Archive of obsolete content
this allows information from the database to be used to generate xul content.
Simple Query Syntax - Archive of obsolete content
it allows you to filter for results that have certain predicates with specific values.
Template Builder Interface - Archive of obsolete content
this is also allowed.
Template Logging - Archive of obsolete content
this allows us to narrow down what query and rule is being used to generate the content.
Template Guide - Archive of obsolete content
it allows to use javascript objects as a data source for xul templates.
The Joy of XUL - Archive of obsolete content
xpconnect allows javascript objects to transparently access and manipulate xpcom objects.
Adding Buttons - Archive of obsolete content
<button id="find-button" label="find"/> note: firefox does not allow you to open chrome windows from web pages, so the view links in the tutorial will open in normal browser windows.
Adding Event Handlers - Archive of obsolete content
this allows you to attach an event listener dynamically and listen for events during the capturing phase.
Adding Methods to XBL-defined Elements - Archive of obsolete content
(the bound element.) the parameter tag allows you to define parameters for a method.
Adding Style Sheets - Archive of obsolete content
this can be done with the code below, allowing you to remove the import from the xul file: style import from xul: <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> style import from css: @import url(chrome://global/skin/); the second syntax is preferred because it reduces the number of dependencies within the xul file itself.
Anonymous Content - Archive of obsolete content
the includes attribute can be used to allow only certain elements to appear in the content.
Box Objects - Archive of obsolete content
the box object also allows navigation in a similar means but retrieves the elements in display order.
Broadcasters and Observers - Archive of obsolete content
like its attribute counterpart, it allows you to define an element to be an observer.
Creating a Skin - Archive of obsolete content
this allows you to use the same image for multiple buttons and set a different region for each one.
Cross Package Overlays - Archive of obsolete content
mozilla allows you to add a list of overlays to the contents.rdf file that you use to list chrome packages, skins and locales.
Grids - Archive of obsolete content
ArchiveMozillaXULTutorialGrids
however, the grid allows either row or column based organization so you may put content in either rows or in columns.
Input Controls - Archive of obsolete content
maxlength the maximum number of characters that the textbox allows.
Manipulating Lists - Archive of obsolete content
list scrolling if there are more rows in the listbox than can be displayed, a scroll bar will appear to allow the user to scroll the list.
Modifying a XUL Interface - Archive of obsolete content
for example, in a preferences dialog, one might have the choice of several possibilities, but one choice allows additional customization.
Modifying the Default Skin - Archive of obsolete content
a skin is described using css, allowing you to define the colors, borders and images used to draw elements.
More Button Features - Archive of obsolete content
this is designed to allow the 'skin' (in this case, the appearance of the image) to be changed without changing the xul file.
More Event Handlers - Archive of obsolete content
this allows you to check for single, double or triple clicks.
More Tree Features - Archive of obsolete content
you do this by adding the container attribute to it as follows: <treeitem container="true" /> this allows the user to click on the row that corresponds to the treeitem to expand and collapse the inner rows.
Open and Save Dialogs - Archive of obsolete content
file pickers a file picker is a dialog that allows the user to select a file.
Popup Menus - Archive of obsolete content
however, it does allow you to use any content besides text in a tooltip.
Scrolling Menus - Archive of obsolete content
mozilla will provide a scrolling mechanism that will allow you to scroll through the items.
Simple Menu Bars - Archive of obsolete content
the menu features of xul consist of a number of different elements which allow you to create menu bars or popup menus.
Skinning XUL Files by Hand - Archive of obsolete content
finally, mozilla provides some special extensions to the cascading style sheets specification that allow even more control over the way that xul is skinned within the browser.
Stacks and Decks - Archive of obsolete content
they are all special types of boxes and allow all of the attributes of boxes on them.
Styling a Tree - Archive of obsolete content
this property, along with the even property allow you to set, for example, alternating colors for each row.
The Box Model - Archive of obsolete content
this model allows you to divide a window into a series of boxes.
Toolbars - Archive of obsolete content
presumably, they would allow the user to save search results and re-open them later.
Tree Selection - Archive of obsolete content
multiple selection for trees that allow multiple selection, getting the list of selected rows is a bit more complicated.
Trees and Templates - Archive of obsolete content
additional rule attributes there are two additional attributes that can be added to the rule element that allow it to match in certain special circumstances.
Updating Commands - Archive of obsolete content
command updaters a command updater is a feature of the commandset element which allows it to update commands when certain events happen.
XPCOM Examples - Archive of obsolete content
this allows you to create a window menu with a list of the currently open windows in the application.
XPCOM Interfaces - Archive of obsolete content
it allows you to add bookmarks to the user's current bookmark list.
XUL Questions and Answers - Archive of obsolete content
a scheme is in development to allow servers to open up their site for cross-site access, but that's not yet done.
Accessibility/XUL Accessibility Reference - Archive of obsolete content
using context="popupid" allows access via shift+f10 on windows and linux.
XUL and RDF - Archive of obsolete content
the second section describes the xul/rdf architecture itself and outlines enhancements to the xul language in order to allow the markup language to reference local data and to indicate how and when it would like to be annotatable with local data.
XML - Archive of obsolete content
html allows some elements, such as <br> and <hr>, to be neither closed nor matched with a closing element.
button - Archive of obsolete content
the disabled attribute is allowed only for form controls.
checkbox - Archive of obsolete content
the disabled attribute is allowed only for form controls.
colorpicker - Archive of obsolete content
the disabled attribute is allowed only for form controls.
commandset - Archive of obsolete content
properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlist...
content - Archive of obsolete content
propiedades tag, uri ejemplos (no son necesarios) atributos inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortd...
dialogheader - Archive of obsolete content
properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlist...
image - Archive of obsolete content
ArchiveMozillaXULimage
inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlist...
label - Archive of obsolete content
ArchiveMozillaXULlabel
the disabled attribute is allowed only for form controls.
menubar - Archive of obsolete content
inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlist...
menupopup - Archive of obsolete content
this allows you to place the popup on one side of a button.
notification - Archive of obsolete content
value type: string the string attribute allows you to associate a data value with an element.
notificationbox - Archive of obsolete content
properties currentnotification, allnotifications, notificationshidden methods appendnotification, getnotificationwithvalue, removeallnotifications, removecurrentnotification, removenotification, removetransientnotifications, attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortd...
panel - Archive of obsolete content
ArchiveMozillaXULpanel
this allows you to place the popup on one side of a button.
param - Archive of obsolete content
ArchiveMozillaXULparam
type type: one of the values below the type of the parameter's value integer 32 bit integer int64 64 bit integer double double-precision floating-point number string string literal, the default value properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlist...
preference - Archive of obsolete content
the disabled attribute is allowed only for form controls.
prefwindow - Archive of obsolete content
usually this method would be used to allow the user to configure advanced options.
rule - Archive of obsolete content
ArchiveMozillaXULrule
properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlist...
stringbundle - Archive of obsolete content
inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortd...
stringbundleset - Archive of obsolete content
examples (example needed) attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , alloweven...
tab - Archive of obsolete content
ArchiveMozillaXULtab
the disabled attribute is allowed only for form controls.
tabpanels - Archive of obsolete content
inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortd...
tabs - Archive of obsolete content
ArchiveMozillaXULtabs
the disabled attribute is allowed only for form controls.
toolbarbutton - Archive of obsolete content
the disabled attribute is allowed only for form controls.
toolbox - Archive of obsolete content
<toolbarbutton label="back"/> <toolbarbutton label="forward"/> <toolbarbutton label="home"/> </toolbar> <toolbar> <toolbarbutton label="stop"/> <toolbarbutton label="reload"/> </toolbar> </toolbox> <textbox multiline="true" value="we have two toolbars inside of one toolbox above." width="20"/> </window> attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortd...
tooltip - Archive of obsolete content
this allows you to place the popup on one side of a button.
treeitem - Archive of obsolete content
properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlist...
wizardpage - Archive of obsolete content
inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited ...
Application Update - Archive of obsolete content
es branding information, setup branding for your application as described here: xulrunner tips icons the updater process for linux systems requires updater.png to be in your <application folder>/icons/, see https://bugzilla.mozilla.org/show_bug.cgi?id=706846 preferences // whether or not app updates are enabled pref("app.update.enabled", true); // this preference turns on app.update.mode and allows automatic download and // install to take place.
Creating a Windows Inno Setup installer for XULRunner applications - Archive of obsolete content
[setup] appname=my app appvername=my app 1.0 apppublisher=mark finkle apppublisherurl=http://developer.mozilla.org/en/docs/getting_started_with_xulrunner appsupporturl=http://developer.mozilla.org/en/docs/getting_started_with_xulrunner appupdatesurl=http://developer.mozilla.org/en/docs/getting_started_with_xulrunner defaultdirname={pf}\my app defaultgroupname=my app allownoicons=yes outputdir=..\build\output outputbasefilename=myapp-1.0-win32 ; setupiconfile= compression=lzma solidcompression=yes [languages] name: english; messagesfile: compiler:default.isl [components] name: main; description: my app; types: full compact custom; flags: fixed name: runtime; description: xul runner runtime; types: full custom [tasks] name: desktopicon; description: {cm:createdes...
Debugging a XULRunner Application - Archive of obsolete content
debuggerserver.addbrowseractors("myxulrunnerappwindowtype"); } debuggerserver.openlistener(6000); for xulrunner version 37+ the code to enable the debugger has changed: components.utils.import('resource://gre/modules/devtools/dbg-server.jsm'); if (!debuggerserver.initialized) { debuggerserver.init(); debuggerserver.addbrowseractors(); debuggerserver.allowchromeprocess = true; } let dbglistener=debuggerserver.createlistener(); dbglistener.portorpath=6000; dbglistener.open(); add the following to your prefs.js: (in recent ffox, edit about:config instead) pref("devtools.debugger.remote-enabled", true); in firefox, go to tools > web developer > connect...
Dialogs in XULRunner - Archive of obsolete content
newer releases will allow using preferences to switch to a xul emulation filepicker, if you want to.
XULRunner FAQ - Archive of obsolete content
it is not meant to be a full-featured runtime; this allows xulrunner to maintain a smaller footprint and simpler deployment strategy than generic full-featured runtimes.
Getting started with XULRunner - Archive of obsolete content
toolkit.singletonwindowtype allows configuring the application to allow only one instance at a time.
XULRunner Hall of Fame - Archive of obsolete content
slimerjs slimerjs is a xulrunner application that can be launched with firefox, allowing to execute an external javascript script which can manipulate web content.
How to enable locale switching in a XULRunner application - Archive of obsolete content
code to update the locale user preference and restart the application mozilla xulrunner doesn't allow runtime switching of the locale, therefore the application must be restarted to activate the new choice.
XUL Application Packaging - Archive of obsolete content
application.ini the application.ini manifest is located at the root of the extension and provides metadata that allows xulrunner to launch the application properly.
toolkit.defaultChromeFeatures - Archive of obsolete content
type: string specified by: default prefs of xulrunner applications default: "chrome,dialog=no,all" example: pref("toolkit.defaultchromefeatures", "chrome,resizable=no,dialog=no"); the toolkit.defaultchromefeatures preference allows simple xulrunner-based applications to specify what features are passed to window.open() when the main application window is opened.
toolkit.defaultChromeURI - Archive of obsolete content
type: string specified by: default prefs of xulrunner applications default: none example: pref("toolkit.defaultchromeuri", "chrome://myapp/content/"); the toolkit.defaultchromeuri preference allows simple xulrunner-based applications to open a new window when the application is launched.
XULRunner - Archive of obsolete content
xulrunner also provides libxul, a solution which allows the embedding of mozilla technologies in other projects and products.
2006-11-24 - Archive of obsolete content
discussions microsummary w/ script a user created patch that will allow script to run in a sandbox during the update of a microsummary.
2006-12-01 - Archive of obsolete content
how do allow an internal web site to have universalbrowserwrite?
2006-11-10 - Archive of obsolete content
this feature consists of creating buttons using a small program, that allows you to create shortcuts to a particular address.
2006-11-17 - Archive of obsolete content
summary: mozilla.dev.platform - november 11th - november 17th, 2006 announcements no announcements this week traffic xulrunner: <browser> not allowing javascript popup windows b notes that when using xul elements <browser/> and <tabbrowser/> the javascript popup windows don't work out of the box and asks what needs to be implement.
2006-18-24 - Archive of obsolete content
summary: mozilla.dev.platform - november 18th - november 24th, 2006 announcements no announcements this week traffic xulrunner: <browser> not allowing javascript popup windows b notes that when using xul elements <browser/> and <tabbrowser/> the javascript popup windows don't work out of the box and asks what needs to be implement.
2006-10-20 - Archive of obsolete content
joes noticed that mp3 files are no longer allowed to be opened directly from email attachments in trunk builds of thunderbird and seamonkey.
JS-Engine FAQ - Archive of obsolete content
to write wrappers in pure javascript to interface with any c library on the system there are mechanisms such as xpcshell, wxjs, jsdb, jsni coding spidermonkey in c check out this tutorial how to compile tamarin on linux/x86 there is a patch that allows you to compile it.
2006-10-27 - Archive of obsolete content
multiple presshells discussion on why current interfaces allow for multiple presshells and how the relationships work for the following objects: docshell, presshell, prescontext, document, domwindow, widget, docshell and contentviewer.
2006-11-10 - Archive of obsolete content
the idea of using a single sheet and the per-site selectors that dbaron implemented would allow for a quick proof of concept.
Multi-process plugin architecture - Archive of obsolete content
in addition to crash protection, the multi-process plugin architecture allows firefox to see plugins which respond very slowly or have completely stopped responding.
Browser-side plug-in API - Archive of obsolete content
this chapter describes methods in the plug-in api that are provided by the browser; these allow call back to the browser to request information, tell the browser to repaint part of the window, and so forth.
NPN_GetAuthenticationInfo - Archive of obsolete content
this function allows the plugin to ask the browser for http authentication information for a domain.
NPN_GetValue - Archive of obsolete content
« gecko plugin api reference « browser side plug-in api summary allows the plug-in to query the browser for information.
NPN_GetValueForURL - Archive of obsolete content
description this entry point is designed to allow plugins which implement their own http stacks to form requests to the web server in the same way the browser does.
NPN_MemAlloc - Archive of obsolete content
since the browser and plug-ins share the same memory space, npn_memalloc allows plug-ins to take advantage of any customized memory allocation scheme the application may have, and allows the application to manage its memory more flexibly and efficiently.
NPP_GetValue - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary allows the browser to query the plug-in for information.
NPP_NewStream - Archive of obsolete content
this mode allows the plug-in full random access to the data using platform-specific file operations.
NPP_SetWindow - Archive of obsolete content
description the browser calls npp_setwindow after creating the instance to allow drawing to begin.
NPP_WriteReady - Archive of obsolete content
this function allows the browser to send only as much data to the instance as it can handle at one time, making resource use more efficient for both the browser and plug-in.
NP_GetValue - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary allows the browser to query the plug-in for information.
NPAPI plug-in side API - Archive of obsolete content
this chapter describes methods in the plug-in api that are available from the plug-in object; these allow plug-ins to interact with the browser.
Adobe Flash - Archive of obsolete content
this is currently not the case, but 12 is a sufficiently high version number (current versions are version 6r.79) to allow for some leeway for fixing this down the road.
Shipping a plugin as a Toolkit bundle - Archive of obsolete content
this allows a remote update file to be read periodically and an updated version of the plugin offered to the user or to mark the plugin as compatible with a wider range of applications.
Plugins - Archive of obsolete content
shipping a plugin as a toolkit bundle plugins can be shipped as a toolkit bundle, allowing a user to easily install, uninstall and manage their personal plugins.
Why Well-Formed Web RSS Module is Popular - Syndicating Your Comments - Archive of obsolete content
there aren't many blogs out there that don't allow commenting of blog posts.
Proposal - Archive of obsolete content
draft exists source guid when an rss item is posted in response to a previous item (called the source item) rss 2.0 offers the source element which allows the item to refer to the rss feed which contains the source item.
.htaccess ( hypertext access ) - Archive of obsolete content
cache control : .htaccess allows a server to control caching by web browsers, helps load pages faster, and reduces the data transfer.
SSL and TLS - Archive of obsolete content
the handshake allows the server to authenticate itself to the client using public-key techniques, then allows the client and the server to cooperate in the creation of symmetric keys used for rapid encryption, decryption, and tamper detection during the session that follows.
Vulnerabilities - Archive of obsolete content
another example is a race condition error that allows the attacker to perform a specific action with elevated privileges.
Sunbird Theme Tutorial - Archive of obsolete content
fixing bug 320823 if you are using the sunbird 0.3a1 release, or a test build before 2005-12-21, then you must apply a fix for bug 320823 to allow sunbird to use themes.
Tamarin Tracing Build Documentation - Archive of obsolete content
tamarin buildbot tryserver the tryserver/sandbox is setup to allow users to push any code changes that they would like to have tested in the automated build/test process prior to actually pushing the changes.
The Basics of Web Services - Archive of obsolete content
this short guide will allow you to learn more about web services.
Create Your Own Firefox Background Theme - Archive of obsolete content
duplicate names are not allowed, so you may need to try a few times to find a unique name.
Theme changes in Firefox 2 - Archive of obsolete content
it should use translucency to allow the window contents to be visible through it.
Scratchpad - Archive of obsolete content
it is also possible to use scratchpad over pages opened from a local file system, if permission policies allow that.
Developing cross-browser and cross-platform pages - Archive of obsolete content
opera 6+ allows users to set the browser identification string via a menu internet explorer uses the windows registry safari, konqueror and icab browsers can mask their browser identity under internet explorer or netscape labels a user or browser distributor can put what they want in the navigator.useragent string and this may trick your code into executing a "wrong" block of code.
Using workers in extensions - Archive of obsolete content
this is because only the main thread is allowed to access the user interface.
-ms-content-zoom-limit-max - Archive of obsolete content
initial value400%applies tonon-replaced block-level elements and non-replaced inline-block elementsinheritednopercentagesthe largest allowed zoom factor.
-ms-content-zoom-limit-min - Archive of obsolete content
initial value100%applies tonon-replaced block-level elements and non-replaced inline-block elementsinheritednopercentagesthe smallest allowed zoom factor.
-ms-hyphenate-limit-chars - Archive of obsolete content
negative values are not allowed.
-ms-hyphenate-limit-lines - Archive of obsolete content
(hyphenation is effectively disabled.) negative values are not allowed.
-ms-scroll-rails - Archive of obsolete content
this value allows for free-form panning.
::-ms-check - Archive of obsolete content
allowable properties only the following css properties can be used in a rule with ::-ms-check in its selector.
::-ms-clear - Archive of obsolete content
such inputs include: <input type="color"> <input type="date"> <input type="datetime"> <input type="datetime-local"> <input type="email"> <input type="month"> <input type="number"> <input type="search"> <input type="tel"> <input type="time"> <input type="url"> <input type="week"> allowable properties only the following css properties can be used in a rule with ::-ms-clear in its selector.
::-ms-expand - Archive of obsolete content
allowable properties only the following css properties can be used in a rule with ::-ms-expand in its selector.
::-ms-fill-lower - Archive of obsolete content
allowable properties only the following css properties can be used in a rule with ::-ms-fill-lower in its selector.
::-ms-fill-upper - Archive of obsolete content
allowable properties only the following css properties can be used in a rule with ::-ms-fill-upper in its selector.
::-ms-reveal - Archive of obsolete content
allowable properties only the following css properties can be used in a rule with ::-ms-reveal in its selector.
::-ms-thumb - Archive of obsolete content
allowable properties only the following css properties can be used in a rule with ::-ms-thumb in its selector.
::-ms-ticks-after - Archive of obsolete content
allowable properties only the following css properties can be used in a rule with ::-ms-ticks-after in its selector.
::-ms-ticks-before - Archive of obsolete content
allowable properties only the following css properties can be used in a rule with ::-ms-ticks-before in its selector.
::-ms-tooltip - Archive of obsolete content
allowable properties only the following css properties can be used in a rule with ::-ms-tooltip in its selector.
::-ms-track - Archive of obsolete content
allowable properties only the following css properties can be used in a rule with ::-ms-track in its selector.
::-ms-value - Archive of obsolete content
allowable properties only the following css properties can be used in a rule with ::-ms-value in its selector.
azimuth - Archive of obsolete content
ArchiveWebCSSazimuth
stereo output produce a lateral sound stage, while binaural headphones and multi-speaker setups allow for a fully three-dimensional stage.
CSS - Archive of obsolete content
ArchiveWebCSS
stereo output produce a lateral sound stage, while binaural headphones and multi-speaker setups allow for a fully three-dimensional stage.display-insidethe display-inside css property specifies the inner display type of the box generated by an element, dictating how its contents lay out inside the box.display-outsidethe display-outside css property specifies the outer display type of the box generated by an element, dictating how the element participates in its parent formatting context.
Processing XML with E4X - Archive of obsolete content
any xml object that represents a node or attribute provides a name() method which returns a qname object, allowing easy inspection of namespaced elements.
The global XML object - Archive of obsolete content
the xml object has several properties that allow you to customize parsing and serialization of e4x.
Expression closures - Archive of obsolete content
javascript 1.7 and older: function(x) { return x * x; } javascript 1.8: function(x) x * x this syntax allows you to leave off the braces and 'return' statement - making them implicit.
GetObject - Archive of obsolete content
some applications allow you to activate part of a file.
Object.getNotifier() - Archive of obsolete content
the object.getnotifer() method was used to create an object that allows to synthetically trigger a change, but has been deprecated and removed in browsers.
Object.prototype.unwatch() - Archive of obsolete content
note: the reason for unwatch() to take the property name prop as its only parameter is due to the "single handler allowing" behavior of the watch() method.
JSObject - Archive of obsolete content
jsobject allows java to manipulate javascript objects.
Old Proxy API - Archive of obsolete content
(name, desc) { object.defineproperty(obj, name, desc); }, delete: function(name) { return delete obj[name]; }, fix: function() { if (object.isfrozen(obj)) { return object.getownpropertynames(obj).map(function(name) { return object.getownpropertydescriptor(obj, name); }); } // as long as obj is not frozen, the proxy won't allow itself to be fixed return undefined; // will cause a typeerror to be thrown }, // derived traps has: function(name) { return name in obj; }, hasown: function(name) { return object.prototype.hasownproperty.call(obj, name); }, get: function(receiver, name) { return obj[name]; }, set: function(receiver, name, val) { obj[name] = val; ret...
Sharp variables in JavaScript - Archive of obsolete content
a sharp variable is a syntax in object initializers that allows serialization of objects that have cyclic references or multiple references to the same object.
Implementation Status - Archive of obsolete content
5.2.1 additional xforms datatypes to allow empty content unsupported 5.2.2 xforms:listitem supported 5.2.3 xforms:listitems supported 5.2.4 xforms:daytimeduration supported 5.2.5 xforms:yearmonthduration supported 5.2.6 xf...
RFE to the XForms API - Archive of obsolete content
ArchiveWebXFormsRFEXForms API
as an example, the nsixformsaccessors interface which allows a user to get/set the value of an instance node and get the state of an instance node, is exposed by the nsixformsdelegate interface using the accessors property.
Requests For Enhancement - Archive of obsolete content
ArchiveWebXFormsRFE
our custom control interfaces allows for the exchange of data between any xml element and and an xforms model.
XForms Styling - Archive of obsolete content
triggers use appearance="minimal" to be able to style buttons portability the mozilla xforms extension is one of the few xforms processors which allow for styling of the xforms elements directly, using mostly standard css.
XForms Range Element - Archive of obsolete content
introduction allows the user to choose a value from within a specific range of values (see the spec).
XForms Repeat Element - Archive of obsolete content
since html:table doesn't (and probably never will) allow xforms:repeat elements as children, another syntax is needed.
XForms Switch Module - Archive of obsolete content
introduction xforms switch module define a switch construct that allows the creation of user interfaces where the user interface can be varied based on user actions and events.
XForms Trigger Element - Archive of obsolete content
introduction allows the user to initiate actions (see the spec).
Archived open Web documentation - Archive of obsolete content
sharp variables in javascript a sharp variable is a syntax in object initializers that allows serialization of objects that have cyclic references or multiple references to the same object.
Fixing Table Inheritance in Quirks Mode - Archive of obsolete content
/* rule to fix quirks-mode inheritance behavior */ table, caption { font-size: inherit; font-weight: inherit; font-style: inherit; font-variant: inherit; } this rule will override the rule in quirk.css and thus allow the author to have reliable inheritance of font styles into tables when in "quirks" mode.
Mozilla's DOCTYPE sniffing - Archive of obsolete content
(almost all, rather than all, to allow for the following points as well.) authors writing web pages to current standards should be able to trigger strict mode.
RDF in Fifty Words or Less - Archive of obsolete content
this syntax allows the graph-like model to be communicated between "agents".
XQuery - Archive of obsolete content
xquseme is a working proof-of-concept (so far tested on windows and linux with java installed; mac does not work) extension which allows one to perform xqueries on external urls, the currently loaded webpage (even if originally from poorly formed html), and/or xml (including well-formed xhtml) documents stored locally.
Using the DOM File API in chrome code - Extensions
this protects users from the inherent security risks associated with allowing web content free access to the contents of their disks.
Game monetization - Game development
there are many companies offering advert systems — you sign up and allow them to show adverts in exchange for a percentage of the earnings.
Building up a basic demo with the PlayCanvas engine - Game development
this allows us to make some space to visualize the objects that we will create later on.
GLSL Shaders - Game development
this allows the cpu to focus its processing power on other tasks, like executing code.
Async scripts for asm.js - Game development
in gecko, async compilation allows the javascript engine to compile the asm.js off the main thread when the game is loading and cache the generated machine code so that the game doesn't need to be compiled on subsequent loads (starting in firefox 28).
Unconventional controls - Game development
the boards and using them may look like this: var cylon = require('cylon'); cylon.robot({ connections: { arduino: { adaptor: 'firmata', port: '/dev/ttyacm0' } }, devices: { makey: { driver: 'makey-button', pin: 2 } }, work: function(my) { my.makey.on('push', function() { console.log("button pushed!"); }); } }).start(); as the description says: this gpio driver allows you to connect a 10 mohm resistor to a digital pin on your arduino or raspberry pi to control your robots with bananas, clay, or drawable circuitry.
Implementing game control mechanisms - Game development
desktop gamepad controls — the gamepad api rather usefully allows gamepads to be used for controlling web apps on desktop/laptop, for that console feel.
Crisp pixel art look with image-rendering - Game development
original size 4x size 4x size (scaled with an image editor) none vendor's algorithm nearest-neighbor algorithm a css-based solution the good news is that you can use css to automatically do the up-scaling, which not only solves the blur problem, but also allows you to use the images in their original, smaller size, thus saving download time.
Efficient animation for web games - Game development
there are signals at the beginning and end of animations that allow you to attach javascript callbacks and form a rudimentary form of synchronisation (though there are no guarantees on how promptly these callbacks will happen).
Create the Canvas and draw on it - Game development
the <canvas> element has an id of mycanvas to allow us to easily grab a reference to it, and it is 480 pixels wide and 320 pixels high.
Game over - Game development
here's the piece of code from the third lesson where we made the ball bounce off the walls: if(x + dx > canvas.width-ballradius || x + dx < ballradius) { dx = -dx; } if(y + dy > canvas.height-ballradius || y + dy < ballradius) { dy = -dy; } instead of allowing the ball to bounce off all four walls, let's only allow three now — left, top and right.
Paddle and keyboard controls - Game development
add the following just below your drawball() function: function drawpaddle() { ctx.beginpath(); ctx.rect(paddlex, canvas.height-paddleheight, paddlewidth, paddleheight); ctx.fillstyle = "#0095dd"; ctx.fill(); ctx.closepath(); } allowing the user to control the paddle we can draw the paddle wherever we want, but it should respond to the user's actions.
Move the ball - Game development
this would take several lines of code — a significantly more complex step than we have seen so far, especially if we want to add paddle and brick collisions too — but fortunately phaser allows us to do this much more easily than if we wanted to use pure javascript.
Scaling - Game development
user_scale — allows you to have custom dynamic scaling, calculating the size, scale and ratio on your own; again, this is more of an advanced mode the other two lines of code in the preload() function are responsible for aligning the canvas element horizontally and vertically, so it is always centered on screen regardless of size.
The score - Game development
let's see how we can add a victory state, allowing us to win the game.
2D breakout game using Phaser - Game development
frameworks speed up development time and help take care of the boring parts, allowing you to concentrate on the fun stuff.
Ajax - MDN Web Docs Glossary: Definitions of Web-related terms
ajax allows you to update parts of the dom of an html page instead without the need for a full page refresh.
Abstraction - MDN Web Docs Glossary: Definitions of Web-related terms
abstraction in computer programming is a way to reduce complexity and allow efficient design and implementation in complex software systems.
Asynchronous - MDN Web Docs Glossary: Definitions of Web-related terms
software design asynchronous software design expands upon the concept by building code that allows a program to ask that a task be performed alongside the original task (or tasks), without stopping to wait for the task to complete.
CMS - MDN Web Docs Glossary: Definitions of Web-related terms
a cms (content management system) is software that allows users to publish, organize, change, or remove various kinds of content, not only text but also embedded images, video, audio, and interactive code.
CORS-safelisted request header - MDN Web Docs Glossary: Definitions of Web-related terms
you can safelist more headers using the access-control-allow-headers header and also list the above headers there to circumvent the following additional restrictions: additional restrictions cors-safelisted headers must also fulfill the following requirements in order to be a cors-safelisted request header: for accept-language and content-language: can only have values consisting of 0-9, a-z, a-z, space or *,-.;=.
Canvas - MDN Web Docs Glossary: Definitions of Web-related terms
the canvas element is part of html5 and allows for dynamic, scriptable rendering of 2d and 3d shapes and bitmap images.
Client hints - MDN Web Docs Glossary: Definitions of Web-related terms
client hints are a set of http request header fields for proactive content negotiation allowing clients to indicate a list of device and agent specific preferences.
Computer Programming - MDN Web Docs Glossary: Definitions of Web-related terms
for example, a program that helps scientists with complex calculations, a database that stores huge amounts of data, a web site that allows people to download music, or animation software that allows people to create animated movies.
Cross-site scripting - MDN Web Docs Glossary: Definitions of Web-related terms
cross-site scripting (xss) is a security exploit which allows an attacker to inject into a website malicious client-side code.
DOM (Document Object Model) - MDN Web Docs Glossary: Definitions of Web-related terms
the dom is one of the most-used apis on the web because it allows code running in a browser to access and interact with every node in the document.
Domain - MDN Web Docs Glossary: Definitions of Web-related terms
if you like to own a domain you have to register it with one of the many registrars who are allowed to do so with a top-level domain registry.
FTP - MDN Web Docs Glossary: Definitions of Web-related terms
increasingly, though, teams and hosting accounts don't allow ftp and instead rely on a version control system like git.
Fetch directive - MDN Web Docs Glossary: Definitions of Web-related terms
for instance, script-src allows developers to allow trusted sources of script to execute on a page, while font-src controls the sources of web fonts.
Fork - MDN Web Docs Glossary: Definitions of Web-related terms
basically, if the license of the original software allows, you can copy the code to develop your own version of it, with your own additions, which will be a "fork".
Gzip compression - MDN Web Docs Glossary: Definitions of Web-related terms
it is based on the deflate algorithm that allows files to be made smaller in size which allows for faster network transfers.
Graceful degradation - MDN Web Docs Glossary: Definitions of Web-related terms
it is a useful technique that allows web developers to focus on developing the best possible websites, given that those websites are accessed by multiple unknown user-agents.
HTTP header - MDN Web Docs Glossary: Definitions of Web-related terms
a basic request with one header: get /example.http http/1.1 host: example.com redirects have mandatory headers (location): 302 found location: /newpage.html a typical set of headers: 304 not modified access-control-allow-origin: * age: 2318192 cache-control: public, max-age=315360000 connection: keep-alive date: mon, 18 jul 2016 16:06:00 gmt server: apache vary: accept-encoding via: 1.1 3dc30c7222755f86e824b93feb8b5b8c.cloudfront.net (cloudfront) x-amz-cf-id: tol0fem6ui4fgldrkjx0vao5hpkkgzulyn2twd2gawltr7vlnjtvzw== x-backend-server: developer6.webapp.scl3.mozilla.com x-cache: hit from cloudfront x-cache-info: cac...
Hoisting - MDN Web Docs Glossary: Definitions of Web-related terms
learn more technical example one of the advantages of javascript putting function declarations into memory before it executes any code segment is that it allows you to use a function before you declare it in your code.
IPv6 - MDN Web Docs Glossary: Definitions of Web-related terms
slowly ipv6 is replacing ipv4, among other reasons because ipv6 allows for many different ip addresses.
Java - MDN Web Docs Glossary: Definitions of Web-related terms
the jvm is available across many platforms, which allows java programs to run almost everywhere without the need to be compiled or packaged again.
JavaScript - MDN Web Docs Glossary: Definitions of Web-related terms
node.js - built using chrome's v8 javascript engine - allows developers to use javascript as a scripting language to automate things on a computer and build fully functional http and web sockets servers.
Lossless compression - MDN Web Docs Glossary: Definitions of Web-related terms
lossless compression is a class of data compression algorithms that allows the original data to be perfectly reconstructed from the compressed data.
Media (CSS) - MDN Web Docs Glossary: Definitions of Web-related terms
css offers several features that allow you to tweak your document's styles—or even offer different styles—according to the media type (such as screen or print, to name two) or media capabilities (such as width, resolution, or other values) of the viewer's device.
Network throttling - MDN Web Docs Glossary: Definitions of Web-related terms
browser developer tools generally have network throttling options, to allow you to test your app under slow network conditions.
Node.js - MDN Web Docs Glossary: Definitions of Web-related terms
node.js is a cross-platform javascript runtime environment that allows developers to build server-side and network applications with javascript.
POP3 - MDN Web Docs Glossary: Definitions of Web-related terms
clients usually retrieve all messages and then delete them from the server, but pop3 does allow retaining a copy on the server.
Progressive Enhancement - MDN Web Docs Glossary: Definitions of Web-related terms
progressive enhancement is a useful technique that allows web developers to focus on developing the best possible websites while making those websites work on multiple unknown user agents.
Prototype-based programming - MDN Web Docs Glossary: Definitions of Web-related terms
in simple words: this type of style allows the creation of an object without first defining its class.
QUIC - MDN Web Docs Glossary: Definitions of Web-related terms
the creation of quic allows developers to conduct experiments and try new things faster.
Request header - MDN Web Docs Glossary: Definitions of Web-related terms
request headers, like accept, accept-*, or if-* allow to perform conditional requests; others like cookie, user-agent, or referer precise the context so that the server can tailor the answer.
Response header - MDN Web Docs Glossary: Definitions of Web-related terms
note that strictly speaking, the content-encoding and content-type headers are entity header: 200 ok access-control-allow-origin: * connection: keep-alive content-encoding: gzip content-type: text/html; charset=utf-8 date: mon, 18 jul 2016 16:06:00 gmt etag: "c561c68d0ba92bbeb8b0f612a9199f722e3a621a" keep-alive: timeout=5, max=997 last-modified: mon, 18 jul 2016 02:36:04 gmt server: apache set-cookie: mykey=myvalue; expires=mon, 17-jul-2017 16:06:00 gmt; max-age=31449600; path=/; secure transfer-encoding: chunked va...
SIMD - MDN Web Docs Glossary: Definitions of Web-related terms
simd allows one same operation to be performed on multiple data points resulting in data level parallelism and thus performance gains — for example, for 3d graphics and video processing, physics simulations or cryptography, and other domains.
SISD - MDN Web Docs Glossary: Definitions of Web-related terms
see also simd for a parallel architecture that allows one same operation to be performed on multiple data points.
SPA (Single-page application) - MDN Web Docs Glossary: Definitions of Web-related terms
this therefore allows users to use websites without loading whole new pages from the server, which can result in performance gains and a more dynamic experience, with some tradeoff disadvantages such as seo, more effort required to maintain state, implement navigation, and do meaningful performance monitoring.
SQL Injection - MDN Web Docs Glossary: Definitions of Web-related terms
as follows: "select count(*) from users where username=' " + txt.user.text+" ' and password=' "+ txt.password.text+" ' "; now suppose user enters the username: admin and password: passwd123, so after clicking on the log in button, sql query will run as follows: "select count(*) from users where username=' admin ' and password=' passwd123 ' "; if the credentials are correct, then the user is allowed to log in, so it's a very simple (and therefore insecure) mechanism.
SRI - MDN Web Docs Glossary: Definitions of Web-related terms
it works by allowing you to provide a cryptographic hash that a fetched file must match.
SVG - MDN Web Docs Glossary: Definitions of Web-related terms
html5 now allows direct embedding of svg tags in an html document.
SVN - MDN Web Docs Glossary: Definitions of Web-related terms
it allows developers to keep a history of text and code modifications.
Scroll container - MDN Web Docs Glossary: Definitions of Web-related terms
the scroll container allows the user to scroll through parts of the overflow region that would otherwise be clipped and hidden from view.
Server Timing - MDN Web Docs Glossary: Definitions of Web-related terms
the server timing specification enables the server to communicate performance metrics from the request-response cycle to the user agent, and utilizes a javascript interface to allow applications to collect, process, and act on these metrics to optimize application delivery.
Snap positions - MDN Web Docs Glossary: Definitions of Web-related terms
this allows a scrolling experience that gives the effect of paging through content rather than needing to drag content into view.
State machine - MDN Web Docs Glossary: Definitions of Web-related terms
there are two types of basic state machines: deterministic finite state machine this kind allows only one possible transition for any allowed input.
Static typing - MDN Web Docs Glossary: Definitions of Web-related terms
in most of these languages, types must be expressly indicated by the programmer; in other cases (such as ocaml), type inference allows the programmer to not indicate their variable types.
Stylesheet - MDN Web Docs Glossary: Definitions of Web-related terms
external stylesheets are generally preferred because they allow you to control the styling of multiple pages from a single place, rather than having to repeat the css across each page.
TURN - MDN Web Docs Glossary: Definitions of Web-related terms
turn is used by webrtc to allow any two devices on the internet to enter a peer-to-peer connection.
Tag - MDN Web Docs Glossary: Definitions of Web-related terms
note that the end tag's name is preceded by a slash character, </p>, and that in empty elements, the end tag is neither required nor allowed.
VoIP - MDN Web Docs Glossary: Definitions of Web-related terms
voip allows you to make a call directly from a computer, a special voip phone, or a traditional phone connected to a special adapter.
WebDAV - MDN Web Docs Glossary: Definitions of Web-related terms
webdav allows clients to add, delete, and retrieve webpage metadata (e.g.
Array - MDN Web Docs Glossary: Definitions of Web-related terms
each item in an array has a number attached to it, called a numeric index, that allows you to access it.
caret - MDN Web Docs Glossary: Definitions of Web-related terms
on the web, a caret is used to represent the insertion point in <input> and <textarea> elements, as well as any elements whose contenteditable attribute is set, thereby allowing the contents of the element to be edited by the user.
Character encoding - MDN Web Docs Glossary: Definitions of Web-related terms
a sequence of bytes allows for different textual interpretations.
HTTPS - MDN Web Docs Glossary: Definitions of Web-related terms
this secure connection allows clients to safely exchange sensitive data with a server, such as when performing banking activities or online shopping.
Routers - MDN Web Docs Glossary: Definitions of Web-related terms
they are distributed by retailers allowing user interaction to the internet.
Assessment: Accessibility troubleshooting - Learn web development
how can you allow them to still access the audio?
Accessibility - Learn web development
css and javascript accessibility best practices css and javascript, when used properly, also have the potential to allow for accessible web experiences, but if misused they can significantly harm accessibility.
Debugging CSS - Learn web development
for example in firefox there are some excellent tools for working visually with css layout, allowing you to inspect and edit grid layouts, flexbox, and shapes.
Organizing your CSS - Learn web development
build systems for css another way to organise css is to take advantage of some of the tooling that is available for front-end developers, which allows you to take a slightly more programmatic approach to writing css.
Overflowing content - Learn web development
this allows the browser to determine if it should display scrollbars.
Attribute selectors - Learn web development
substring matching selectors these selectors allow for more advanced matching of substrings inside the value of your attribute.
CSS selectors - Learn web development
there are a wide variety of css selectors available, allowing for fine-grained precision when selecting elements to style.
Styling tables - Learn web development
use table-layout: fixed to create a more predictable table layout that allows you to easily set column widths by setting width on their headings (<th>).
Floats - Learn web development
the background of floats the float property was introduced to allow web developers to implement simple layouts involving an image floating inside a column of text, with the text wrapping around the left or right of it.
Grids - Learn web development
try changing grid-auto-rows to use a minmax value: .container { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: minmax(100px, auto); grid-gap: 20px; } if you add extra content you will see that the track expands to allow it to fit.
Multiple-column layout - Learn web development
when you turn your content into a multicol container it is fragmented into columns, and the content breaks to allow this to happen.
Supporting older browsers - Learn web development
feature queries feature queries allow you to test whether a browser supports any particular css feature.
How CSS is structured - Learn web development
for example, perhaps your cms only allows you to edit the html body.
CSS first steps - Learn web development
css (cascading style sheets) allows you to create great-looking web pages, but how does it work under the hood?
Use CSS to solve common problems - Learn web development
LearnCSSHowto
how to change the box model completely using box-sizing how to control backgrounds how to control borders how to style an html table how to add shadows to boxes uncommon and advanced techniques css allows some advanced design techniques.
Styling links - Learn web development
inline-block allows us to do this.
Typesetting a community school homepage - Learn web development
give your headings a little bit of letter-spacing to make them not too too squashed, and allow the letters to breathe a bit.
Styling text - Learn web development
web fonts here we will explore web fonts in detail — these allow you to download custom fonts along with your web page, to allow for more varied, custom text styling.
How do you make sure your website works properly? - Learn web development
403: forbidden you aren't allowed to display the resource.
What do common web layouts contain? - Learn web development
simple layouts are easier to implement, but allow yourself room to express your creativity in this area.
How can we design for all types of users? - Learn web development
if you want an elastic/responsive website, and you don't know what the browser's default width is, you can use the max-width property to allow up to 70 characters per line and no more: div.container { max-width:70em; } alternative content for images, audio, and video websites often include stuff besides plain text.
How does the Internet work? - Learn web development
as we saw, the internet is a technical infrastructure which allows billions of computers to be connected all together.
What is the difference between webpage, website, web server, and search engine? - Learn web development
each web page of a given website provides explicit links—most of the time in the form of clickable portion of text—that allow the user to move from one page of the website to another.
What is a Domain Name? - Learn web development
tlds containing .gov are only allowed to be used by government departments.
What software do I need to build a website? - Learn web development
you should make sure your hosting provider allows use of a secure connection, e.g.
Basic native form controls - Learn web development
the user is allowed to select multiple files in this case.
How to build custom form controls - Learn web development
the tabindex attribute is what allows the user to focus the control.
Styling web forms - Learn web development
note: there are some proprietary css pseudo-elements available that allow you to style internal components of these form controls, such as ::-moz-range-track, but these are not consistent across browsers, so can't be relied upon.
Test your skills: HTML5 controls - Learn web development
html5 controls 2 next, we want you to implement a slider control to allow the user to choose a maximum number of people to invite to their party.
Test your skills: Other controls - Learn web development
other controls 2 now it's time to have a go at implementing a drop-down select menu, to allow a user to pick their favourite food from the choices provided.
Example - Learn web development
ox; box-sizing: border-box; /* to harmonize the look & feel of text field border */ border: 1px solid #999; } input:focus, textarea:focus { /* to give a little highligh on active elements */ border-color: #000; } textarea { /* to properly align multiline text field with their label */ vertical-align: top; /* to give enough room to type some text */ height: 5em; /* to allow users to resize any textarea vertically it works only on chrome, firefox and safari */ resize: vertical; } .button { /* to position the buttons to the same position of the text fields */ padding-left: 90px; /* same size as the label elements */ } button { /* this extra magin represent the same space as the space between the labels and their text fields */ margin-left: .5em; ...
How the Web works - Learn web development
in addition to the client and the server, we also need to say hello to: your internet connection: allows you to send and receive data on the web.
Advanced text formatting - Learn web development
the <time> element allows you to attach an unambiguous, machine-readable time/date for this purpose.
Debugging HTML - Learn web development
note: html is parsed permissively because when the web was first created, it was decided that allowing people to get their content published was more important than making sure the syntax was absolutely correct.
Mozilla splash page - Learn web development
glitch is probably better for this example, as it allows you upload assets like images, whereas some of the other tools don't.
Build your own function - Learn web development
let's improve our function by adding some parameters, allowing us to call it with some different options.
Looping code - Learn web development
first, some simple html — a text <input> allowing us to enter a name to search for, a <button> element to submit a search, and a <p> element to display the results in: <label for="search">search by contact name: </label> <input id="search" type="text"> <button>search</button> <p></p> now on to the javascript: const contacts = ['chris:2232322', 'sarah:3453456', 'bill:7654322', 'mary:9998769', 'dianne:9384975']; const para = document.querys...
Function return values - Learn web development
this little page will allow you to enter a number into the text box, and display different numbers related to it in the paragraph below.
JavaScript building blocks - Learn web development
functions allow you to store a piece of code that does a single task inside a defined block, and then call that code whenever you need it using a single short command — rather than having to type out the same code multiple times.
Storing the information you need — Variables - Learn web development
this isn't allowed and causes an error.
What went wrong? Troubleshooting JavaScript - Learn web development
it won't always be that simple to work out what's wrong in your code, but at least this will save you a few hours of sleep and allow you to progress a bit faster when things don't turn out right, especially in the earlier stages of your learning journey.
Object-oriented JavaScript for beginners - Learn web development
javascript has a built-in method called create() that allows you to do that.
Object prototypes - Learn web development
summary this article has covered javascript object prototypes, including how prototype object chains allow objects to inherit features from one another, the prototype property and how it can be used to add methods to constructors, and other related topics.
JavaScript — Dynamic client-side scripting - Learn web development
javascript is a programming language that allows you to implement complex things on web pages.
What is web performance? - Learn web development
does the site load quickly, allow the user to start interacting with it quickly, and offer reassuring feedback if something is taking time to load (e.g.
The business case for web performance - Learn web development
a performance budget is a set of limits that are set to specify limits, such as maximum number of http requests allowed, the maximum total size of all the assets combined, the minimum allowable fps on a specific device, etc, that must be maintained.
Web performance - Learn web development
javascript performance best practices javascript, when used properly, can allow for interactive and immersive web experiences — or it can significantly harm download time, render time, in-app performance, battery life, and user experience.
Accessibility in React - Learn web development
look out for opportunities to practice them more, because doing so will allow you to create inclusive experiences for users.
React resources - Learn web development
the react devtools utility allows you to inspect the internals of your react application directly in the browser.
Starting our Svelte Todo list app - Learn web development
note: you can put your components anywhere inside the src folder, but the components folder is a recognized convention to follow, allowing you to find your components easily.
Focus management with Vue refs - Learn web development
we'll look at using vue refs to handle this — an advanced feature that allows you to have direct access to the underlying dom nodes below the virtual dom, or direct access from one component to the internal dom structure of a child component.
Rendering a list of Vue components - Learn web development
what we really need next is the ability to allow our users to enter their own todo items into the app, and for that we'll need a text <input>, an event to fire when the data is submitted, a method to fire upon submission to add the data and rerender the list, and a model to control the data.
Implementing feature detection - Learn web development
this is a property that allows you to run media query tests inside javascript.
Git and GitHub - Learn web development
all developers will use some kind of version control system (vcs), a tool to allow them to collaborate with other developers on a project without danger of them overwriting each other's work, and roll back to previous versions of the code base if a problem is discovered later on.
Accessibility/LiveRegionDevGuide
current utterances should be allowed to finish but the 'rude' messages should be output as soon as possible.
Accessibility information for UI designers and developers
ensure your design is flexible enough to allow for this.
Frequently Asked Questions for Lightweight themes
what's the maximum file size allowable for my lightweight theme?
Lightweight themes
duplicate names are not allowed, so you may need to try a few times to find a unique name.
Theme concepts
practically, this means you would need to allow for a width of up to 5120 pixels wide (for the next generation of 5k monitors).
Themes
themes allow you to change the look and feel of the user interface and personalize it to your tastes.
What to do and what not to do in Bugzilla
canconfirm privilege the canconfirm privilege allows you to confirm bugs and also to start your bug reports in the confirmed state (new).
Continuous Integration
games benchmarking (firefox) under development, the games benchmarking harness (aka mozbench) will allow a number of games-related benchmarks to be run against firefox and chrome.
Creating a spell check dictionary add-on
parts needed to create a dictionary add-on, you first need two things: a spell check dictionary in hunspell or myspell format, with a license which allows you to use it.
Creating Sandboxed HTTP Connections
these methods provide all the required functionality needed to modify cookies before they are processed/sent, allowing for sandboxed cookie connections that don't affect the user's cookies.
Debugging JavaScript
dump() the dump() function allows you to print text on the native console.
HTTP logging
this allows you to capture only the "interesting" part of the browser's behavior (i.e.
The Firefox codebase: CSS Guidelines
also, it is good practice to introduce a common class when the new element you are styling reuses some styles from another element, this allows the maintenance cost and the amount of code duplication to be reduced.
Creating Custom Events That Can Pass Data
the problem that extension developers will hit is that you are not allowed derive from nsdomevent in an extension.
Displaying Places information using views
it allows you to do things like getting the nsinavhistoryresult instance that a view displays and examining its selected nodes.
Limitations of chrome scripts
add-on code is still allowed to use cpows "unsafely".
Process scripts
in just about every respect, using process scripts is like using frame scripts: you can pass the allowdelayedload to loadprocessscript().
Message manager
they are particularly useful for allowing chrome code, including the browser's code and extension's code, to access web content while the browser is running web content in a separate process.
Firefox Operational Information Database: SQLite
the sqlite manager add-on allows convenient browsing of this information.
HTMLIFrameElement.download()
options optional an options object allowing optional settings to be specified for the download.
HTMLIFrameElement.executeScript()
the executescript() method of the htmliframeelement interface allows a specified script to be executed against a page loaded in the browser <iframe>.
mozbrowsercaretstatechanged
senddocommandmsg a method allowing you to issue a command via an anonymouse function, i.e.
HTMLIFrameElement.sendMouseEvent()
the sendmouseevent() method of the htmliframeelement interface allows you to fake a mouse event and send it to the browser <iframe>'s content.
HTMLIFrameElement.sendTouchEvent()
the sendtouchevent() method of the htmliframeelement allows you to fake a touch event and send it to the browser <iframe>'s content.
Chrome-only API reference
MozillaGeckoChromeAPI
browser apithe html browser api is an extension of the html <iframe> element that allows web apps to implement browsers or browser-like applications.
MozBeforePaint
this allows multiple animations to remain in sync with one another within the context of a given window.
Embedding Mozilla
gecko allows third-party developers to use the same technology as found in mozilla.
Getting from Content to Layout
changes to a document originate in the content tree (from dom modification by scripting, insertion of elements from the parser, etc.) and are propogated to the layout tree through magic that primarily resides in //github.com/realityripple/uxp/blob/master/layout/base/nscssframeconstructor.cpp the frame constructor implements nsimutationobserver which allows it to "watch" the content tree.
IPC Protocol Definition Language (IPDL)
ipdl, short for "ipc (inter-process communication) protocol definition language", is a mozilla-specific language allowing c++ code to pass messages between processes or threads in an organized and secure way.
Integrated Authentication
if you wish to use non-fully-qualified entries of the form mydomain.com in the above preferences for ntlm and spnego authentication, you will also need to set the preferences network.automatic-ntlm-auth.allow-non-fqdn and network.negotiate-auth.allow-non-fqdn (respectively) to true.
Addon
operations my be restricted based on system policies (e.g., the system administrator may not allow certain add-ons to be uninstalled), add-on type (e.g., themes may not be disabled), or add-on state (e.g., an incompatible add-on cannot be enabled).
Assert.jsm
undefined ok( actual, message ); parameters actual test subject to be evaluated as truthy message short explanation of the expected result equal() the equality assertion tests shallow, coercive equality with ==.
Dict.jsm
methods copy() returns a shallow copy of the dictionary; that is, a copy of the dictionary including the items immediately included within the dictionary; however, any objects referenced by those top-level objects are not copied.
DownloadSummary
this allows the summary to be used without requiring the initialization of the downloadlist first.
Http.jsm
submitting post data httprequest allows attaching data to the post requests.
JNI.jsm
if you would like to support versions before that, you can copy and paste the contents of the jsm file int jni stands for java native interface; this library allows calling java code running in java virtual machines (jvms), etc.
JavaScript OS.Constants
o_symlink allow opening of symbolic links.
JavaScript OS
the javascript os module contains tools that allow chrome content (i.e.
PromiseWorker.jsm
javascript files imported into the worker scope and main thread scope which allows posting to the worker and receiving in the form of a promise.
Sqlite.jsm
sqlite.jsm exposes a transaction api built on top of task.jsm that allows transactions to be written as procedural javascript functions (as opposed to a series of callback driven operations).
Using JavaScript code modules
unloading code modules requires gecko 7.0(firefox 7.0 / thunderbird 7.0 / seamonkey 2.4) components.utils.unload() allows you to unload a previously imported code module.
WebChannel.jsm
webchannel(string webchannelid, string originorpermission); 2nd argument is a permission for which the permission manager will be checked to determine if the request is allowed.
WebRequest.jsm
redirection is not allowed in onbeforerequest or onheadersreceived, but is allowed in onbeforesendheaders.
source-editor.jsm
set it to false to allow editing.
L10n Checks
it allows mozilla localizers to easily check their work.
Localizing extension metadata on addons.mozilla.org
step 4 allows you to translate any of the above fields into any other language amo supports.
Localizing with Mercurial
mercurial allows localizers to work locally (on their machines) and then push (an hg term) changes to a remote repository, which usually is hosted on the mozilla servers (hg.mozilla.org).
Localizing with Pontoon
user menu allows for user-specific tasks, like commiting to repository, downloading files and signing out.
Localizing without a specialized tool
repeating the process allows a localizer to create a testable package to see his or her work as they progress to a final version.
Initial setup
wget wget is a command-line utility that allows you to retrieve files using internet protocols.
Release phase
next, try issuing the following command: $ ssh hg.mozilla.org if ssh is working fine, you should see the following message: no interactive shells allowed here!
Translation phase
these are the l10n tools we use to localize mozilla web projects: pontoon a web-based, what-you-see-is-what-you-get (wysiwyg) l10n tool that allows you to localize mozilla websites within the site itself.
SVN for Localizers
it's a handy tool that allows us to grab, change, and store versions of source files in one location.
gettext
gettext's context feature allows the developer to distinguish between two identical english strings and disambiguate the translation.
Fonts for Mozilla 2.0's MathML engine
the license allows you to "use this font as permitted by the eula for the product in which this font is included to display and print content", so consulting your lawyer is recommended if considering installing this on systems without the associated product.
Using the viewport meta tag to control layout on mobile browsers
the maximum-scale, minimum-scale, and user-scalable properties control how users are allowed to zoom the page in or out.
Mozilla Web Developer FAQ
style sheet processing instructions are only allowed in the prolog of xml documents.
Mozilla Development Strategies
having parallel trees should allow you to work on other items while you are awaiting reviews.
Mozilla Quirks Mode Behavior
in quirks mode, the css parser allows {} around the contents of style attributes (bug 99554).
Mozilla Style System Documentation
this double tree (style context tree and rule tree) allows for sharing of style data, which allows the data to take up less memory and allows the data computation to take less time.
Are We Slim Yet
this allowed us to run measurements on all branches and platforms.
DMD
this will allow the local libraries to be found and used.
Investigating CSS Performance
two counts are collected which allow for an estimation of the amount of work being done during restyle: resolvestyleforcount this is incremented everytime that we do style resolution on an element contentenumfunccount this is incremented roughly for every rule that we test against time during restyle can be spent in a bunch of places.
Leak-hunting strategies and tips
xpconnect allows an xpcom object to be exposed to javascript, and it allows certain javascript objects to be exposed to c++ code as normal xpcom objects.
Profiling with Xperf
also experiment with turning columns on and off; removing a column will allow data to be aggregated without considering that column's contributions.
Refcount tracing and balancing
however, having an nscomptr log and using it in the creation of the balance tree allows addref and release calls that we know are matched to be eliminated from the tree, so it makes it much easier to debug reference count leaks of objects that have a large amount of reference counting traffic.
tools/power/rapl
windows unfortunately, rapl does not work on windows, and porting it would be difficult because windows does not have apis that allow easy access to the relevant model-specific registers.
Performance
that log can then be replayed against firefox's default memory allocator independently or through another replace-malloc library, allowing the testing of other allocators under the exact same workload.
Research and prep
e-commerce search these search engines should allow users to get connected to new and used products they want to buy as quickly and painlessly as possible in a "trusted" site -- for example, choosing the most popular auction, general shopping, or classified type sites that have the desired user experience are good choices.
Crash reporting
there is also a custom query tool which allows users to limit searches on more precise information.
L20n
it allows to adapt your web application not only to languages and cultures, but also contextual data, user gender and screen dimensions.
MailNews automated testing
it allows reviewers to quickly pick up regressions in patches and helps developers to think about different cases.
MailNews
it allows reviewers to quickly pick up regressions in patches and helps developers to think about different cases.
McCoy
mccoy is an application that allows add-on authors to provide secure updates to their users.
Midas
user_pref("capability.policy.policynames", "allowclipboard"); user_pref("capability.policy.allowclipboard.clipboard.paste", "allaccess"); see: more about security preferences note: the shortcut key will automatically trigger this command (typically accel-v) with or without the signed js or any code on the page to handle it.
NSPR Contributor Guide
license under mpl or gpl when you contribute material to nspr, you agree to allow your contribution to be licensed under the mpl or gpl.
NSPR Poll Method
the prototype of the poll method is print16 poll_method(prfiledesc *fd, print16 in_flags, print16 *out_flags); the purpose of the poll method is to allow a layer to modify that flags that will ultimately be used in the call to the underlying network transport's select (or equivalent) function, and to indicate that a layer is already able to make progress in the manner suggested by the polling flags.
I/O Functions
tcpsocket pr_connect pr_connectcontinue pr_accept pr_bind pr_listen pr_shutdown pr_recv pr_send pr_recvfrom pr_sendto pr_transmitfile pr_acceptread pr_getsockname pr_getpeername pr_getsocketoption pr_setsocketoption converting between host and network addresses pr_ntohs pr_ntohl pr_htons pr_htonl pr_familyinet memory-mapped i/o functions the memory-mapped i/o functions allow sections of a file to be mapped to memory regions, allowing read-write accesses to the file to be accomplished by normal memory accesses.
Interval Timing
this chapter describes printervaltime and the functions that allow you to use it for timing purposes: interval time type and constants interval functions interval time type and constants all timed functions in nspr require a parameter that depicts the amount of time allowed to elapse before the operation is declared failed.
Named Shared Memory
shared memory allows multiple processes to access one or more common shared memory regions, using it as an interprocess communication channel.
PRHostEnt
the #ifdef in the structure allows direct assignment of the prhostent structure.
PRSockOption
pr_sockopt_reuseaddr allow local address reuse.
PRSocketOptionData
reuse_addr allow local address reuse.
PRThreadType
nspr allows the client to synchronize the termination of all user threads and ignores those created as system threads.
PR_AcceptRead
this buffer must be large enough to receive amount bytes of data and two prnetaddr structures (thus allowing the runtime to align the addresses as needed).
PR_CallOnce
from that time on, the client should consider the object read-only (or even opaque) and allow the runtime to manipulate its content appropriately.
PR_EXTERN
warning: some platforms do not allow the use of the underscore character (_) as the first character of an exported symbol.
PR_IMPLEMENT
warning: some platforms do not allow the use of the underscore character (_) as the first character of an exported symbol.
PR_Initialize
this allows main to be treated like any other function, signaling its completion by returning and allowing the runtime to coordinate the completion of the other threads of the runtime.
PR_NewTCPSocket
new code should use pr_opentcpsocket instead, which allows the address family (ipv4 or ipv6) of the new tcp socket to be specified.
PR_NewUDPSocket
new code should use pr_openudpsocket instead, which allows the address family (ipv4 or ipv6) of the new udp socket to be specified.
PR_SetLibraryPath
this allows an environment to express policy decisions globally and lazily, rather than hardcoding and distributing the decisions throughout the code.
PR_TicksPerSecond
pr_pr_tickspersecond() allows you to discover exactly what that relationship is.
Function_Name
the certificate is a shallow copy, use cert_destroycertificate to decrement the reference count on the certificate instance.
NSS CERTVerify Log
this allows multiple errors to be reported all at * once.
CERT_FindCertByDERCert
the certificate is a shallow copy, use cert_destroycertificate to decrement the reference count on the certificate instance.
CERT_FindCertByIssuerAndSN
the certificate is a shallow copy, use cert_destroycertificate to decrement the reference count on the certificate instance.
Introduction to Network Security Services
these hp and solaris platforms allow programs that use the ilp32 program model to run on both 32-bit cpus and 64-bit cpus.
JSS FAQ
MozillaProjectsNSSJSSJSS FAQ
setcipherpolicy does not need to be called by a jss app unless that app wants to limit itself to export-allowed cipher suites.
NSS 3.12.5 release_notes
(see ssl.h) error codes: ssl_error_decompression_failure (see sslerr.h) ssl_error_renegotiation_not_allowed (see sslerr.h) new context initialization and shutdown functions see nss.h for details.
NSS 3.14.3 release notes
notable changes in nss 3.14.3 cve-2013-1620 recent research by nadhem alfardan and kenny patterson has highlighted a weakness in the handling of cbc padding as used in ssl, tls, and dtls that allows an attacker to exploit timing differences in mac processing.
NSS 3.15.1 release notes
hmac-sha256 cipher suites (rfc 5246 and rfc 5289) are supported, allowing tls to be used without md5 and sha-1.
NSS 3.16.2 release notes
on linux, nss is built with the -ffunction-sections -fdata-sections compiler flags and the --gc-sections linker flag to allow unused functions to be discarded.
NSS 3.18.1 release notes
notable changes in nss 3.18.1 the following ca certificate had the websites and code signing trust bits restored to their original state to allow more time to develop a better transition strategy for affected sites.
NSS 3.19 release notes
a new api (cert_getimposednameconstraints) has been added that allows one to lookup imposed constraints.
NSS 3.22 release notes
nss 3.22 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_22_rtm/src/ new in nss 3.22 new functionality rsa-pss signatures are now supported (bug 1215295) new functions pk11_signwithmechanism() and pk11_signwithmechanism() are provided to allow rsa keys to be used with pss.
NSS 3.26 release notes
source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/nss_3_26_rtm/src/ new in nss 3.26 new functionality the selfserv test utility has been enhanced to support alpn (http/1.1) and 0-rtt added support for the system-wide crypto policy available on fedora linux, see http://fedoraproject.org/wiki/changes/cryptopolicy introduced build flag nss_disable_libpkix which allows compilation of nss without the libpkix library notable changes in nss 3.26 the following ca certificate was added cn = isrg root x1 sha-256 fingerprint: 96:bc:ec:06:26:49:76:f3:74:60:77:9a:cf:28:c5:a7:cf:e8:a3:c0:aa:e1:1a:8f:fc:ee:05:c0:bd:df:08:c6 npn is disabled, and alpn is enabled by default the nss test suite now completes with the experimental tls 1.3 ...
NSS 3.27.1 release notes
nss 3.27 set this value on by default, allowing tls 1.3 (draft) to be disabled using nss_disable_tls_1_3, although the maximum version used by default remained tls 1.2.
NSS 3.27 release notes
nss 3.27 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_27_rtm/src/ new in nss 3.27 new functionality allow custom named group priorities for tls key exchange handshake (ssl_namedgroupconfig).
NSS 3.30 release notes
in pk11pub.h pk11_hasattributeset - allows to check if a pkcs#11 object in a given slot has a specific boolean attribute set.
NSS 3.35 release notes
this function allows for callbacks to be installed, which are called when a server receives a new tls clienthello.
NSS 3.37 release notes
nss allows servers now to register alpn handling callbacks to select a protocol.
NSS 3.43 release notes
new in nss 3.43 new functionality new functions in sechash.h hash_gethashoidtagbyhashtype - convert type hash_hashtype to type secoidtag in sslexp.h ssl_sendcertificaterequest - allow server to request post-handshake client authentication.
NSS 3.48 release notes
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.
NSS 3.52 release notes
bug 1624864 - allow building of gcm-arm32-neon on non-armv7 architectures.
NSS Developer Tutorial
curly braces: both of the following styles are allowed: if (condition) { action1(); } else { action2(); } or: if (condition) { action1(); } else { action2(); } the former style is more common.
NSS sources building testing
any c function that isn't contained in .def files is strictly for private use within nss, and applications and test tools are not allowed to call them.
nss tech note6
if you still decide to make unsupported changes, you can allow the softoken to come up in fips 140 mode of operation by regenerating the .chk files yourself.
nss tech note7
to prevent denial-of-service attacks with huge public keys, nss disallows modulus size greater than 8192 bits.
NSS PKCS11 Functions
many tokens keep track of the number of attempts to enter a password and do not allow further attempts after a certain point.
PKCS11 Implement
currently pkcs #12 isn't allowed to import onto a token.
PKCS 12 functions
later sec_pkcs12decodervalidatebags mxr 3.2 and later sec_pkcs12decoderverify mxr 3.2 and later sec_pkcs12destroyexportcontext mxr 3.2 and later sec_pkcs12enablecipher mxr 3.2 and later sec_pkcs12encode mxr 3.2 and later sec_pkcs12isencryptionallowed mxr 3.2 and later sec_pkcs12setpreferredcipher mxr 3.2 and later ...
PKCS 7 functions
d later sec_pkcs7includecertchain mxr 3.2 and later sec_pkcs7iscontentempty mxr 3.2 and later sec_pkcs7setcontent mxr 3.4 and later sec_pkcs7verifydetachedsignature mxr 3.4 and later sec_pkcs7verifysignature mxr 3.2 and later secmime_decryptionallowed mxr 3.4 and later ...
Migration to HG
and build both nspr and nss: mkdir workarea cd workarea hg clone https://hg.mozilla.org/projects/nspr hg clone https://hg.mozilla.org/projects/nss cd nss # set use_64=1 on 64 bit architectures # set build_opt=1 to get an optimized build make nss_build_all note that the jss project has been given a private copy of the former mozilla/security/coreconf directory, allowing it to remain stable, and only update its build system as necessary.
FC_InitPIN
the module only allows the pkcs #11 so to log in if the normal user's pin has not yet been set or has been reset.
FC_Login
the nss cryptographic module doesn't allow the so to log in if the normal user's pin is already initialized.
NSC_Login
the nss cryptographic module doesn't allow the so to log in if the normal user's pin is already initialized.
NSPR functions
the following nspr functions allow you to create your own nspr i/o layer and manipulate it.
NSS tools : ssltab
if you are not using the default badcert callback, the one you supply must allow for this possibility.
NSS tools : ssltap
if you are not using the default badcert callback, the one you supply must allow for this possibility.
troubleshoot.html
some systems may not be configured to allow this many simultaneous connections by default; if the stress tests fail, try increasing the number of simultaneous sockets supported.
NSS reference
addpasswordintegrity sec_pkcs12enablecipher sec_pkcs12encode sec_pkcs12destroyexportcontext sec_pkcs12decoderstart sec_pkcs12decoderimportbags sec_pkcs12decoderupdate sec_pkcs12decoderfinish sec_pkcs12decodervalidatebags sec_pkcs12decoderverify sec_pkcs12decodergetcerts sec_pkcs12decodersettargettokencas sec_pkcs12decoderiterateinit sec_pkcs12decoderiteratenext sec_pkcs12isencryptionallowed sec_pkcs12setpreferredcipher nspr functions a small number of nspr functions are required for using the certificate verification and ssl functions in nss.
OLD SSL Reference
upgraded documentation may be found in the current nss reference ssl reference newsgroup: mozilla.dev.tech.crypto writer: sean cotter manager: wan-teh chang chapter 1 overview of an ssl application ssl and related apis allow compliant applications to configure sockets for authenticated, tamper-proof, and encrypted communications.
gtstd.html
the security module database tool allows you to add and delete pkcs #11 modules, change passwords, set defaults, list module contents, enable or disable slots, enable or disable fips-140-1 compliance, and assign default providers for cryptographic operations.
pkfnc.html
many tokens keep track of the number of attempts to enter a password and do not allow further attempts after a certain point.
NSS Tools
nss security tools newsgroup: mozilla.dev.tech.crypto overview the nss security tools allow developers to test, debug, and manage applications that use nss.
NSS Tools dbck-tasks
there should be command-line options and, perhaps, an interactive mode to allow determine which certificates to keep.
NSS Tools ssltap
if you are not using the default badcert callback, the one you supply must allow for this possibility.
NSS tools : signver
MozillaProjectsNSStoolssignver
nss has some flexibility that allows applications to use their own, independent database engine while keeping a shared database and working around the access issues.
NSS tools : ssltap
MozillaProjectsNSStoolsssltap
if you are not using the default badcert callback, the one you supply must allow for this possibility.
Installing Pork
build and install mcpp mcpp generates macro expansion comments that allow pork's elsa to undo macros, which is necessary in order to get exact position information.
Pork
this information allows c++ to be automatically rewritten in a precise way.
Rhino Debugger
the rhino javascript debugger is a gui that allows debugging of interpreted javascript scripts run in rhino.
Tutorial: Embedding Rhino
the javascript feature calledliveconnect allows javascript programs to interact with java objects: $ java runscript "java.lang.system.out.println(3)" 3.0 undefined implementing interfaces using rhino, javascript objects can implement arbitrary java interfaces.
Small Footprint
optimizer it is possible to run rhino with interpreter mode only, allowing you to remove code for classfile generation that include all the classes from <tt>org.mozilla.javascript.optimizer</tt> package.
Rhino history
for a time, a couple of major companies (including sun) licensed rhino for use in their products and paid netscape to do so, allowing work on rhino to continue.
Performance Hints
not only is it good programming practice, it can speed up your code by allowing the compiler to generate special code to access the variables.
Rhino requirements and limitations
to use the javaadapter feature or an optimization level of 0 or greater, rhino must be running under a security manager that allows the definition of class loaders.
Rebranding SpiderMonkey (1.8.5)
it also allows these instructions to apply to a wide range platforms without introducing more software dependencies.
FOSS
includes a js shell that allows you to use cpan modules from javascript.
Future directions
we would also like to allow webassembly to interact with gc-managed data.
Getting SpiderMonkey source code
git clone https://github.com/mozilla/gecko-dev.git cd gecko-dev/js/src if you want a faster (about 5 times as of january 2015) download, try doing a shallow clone (no version control history).
Hacking Tips
this is because firefox doesn't allow loading files from the harddisk using httprequest, even when the file loading the file is on the harddisk.
Statistics API
in between slices, other browser code is allowed to run.
Garbage collection
this allows compartments to be used for security checks: objects in the same compartment have the same access requirements, so no checks are needed, but checks may be done when traversing cross-compartment wrappers.
SpiderMonkey Internals
jsarena.cpp, jsarena.h last-in-first-out allocation macros that amortize malloc costs and allow for en-masse freeing.
JIT Optimization Outcomes
disabled the optimization has been explicitly disallowed.
INT_FITS_IN_JSVAL
description determines if a specified c integer value, i, lies within the range allowed for integer jsvals.
JS::MutableHandle
it is used in the same way as js::handle&lt;t&gt; and includes a |set(const t &v)| method to allow updating the value of the referenced js::rooted&lt;t&gt;.
JS::SetLargeAllocationFailureCallback
added in spidermonkey 38 description if a large allocation fails when calling pod_{calloc,realloc}cangc, the js engine may call the large-allocation- failure callback, if set, to allow the embedding to flush caches, possibly perform shrinking gcs, etc.
JS::SetOutOfMemoryCallback
added in spidermonkey 38 description unlike the error reporter, which is only called if the exception for an oom bubbles up and is not caught, the js::outofmemorycallback is called immediately at the oom site to allow the embedding to capture the current state of heap allocation before anything is freed.
JSClass.flags
the jsclass.flags field allows an application to enable optional jsclass features on a per-class basis.
JSExtendedClass.wrappedObject
wrapper objects typically have no prototype, do not allow setting __proto__, and inherit properties from the wrapped object rather than the prototype chain (see jsnewresolveop).
JSGetObjectOps
thus jsclass (which pre-dates jsobjectops in the api) provides a low-level interface to class-specific code and data, while jsobjectops allows for a higher level of operation, which does not use the object's class except to find the class's jsobjectops struct, by calling clasp->getobjectops, and to finalize the object.
JSReserveSlotsOp
the optional jsclass.reserveslots hook allows a class to make computed per-instance object slots reservations, in addition to or instead of using jsclass_has_reserved_slots(n) in the jsclass.flags initializer to reserve a constant-per-class number of slots.
JSRuntime
earlier versions allowed using js_clearcontextthread and other functions to move a jscontext from one thread to another.
JS_AddFinalizeCallback
it was replaced with js_addfinalizecallback, to allow adding multiple callback functions.
JS_Add*Root
js_addgcthingroot allows the caller to have a single root that may hold either strings or objects.
JS_ClearPendingException
(there is a pending exception if the most recently thrown exception in cx has not yet been caught or cleared.) when any jsapi call fails with an exception, the caller must either use js_clearpendingexception to catch the exception; or return false to allow the exception to propagate to the caller.
JS_DefineProperty
it differs from js_setproperty in that: it does not behave like ordinary property assignment in the javascript language; it allows the application to specify additional details (getter, setter, and attrs) governing the new property's behavior; it never calls a setter; it can call the jsclass.addproperty callback when js_setproperty would not, because it can replace an existing property.
JS_EnterLocalRootScope
description scoped local root management allows native functions, getter/setters, etc.
JS_GetGlobalObject
furthermore, some jsapi functions, such as js_executescript, allow the caller to specify a global object in which the script executes.
JS_GetParent
some of these functions allow the application to specify a parent object.
JS_LockGCThing
js_unlockgcthing removes a lock from a specified item, thing, allowing it to be garbage collected when the javascript engine determines it is unreachable.
JS_LookupProperty
flags js_lookuppropertywithflags and js_lookuppropertywithflagsbyid allow the caller to specify flags requesting special lookup behavior.
JS_NewExternalString
(ultimately, the string will be garbage collected, and the javascript engine will call the string finalizer callback, allowing the application to free the array.) the array does not need to be zero-terminated.
JS_NewUCString
this allows the javascript engine to avoid needless data copying.
JS_SetCallReturnValue2
causes a native to return a reference value (as allowed by ecma 262-3 §11.2.3).
JS_SetInterruptCallback
description these functions allow setting an interrupt callback that will be called from the js thread some time after any thread triggered the callback using js_requestinterruptcallback.
JS_SetObjectPrincipalsFinder
description js_setobjectprincipalsfinder allows the application to set a callback that the javascript engine uses to obtain an object's principals.
JS_SetOperationCallback
description these functions allow setting an operation callback that will be called from the js thread some time after any thread triggered the callback using js_triggeroperationcallback.
JS_YieldRequest
momentarily suspend the current jsapi request, allowing garbage collection to run if another thread has requested it.
Property attributes
added in spidermonkey 17 mxr id search for jsfun_constructor jsprop_redefine_nonconfigurable if set, will allow redefining a non-configurable property, but only on a non-dom global.
Stored value
js_defineproperty allows the application to specify a property's initial stored value.
Profiling SpiderMonkey
if you'd like to profile something at a higher level of detail than the js shark functions allow, there are corresponding c functions available at the bottom of jsdbgapi.h.
SpiderMonkey 1.8.7
strings js_comparestrings received a new function signature with bug 609440, allowing us to correctly propagate exceptions when the underlying functions to retrieve the characters in the string failed.
TPS Tests
set up an environment and run a test to run tps, you should create a new firefox account using a restmail.net email address (strictly speaking, restmail isn't required, but it will allow tps to automatically do account confirmation steps for you.
Zest tools
the following tools currently support zest: owasp zed attack proxy the zap add-on allows the user to create, edit and run zest scripts.
Zest usecase: Reporting Security Vulnerabilities to Developers
while it will still be necessary to describe vulnerabilities, zest allows security teams to create reproducible test cases which they can then share with the developers.
Mozinfo
downloading the software and running python setup.py develop will allow you to do import mozinfo from python.
Pinning violation reports
it allows site operators to specify who can issue valid certificates for them, rather than accepting any one of the hundreds of built-in root certificates that ship with your browser.
Secure Development Guidelines
int fd = open("/etc/shadow", o_rdwr); setreuid(getuid(), getuid()); excve("/bin/sh", argv, envp); } suid root applications file i/o: file descriptors and handles potential overflows when using select fd_set struct, static length, holds a bitmask of fds manipulated with fd_set, fd_isset, fd_clr and fd_zero macros fd_set’s size depends on the operating system if the os allows opening more fds, then fd_set can hold could overflow fd_set file i/o: file descriptors and handles good solution: dynamically allocate fd_set structs int main(void) { int i, fd; fd_set fdset; for( i = 0; i < 2000; i++) { fd = open("/dev/null", o_rdwr); } fd_set(fd, &fdset); } file i/o: race conditions operating on files can often lead to race conditio...
Handling Mozilla Security Bugs
in particular, the mozilla.org bugzilla system will allow bug reports related to security vulnerabilities to be marked as "security-sensitive," and will have special access control features specifically for use with such bug reports.
Setting up an update server
if you want to use a locally-built mar, the copy of firefox being updated will need to be built to allow un-signed mars.
Gecko states
indicates this object is the child of an object that allows its children to be selected and that this child is one of those children that has been selected.
AT APIs Support
this is done to ensure a common look and feel across all supported platforms, and to allow for different skins (appearances).
Places Developer Guide
resultcontainernode.containeropen = true; for (var i=0; i < resultcontainernode.childcount; ++i) { var childnode = resultcontainernode.getchild(i); // accessing properties of matching bookmarks var title = childnode.title; var uri = childnode.uri; } observing history the nsinavhistoryobserver interface allows observation of history events such as new visits, page title changes, page expiration and when all history is cleared.
Using the Places annotation service
this allows you to link directly to data stored in the annotation service.
Using the Places favicon service
this allows efficient caching, since the default favicon will probably be cached in its decoded form by the image library.
Using the Places keywords API
using the places keywords api the places keywords api allows to assign a keyword to an url.
places.sqlite Database Troubleshooting
in some cases, this procedure may allow you to recover the corrupt file along with all of its contents (history).
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.
XML Extras
the xml extras module contains several features that allow developers to treat xml as data i.e.
Accessing the Windows Registry Using XPCOM
the following skeleton code will allow you to determine which interface to use: if ("@mozilla.org/windows-registry-key;1" in components.classes) { // firefox 1.5 or newer } else if ("@mozilla.org/winhooks;1" in components.classes) { // seamonkey or other older non-toolkit application } else if ("@mozilla.org/browser/shell-service;1" in components.classes) { var wss = components.classes["@mozilla.org/browser/shell-service;1"] ...
Aggregating the In-Memory Datasource
the basic idea is to overload queryinterface(), allowing it to return adelegate object that supports the interface.
XPCOM glue
MozillaTechXPCOMGlue
it allows developers to link only against the frozen xpcom method symbols and maintain compatibility with multiple versions of xpcom.
Building the WebLock UI
one of the most efficient ways to expose this is to use radio buttons, which allow the user to toggle a particulart state, as the figure above illustrates.
Introduction to XPCOM for the DOM
this would allow us to be able to re-use the nsdocument code in nsxmldocument, for example.
Components.utils.cloneInto
if you pass the {wrapreflectors:true} flag, then the object you clone is allowed to contain these objects: // add-on script var addonscriptobject = { body: contentwindow.document.body }; contentwindow.addonscriptobject = cloneinto(addonscriptobject, contentwindow, {wrapreflectors: true}); // page script var test = document.getelementbyid("test"); test.addeventlistener("click", functi...
Components.utils.importGlobalProperties
var domfile = services.appshell.hiddendomwindow.file('/path/to/file'); xpcom components some objects have an xpcom alternative, which typically allows more flexibility then the dom version here is an example of how to use the dom xmlhttprequest through xpcom interface of nsixmlhttprequest: var oreq = cc["@mozilla.org/xmlextras/xmlhttprequest;1"].createinstance(ci.nsixmlhttprequest); ...
PyXPCOM
pyxpcom allows for communication between python and xpcom, such that a python application can access xpcom objects, and xpcom can access any python class that implements an xpcom interface.
NS_InitXPCOM3
initializing xpcom with static modules allows the application to easily define modules that are linked into the application's executable.
NS_OVERRIDE
ns_override is a macro which allows c++ code in mozilla to specify that a method is intended to override a base class method.
nsDependentCString
parameters nsacstring_internal& str assertvalid void assertvalid() - source verify restrictions rebind void rebind(const char*) - source allow this class to be bound to a different string...
nsDependentString
) - source parameters prunichar* data pruint32 length void nsdependentstring(const prunichar*) - source parameters prunichar* data void nsdependentstring(const nsastring_internal&) - source parameters nsastring_internal& str void nsdependentstring() - source assertvalid void assertvalid() - source verify restrictions rebind void rebind(const prunichar*) - source allow this class to be bound to a different string...
nsMemory
these routines allow easy access to xpcom's global nsimemory implementation without having to go through the service manager to get it.
amIWebInstallInfo
toolkit/mozapps/extensions/amiwebinstalllistener.idlscriptable this interface is used by the default implementation of amiwebinstalllistener to communicate with the running application and allow it to warn the user about blocked installs and start the installs running.
amIWebInstallListener
methods onwebinstallblocked() called when the website is not allowed to directly prompt the user to install add-ons.
jsdIStackFrame
|true| if this context should be allowed to run scripts, |false| otherwise.
mozIAsyncHistory
toolkit/components/places/moziasynchistory.idlscriptable this interface allows you to add multiple visits to a single url in a batch.
mozIRegistry
it will also facilitate building a browser-based application that will allow people to display and edit its contents.
mozIStorageAggregateFunction
it allows consumers to add aggregate functions that are available to sql queries and triggers.
mozIStorageAsyncStatement
(mozistoragestatement can be used for both synchronous and asynchronous purposes.) this specialization for asynchronous operation allows us to avoid needing to acquire synchronization primitives also used by the asynchronous execution thread.
mozIStorageConnection
methods asyncclose() asynchronously closes a database connection, allowing all pending asynchronous statements to complete first.
mozIStorageFunction
it allows consumers to add functions that are available to sql queries and triggers.
mozIStoragePendingStatement
the mozistoragependingstatement interface represents a pending asynchronous database statement, and offers the cancel() method which allows you to cancel the pending statement.
mozITXTToHTMLConv
unsigned long citeleveltxt(in wstring line, out unsigned long loglinestart) void findurlinplaintext(in wstring text, in long alength, in long apos, out long astartpos, out long aendpos) wstring scanhtml(in wstring text, in unsigned long whattodo) wstring scantxt(in wstring text, in unsigned long whattodo) constants conversion control attributes these bits allow you to control the conversion of text into html.
mozIThirdPartyUtil
this is done as follows: if achannel is an nsihttpchannel and has the 'forceallowthirdpartycookie' property set, then: if auri is null, return false.
nsIAccessibleImage
accessible/public/nsiaccessibleimage.idlscriptable this interface allows in-process accessibility clients to retrieve information about an image.
nsIAccessibleText
nsiaccessible getattributerange( in long offset, out long rangestartoffset, out long rangeendoffset ); parameters offset rangestartoffset rangeendoffset return value getcharacteratoffset() it would be better to return an unsigned long here, to allow unicode chars > 16 bits.
nsIAlertsService
however, certain notification systems (such as growl on mac os x) allow the user to disable alerts by name.
nsIAppShell
runinstablestate() allows running of a "synchronous section", in the form of an nsirunnable once the event loop has reached a "stable state".
nsIAsyncVerifyRedirectCallback
if this is ns_succeeded the redirect has been allowed by all consumers.
nsIAuthModule
req_delegate (1 << 1) the server is allowed to impersonate the client.
nsIAuthPrompt
netwerk/base/public/nsiauthprompt.idlscriptable this interface allows the networking layer to pose a user/password prompt to obtain the values needed for authentication.
nsIAuthPrompt2
netwerk/base/public/nsiauthprompt2.idlscriptable an interface allowing to prompt for a username and password.
nsIAuthPromptProvider
exceptions thrown ns_error_not_available if no prompt is allowed or available for the given reason.
nsIBinaryInputStream
xpcom/io/nsibinaryinputstream.idlscriptable this interface allows consumption of primitive data types from a "binary stream" containing untagged, big-endian binary data, that is as produced by an implementation of nsibinaryoutputstream.
nsIBinaryOutputStream
xpcom/io/nsibinaryoutputstream.idlscriptable this interface allows writing of primitive data types (integers, floating-point values, booleans, and so on.) to a stream in a binary, untagged, fixed-endianness format.
nsIBlocklistPrompt
these are javascript objects with properties: name - the plugin or extension name version - the version of the extension or plugin icon - the plugin or extension icon disable - can be used by the nsiblocklistprompt to allows users to decide whether a soft-blocked add-on should be disabled blocked - true if the item is hard-blocked, false otherwise item - the nsiplugintag or addon object acount optional the number of addons.
nsICache
allows the cache entry to be stored in any device.
nsICachingChannel
a channel may optionally implement this interface to allow clients to affect its behavior with respect to how it uses the cache service.
nsICommandLine
this flag allows the default action to be prevented.
nsIComponentManager
a "bootstrapped" chrome manifest supports some of the instructions allowed in a regular chrome manifest, see the chrome registration documentation for details.
nsIConsoleListener
xpcom/base/nsiconsolelistener.idlscriptable this interface allows you to listen for messages sent to the console.
nsIContentPrefObserver
dom/interfaces/base/nsicontentprefservice.idlscriptable this interface allows code to easily watch for changes to the values of content preferences.
nsIContentPrefService2
dom/interfaces/base/nsicontentprefservice2.idlscriptable asynchronous api for content preferences 1.0 66 introduced gecko 20.0 inherits from: nsisupports last changed in gecko 20.0 (firefox 20.0 / thunderbird 20.0 / seamonkey 2.17) description content preferences allow the application to associate arbitrary data, or "preferences", with specific domains, or web "content".
nsIControllers
windows and text inputs have default controllers that allow commands such as cmd_copy to act on the focused element or window.
nsIConverterInputStream
this allows reading unicode strings from a stream, automatically converting the bytes from a selected character encoding.
nsIConverterOutputStream
xpcom/io/nsiconverteroutputstream.idlscriptable this interface allows writing strings to a stream, doing automatic character encoding conversion.
nsICookieService
note: should be able to allow null aprompt, since nsiprompt can be queried from achannel.
nsICrashReporter
only https and http urls are allowed, as the submission is handled by os-native networking libraries.
nsIDNSRecord
since a dns query may return more than one resolved ip address, the record acts like an enumerator, allowing the caller to easily step through the list of ip addresses.
nsIDOMChromeWindow
methods beginwindowmove() on some operating systems, we must allow the window manager to handle window dragging.
nsIDOMFile
this allows the file reference to be saved when the form is submitted while the user is using a web application offline, so that the data can be retrieved and uploaded once the internet connection is restored.
nsIDOMHTMLSourceElement
last changed in gecko 1.9.1.2 inherits from: nsidomhtmlelement the source element allows authors to specify multiple media resources for media elements.
nsIDOMOfflineResourceList
the nsidomofflineresourcelist interface provides access to the application cache that allows web content's resources to be cached locally for use while offline.
nsIDOMOrientationEvent
the nsidomorientationevent interface describes the event that can be delivered to dom windows, providing information from the device's accelerometer, allowing code to determine the orientation of the device.
nsIDOMStorageEventObsolete
canbubblearg true if the event is allowed to bubble, otherwise false.
nsIDOMWindow2
inherits from: nsidomwindow last changed in gecko 1.9 (firefox 3) because nsidomwindow is frozen, this interface was introduced in firefox 3 (gecko 1.9) to allow dom windows to take on new features.
nsIDOMWindowUtils
getpropertyvalue(apropertyname) except that, when the link whose presence in history is allowed to influence aelement's style is visited, get the value the property would have if allowed all properties to change as a result of :visited selectors (except for cases where getcomputedstyle uses data from the frame).
nsIDebug
this allows the debugger to be attached before the software break.
nsIDirectoryServiceProvider2
xpcom/io/nsidirectoryservice.idlscriptable an extension of nsidirectoryserviceprovider which allows multiple files to be returned for the given key.
nsIDragSession
this allows chrome to handle a drag that was refused by content.
nsIErrorService
xpcom/base/nsierrorservice.idlscriptable this is a service that allows nsresult codes to be mapped to string bundles that can be used to look up error messages.
nsIEventListenerInfo
1.0 66 introduced gecko 1.9.2 inherits from: nsisupports last changed in gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) method overview nsisupports getdebugobject(); astring tosource(); attributes attribute type description allowsuntrusted boolean indicates whether or not the event listener allows untrusted events.
nsIFTPEventSink
last changed in gecko 1.9 (firefox 3) inherits from: nsisupports method overview void onftpcontrollog(in boolean server, in string msg) methods onftpcontrollog allows a consumer to receive a log of the ftp control connection conversation.
nsIFactory
xpcom/components/nsifactory.idlscriptable this interface is a class factory that allows for the creation of nsisupports derived classes without specifying a concrete class type.
nsIFaviconService
this allows you to avoid trying to load "foo.com/favicon.ico" for every page on a site that doesn't have a favicon.
nsIFeed
textinput nsiwritablepropertybag2 information about a text box that can be displayed along with the feed by aggregators that support it, to allow the reader to send a response back to the source of the feed.
nsIFeedEntry
toolkit/components/feeds/public/nsifeedentry.idlscriptable this interface describes a single entry in an rss or atom news feed, providing attributes allowing access to the entry's data.
nsIFeedProgressListener
programs using the feed content access api do not have to implement any of these callbacks; they are optional, but allow you to provide feedback during the parsing process.
nsIFileInputStream
netwerk/base/nsifilestreams.idlscriptable an input stream that allows you to read from a file.
nsIFilePicker
filterallowurls 0x80 allow urls.
nsIFileStreams
the nsifilestreams interface is an input stream that allows you to read from a file.
nsIFileURL
the setter clones the nsifile object (allowing the caller to safely modify the nsifile object after setting it on this interface).
nsIFrameLoader
this can be used to decide what operations may or may not be allowed on the loader's docshell.
nsIFrameLoaderOwner
exceptions thrown ns_error_dom_security_err if the swap is not allowed on security grounds.
nsIHTTPHeaderListener
modules/plugin/base/public/nsihttpheaderlistener.idlscriptable this interface allows plugin authors to access http response headers after issuing an nsipluginhost.geturl or nsipluginhost.posturl call.
nsIInterfaceRequestor
nsiinterfacerequestor, however, allows you to obtain an interface c from a that may (or most likely) will not have the ability to get back to a.
nsILivemarkService
being able to manually control this allows activity such as bookmarks import to occur without kicking off http traffic.
nsILoginManagerStorage
the user interface allows this to be done without getting each login first (which might require knowing the master password).
nsIMemory
this allows nsiobserver implementations to observe multiple nsimemory instances and determine the source of memory pressure notifications.
nsIMimeConverter
the nsimimeconverter service allows you to convert headers into and out of mime format.
nsIMsgCustomColumnHandler
the nsimsgcustomcolumnhandler interface allows you to create custom handlers for columns.
nsIMsgDBViewCommandUpdater
updatenextmessageafterdelete() allows the backend to tell the front end to re-determine which message we should select after a delete or move void updatenextmessageafterdelete(); parameters none.
nsIMsgHeaderParser
removealiasestome allows the address parser to use the preference which contains regular expressions which also mean 'me' for the purpose of stripping the user's email address(es) out of addrs string removeduplicateaddresses( in string addrs, in string other_addrs, in prbool removealiasestome ); parameters addrs the addresses to remove duplicates from.
nsIMsgIncomingServer
by default this value is set to true via global pref 'allows_specialfolders_usage' (mailnews.js).
nsIMsgProtocolInfo
specialfoldersdeletionallowed boolean true if the user can delete folders like inbox, trash, etc.
nsIMsgSearchCustomTerm
* recommended form: extensionname@example.com#termname * commas and quotes are not allowed, the id must not * parse to an integer, and names of standard search * attributes in searchattribentrytable in nsmsgsearchterm.cpp * are not allowed.
nsIMsgSearchSession
the nsimsgsearchsession interface allows you to create and manipulate search sessions within thunderbird.
nsINavHistoryQuery
this allows place queries to be returned (which might include bookmark folders -- use the bookmark service's getfolderuri) as well as anything else that may have been tagged with an annotation.
nsINavHistoryResultObserver
1.0 66 introduced gecko 2.0 inherits from: nsisupports last changed in gecko 11.0 (firefox 11.0 / thunderbird 11.0 / seamonkey 2.8) note: in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1), this interface replaced the older nsinavhistoryresultviewer interface, which only allowed one client at a time.
nsINavHistoryResultViewer
removed in gecko 2.0 and replaced with the nsinavhistoryresultobserver interface, which is similar but allows multiple clients to observe the result at once.
nsINavHistoryService
this function allows you to determine whether it will be or not.
nsIOutputStream
note: this method is defined by this interface in order to allow the output stream to efficiently copy the data from the input stream into its internal buffer (if any).
Component; nsIPrefBranch
unlocking a previously locked preference allows the preference service to once again return the user set value of the preference.
nsIPrefService
the preference service is directly responsible for the management of the preferences files and also facilitates access to the preference branch object which allows the direct manipulation of the preferences themselves.
nsIPromptService
button_pos_2 65536 this button can be used to give the user a choice of options, but still allowing the user to cancel the prompt.
nsIRequest
note: most nsirequest implementations expect astatus to be a failure code; however, some implementations may allow astatus to be a success code such as ns_ok.
nsIScriptableIO
this properly allows platform-independent path construction.
nsIScriptableInputStream
note: the init method may be called more than once, allowing a nsiscriptableinputstream instance to be reused.
nsISearchEngine
this allows the search service to provide a different nsisearchsubmission depending on e.g.
nsISocketProvider
methods native code only!addtosocket this function is called to allow the socket provider to layer a prfiledesc (a file descriptor) on top of another prfiledesc.
nsIStreamConverter
you could implement this interface to allow everyone else to use your conversion logic using a standard api.
nsIStyleSheetService
allows extensions or embeddors to add to the built-in list of user or agent style sheets.
nsISupportsPriority
in some cases, changing the priority of an object may be disallowed (resulting in an exception being thrown) or may simply be ignored.
nsISupports proxies
xpcom proxies were a technology which allowed code to make asynchronous or synchronous xpcom calls to a different thread on arbitrary xpcom interfaces.
nsITXTToHTMLConv
netwerk/streamconv/public/nsitxttohtmlconv.idlscriptable this interface allows you to modify the conversion from plain text to html.
nsITaskbarPreview
the controller is not allowed to be null.
nsITaskbarPreviewController
this doesn't need to match the preview's aspect ratio, and is allowed to be changed at any time.
nsITaskbarTabPreview
an application may have as many tab previews as memory allows.
nsITextInputProcessor
sharing modifier state during multiple instances sharemodifierstateof() allows to share modifier state between multiple instances: var shiftkey = new keyboardevent("", { key: "shift", code: "shiftleft" }); var ctrlkey = new keyboardevent("", { key: "control", code: "controlleft" }); var altkey = new keyboardevent("", { key: "alt", code: "altleft" }); tip1.keydown(shiftkey); // tip1's shift state becomes active.
nsIThread
warning: calling nsithread.processnextevent allows network and ui events to run which can modify data structures that your code isn't expecting to be modified during a synchronous method call.
nsIThreadObserver
maywait true if the method is allowed to block the calling thread.
nsIThreadPool
threadlimit unsigned long the maximum number of threads allowed at once in the pool; you may change this value by altering this attribute.
nsITransactionManager
this mode allows an application to execute and group together several independent transactions so they can be undone with a single call to undotransaction().
nsIURIFixup
fixup_flag_allow_keyword_lookup 1 allow the fixup to use a keyword lookup service to complete the uri.
nsIURIFixupInfo
the input is an invalid uri and fixup_flag_allow_keyword_lookup is not passed).
nsIUTF8StringEnumerator
xpcom/ds/nsistringenumerator.idlscriptable an object can implement this interface to allow a client to iterate over a set of strings provided by the object.
nsIUpdate
this allows the user to never receive a notification for that specific update version again.
nsIUserCertPicker
inherits from: nsisupports last changed in gecko 1.7 method overview nsix509cert pickbyusage(in nsiinterfacerequestor ctx, in wstring selectednickname, in long certusage, in boolean allowinvalid, in boolean allowduplicatenicknames, out boolean canceled); methods pickbyusage() nsix509cert pickbyusage( in nsiinterfacerequestor ctx, in wstring selectednickname, in long certusage, in boolean allowinvalid, in boolean allowduplicatenicknames, out boolean canceled ); parameters ctx selectednickname certusage allowinvalid allowduplicatenicknames canceled return value ...
nsIWeakReference
it allows a consumer to hold an indirect, non-owning reference to an xpcom object.
nsIWebBrowserFindInFrames
searchparentframes boolean whether to allow the search to propagate out of the currentsearchframe into its parent frame(s).
nsIWebBrowserPersist
persist_flags_force_allow_cookies 65536 force relevant cookies to be sent with this load even if normally they wouldn't be.
nsIWebPageDescriptor
docshell/base/nsiwebpagedescriptor.idlscriptable this interface allows content being displayed in one window to be loaded into another window without refetching it from the network.
nsIWindowWatcher
it maintains a list of open top-level windows, and allows some operations on them.
nsIWorker
methods postmessage() used to allow the worker to send a message back to the web application that created it.
nsIWorkerGlobalScope
this interface allows a worker to look up information about itself, as well as to control itself.
nsIWorkerMessagePort
dom/interfaces/threads/nsidomworkers.idlscriptable this interface represents a worker thread's message port, which is used to allow the worker to post messages back to its creator.
nsIWorkerScope
methods close() allows the worker to terminate itself.
nsIXULAppInfo
only the following characters are allowed: a-z a-z 0-9 - .
nsIXULRuntime
xpcom/system/nsixulruntime.idlscriptable provides information about the xul runtime to allow extensions and xul applications to determine information about the xul runtime.
nsIXULSortService
asorthints one or more hints as to how to sort: ascending: sort the contents in ascending order descending: sort the contents in descending order comparecase: perform case sensitive comparisons integer: treat values as integers, non-integers are compared as strings twostate: do not allow the natural (unordered state) see also nsixultemplatequeryprocessor ...
nsIZipReader
it is allowed to open with another file, but it needs to be closed first with close().
NS_CStringContainerInit2
this is significant as it allows the programmer to be certain that ns_cstringgetdata will return a null-terminated character array.
NS_CStringCopy
remarks this function is designed to allow the implementation to efficiently assign the same value to two string objects.
NS_StringCopy
remarks this function is designed to allow the implementation to efficiently assign the same value to two string objects.
XPCOM reference
in a big change from the original nsiabcard, properties are now stored in a hash table instead of as attributes on the interface, allowing it to be more flexible.nsicookie2 mozilla 1 8 branchnsimsgsearchvaluedefined in comm-central/ mailnews/ base/ search/ public/ nsimsgsearchvalue.idl nsmsgmessageflagsthe nsmsgmessageflags interface describes possible flags for messages.
Setting HTTP request headers
this method allows us to set an http request header.
The Thread Manager
nsithreadeventfilter this interface is used by the nsithreadinternal.pusheventqueue() method in nsithreadinternal to allow event filtering.
Using the clipboard
this allows the clipboard to be used by another application right away.
XPCOM category image-sniffing-services
in firefox 3, a new xpcom category was added in bug 391667 to allow "third-party" xpcom components to identify images based on their content.
already_AddRefed
« xpcom api reference already_addrefed in association with nscomptr allows you to assign in a pointer without addrefing it.
xpidl
MozillaTechXPIDLxpidl
the xpidl compiler is now part of the build process, allowing us to generate headers used by the xpcom components.
XTF
MozillaTechXTF
the extensible tag framework (xtf) allows adding support for new namespaces using xpcom components to mozilla (written in javascript or c++).
Address Book examples
photo handlers photo handlers allow developers to customize the behavior of the contact editor when loading or saving contact photos.
Address book sync client design
this interface is defined in mozilla/mailnews/addrbook/public/nsiabsyncdriver.idl #include "nsrootidl.idl" #include "nsiabsynclistener.idl" [scriptable, uuid(91fdfee1-efbc-11d3-8f97-000073757374)] interface nsiabsyncdriver : nsiabsynclistener { void kickit(); }; as you can see, this is a very simple interface which allows for the starting of the address book sync operation.
Filelink Providers
the account setup dialog the account setup dialog allows the user to select what account type they would like to create from a menulist.
Mail event system
the nsimsgmailsession interface actually only allows adding and removal of listeners - the notifications happen through the nsifolderlistener interface as well.
Mailbox
this may seem like a lot of infrastructure just to read messages from a flat file, but it allows us to do it asynchronously, and to have reading local messages fit into the same kind of mechanisms that reading nntp and imap messages do - running urls, getting onstart/stoprunningurl notifications when the url starts/stops, etc.
Thunderbird Binaries
additionally, ad-hoc packages called try builds are made available on an as-needed basis to allow for testing of certain patches, and are typically announced in related bug reports.
Building a Thunderbird extension 5: XUL
this shows how the thunderbird architecture allows extensions to modify the user experience without modifying the installation files.
Building a Thunderbird extension 6: Adding JavaScript
this allows us to call the startup function repeatedly with an interval of 60000ms (every minute).
Activity Manager examples
ound", process.starttime, // start time date.now()); // completion time event.contexttype = process.contexttype; // optional event.contextobj = process.contextobj; // optional gactivitymanager.addactivity(event); showing a user-defined activity with cancel capability (javascript) this sample improves the previous one by providing an nsiactivitycancelhandler to allow the user to cancel the process.
customDBHeaders Preference
in addition to the preference outlined in setting up extension development environment, you'll want to add the following preferences: // this allows you to add extra headers while composing messages user_pref("mail.compose.other.header", "x-superfluous,x-other,x-whatever"); // this enables the preservation of custom headers as incoming mail is processed user_pref( "mailnews.customdbheaders", "x-superfluous,x-other"); important: please pay careful attention to the case of the mailnews.customdbheaders preference.
Using MAPI with Thunderbird's Windows 7 developer builds
mapi (messaging application programming interface) is a windows feature that allows applications to send files via a system's default mail application.
Using the Mozilla symbol server
this allows debugging of those builds without forcing all users to download large debugging files.
Working with windows in chrome code
queryinterface(components.interfaces.nsiinterfacerequestor) .getinterface(components.interfaces.nsiwebnavigation) .queryinterface(components.interfaces.nsidocshelltreeitem) .roottreeitem .queryinterface(components.interfaces.nsiinterfacerequestor) .getinterface(components.interfaces.nsidomwindow); this allows you to cross the chrome-content boundaries, and returns the main window object.
Examples
lightweight bridge for calling cocoa frameworks from javascript, js-macosx transparently handles definition of cocoa api, both c and objective-c, and provides automatic declarations for framework functions, structures, constants and enumerations, as well as allows creating and subclassing cocoa classes.
Declaring types
this is permitted since c allows it, for the widest possible compatibility.
Standard OS Libraries
this article allows you to find out what types to give to values/arguments by supplying links to the documentation of the os libraries.
Library
declare() declares an api from the native library, allowing it to be used from javascript.
ctypes
large integer types because javascript doesn't support large (64-bit) integers, js-ctypes provides two data types allowing access to 64-bit integer data.
js-ctypes reference
first, they provide a concrete representation of different data types, allowing the programmer to describe the arguments and return type of a native function (see library.declare()).
Streams - Plugins
this function allows the browser to send only as much data to the instance as it can handle at one time, and it helps both the browser and the plug-in to use their resources efficiently.
Version, UI, and Status Information - Plugins
« previousnext » this chapter describes the functions that allow a plug-in to display a message on the status line, get agent information, and check on the current version of the plug-in api and the browser.
DOM Inspector - Firefox Developer Tools
the dom hierarchy can be navigated using a two-paned window that allows a variety of different views on the document and all nodes within.
Debugging service workers - Firefox Developer Tools
when the service worker is stopped, a start button is provided to start it running, allowing you to trigger the service worker lifecycle.
Set event listener breakpoints - Firefox Developer Tools
when you click in this input and type a search term, the list of event listener types will filter by that term allowing you to find the events you want to break on more easily.
Debugger.Environment - Firefox Developer Tools
this allows the code using each debugger instance to place whatever properties it likes on its own debugger.object instances, without worrying about interfering with other debuggers.) if a debugger.environment instance’s referent is not a debuggee environment, then attempting to access its properties (other than inspectable) or call any its methods throws an instance of error.
Debugger.Script - Firefox Developer Tools
this allows the code using each debugger instance to place whatever properties it likes on its debugger.script instances, without worrying about interfering with other debuggers.) a debugger.script instance is a strong reference to a jsscript object; it protects the script it refers to from being garbage collected.
Measure a portion of the page - Firefox Developer Tools
when you stop holding the mouse down, the rectangle that was displayed on screen when you released the button will stay there until you click again, allowing you time to take screenshots, note the information down, etc.
Inspecting web sockets - Firefox Developer Tools
this allows you to capture only the frames that you are interested in.
Network monitor toolbar - Firefox Developer Tools
a set of tool icons: pause (or resume) recording network log search the log request blocking an array of buttons to filter the network request list by type: by the content type of the response xhr requests websocket upgrades and messages (labeled ws) other requests a checkbox that allows you to disable caching.
Network monitor recording - Firefox Developer Tools
the pause button allows you to look at a certain snapshot.
Network request list - Firefox Developer Tools
for example, "csp", "malware", "cors missing allow origin", "blocked by [name of extension]".
CSS Flexbox Inspector: Examine Flexbox layouts - Firefox Developer Tools
the flexbox inspector allows you to examine css flexbox layouts using the firefox devtools, which is useful for discovering flex containers on a page, examining and modifying them, debugging layout issues, and more.
Examine and edit CSS - Firefox Developer Tools
examine css rules the rules view lists all the rules that apply to the selected element, ordered from most-specific to least-specific: the four buttons on the right top of the rules view allow you to change the display of certain css and rules view features.
Responsive Design Mode - Firefox Developer Tools
on the right end of the screen, three buttons allow you to: camera button - take a screenshot settings button - opens the rdm settings menu close button - closes rdm mode and returns to regular browsing the settings menu includes the following commands: left-align viewport - when checked moves the rdm viewport to the left side of the browser window show user agent - when checked displays the user agent string the final two options de...
Cookies - Firefox Developer Tools
same-site cookies allow servers to mitigate the risk of csrf and information leakage attacks by asserting that a particular cookie should only be sent with requests initiated from the same registrable domain.
Tips - Firefox Developer Tools
storage inspector right-click the column headers to open a menu allowing to toggle the display of the columns.
about:debugging (before Firefox 68) - Firefox Developer Tools
each tab entry has a debug button next to it — when clicked, this will open up a toolbox specific to that tab, allowing you to debug that tab's contents.
Firefox Developer Tools
accessibility inspector provides a means to access the page's accessibility tree, allowing you to check what's missing or otherwise needs attention.
ANGLE_instanced_arrays - Web APIs
the angle_instanced_arrays extension is part of the webgl api and allows to draw the same object, or groups of similar objects multiple times, if they share the same vertex data, primitive count and type.
AbortController.AbortController() - Web APIs
this associates the signal and controller with the fetch request and allows us to abort it by calling abortcontroller.abort(), as seen below in the second event listener.
AbortController.abort() - Web APIs
this associates the signal and controller with the fetch request and allows us to abort it by calling abortcontroller.abort(), as seen below in the second event listener.
AbortController.signal - Web APIs
this associates the signal and controller with the fetch request and allows us to abort it by calling abortcontroller.abort(), as seen below in the second event listener.
AbstractRange - Web APIs
range provides methods that allow you to alter the range's endpoints, as well as methods to compare ranges, detect intersections beween ranges, and so forth.
Ambient Light Events - Web APIs
it allows them to react to such a change, for example by changing the color contrast of the user interface (ui) or by changing the exposure necessary to take a picture.
AnalyserNode - Web APIs
it is an audionode that passes the audio stream unchanged from the input to the output, but allows you to take the generated data, process it, and create audio visualizations.
Animation - Web APIs
WebAPIAnimation
animation.onremove allows you to set and run an event handler that fires when the animation is removed (i.e., put into an active replace state).
AnimationEvent.initAnimationEvent() - Web APIs
the following values are allowed: value meaning animationstart the animation has started.
AudioBuffer() - Web APIs
user agents are required to support sample rates from 8,000 hz to 96,000 hz (but are allowed to go farther outside this range).
AudioBufferSourceNode.start() - Web APIs
the default value, 0, will begin playback at the beginning of the audio buffer, and offsets past the end of the audio which will be played (based on the audio buffer's duration and/or the loopend property) are silently clamped to the maximum value allowed.
AudioBufferSourceNode - Web APIs
multiple calls to stop() are allowed.
AudioContext.createJavaScriptNode() - Web APIs
smaller sizes allow for lower latency and higher for better overall quality.
AudioContextLatencyCategory - Web APIs
by using these strings rather than a numeric value when specifying a latency to a audiocontext, you can allow the user agent to select an appropriate latency for your use case that makes sense on the device on which your content is being used.
AudioNode.channelInterpretation - Web APIs
the specification explicitly allows the future definition of new speaker layouts.
AudioParam - Web APIs
this list of events allows us to schedule changes that have to happen at very precise times, using arbitrary timelime-based automation curves.
AudioTrack.label - Web APIs
WebAPIAudioTracklabel
the list is filtered to only allow certain track kinds through.
AudioTrack - Web APIs
the list is filtered to only allow certain track kinds through.
AudioTrackList.getTrackById() - Web APIs
this function allows the game to disable a specific character's audio in order to adjust the movie's performance based on occurrences within the game; if the character's dialog isn't relevant, it gets left out.
AudioWorkletGlobalScope.registerProcessor - Web APIs
registering the same name twice is not allowed.
AudioWorkletGlobalScope - Web APIs
as the global execution context is shared across the current baseaudiocontext, it's possible to define any other variables and perform any actions allowed in worklets — apart from defining audioworkletprocessor-derived classes.
AudioWorkletNode() - Web APIs
the result of the structured clone algorithm applied to the object is also internally passed into the associated audioworkletprocessor() constructor — this allows custom initialization of an underlying user-defined audioworkletprocessor.
BaseAudioContext.createChannelMerger() - Web APIs
to use them, you need to use the second and third parameters of the audionode.connect(audionode) method, which allow you to specify both the index of the channel to connect from and the index of the channel to connect to.
BaseAudioContext.createChannelSplitter() - Web APIs
to use them, you need to use the second and third parameters of the audionode.connect(audionode) method, which allow you to specify the index of the channel to connect from and the index of the channel to connect to.
BaseAudioContext.createDelay() - Web APIs
example we have created a simple example that allows you to play three different samples on a constant loop — see create-delay (you can also view the source code).
BaseAudioContext.createScriptProcessor() - Web APIs
it is recommended for authors to not specify this buffer size and allow the implementation to pick a good buffer size to balance between latency and audio quality.
BeforeInstallPromptEvent.prompt() - Web APIs
the prompt() method of the beforeinstallpromptevent interface allows a developer to show the install prompt at a time of their own choosing.
Bluetooth.getAvailability() - Web APIs
note: user might not allow use of web bluetooth api, even if getavailability() returned true (navigator.bluetooth.requestdevice() might not resolve with a bluetoothdevice).
Bluetooth - Web APIs
WebAPIBluetooth
for example, an eddystone beacon might advertise a url, which the user agent allows the user to open.
BluetoothDevice.uuids - Web APIs
the bluetoothdevice.uuids read-only property lists the uuids of gatt services provided by the device, that the current origin is allowed to access.
BluetoothDevice - Web APIs
bluetoothdevice.uuids read only lists the uuid's of gatt services provided by the device, that the current origin is allowed to access.
Body - Web APIs
WebAPIBody
the body mixin of the fetch api represents the body of the response/request, allowing you to declare what its content type is and how it should be handled.
BroadcastChannel.close() - Web APIs
the broadcastchannel.close() terminates the connection to the underlying channel, allowing the object to be garbage collected.
CDATASection - Web APIs
]]> for example: <foo>here is a cdata section: <![cdata[ < > & ]]> with all kinds of unescaped text.</foo> the only sequence which is not allowed within a cdata section is the closing sequence of a cdata section itself, ]]>: <![cdata[ ]]> will cause an error ]]> note that cdata sections should not be used within html; they only work in xml.
CSS.supports() - Web APIs
WebAPICSSsupports
the first one allows to test the support of a pair property-value: propertyname a domstring containing the name of the css property to check.
CSS - Web APIs
WebAPICSS
css.registerproperty() registers custom properties, allowing for property type checking, default values, and properties that do or do not inherit their value.
CSSNumericValue.equals() - Web APIs
this allows structural equality to be tested quickly.
CSSNumericValue - Web APIs
cssnumericvalue.tosum tbd cssnumericvalue.type tbd cssnumericvalue.parse allows a cssnumericvalue to be constructed directly from a string containing css.
CSSPrimitiveValue.setFloatValue() - Web APIs
an no_modification_allowed_err is raised if this property is read-only.
CSSPrimitiveValue.setStringValue() - Web APIs
an no_modification_allowed_err is raised if this property is read-only.
CSSPrimitiveValue - Web APIs
conversions are allowed between absolute values (from millimeters to centimeters, from degrees to radians, and so on) but not between relative values.
CSSStyleDeclaration.removeProperty() - Web APIs
exceptions domexception no_modification_allowed_err: if the property or declaration block is read only.
CSSValueList - Web APIs
some properties allow an empty list in their syntax.
CSSVariableReferenceValue - Web APIs
the cssvariablereferencevalue interface of the css typed object model api allows you to create a custom name for a built-in css value.
CSS Counter Styles - Web APIs
the css counter styles module allows to define custom counter styles, which can be used for css list-marker and generated-content counters.
Using dynamic styling information - Web APIs
the css object model (cssom), part of the dom, exposes specific interfaces allowing manipulation of a wide amount of information regarding css.
Using the CSS Typed Object Model - Web APIs
the css typed object model api exposes css values as typed javascript objects to allow their performant manipulation.
Cache.delete() - Web APIs
WebAPICachedelete
ignoremethod: a boolean that, when set to true, prevents matching operations from validating the request http method (normally only get and head are allowed.) it defaults to false.
Cache.keys() - Web APIs
WebAPICachekeys
ignoremethod: a boolean that, when set to true, prevents matching operations from validating the request http method (normally only get and head are allowed.) it defaults to false.
Cache.match() - Web APIs
WebAPICachematch
ignoremethod: a boolean that, when set to true, prevents matching operations from validating the request http method (normally only get and head are allowed.) it defaults to false.
Cache.put() - Web APIs
WebAPICacheput
the put() method of the cache interface allows key/value pairs to be added to the current cache object.
CacheStorage.match() - Web APIs
ignoremethod: a boolean that, when set to true, prevents matching operations from validating the request http method (normally only get and head are allowed.) it defaults to false.
CanvasImageSource - Web APIs
the interfaces that it allows to be used as image sources are the following: htmlimageelement svgimageelement htmlvideoelement htmlcanvaselement imagebitmap offscreencanvas specifications specification status comment html living standardthe definition of 'canvasimagesource' in that specification.
CanvasRenderingContext2D.fillText() - Web APIs
an optional parameter allows specifying a maximum width for the rendered text, which the user agent will achieve by condensing the text or by using a lower font size.
CanvasRenderingContext2D.filter - Web APIs
negative values are not allowed.
CanvasRenderingContext2D.strokeText() - Web APIs
an optional parameter allows specifying a maximum width for the rendered text, which the user agent will achieve by condensing the text or by using a lower font size.
CanvasRenderingContext2D - Web APIs
canvasrenderingcontext2d.imagesmoothingquality allows you to set the quality of image smoothing.
Compositing and clipping - Web APIs
in addition, the clip property allows us to hide unwanted parts of shapes.
Drawing shapes with canvas - Web APIs
this might allow you to pass around path data and re-use them in both, svg and canvas.
Drawing text - Web APIs
ight); eval(textarea.value); } reset.addeventlistener('click', function() { textarea.value = code; drawcanvas(); }); edit.addeventlistener('click', function() { textarea.focus(); }) textarea.addeventlistener('input', drawcanvas); window.addeventlistener('load', drawcanvas); advanced text measurements in the case you need to obtain more details about the text, the following method allows you to measure it.
Pixel manipulation with canvas - Web APIs
see security and tainted canvases in allowing cross-origin use of images and canvas canvas.todataurl('image/png') default setting.
Transformations - Web APIs
ctx.save(); ctx.scale(10, 3); ctx.fillrect(1, 10, 10, 10); ctx.restore(); // mirror horizontally ctx.scale(-1, 1); ctx.font = '48px serif'; ctx.filltext('mdn', -135, 120); } <canvas id="canvas" width="150" height="150"></canvas> draw(); screenshotlive sample transforms finally, the following transformation methods allow modifications directly to the transformation matrix.
Using images - Web APIs
data urls allow you to completely define an image as a base64 encoded string of characters directly in your code.
ChannelMergerNode - Web APIs
to use them, you need to use the second and third parameters of the audionode.connect(audionode) method, which allow you to specify both the index of the channel to connect from and the index of the channel to connect to.
ChannelSplitterNode - Web APIs
to use them, you need to use the second and third parameters of the audionode.connect(audionode) method, which allow you to specify the index of the channel to connect from and the index of the channel to connect to.
Client.postMessage() - Web APIs
the postmessage() method of the client interface allows a service worker to send a message to a client (a window, worker, or sharedworker).
Clients.claim() - Web APIs
WebAPIClientsclaim
the claim() method of the clients interface allows an active service worker to set itself as the controller for all clients within its scope.
Clients.matchAll() - Web APIs
WebAPIClientsmatchAll
syntax self.clients.matchall(options).then(function(clients) { // do something with your clients list }); parameters options optional an options object allowing you to set options for the matching operation.
Clients.openWindow() - Web APIs
in firefox, the method is allowed to show popups only when called as the result of a notification click event.
console.clear() - Web APIs
WebAPIConsoleclear
the console.clear() method clears the console if the environment allows it.
Console API - Web APIs
the console api provides functionality to allow developers to perform debugging tasks, such as logging messages or the values of variables at set points in your code, or timing how long an operation takes to complete.
ConstantSourceNode - Web APIs
example in the article controlling multiple parameters with constantsourcenode, a constantsourcenode is created to allow one slider control to change the gain on two gainnodes.
ConstrainDOMString - Web APIs
it allows you to specify one or more exact string values from which one must be the parameter's value, or a set of ideal values which should be used if possible.
ContentIndex.delete() - Web APIs
we receive a reference to the current serviceworkerregistration, which allows us to access the index property and thus access the delete method.
ContentIndex - Web APIs
the contentindex interface of the content index api allows developers to register their offline enabled content with the browser.
CredentialsContainer.preventSilentAccess() - Web APIs
the preventsilentaccess() method of the credentialscontainer interface sets a flag that specifies whether automatic log in is allowed for future visits to the current origin, then returns an empty promise.
CredentialsContainer - Web APIs
credentialscontainer.preventsilentaccess()secure context sets a flag that specifies whether automatic log in is allowed for future visits to the current origin, then returns an empty promise.
Crypto - Web APIs
WebAPICrypto
it allows access to a cryptographically strong random number generator and to cryptographic primitives.
DOMMatrix - Web APIs
WebAPIDOMMatrix
this interface should be available inside web workers, though some implementations don't allow it yet.
DOMPoint.fromPoint() - Web APIs
the z and w properties are allowed to keep their default values (0 and 1 respectively).
DOMPoint.w - Web APIs
WebAPIDOMPointw
this value is unrestricted, meaning that it is allowed to be infinite or invalid (that is, its value may be nan or ±infinity).
DOMPoint.x - Web APIs
WebAPIDOMPointx
this value is unrestricted, meaning that it is allowed to be infinite or invalid (that is, its value may be nan or ±infinity).
DOMPoint.y - Web APIs
WebAPIDOMPointy
this value is unrestricted, meaning that it is allowed to be infinite or invalid (that is, its value may be nan or ±infinity).
DOMPoint.z - Web APIs
WebAPIDOMPointz
this value is unrestricted, meaning that it is allowed to be infinite or invalid (that is, its value may be nan or ±infinity).
DOMPoint - Web APIs
WebAPIDOMPoint
dompoint is based on dompointreadonly but allows its properties' values to be changed.
DOMPointInit.w - Web APIs
WebAPIDOMPointInitw
this value is unrestricted, meaning that it is allowed to be infinite or invalid (that is, its value may be nan or ±infinity).
DOMPointInit.x - Web APIs
WebAPIDOMPointInitx
this value is unrestricted, meaning that it is allowed to be infinite or invalid (that is, its value may be nan or ±infinity).
DOMPointInit.y - Web APIs
WebAPIDOMPointInity
this value is unrestricted, meaning that it is allowed to be infinite or invalid (that is, its value may be nan or ±infinity).
DOMPointInit.z - Web APIs
WebAPIDOMPointInitz
this value is unrestricted, meaning that it is allowed to be infinite or invalid (that is, its value may be nan or ±infinity).
DOMPointReadOnly.fromPoint() - Web APIs
the z and w properties are allowed to keep their default values (0 and 1 respectively).
DOMPointReadOnly.w - Web APIs
this value is unrestricted, meaning that it is allowed to be infinite or invalid (that is, its value may be nan or ±infinity).
DOMPointReadOnly.x - Web APIs
this value is unrestricted, meaning that it is allowed to be infinite or invalid (that is, its value may be nan or ±infinity).
DOMPointReadOnly.y - Web APIs
this value is unrestricted, meaning that it is allowed to be infinite or invalid (that is, its value may be nan or ±infinity).
DOMPointReadOnly.z - Web APIs
this value is unrestricted, meaning that it is allowed to be infinite or invalid (that is, its value may be nan or ±infinity).
Binary strings - Web APIs
WebAPIDOMStringBinary
a binary string is a concept similar to the ascii subset, but instead of limiting the range to 127, it allows code points until 255.
DOMTokenList.entries() - Web APIs
the domtokenlist.entries() method returns an iterator allowing you to go through all key/value pairs contained in this object.
DOMTokenList.keys() - Web APIs
WebAPIDOMTokenListkeys
the keys() method of the domtokenlist interface returns an iterator allowing to go through all keys contained in this object.
DOMTokenList.supports() - Web APIs
example let iframe = document.getelementbyid('display'); if (iframe.sandbox.supports('an-upcoming-feature')) { // support code for mystery future feature } else { // fallback code } if (iframe.sandbox.supports('allow-scripts')) { // instruct frame to run javascript // // (note: this feature is well-supported; this is just an example!) // } specifications specification status comment credential management level 1 working draft initial definition.
DOMTokenList.values() - Web APIs
the values() method of the domtokenlist interface returns an iterator allowing developers to go through all values contained in the domtokenlist.
DataTransfer.items - Web APIs
"> <style> div { margin: 0em; padding: 2em; } #target { border: 1px solid black; } </style> <script> function dragstart_handler(ev) { console.log("dragstart: target.id = " + ev.target.id); // add this element's id to the drag payload so the drop handler will // know which element to add to its tree ev.datatransfer.setdata("text/plain", ev.target.id); ev.datatransfer.effectallowed = "move"; } function drop_handler(ev) { console.log("drop: target.id = " + ev.target.id); ev.preventdefault(); // get the id of the target and add the moved element to the target's dom var data = ev.datatransfer.getdata("text"); ev.target.appendchild(document.getelementbyid(data)); // print each format type if (ev.datatransfer.types != null) { for (var i=0; i < ev.datatransfer.types.
DataTransfer.types - Web APIs
"> <style> div { margin: 0em; padding: 2em; } #target { border: 1px solid black; } </style> <script> function dragstart_handler(ev) { console.log("dragstart: target.id = " + ev.target.id); // add this element's id to the drag payload so the drop handler will // know which element to add to its tree ev.datatransfer.setdata("text/plain", ev.target.id); ev.datatransfer.effectallowed = "move"; } function drop_handler(ev) { console.log("drop: target.id = " + ev.target.id); ev.preventdefault(); // get the id of the target and add the moved element to the target's dom var data = ev.datatransfer.getdata("text"); ev.target.appendchild(document.getelementbyid(data)); // print each format type if (ev.datatransfer.types != null) { for (var i=0; i < ev.datatransfer.types.
DataTransfer - Web APIs
datatransfer.effectallowed provides all of the types of operations that are possible.
DelayNode.delayTime - Web APIs
example we have created a simple example that allows you to play three different samples on a constant loop — see create-delay (you can also view the source code).
DelayNode - Web APIs
WebAPIDelayNode
example we have created a simple example that allows you to play three different samples on a constant loop — see create-delay (you can also view the source code).
DisplayMediaStreamConstraints.audio - Web APIs
syntax displaymediastreamconstraints.audio = allowaudioflag; displaymediastreamconstraints.audio = mediatrackconstraints; displaymediastreamconstraints = { audio: allowaudioflag|mediatrackconstraints; } value the value may be either a boolean or a mediatrackconstraints object.
Document.cookie - Web APIs
WebAPIDocumentcookie
the cookie value string can use encodeuricomponent() to ensure that the string does not contain any commas, semicolons, or whitespace (which are disallowed in cookie values).
Document.createElement() - Web APIs
note: for backwards compatibility with previous versions of the custom elements specification, some browsers will allow you to pass a string here instead of an object, where the string's value is the custom element's tag name.
Document.createElementNS() - Web APIs
for backwards compatibility with previous versions of the custom elements specification, some browsers will allow you to pass a string here instead of an object, where the string's value is the custom element's tag name.
Document: drag event - Web APIs
on the dragged elem dragged = event.target; // make it half transparent event.target.style.opacity = .5; }, false); document.addeventlistener("dragend", function(event) { // reset the transparency event.target.style.opacity = ""; }, false); /* events fired on the drop targets */ document.addeventlistener("dragover", function(event) { // prevent default to allow drop event.preventdefault(); }, false); document.addeventlistener("dragenter", function(event) { // highlight potential drop target when the draggable element enters it if (event.target.classname == "dropzone") { event.target.style.background = "purple"; } }, false); document.addeventlistener("dragleave", function(event) { // reset background of potential drop target when the dra...
Document.execCommand() - Web APIs
enableabsolutepositioneditor enables or disables the grabber that allows absolutely-positioned elements to be moved around.
Document.fullscreenEnabled - Web APIs
full-screen mode is available only for a page that has no windowed plug-ins in any of its documents, and if all <iframe> elements which contain the document have their allowfullscreen attribute set.
Document.importNode() - Web APIs
starting with gecko 29.0 (firefox 29 / thunderbird 29 / seamonkey 2.26)), a shallow clone is defaulted instead of a deep clone.
Document - Web APIs
WebAPIDocument
document.mozsetimageelement() allows you to change the element being used as the background image for a specified element id.
DocumentTimeline.DocumentTimeline() - Web APIs
examples we could share a single documenttimeline among multiple animations, thus allowing us to manipulate just that group of animations via their shared timeline.
DocumentTimeline - Web APIs
examples we could share a single documenttimeline among multiple animations, thus allowing us to manipulate just that group of animations via their shared timeline.
Examples of web and XML development using the DOM - Web APIs
if dom core methods document.createelement and node.appendchild are used to create rows and cells, ie requires that they are appended to a tbody element, whereas other browsers will allow appending to a table element (the rows will be added to the last tbody element).
Using the W3C DOM Level 1 Core - Web APIs
the w3c dom level 1 core allows you to change a dom tree in any way you want.
How whitespace is handled by HTML, CSS, and in the DOM - Web APIs
these characters allow you to format your code in a way that will make it easily readable by yourself and other people.
Document Object Model (DOM) - Web APIs
dom methods allow programmatic access to the tree.
EXT_float_blend - Web APIs
the webgl api's ext_float_blend extension allows blending and draw buffers with 32-bit floating-point components.
EffectTiming.iterationStart - Web APIs
usually you'll use a value between 0.0 and 1.0 to indicate an offset into the first run of the animation at which to begin the animation performance, but any positive, non-infinite value is allowed.
Element.getAttributeNS() - Web APIs
getattributens() differs from getattribute() in that it allows you to further specify the requested attribute as being part of a particular namespace, as in the example above, where the attribute is part of the fictional "specialspace" namespace on mozilla.
Element.getAttributeNodeNS() - Web APIs
== example == tbd the example needs to be fixed pre> // html: <div id="top" /> t = document.getelementbyid("top"); specialnode = t.getattributenodens( "http://www.mozilla.org/ns/specialspace", "id"); // inode.value = "full-top" </pre notes getattributenodens is more specific than getattributenode in that it allows you to specify attributes that are part of a particular namespace.
Element.innerHTML - Web APIs
WebAPIElementinnerHTML
nomodificationallowederror an attempt was made to insert the html into a node whose parent is a document.
Element: mousedown event - Web APIs
bubbles yes cancelable yes interface mouseevent event handler property onmousedown examples the following example uses the mousedown, mousemove, and mouseup events to allow the user to draw on an html5 canvas.
Element: mousemove event - Web APIs
bubbles yes cancelable yes interface mouseevent event handler property onmousemove examples the following example uses the mousedown, mousemove, and mouseup events to allow the user to draw on an html5 canvas.
Element: mouseup event - Web APIs
bubbles yes cancelable yes interface mouseevent event handler property onmouseup examples the following example uses the mousedown, mousemove, and mouseup events to allow the user to draw on an html5 canvas.
Element.outerHTML - Web APIs
WebAPIElementouterHTML
nomodificationallowederror an attempt was made to set outerhtml on an element which is a direct child of a document, such as document.documentelement.
Element.requestFullscreen() - Web APIs
it must either be located within the top-level document or in an <iframe> which has the allowfullscreen attribute applied to it.
Element.setPointerCapture() - Web APIs
overview of pointer capture pointer capture allows events for a particular pointer event (pointerevent) to be re-targeted to a particular element instead of the normal (or hit test) target at a pointer's location.
Element - Web APIs
WebAPIElement
element.requestpointerlock() allows to asynchronously ask for the pointer to be locked on the given element.
ElementTraversal - Web APIs
the elementtraversal interface used to define methods that allowed access from one node to another in the document tree.
Encoding API - Web APIs
interfaces textdecoder textencoder textdecoderstream textencoderstream tutorials & tools a shim allowing to use this interface in browsers that don't support it.
Event.bubbles - Web APIs
WebAPIEventbubbles
you can use this property to check if an event is allowed to bubble or not.
Event.msConvertURL() - Web APIs
the msconverturl method instructs the html paste operation on how to modify the src attribute that corresponds to each file in the clipboarddata.files collection, allowing otherwise inaccessible files to be converted to blob or data uris.
Event.preventDefault() - Web APIs
first, listen for keypress events: var mytextbox = document.getelementbyid('my-textbox'); mytextbox.addeventlistener('keypress', checkname, false); the checkname() function, which looks at the pressed key and decides whether to allow it: function checkname(evt) { var charcode = evt.charcode; if (charcode != 0) { if (charcode < 97 || charcode > 122) { evt.preventdefault(); displaywarning( "please use lowercase letters only." + "\n" + "charcode: " + charcode + "\n" ); } } } the displaywarning() function presents a notification of a problem.
Event.returnValue - Web APIs
WebAPIEventreturnValue
it is set to true by default, allowing the default action to occur.
FeaturePolicy.features() - Web APIs
feature whose name appears on the list might not be allowed by the feature policy of the current execution context and/or might not be accessible because of user's permissions.
FetchEvent.respondWith() - Web APIs
the respondwith() method of fetchevent prevents the browser's default fetch handling, and allows you to provide a promise for a response yourself.
FetchEvent - Web APIs
it provides the event.respondwith() method, which allows us to provide a response to this fetch.
File.getAsText() - Web APIs
WebAPIFilegetAsText
example // fileinput is a htmlinputelement: <input type="file" id="myfileinput" multiple> var fileinput = document.getelementbyid("myfileinput"); // files is a filelist object (similar to nodelist) var files = fileinput.files; // object for allowed media types var accept = { binary : ["image/png", "image/jpeg"], text : ["text/plain", "text/css", "application/xml", "text/html"] }; var file; for (var i = 0; i < files.length; i++) { file = files[i]; // if file type could be detected if (file !== null) { if (accept.text.indexof(file.mediatype) > -1) { // file is of type text, which we accept // make sure it's en...
File - Web APIs
WebAPIFile
the file interface provides information about files and allows javascript in a web page to access their content.
FileReaderSync.readAsArrayBuffer() - Web APIs
the readasarraybuffer() method of the filereadersync interface allows to read file or blob objects in a synchronous way into an arraybuffer.
FileReaderSync.readAsBinaryString() - Web APIs
the readasbinarystring() method of the filereadersync interface allows to read file or blob objects in a synchronous way into an domstring.
FileReaderSync.readAsDataURL() - Web APIs
the readasdataurl() method of the filereadersync interface allows to read file or blob objects in a synchronous way into an domstring representing a data url.
FileReaderSync.readAsText() - Web APIs
the readastext() method of the filereadersync interface allows to read file or blob objects in a synchronous way into an domstring.
FileReaderSync - Web APIs
the filereadersync interface allows to read file or blob objects synchronously.
FileSystemDirectoryEntry.getDirectory() - Web APIs
options optional an object based on the filesystemflags dictionary, which allows you to specify whether or not to create the entry if it's missing and if it's an error if the file already exists.
FileSystemDirectoryEntry.getFile() - Web APIs
options optional an object based on the filesystemflags dictionary, which allows you to specify whether or not to create the entry if it's missing and if it's an error if the file already exists.
FileSystemDirectoryEntry.removeRecursively() - Web APIs
fileerror.no_modification_allowed_err the file system's state doesn't permit modification.
FileSystemEntry.remove() - Web APIs
fileerror.no_modification_allowed_err the file system's state doesn't permit removing the file or directory.
FileSystemFileEntry - Web APIs
obsolete methods createwriter() creates a new filewriter object which allows writing to the file represented by the file system entry.
File and Directory Entries API support in Firefox - Web APIs
ntry filesystemdirectoryentrysync directoryentrysync filesystemdirectoryreader directoryreader filesystemdirectoryreadersync directoryreadersync filesystementry entry filesystementrysync entrysync filesystemfileentry fileentry filesystemfileentrysync fileentrysync be sure to account for this in your code by allowing for both names.
FontFace.family - Web APIs
WebAPIFontFacefamily
the fontface.family property allows the author to get or set the font family of a fontface object.
FontFace - Web APIs
WebAPIFontFace
it allows control of the source of the font face, being a url to an external resource, or a buffer; it also allows control of when the font face is loaded and its current status.
Using FormData Objects - Web APIs
this allows a formdata object to be quickly obtained in response to a formdata event firing, rather than needing to put it together yourself.
FormData.entries() - Web APIs
WebAPIFormDataentries
the formdata.entries() method returns an iterator allowing to go through all key/value pairs contained in this object.
FormData.keys() - Web APIs
WebAPIFormDatakeys
the formdata.keys() method returns an iterator allowing to go through all keys contained in this object.
FormData.values() - Web APIs
WebAPIFormDatavalues
the formdata.values() method returns an iterator allowing to go through all values contained in this object.
FormDataEntryValue - Web APIs
note that the formdata.append() and formdata.set() methods allow passing a blob value, which is converted to a file in the process.
FormDataEvent - Web APIs
this allows a formdata object to be quickly obtained in response to a formdata event firing, rather than needing to put it together yourself when you wish to submit form data via a method like xmlhttprequest (see using formdata objects).
Frame Timing API - Web APIs
frame observers the performance observer interfaces allow an application to register an observer for specific performance event types.
Gamepad.buttons - Web APIs
WebAPIGamepadbuttons
in this simple example i've just allowed either.
Gamepad.id - Web APIs
WebAPIGamepadid
this information is intended to allow you to find a mapping for the controls on the device as well as display useful feedback to the user.
Gamepad.timestamp - Web APIs
WebAPIGamepadtimestamp
the idea behind this is to allow developers to determine if the axes and button data have been updated from the hardware.
Gamepad - Web APIs
WebAPIGamepad
the gamepad interface of the gamepad api defines an individual gamepad or other controller, allowing access to information such as button presses, axis positions, and id.
Gamepad API - Web APIs
see also the extensions to the gamepad interface, for features that allow you to access the above information.
Geolocation - Web APIs
this allows a web site or app to offer customized results based on the user's location.
GeolocationPositionError.code - Web APIs
3 timeout the time allowed to acquire the geolocation, defined by positionoptions.timeout information that was reached before the information was obtained.
GeolocationPositionError - Web APIs
3 timeout the time allowed to acquire the geolocation, defined by positionoptions.timeout information was reached before the information was obtained.
GlobalEventHandlers.onanimationiteration - Web APIs
example let's create an animation which automatically pauses at the end of each iteration, allowing the user to choose whether or not to start the next iteration.
GlobalEventHandlers.onclick - Web APIs
note: when using the click event to trigger an action, also consider adding this same action to the keydown event, to allow the use of that same action by people who don't use a mouse or a touch screen.
GlobalEventHandlers.ontransitioncancel - Web APIs
this could also be used to trigger animations or other effects, to allow chaining of reactions.
GlobalEventHandlers.ontransitionend - Web APIs
this could also be used to trigger animations or other effects, to allow chaining of reactions.
HTMLAudioElement - Web APIs
mozsetup() sets up the audio stream to allow writing, given the number of audio channels (1 or 2) and the sample rate in khz.
HTMLDialogElement.show() - Web APIs
still allowing interaction with content outside of the dialog.
HTMLDialogElement - Web APIs
still allowing interaction with content outside of the dialog.
HTMLElement.dir - Web APIs
WebAPIHTMLElementdir
browsers might allow users to change the directionality of <input> and <textarea>s in order to assist with authoring content.
HTMLElement.oncut - Web APIs
WebAPIHTMLElementoncut
example this example allows text to be copied from the <textarea>, but doesn't allow text to be cut.
HTMLElement - Web APIs
htmlorforeignelement.nonce returns the cryptographic number used once that is used by content security policy to determine whether a given fetch will be allowed to proceed.
HTMLFormElement.enctype - Web APIs
multipart/form-data: the type that allows file <input> element(s) to upload file data.
HTMLFormElement.name - Web APIs
internet explorer (ie) does not allow the name attribute of an element created using createelement() to be set or modified using the name property.
HTMLFormElement - Web APIs
it allows access to—and, in some cases, modification of—aspects of the form, as well as access to its component elements.
HTMLHyperlinkElementUtils.href - Web APIs
the htmlhyperlinkelementutils.href property is a stringifier that returns a usvstring containing the whole url, and allows the href to be updated.
HTMLIFrameElement.setNfcFocus() - Web APIs
default is false; set to true to allow it to receive nfc events.
HTMLImageElement.align - Web APIs
instead, they cause the image to "float" to the left or right margin, allowing the following text to flow around the image.
HTMLImageElement.alt - Web APIs
to allow that text to be displayed in place of the image if the image isn't available.
HTMLImageElement.decoding - Web APIs
usage notes the decoding property allows you to control whether or not the browser is allowed to try to parallelize loading your image.
HTMLInputElement.stepDown() - Web APIs
the stepdown() method will not allow the input to go out of range, in this case stopping when it reaches 0 and rounding down and floats that are passed as a parameter.
HTMLInputElement.stepUp() - Web APIs
the stepup will not allow the input to out of range, in this case stopping when it reaches 400, and rounding down any floats that are passed as a parameter.
HTMLInputElement.webkitEntries - Web APIs
more specifically, files are represented by filesystemfileentry objects, and, if they're allowed, directories are represented by filesystemdirectoryentry objects.
HTMLInputElement.webkitdirectory - Web APIs
syntax htmlinputelement.webkitdirectory = boolvalue value a boolean; true if the <input> element should allow picking only directories or false if only files should be selectable.
HTMLInputElement - Web APIs
allowdirs boolean: part of the non-standard directory upload api; indicates whether or not to allow directories and files both to be selected in the file list.
HTMLLegendElement - Web APIs
the htmllegendelement is an interface allowing to access properties of the <legend> elements.
HTMLMediaElement.autoplay - Web APIs
syntax htmlmediaelement.autoplay = true | false; var autoplay = htmlmediaelement.autoplay; value a boolean whose value is true if the media element will begin playback as soon as enough content has loaded to allow it to do so without interruption.
HTMLMediaElement.captureStream() - Web APIs
the stream can then be used for other purposes—like a source for streaming over webrtc, to allow sharing prerecorded videos with another person during a video call.
HTMLMediaElement.disableRemotePlayback - Web APIs
the htmlmediaelement.disableremoteplayback property determines whether the media element is allowed to have a remote playback ui.
HTMLMediaElement - Web APIs
htmlmediaelement.disableremoteplayback a boolean that sets or returns the remote playback state, indicating whether the media element is allowed to have a remote playback ui.
HTMLOrForeignElement.nonce - Web APIs
the nonce property of the htmlorforeignelement interface returns the cryptographic number used once that is used by content security policy to determine whether a given fetch will be allowed to proceed.
HTMLOrForeignElement - Web APIs
propertiesdataset read only the dataset read-only property of the htmlorforeignelement interface provides read/write access to all the custom data attributes (data-*) set on the element.nonce the nonce property of the htmlorforeignelement interface returns the cryptographic number used once that is used by content security policy to determine whether a given fetch will be allowed to proceed.tabindexthe tabindex property of the htmlorforeignelement interface represents the tab order of the current element.methodsblur()the htmlelement.blur() method removes keyboard focus from the current element.focus()the htmlelement.focus() method sets focus on the specified element, if it can be focused.
HTMLSelectElement.selectedOptions - Web APIs
label><br> <select id="foods" name="foods" size="7" multiple> <option value="1">burrito</option> <option value="2">cheeseburger</option> <option value="3">double bacon burger supreme</option> <option value="4">pepperoni pizza</option> <option value="5">taco</option> </select> <br> <button name="order" id="order"> order now </button> <p id="output"> </p> the <select> element is set to allow multiple items to be selected, and it is 7 rows tall.
HTMLStyleElement - Web APIs
this interface doesn't allow to manipulate the css it contains (in most case).
HTMLTableElement.rows - Web APIs
although the property itself is read-only, the returned object is live and allows the modification of its content.
HTMLTableElement.tBodies - Web APIs
although the property is read-only, the returned object is live and allows the modification of its content.
Recommended Drag Types - Web APIs
this allows the drop target to receive the actual node where the drag was started from.
HTML Drag and Drop API - Web APIs
during the drag operation, drag effects may be modified to indicate that certain effects are allowed at certain locations.
HashChangeEvent - Web APIs
here is a version that allows only one handler to be bound to the onhashchange property: ;(function(window) { // exit if the browser implements that event if ( "onhashchange" in window.document.body ) { return; } var location = window.location, oldurl = location.href, oldhash = location.hash; // check the location hash on a 100ms interval setinterval(function() { var newurl = location.href, ...
Headers.entries() - Web APIs
WebAPIHeadersentries
the headers.entries() method returns an iterator allowing to go through all key/value pairs contained in this object.
Headers.keys() - Web APIs
WebAPIHeaderskeys
the headers.keys() method returns an iterator allowing to go through all keys contained in this object.
Headers.values() - Web APIs
WebAPIHeadersvalues
the headers.values() method returns an iterator allowing to go through all values contained in this object.
History.scrollRestoration - Web APIs
the scrollrestoration property of history interface allows web applications to explicitly set default scroll restoration behavior on history navigation.
Ajax navigation example - Web APIs
"found", 303: "see other", 304: "not modified", 305: "use proxy", 306: "reserved", 307: "temporary redirect", 308: "permanent redirect", 400: "bad request", 401: "unauthorized", 402: "payment required", 403: "forbidden", 404: "not found", 405: "method not allowed", 406: "not acceptable", 407: "proxy authentication required", 408: "request timeout", 409: "conflict", 410: "gone", 411: "length required", 412: "precondition failed", 413: "request entity too large", 414: "request-uri too long", 415: "unsupported media type", 416...
History API - Web APIs
() method is to refresh the current page by either passing 0, or by invoking it without an argument: // the following statements // both have the effect of // refreshing the page window.history.go(0) window.history.go() you can determine the number of pages in the history stack by looking at the value of the length property: let numberofentries = window.history.length interfaces history allows manipulation of the browser session history (that is, the pages visited in the tab or frame that the current page is loaded in).
IDBCursor.advance() - Web APIs
WebAPIIDBCursoradvance
advance() works in a similar way to idbcursor.continue, except that it allows you to jump multiple records at a time, not just always go onto the next record.
IDBDatabase.transaction() - Web APIs
duplicate items not allowed.</li>'; }; // you would then go on to do something to this database // via an object store var objectstore = transaction.objectstore("todolist"); // etc.
IDBDatabase - Web APIs
idbdatabase.createmutablefile() creates a file handle, allowing files to be stored inside an indexeddb database.
IDBDatabaseSync - Web APIs
timeout the interval that this operation is allowed to take to acquire locks on all the objects stores and indexes identified in storenames.
IDBIndex - Web APIs
WebAPIIDBIndex
idbindex.unique read only if true, this index does not allow duplicate values for a key.
IDBKeyRange.bound() - Web APIs
WebAPIIDBKeyRangebound
note: for a more complete example allowing you to experiment with key range, have a look at the idbkeyrange directory in the indexeddb-examples repo (view the example live too.) function displaydata() { var keyrangevalue = idbkeyrange.bound("a", "f"); var transaction = db.transaction(['fthings'], 'readonly'); var objectstore = transaction.objectstore('fthings'); objectstore.opencursor(keyrangevalue).onsuccess = function(eve...
IDBKeyRange.lower - Web APIs
WebAPIIDBKeyRangelower
note: for a more complete example allowing you to experiment with key range, have a look at our idbkeyrange-example repo (view the example live too.) function displaydata() { var keyrangevalue = idbkeyrange.bound("f", "w", true, true); console.log(keyrangevalue.lower); var transaction = db.transaction(['fthings'], 'readonly'); var objectstore = transaction.objectstore('fthings'); objectstore.opencursor(keyrangevalue).onsu...
IDBKeyRange.lowerBound() - Web APIs
note: for a more complete example allowing you to experiment with key range, have a look at our idbkeyrange-example repo (view the example live too.) function displaydata() { var keyrangevalue = idbkeyrange.lowerbound("f"); var transaction = db.transaction(['fthings'], 'readonly'); var objectstore = transaction.objectstore('fthings'); objectstore.opencursor(keyrangevalue).onsuccess = function(event) { var cursor = event...
IDBKeyRange.lowerOpen - Web APIs
note: for a more complete example allowing you to experiment with key range, have a look at our idbkeyrange-example repo (view the example live too.) function displaydata() { var keyrangevalue = idbkeyrange.bound("f", "w", true, true); console.log(keyrangevalue.loweropen); var transaction = db.transaction(['fthings'], 'readonly'); var objectstore = transaction.objectstore('fthings'); objectstore.opencursor(keyrangevalue).
IDBKeyRange.only() - Web APIs
WebAPIIDBKeyRangeonly
note: for a more complete example allowing you to experiment with key range, have a look at our idbkeyrange repo (view the example live too.) function displaydata() { var keyrangevalue = idbkeyrange.only("a"); var transaction = db.transaction(['fthings'], 'readonly'); var objectstore = transaction.objectstore('fthings'); objectstore.opencursor(keyrangevalue).onsuccess = function(event) { var cursor = event.target.result...
IDBKeyRange.upper - Web APIs
WebAPIIDBKeyRangeupper
note: for a more complete example allowing you to experiment with key range, have a look at our idbkeyrange-example repo (view the example live too.) function displaydata() { var keyrangevalue = idbkeyrange.bound("f", "w", true, true); console.log(keyrangevalue.upper); var transaction = db.transaction(['fthings'], 'readonly'); var objectstore = transaction.objectstore('fthings'); objectstore.opencursor(keyrangevalue).onsu...
IDBKeyRange.upperBound() - Web APIs
note: for a more complete example allowing you to experiment with key range, have a look at our idbkeyrange-example repo (view the example live too.) function displaydata() { var keyrangevalue = idbkeyrange.upperbound("f"); var transaction = db.transaction(['fthings'], 'readonly'); var objectstore = transaction.objectstore('fthings'); objectstore.opencursor(keyrangevalue).onsuccess = function(event) { var cursor = event...
IDBKeyRange.upperOpen - Web APIs
note: for a more complete example allowing you to experiment with key range, have a look at our idbkeyrange-example repo (view the example live too.) function displaydata() { var keyrangevalue = idbkeyrange.bound("f", "w", true, true); console.log(keyrangevalue.upperopen); var transaction = db.transaction(['fthings'], 'readonly'); var objectstore = transaction.objectstore('fthings'); objectstore.opencursor(keyrangevalue).
IDBKeyRange - Web APIs
note: for a more complete example allowing you to experiment with key range, have a look at our idbkeyrange-example repo (view the example live too.) function displaydata() { var keyrangevalue = idbkeyrange.bound("a", "f"); var transaction = db.transaction(['fthings'], 'readonly'); var objectstore = transaction.objectstore('fthings'); objectstore.opencursor(keyrangevalue).onsuccess = function(event) { var cursor = event...
FileHandle.getFile() - Web APIs
summary the getfile method allows to retrieve a read-only snapshot of the handled file in the form of a file object.
FileHandle.open() - Web APIs
summary the open method returns a lockedfile object that allows to safely write in the file.
IDBObjectStore.add() - Web APIs
duplicate items not allowed.</li>'; }; // create an object store on the transaction var objectstore = transaction.objectstore("todolist"); // make a request to add our newitem object to the object store var objectstorerequest = objectstore.add(newitem[0]); objectstorerequest.onsuccess = function(event) { // report the success of our request note.innerhtml += '<li>request successful.</li>'; }; }; ...
IDBObjectStore.autoIncrement - Web APIs
duplicate items not allowed.</li>'; }; // create an object store on the transaction var objectstore = transaction.objectstore("todolist"); console.log(objectstore.autoincrement); // make a request to add our newitem object to the object store var objectstorerequest = objectstore.add(newitem[0]); objectstorerequest.onsuccess = function(event) { // report the success of our request note.innerhtml +=...
IDBObjectStore.delete() - Web APIs
either a key or an idbkeyrange can be passed, allowing one or multiple records to be deleted from a store.
IDBObjectStore.indexNames - Web APIs
duplicate items not allowed.</li>'; }; // create an object store on the transaction var objectstore = transaction.objectstore("todolist"); console.log(objectstore.indexnames); // make a request to add our newitem object to the object store var objectstorerequest = objectstore.add(newitem[0]); objectstorerequest.onsuccess = function(event) { // report the success of our request note.innerhtml += '<...
IDBObjectStore.keyPath - Web APIs
duplicate items not allowed.</li>'; }; // create an object store on the transaction var objectstore = transaction.objectstore("todolist"); console.log(objectstore.keypath); // make a request to add our newitem object to the object store var objectstorerequest = objectstore.add(newitem[0]); objectstorerequest.onsuccess = function(event) { // report the success of our request note.innerhtml += '<li>...
IDBObjectStore.name - Web APIs
duplicate items not allowed.</li>'; }; // create an object store on the transaction var objectstore = transaction.objectstore("todolist"); console.log(objectstore.name); // make a request to add our newitem object to the object store var objectstorerequest = objectstore.add(newitem[0]); objectstorerequest.onsuccess = function(event) { // report the success of our request note.innerhtml += '<li>req...
IDBObjectStore.transaction - Web APIs
duplicate items not allowed.</li>'; }; // create an object store on the transaction var objectstore = transaction.objectstore("todolist"); console.log(objectstore.transaction); // make a request to add our newitem object to the object store var objectstorerequest = objectstore.add(newitem[0]); objectstorerequest.onsuccess = function(event) { // report the success of our request note.innerhtml += '...
IDBObjectStore - Web APIs
duplicate items not allowed.</li>'; }; // create an object store on the transaction var objectstore = transaction.objectstore("todolist"); // make a request to add our newitem object to the object store var objectstorerequest = objectstore.add(newitem[0]); objectstorerequest.onsuccess = function(event) { note.innerhtml += '<li>request successful .</li>'; } specifications specification status comment ...
IDBTransaction.abort() - Web APIs
duplicate items not allowed.</li>'; }; // create an object store on the transaction var objectstore = transaction.objectstore("todolist"); // add our newitem object to the object store var objectstorerequest = objectstore.add(newitem[0]); objectstorerequest.onsuccess = function(event) { // report the success of the request (this does not mean the item // has been stored successfully in the db - for ...
IDBTransaction.commit() - Web APIs
duplicate items not allowed.</li>'; }; // create an object store on the transaction var objectstore = transaction.objectstore("myobjstore"); // add our newitem object to the object store var objectstorerequest = objectstore.add(newitem[0]); objectstorerequest.onsuccess = function(event) { // report the success of the request (this does not mean the item // has been stored successfully in the db - for that you need ...
IDBTransaction.db - Web APIs
WebAPIIDBTransactiondb
duplicate items not allowed.</li>'; }; // create an object store on the transaction var objectstore = transaction.objectstore("todolist"); // add our newitem object to the object store var objectstorerequest = objectstore.add(newitem[0]); objectstorerequest.onsuccess = function(event) { // report the success of the request (this does not mean the item // has been stored successfully in the db - for ...
IDBTransaction.objectStore() - Web APIs
duplicate items not allowed.</li>'; }; // create an object store on the transaction var objectstore = transaction.objectstore("todolist"); // add our newitem object to the object store var objectstorerequest = objectstore.add(newitem[0]); objectstorerequest.onsuccess = function(event) { // report the success of the request (this does not mean the item // has been stored successfully in the db - for ...
Basic concepts - Web APIs
note, however, that locale-aware sorting has been allowed with an experimental flag enabled (currently for firefox only) since firefox 43.
Checking when a deadline is due - Web APIs
duplicate items not allowed.</li>'; }; // create an object store on the transaction var objectstore = transaction.objectstore("todolist"); // add our newitem object to the object store var request = objectstore.add(newitem[0]); in this section we create an object called newitem that stores the data in the format required to insert it into the database.
InputDeviceCapabilities - Web APIs
this allows, for example, touchscreen keyboards and physical keyboards to be represented the same way when they produce the same input.
install - Web APIs
in contrast to startsoftwareupdate, install allows you to do multiple installs with the same trigger and provides a unified user experience for the multiple installs.
startSoftwareUpdate - Web APIs
this method has been largely superseded by newer install method, which is more flexible and allows you to install more than one xpi.
IntersectionObserver.observe() - Web APIs
note that this design allows multiple elements' intersection changes to be processed by a single call to the callback.
Intersection Observer API - Web APIs
one thing the intersection observer api can't tell you: the exact number of pixels that overlap or specifically which ones they are; however, it covers the much more common use case of "if they intersect by somewhere around n%, i need to do something." intersection observer concepts and usage the intersection observer api allows you to configure a callback that is called: (1) whenever one element, called the target, intersects either the device viewport or a specified element; for the purpose of this api, this is called the root element or root (2) and whenever the observer is asked to watch a target for the very first time typically, you'll want to watch for intersection changes with regard to the element's closest ...
KeyboardEvent.code - Web APIs
that would allow both smoother and faster movement, but would also allow the player to be moving and steering at the same time.
KeyframeEffect.KeyframeEffect() - Web APIs
the keyframeeffect() constructor of the web animations api returns a new keyframeeffect object instance, and also allows you to clone an existing keyframe effect object instance.
KeyframeEffect - Web APIs
constructor keyframeeffect() returns a new keyframeeffect object instance, and also allows you to clone an existing keyframe effect object instance.
LocalFileSystemSync - Web APIs
resolvelocalfilesystemsyncurl() allows the user to look up the entry for a file or directory referred to by a local url.
Location: href - Web APIs
WebAPILocationhref
the href property of the location interface is a stringifier that returns a usvstring containing the whole url, and allows the href to be updated.
LockManager.request() - Web APIs
this shared/exclusive lock pattern is common in database transaction architecture, for example to allow multiple simultaneous readers (each requests a "shared" lock) but only one writer (a single "exclusive" lock).
LockedFile.active - Web APIs
WebAPILockedFileactive
the active property allows to know if the lockedfile object is still usable (true) or not (false).
LockedFile.flush() - Web APIs
WebAPILockedFileflush
this allows fast writing and reading operations.
LockedFile.getMetadata() - Web APIs
summary the getmetadata method allows to retrieve some metadata about the locked file.
MediaDevices.getDisplayMedia() - Web APIs
notallowederror permission to access a screen area was denied by the user, or the current browsing instance is not permitted access to screen sharing.
MediaDevices - Web APIs
am; }) .catch(function(error) { if (error.name === 'constraintnotsatisfiederror') { errormsg('the resolution ' + constraints.video.width.exact + 'x' + constraints.video.height.exact + ' px is not supported by your device.'); } else if (error.name === 'permissiondeniederror') { errormsg('permissions have not been granted to use your camera and ' + 'microphone, you need to allow the page access to your devices in ' + 'order for the demo to work.'); } errormsg('getusermedia error: ' + error.name, error); }); function errormsg(msg, error) { errorelement.innerhtml += '<p>' + msg + '</p>'; if (typeof error !== 'undefined') { console.error(error); } } specifications specification status comment media capture and streamsthe de...
MediaKeyMessageEvent() - Web APIs
options options are as follows: messagetype: a developer-defined message type that allows applications to differentiate messages without parsing them.
MediaList.mediaText - Web APIs
the mediatext property of the medialist interface is a stringifier that returns a domstring representing the medialist as text, and also allows you to set a new medialist.
MediaList - Web APIs
WebAPIMediaList
properties medialist.mediatext a stringifier that returns a domstring representing the medialist as text, and also allows you to set a new medialist.
MediaMetadata - Web APIs
the mediametadata interface of the the media session api provides allows a web page to provide rich media metadata for display in a platform ui.
MediaQueryList - Web APIs
this is very useful for adaptive design, since this makes it possible to observe a document to detect when its media queries change, instead of polling the values periodically, and allows you to programmatically make changes to a document based on media query status.
MediaRecorder: error event - Web APIs
the mediarecorder interface's error event is fired when an error occurs: for example because recording wasn't allowed or was attempted using an unsupported codec.
MediaRecorder.onpause - Web APIs
the mediarecorder.onpause event handler (part of the mediarecorder api) handles the pause event, allowing you to run code in response to the media recording being paused.
MediaRecorder.onresume - Web APIs
the mediarecorder.onresume event handler (part of the mediarecorder api) handles the resume event, allowing you to run code in response to the media recording being resumed after pausing.
MediaRecorder.onstart - Web APIs
the mediarecorder.onstartevent handler (part of the mediarecorder api) handles the start event, allowing you to run code in response to media recording being started by a mediarecorder.
MediaRecorder.onstop - Web APIs
the mediarecorder.onstop event handler (part of the mediarecorder api) handles the stop event, allowing you to run code in response to media recording via a mediarecorder being stopped.
MediaRecorder.onwarning - Web APIs
the mediarecorder.onwarning event handler (part of the mediarecorder api) handles the recordingwarning event, allowing you to run code in response to non-fatal errors being thrown during media recording via a mediarecorder, which don't halt recording.
MediaRecorder.start() - Web APIs
securityerror the mediastream is configured to disallow recording.
MediaRecorder - Web APIs
error fired when an error occurs: for example because recording wasn't allowed or was attempted using an unsupported codec.
MediaSession.setActionHandler() - Web APIs
implement support for each of these in order to allow that type of action to be performed.
MediaSession - Web APIs
the mediasession interface of the media session api allows a web page to provide custom behaviors for standard media playback interactions, and to report metadata that can be sent by the user agent to the device or operating system for presentation in standardized user interface elements.
Media Session action types - Web APIs
implement support for each of these in order to allow that type of action to be performed.
MediaSessionActionDetails - Web APIs
implement support for each of these in order to allow that type of action to be performed.
MediaStreamConstraints.audio - Web APIs
as long as an audio input device is available and the user allows it to be used, an audio track will be included in the resulting stream, and it will match the specified constraints as well as possible.
MediaStreamConstraints.video - Web APIs
as long as a video input device is available and the user allows it to be used, a video track will be included in the resulting stream, and it will match the specified constraints as well as possible.
MediaStreamTrack.enabled - Web APIs
the enabled property on the mediastreamtrack interface is a boolean value which is true if the track is allowed to render the source stream or false if it is not.
MediaStreamTrack.remote - Web APIs
the mediastreamtrack.remote read-only property allows javascript to know whether a webrtc mediastreamtrack is from a remote source or a local one.
MediaStreamTrack - Web APIs
mediastreamtrack.enabled a boolean whose value of true if the track is enabled, that is allowed to render the media source stream; or false if it is disabled, that is not rendering the media source stream but silence and blackness.
MediaTrackConstraints.logicalSurface - Web APIs
this is used to specify whether or not getdisplaymedia() should allow the user to choose display surfaces which are not necessarily fully visible on the screen, such as occluded windows or the complete content of windows which are large enough to require scrolling to see their entire contents.
MediaTrackSettings.logicalSurface - Web APIs
for example, a user agent may choose to allow the user to choose whether to share the entire document (a browser with logicalsurface value of true), or just the currently visible portion of the document (where the logicalsurface of the browser surface is false).
MediaTrackSupportedConstraints.displaySurface - Web APIs
it adds the displaysurface constraint (requesting that only full-screen sharing be allowed) only if it is known to be supported by the browser.
Transcoding assets for Media Source Extensions - Web APIs
while mse is flexible enough to allow you to make your implementation, it's highly recommended to use an existing dash client as dash is a well-specified application protocol.
Capabilities, constraints, and settings - Web APIs
you can specify one or more media input device ids to establish restrictions on which input sources are allowed.
MerchantValidationEvent - Web APIs
the merchantvalidationevent interface of the the payment request api enables a merchant to verify themselves as allowed to use a particular payment handler.
MessageChannel - Web APIs
the messagechannel interface of the channel messaging api allows us to create a new message channel and send data through it via its two messageport properties.
MessagePort - Web APIs
the messageport interface of the channel messaging api represents one of the two ports of a messagechannel, allowing messages to be sent from one port and listening out for them arriving at the other.
MouseEvent.pageX - Web APIs
WebAPIMouseEventpageX
this property was originally specified in the touch events specification as a long integer, but was redefined in the cssom view module to be a double-precision floating-point number to allow for subpixel precision.
msPlayToPreferredSourceUri - Web APIs
this uri can point to a cloud based media server allowing streaming directly from the cloud, which can be drm protected, instead of streaming content from the windows machine which must be unprotected content.
Navigator.cookieEnabled - Web APIs
for example, chrome 80+ does not allow creating cookies with samesite=none attribute, unless they are created over https and with secure attribute.
Navigator.geolocation - Web APIs
this allows a web site or app to offer customized results based on the user's location.
Navigator.registerContentHandler() - Web APIs
allows web sites to register themselves as possible handlers for content of a particular mime type.
Navigator.wakeLock - Web APIs
the wakelock read-only property returns a wakelock interface which allows a document to acquire a screen wake lock.
NavigatorConcurrentHardware - Web APIs
the navigatorconcurrenthardware mixin adds to the navigator interface features which allow web content to determine how many logical processors the user has available, in order to let content and web apps optimize their operations to best take advantage of the user's cpu.
NavigatorID.platform - Web APIs
the specification allows browsers to always return the empty string, so don't rely on this property to get a reliable answer.
Node.cloneNode() - Web APIs
WebAPINodecloneNode
starting with gecko 29.0 (firefox 29 / thunderbird 29 / seamonkey 2.26)), a shallow clone is defaulted instead of a deep clone.
Node.nextSibling - Web APIs
WebAPINodenextSibling
the possible inclusion of text nodes must be allowed for when traversing the dom using nextsibling.
Node.setUserData() - Web APIs
WebAPINodesetUserData
the node.setuserdata() method allows a user to attach (or remove) data to an element, without needing to modify the dom.
NodeList.entries() - Web APIs
WebAPINodeListentries
the nodelist.entries() method returns an iterator allowing to go through all key/value pairs contained in this object.
NodeList.keys() - Web APIs
WebAPINodeListkeys
the nodelist.keys() method returns an iterator allowing to go through all keys contained in this object.
NodeList.values() - Web APIs
WebAPINodeListvalues
the nodelist.values() method returns an iterator allowing to go through all values contained in this object.
NotificationAction - Web APIs
here a service worker shows a notification with a single "archive" action, allowing users to perform this common task from the notification without having to open the website.
NotificationEvent.notification - Web APIs
the notification provides read-only access to many properties that were set at the instantiation time of the notification such as tag and data attributes that allow you to store information for defered use in the notificationclick event.
OfflineAudioContext.suspend() - Web APIs
for this reason, it is not allowed to schedule multiple suspends at the same quantized frame.
PannerNode.maxDistance - Web APIs
the default is 10000, and non-positive values are not allowed.
PannerNode.rolloffFactor - Web APIs
syntax var audioctx = new audiocontext(); var panner = audioctx.createpanner(); panner.rollofffactor = 1; value a number whose range depends on the distancemodel of the panner as follows (negative values are not allowed): "linear" the range is 0 to 1.
ParentNode.append() - Web APIs
WebAPIParentNodeappend
differences from node.appendchild(): parentnode.append() allows you to also append domstring objects, whereas node.appendchild() only accepts node objects.
ParentNode.replaceChildren() - Web APIs
for example, say we have a simple application allowing you to choose what food you want for your party.
PaymentAddress.languageCode - Web APIs
this is used while localizing the displayy of the address, allowing the determination of the field separators and the order of fields when formatting the address.
PaymentCurrencyAmount - Web APIs
this has been removed; instead of allowing sites to choose the standard to use, iso 4217 is always used for the currency identifier now.
PaymentRequest.onmerchantvalidation - Web APIs
syntax paymentrequest.onmerchantvalidation = eventhandlerfunction; value an event handler function which is to be called whenever the merchantvalidation event is fired at the paymentrequest, indicating that the payment handler requires the merchant to validate themselves as allowed to use this payment handler.
PaymentRequest.show() - Web APIs
if this is provided, show() will not allow the user to interact with the payment interface until the promise is fulfilled, so that data can be updated prior to the user engaging with the payment process.
PaymentRequestEvent.respondWith() - Web APIs
the respondwith property of the paymentrequestevent interface prevents the default event handling and allows you to provide a promise for a paymentresponse object yourself.
PaymentRequestEvent - Web APIs
respondwith() prevents the default event handling and allows you to provide a promise for a paymentresponse object yourself.
PerformanceResourceTiming.redirectEnd - Web APIs
when fetching a resource, if there are multiple http redirects, and any of the redirects have an origin that is different from the current document, and the timing allow check algorithm passes for each redirected resource, this property returns the time immediately after receiving the last byte of the response of the last redirect; otherwise, zero is returned.
PerformanceResourceTiming.redirectStart - Web APIs
if there are http redirects when fetching the resource and if any of the redirects are not from the same origin as the current document, but the timing allow check algorithm passes for each redirected resource, this property returns the starting time of the fetch that initiates the redirect; otherwise, zero is returned.
PerformanceServerTiming - Web APIs
this interface is restricted to the same origin, but you can use the timing-allow-origin header to specify the domains that are allowed to access the server metrics.
Performance API - Web APIs
also adds the timing-allow-origin response header.
Permissions.query() - Web APIs
WebAPIPermissionsquery
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.
Permissions.revoke() - Web APIs
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.
PositionOptions.timeout - Web APIs
the positionoptions.timeout property is a positive long value representing the maximum length of time (in milliseconds) the device is allowed to take in order to return a position.
PositionOptions - Web APIs
positionoptions.timeout secure context is a positive long value representing the maximum length of time (in milliseconds) the device is allowed to take in order to return a position.
ProgressEvent.initProgressEvent() - Web APIs
the following values are allowed: value meaning loadstart the operation has started.
PushManager.getSubscription() - Web APIs
var pushbutton = document.queryselector('.js-push-button'); pushbutton.disabled = false; if (!subscription) { // we aren’t subscribed to push, so set ui // to allow the user to enable push return; } // keep your server in sync with the latest subscriptionid sendsubscriptiontoserver(subscription); showcurlcommand(subscription); // set your ui to show they have subscribed for // push messages pushbutton.textcontent = 'disable push messages'; ispushenabled = true; }) .catch...
PushManager.subscribe() - Web APIs
ponse to a user gesture, such as clicking a button, for example: btn.addeventlistener('click', function() { serviceworkerregistration.pushmanager.subscribe(options) .then(function(pushsubscription) { // handle subscription }); }) this is not only best practice — you should not be spamming users with notifications they didn't agree to — but going forward browsers will explicitly disallow notifications not triggered in response to a user gesture.
PushMessageData - Web APIs
unlike the similar methods in the fetch api, which only allow the method to be invoked once, these methods can be called multiple times.
PushSubscription.getKey() - Web APIs
subbtn.disabled = false; if (!subscription) { console.log('not yet subscribed to push') // we aren't subscribed to push, so set ui // to allow the user to enable push return; } // set your ui to show they have subscribed for // push messages subbtn.textcontent = 'unsubscribe from push messaging'; ispushenabled = true; // initialize status, which includes setting ui elements for subscribed status // and updating subscribers list via push var endpoint = subscription.endpoint; var key = subscription.getkey('p256dh')...
PushSubscription - Web APIs
the pushsubscription interface of the push api provides a subcription's url endpoint and allows unsubscription from a push service.
Web Push API Notifications best practices - Web APIs
allowing your site to push notifications in realtime requires trust.
RTCConfiguration.certificates - Web APIs
this attribute supports providing multiple certificates because even though a given dtls connection uses only one certificate, providing multiple certificates allows support for multiple encryption algorithms.
RTCDTMFSender - Web APIs
the primary purpose for webrtc's dtmf support is to allow webrtc-based communication clients to be connected to a public-switched telephone network (pstn) or other legacy telephone service, including extant voice over ip (voip) services.
RTCDTMFToneChangeEvent - Web APIs
it appends each tone to a display box as it's played, and, once all tones have been sent, re-enabled a previously-disabled "send" button, allowing the next dmtf string to be entered.
RTCDataChannel.binaryType - Web APIs
values allowed by the websocket.binarytype property are also permitted here: "blob" if blob objects are being used or "arraybuffer" if arraybuffer objects are being used.
RTCDataChannel: close event - Web APIs
bubbles no cancelable no interface event event handler property rtcdatachannel.onclose examples this example sets up a handler for the close event for the rtcdatachannel named dc; its responsibility in this example is to update user interface elements to reflect that there is no longer an ongoing call, and to allow a new call to be started.
RTCDataChannel.maxPacketLifeTime - Web APIs
the read-only rtcdatachannel property maxpacketlifetime returns the amount of time, in milliseconds, the browser is allowed to take to attempt to transmit a message, as set when the data channel was created, or null.
RTCIceCandidatePairStats.consentExpiredTimestamp - Web APIs
syntax consentexpiration = rtcicecandidatepairstats.consentexpiredtimestamp; value a domhighrestimestamp object that indicates the time at which the stun binding that allows the two peers described by this rtcicecandidatepair to communicate will expire (or the time at which the binding did expire, if the time has passed).
RTCIceCandidatePairStats.nominated - Web APIs
once a candidate pair has been nominated and the two peers have each reconfigured themselves to use the specified configuration, the ice negotiation process can potentially end (or it can continue, to allow the connection to adapt to changing conditions).
RTCIceServer.url - Web APIs
WebAPIRTCIceServerurl
you should instead use the newer urls property, which allows you to optionally specify multiple urls for the server.
RTCPeerConnection() - Web APIs
you may find in some cases that connections can be established more quickly by allowing the ice agent to start fetching ice candidates before you start trying to connect, so that they're already available for inspection when rtcpeerconnection.setlocaldescription() is called.
RTCPeerConnection.addIceCandidate() - Web APIs
during negotiation, your app will likely receive many candidates which you'll deliver to the ice agent in this way, allowing it to build up a list of potential connection methods.
RTCPeerConnection.addStream() - Web APIs
navigator.mediadevices.getusermedia({video:true, audio:true}, function(stream) { var pc = new rtcpeerconnection(); pc.addstream(stream); }); migrating to addtrack() compatibility allowing, you should update your code to instead use the addtrack() method: navigator.getusermedia({video:true, audio:true}, function(stream) { var pc = new rtcpeerconnection(); stream.gettracks().foreach(function(track) { pc.addtrack(track, stream); }); }); the newer addtrack() api avoids confusion over whether later changes to the track-makeup of a stream affects a peer connection (they d...
RTCPeerConnection.addTrack() - Web APIs
you could also just create a new stream for each track received: pc.ontrack = ev => { if (ev.streams && ev.streams[0]) { videoelem.srcobject = ev.streams[0]; } else { let inboundstream = new mediastream(ev.track); videoelem.srcobject = inboundstream; } } associating tracks with specific streams by specifying a stream and allowing rtcpeerconnection to create streams for you, the streams' track associations are automatically managed for you by the webrtc infrastructure.
RTCPeerConnection.addTransceiver() - Web APIs
sendencodings optional a list of encodings to allow when sending rtp media from the rtcrtpsender.
RTCPeerConnection.createDataChannel() - Web APIs
ictionary the rtcdatachannelinit dictionary provides the following fields, any of which may be included in the object passed as the options parameter in order to configure the data channel to suit your needs: ordered optional indicates whether or not messages sent on the rtcdatachannel are required to arrive at their destination in the same order in which they were sent (true), or if they're allowed to arrive out-of-order (false).
RTCPeerConnection.getIdentityAssertion() - Web APIs
it is not expected for the application dealing with the rtcpeerconnection: this is automatically done; an explicit call only allows to anticipate the need.
RTCPeerConnection.iceConnectionState - Web APIs
"checking" the ice agent has been given one or more remote candidates and is checking pairs of local and remote candidates against one another to try to find a compatible match, but has not yet found a pair which will allow the peer connection to be made.
RTCPeerConnection.signalingState - Web APIs
syntax var state = rtcpeerconnection.signalingstate; value the allowed values are those included in the enum rtcsignalingstate.
RTCRtpEncodingParameters.maxBitrate - Web APIs
the rtcrtpencodingparameters dictionary's maxbitrate property specifies the maximum number of bits per second to allow a track encoded with this encoding to use.
RTCRtpSender.replaceTrack() - Web APIs
the promise is rejected if the track cannot be replaced for any reason; this is commonly because the change would require renegotiation of the codec, which is not allowed (see things that require negotiation).
RTCRtpSender.setParameters() - Web APIs
rangeerror the value specified for scaleresolutiondownby is less than 1.0, which would result in scaling up rather than down, which is not allowed; or one or more of the specified encodings' maxframerate values is less than 0.0.
RTCRtpTransceiverInit - Web APIs
sendencodings optional a list of encodings to allow when sending rtp media from the rtcrtpsender.
RTCSessionDescription.type - Web APIs
the allowed values are those of an enum of type rtcsdptype: "offer", the description is the initial proposal in an offer/answer exchange.
RTCTrackEventInit.transceiver - Web APIs
the transceiver pairs the track's receiver with an rtcrtpsender to allow bidirectional communication.
ReadableByteStreamController - Web APIs
the readablebytestreamcontroller interface of the streams api represents a controller allowing control of a readablestream's state and internal queue.
ReadableStream.tee() - Web APIs
this is useful for allowing two readers to read a stream simultaneously, perhaps at different speeds.
ReadableStreamBYOBReader - Web APIs
properties readablestreambyobreader.closed read only allows you to write code that responds to an end to the streaming process.
ReadableStreamDefaultController - Web APIs
the readablestreamdefaultcontroller interface of the streams api represents a controller allowing control of a readablestream's state and internal queue.
ReadableStreamDefaultReader - Web APIs
properties readablestreamdefaultreader.closed read only allows you to write code that responds to an end to the streaming process.
ReportingObserver - Web APIs
the reportingobserver interface of the reporting api allows you to collect and access reports.
ReportingObserverOptions - Web APIs
the reportingobserveroptions dictionary of the reporting api allows options to be set in the constructor when creating a reportingobserver.
Request.cache - Web APIs
WebAPIRequestcache
// abortcontroller and signal to allow better memory cleaning.
Request.clone() - Web APIs
WebAPIRequestclone
in fact, the main reason clone() exists is to allow multiple uses of body objects (when they are one-use only.) if intend to modify the request, you may prefer the request constructor.
Request.mode - Web APIs
WebAPIRequestmode
cors — allows cross-origin requests, for example to access various apis offered by 3rd party vendors.
ResizeObserver.observe() - Web APIs
options optional an options object allowing you to set options for the observation.
ResizeObserverEntry - Web APIs
the resizeobserverentry interface represents the object passed to the resizeobserver() constructor's callback function, which allows you to access the new dimensions of the element or svgelement being observed.
Using the Resource Timing API - Web APIs
this requires the server providing the resource to send the timing-allow-origin http response header with a value specifying the origin or origins which are allowed to get the restricted timestamp values.
Resource Timing API - Web APIs
this requires the server providing the resource to send the timing-allow-origin http response header with a value specifying the origin or origins which are allowed to get the restricted timestamp values.
Response.clone() - Web APIs
WebAPIResponseclone
in fact, the main reason clone() exists is to allow multiple uses of body objects (when they are one-use only.) syntax var response2 = response1.clone(); parameters none.
SVGElement: abort event - Web APIs
the abort event is fired when page loading is stopped before an svg element has been allowed to load completely.
SVGElement - Web APIs
abort fired when page loading is stopped before an svg element has been allowed to load completely.
getBBox() - Web APIs
the svggraphicselement.getbbox() allows us to determine the coordinates of the smallest rectangle in which the object fits.
SVGMatrix - Web APIs
WebAPISVGMatrix
exceptions a domexception with the code no_modification_allowed_err is raised when attempting updating a read-only attribute or when the object itself is read-only.
SVGNumber - Web APIs
WebAPISVGNumber
note: if the svgnumber is read-only, a domexception with the code no_modification_allowed_err is raised on an attempt to change the value.
SVGPreserveAspectRatio - Web APIs
exceptions on setting: a domexception with code no_modification_allowed_err is raised on an attempt to change the value of an attribute on a read only object.
SVGScriptElement - Web APIs
a domexception is raised with the code no_modification_allowed_err on an attempt to change the value of a read only attribut.
Screen.lockOrientation() - Web APIs
syntax lockallowed = window.screen.lockorientation(orientation); parameters orientation the orientation into which to lock the screen.
Screen Capture API - Web APIs
feature policy validation user agents that support feature policy (either using http's feature-policy header or the <iframe> attribute allow) can specify a desire to use the screen capture api using the policy control directive display-capture: <iframe allow="display-capture" src="/some-other-document.html"> the default allow list is self, which lets the any content within the document use screen capture.
ScriptProcessorNode - Web APIs
the scriptprocessornode interface allows the generation, processing, or analyzing of audio using javascript.
ScrollToOptions.behavior - Web APIs
examples in our scrolltooptions example (see it live) we include a form that allows the user to enter three values — two numbers representing the left and top properties (i.e.
ScrollToOptions.left - Web APIs
examples in our scrolltooptions example (see it live) we include a form that allows the user to enter three values — two numbers representing the left and top properties (i.e.
ScrollToOptions.top - Web APIs
examples in our scrolltooptions example (see it live) we include a form that allows the user to enter three values — two numbers representing the left and top properties (i.e.
ScrollToOptions - Web APIs
examples in our scrolltooptions example (see it live) we include a form that allows the user to enter three values — two numbers representing the left and top properties (i.e.
Selection.setBaseAndExtent() - Web APIs
next, we have two form inputs that allow you to set the anchoroffset and focusoffset — they both have a default value of 0.
Selection - Web APIs
WebAPISelection
typically, it holds only one range, accessed as follows: var selobj = window.getselection(); var range = selobj.getrangeat(0); selobj is a selection object range is a range object as the selection api specification notes, the selection api was initially created by netscape and allowed multiple ranges (for instance, to allow the user to select a column from a <table>).
ServiceWorkerContainer.register() - Web APIs
r.serviceworker.register('/sw.js', {scope: '/product/'}).then(function(registration) { console.log('service worker registration succeeded:', registration); }, /*catch*/ function(error) { console.log('service worker registration failed:', error); }); } else { console.log('service workers are not supported.'); } however, servers can remove this restriction by setting a service-worker-allowed header on the service worker script, and then you can specify a max scope for that service worker above the service worker's location.
ServiceWorkerGlobalScope.onmessage - Web APIs
note: service workers define the extendable event to allow extending the lifetime of the event.
ServiceWorkerMessageEvent - Web APIs
this extends the default message event to allow setting a serviceworker object as the source of a message.
ServiceWorkerRegistration.index - Web APIs
the index read-only property of the serviceworkerregistration interface returns a reference to the contentindex interface, which allows for indexing of offline content.
SharedWorker() - Web APIs
exceptions a securityerror is raised if the document is not allowed to start workers, for example if the url has an invalid syntax or if the same-origin policy is violated.
SharedWorkerGlobalScope - Web APIs
workerglobalscope.dump() allows you to write a message to stdout — i.e.
Slottable - Web APIs
WebAPISlottable
the slottable mixin defines features that allow nodes to become the contents of a <slot> element — the following features are included in both element and text.
SourceBufferList: indexed property getter - Web APIs
the indexed property getter of the sourcebufferlist interface allows the sourcebuffer objects in the list to be accessed with an array operator (i.e.
SourceBufferList - Web APIs
sourcebufferlist: indexed property getter this getter allows the sourcebuffer objects in the list to be accessed with an array operator (i.e.
SpeechGrammarList.item() - Web APIs
the item getter of the speechgrammarlist interface is a standard getter — it allows individual speechgrammar objects to be retrieved from the speechgrammarlist using array syntax.
SpeechGrammarList - Web APIs
methods speechgrammarlist.item() standard getter — allows individual speechgrammar objects to be retrieved from the speechgrammarlist using array syntax.
SpeechRecognitionEvent.resultIndex - Web APIs
the speechrecognitionresultlist object is not an array, but it has a getter that allows it to be accessed by array syntax.
SpeechRecognitionResult.item() - Web APIs
the item getter of the speechrecognitionresult interface is a standard getter that allows speechrecognitionalternative objects within the result to be accessed via array syntax.
SpeechRecognitionResult - Web APIs
speechrecognitionresult.length read only returns the length of the "array" — the number of speechrecognitionalternative objects contained in the result (also referred to as "n-best alternatives".) methods speechrecognitionresult.item a standard getter that allows speechrecognitionalternative objects within the result to be accessed via array syntax.
SpeechRecognitionResultList.item() - Web APIs
the item getter of the speechrecognitionresultlist interface is a standard getter — it allows speechrecognitionresult objects in the list to be accessed via array syntax.
SpeechRecognitionResultList - Web APIs
methods speechrecognitionresultlist.item a standard getter that allows speechrecognitionresult objects in the list to be accessed via array syntax.
SpeechSynthesisVoice.localService - Web APIs
the localservice read-only property of the speechsynthesisvoice interface returns a boolean indicating whether the voice is supplied by a local speech synthesizer service (true), or a remote speech synthesizer service (false.) this property is provided to allow differentiation in the case that some voice options are provided by a remote service; it is possible that remote voices might have extra latency, bandwidth or cost associated with them, so such distinction may be useful.
Storage.setItem() - Web APIs
WebAPIStoragesetItem
(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().
Storage - Web APIs
WebAPIStorage
it allows, for example, the addition, modification, or deletion of stored data items.
Using writable streams - Web APIs
the second object is optional, and allows you to specify a custom queueing strategy to use for your stream, which takes the form of an instance of bytelengthqueuingstrategy or countqueuingstrategy.
SubtleCrypto.deriveKey() - Web APIs
note that the key usages must be allowed by the algorithm set in derivedkeyalgorithm.
Text.splitText() - Web APIs
WebAPITextsplitText
exceptions thrown a domexception with a value of index_size_err is thrown if the specified offset is negative or is greater than the number of 16-bit units in the node's text; a domexception with a value of no_modification_allowed_err is thrown if the node is read-only.
Text.wholeText - Web APIs
WebAPITextwholeText
this allows to specify any text node and obtain all adjacent text as a single string.
TextDecoder() - Web APIs
example var textdecoder1 = new textdecoder("iso-8859-2"); var textdecoder2 = new textdecoder(); var textdecoder3 = new textdecoder("csiso2022kr", {fatal: true}); // allows encodingerror exception to be thrown.
Touch() - Web APIs
WebAPITouchTouch
the user agent may use 0 as the value in this case, or it may use any other value in the allowed range.
TrackDefaultList.TrackDefault() - Web APIs
the trackdefault() getter method of the trackdefaultlist interface allows the trackdefault objects in the list to be accessed with an array operator (i.e.
TrackDefaultList - Web APIs
trackdefaultlist.trackdefault() this getter allows the trackdefault objects in the list to be accessed with an array operator (i.e.
TransitionEvent.initTransitionEvent() - Web APIs
the following value is allowed: value meaning transitionend the transition completed.
sourceCapabilities - Web APIs
for example, many user agents allow a window to be resized with a mouse or a keyboard, but this detail is not exposed to the web platform in any way, and so the sourcecapabilities of a resize event will typically be null.
URL.searchParams - Web APIs
WebAPIURLsearchParams
the searchparams readonly property of the url interface returns a urlsearchparams object allowing access to the get decoded query arguments contained in the url.
URL - Web APIs
WebAPIURL
it works by providing properties which allow you to easily read and modify the components of a url.
URLSearchParams.entries() - Web APIs
the entries() method of the urlsearchparams interface returns an iterator allowing iteration through all key/value pairs contained in this object.
URLSearchParams.forEach() - Web APIs
the foreach() method of the urlsearchparams interface allows iteration through all values contained in this object via a callback function.
URLSearchParams.keys() - Web APIs
the keys() method of the urlsearchparams interface returns an iterator allowing iteration through all keys contained in this object.
URLSearchParams.values() - Web APIs
the values() method of the urlsearchparams interface returns an iterator allowing iteration through all values contained in this object.
USVString - Web APIs
WebAPIUSVString
usvstring is equivalent to domstring except for not allowing unpaired surrogate codepoints.
Using the User Timing API - Web APIs
the user timing interface allows the developer to create application specific timestamps that are part of the browser's performance timeline.
User Timing API - Web APIs
the user timing interface allows the developer to create application specific timestamps that are part of the browser's performance timeline.
Vibration API - Web APIs
continued vibrations some basic setinterval and clearinterval action will allow you to create persistent vibration: var vibrateinterval; // starts vibration at passed in level function startvibrate(duration) { navigator.vibrate(duration); } // stops vibration function stopvibrate() { // clear interval and stop persistent vibrating if(vibrateinterval) clearinterval(vibrateinterval); navigator.vibrate(0); } // start persistent vibration at given duration an...
VideoTrack.label - Web APIs
WebAPIVideoTracklabel
the list is filtered to only allow certain track kinds through.
Visual Viewport API - Web APIs
these events allow you to position elements relative to the visual viewport that would normally be anchored to the layout viewport.
WEBGL_compressed_texture_atc - Web APIs
compressed textures reduce the amount of memory needed to store a texture on the gpu, allowing for higher resolution textures or more of the same resolution textures.
WEBGL_compressed_texture_etc - Web APIs
compressed textures reduce the amount of memory needed to store a texture on the gpu, allowing for higher resolution textures or more of the same resolution textures.
WEBGL_compressed_texture_etc1 - Web APIs
compressed textures reduce the amount of memory needed to store a texture on the gpu, allowing for higher resolution textures or more of the same resolution textures.
WEBGL_compressed_texture_pvrtc - Web APIs
compressed textures reduce the amount of memory needed to store a texture on the gpu, allowing for higher resolution textures or more of the same resolution textures.
WEBGL_compressed_texture_s3tc - Web APIs
compressed textures reduce the amount of memory needed to store a texture on the gpu, allowing for higher resolution textures or more of the same resolution textures.
WEBGL_compressed_texture_s3tc_srgb - Web APIs
compressed textures reduce the amount of memory needed to store a texture on the gpu, allowing for higher resolution textures or more of the same resolution textures.
WEBGL_debug_shaders.getTranslatedShaderSource() - Web APIs
the webgl_debug_shaders.gettranslatedshadersource() method is part of the webgl api and allows you to debug a translated shader.
WEBGL_draw_buffers.drawBuffersWEBGL() - Web APIs
the webgl_draw_buffers.drawbufferswebgl() method is part of the webgl api and allows you to define the draw buffers to which all fragment colors are written.
WEBGL_lose_context.loseContext() - Web APIs
the webgl_lose_context.losecontext() method is part of the webgl api and allows you to simulate losing the context of a webglrenderingcontext context.
WEBGL_lose_context.restoreContext() - Web APIs
the webgl_lose_context.restorecontext() method is part of the webgl api and allows you to simulate restoring the context of a webglrenderingcontext object.
WebGL2RenderingContext.renderbufferStorageMultisample() - Web APIs
the webgl2renderingcontext.renderbufferstoragemultisample() method of the webgl 2 api returns creates and initializes a renderbuffer object's data store and allows specifying a number of samples to be used.
WebGL2RenderingContext.vertexAttribIPointer() - Web APIs
the main difference is that while values specified by vertexattribpointer are always interpreted as floating-point values in the shader (even if they were originally specified as integers in the buffer), this method allows specifying values which are interpreted as integers in the shader.
WebGL2RenderingContext - Web APIs
webgl2renderingcontext.renderbufferstoragemultisample() creates and initializes a renderbuffer object's data store and allows specifying the number of samples to be used.
WebGLQuery - Web APIs
another kind of queries are disjoint timer queries, which allow you to measure performance and profiling of your gpu.
WebGLRenderingContext.bufferData() - Web APIs
a gl.invalid_enum error is thrown if target or usage are not one of the allowed enums.
WebGLRenderingContext.bufferSubData() - Web APIs
a gl.invalid_enum error is thrown if target is not one of the allowed enums.
WebGLRenderingContext.framebufferRenderbuffer() - Web APIs
a gl.invalid_enum error is thrown if attachment is not one of the allowed enums.
WebGLRenderingContext.getError() - Web APIs
gl.invalid_operation the specified command is not allowed for the current state.
WebGLRenderingContext.isContextLost() - Web APIs
the user updates their graphics driver on an operating system that allows graphics drivers to be updated without restarting the system.
WebGLTransformFeedback - Web APIs
it allows to preserve the post-transform rendering state of an object and resubmit this data multiple times.
WebGLVertexArrayObject - Web APIs
when working with webglvertexarrayobject objects, the following methods are useful: webgl2renderingcontext.createvertexarray() webgl2renderingcontext.deletevertexarray() webgl2renderingcontext.isvertexarray() webgl2renderingcontext.bindvertexarray() webgl 1: the oes_vertex_array_object extension allows you to use vertex array objects in a webgl 1 context.
Basic scissoring - Web APIs
although the clear() drawing command writes the clear color (set by clearcolor()) to all pixels in the drawing buffer, scissor() defines a mask that only allows pixels inside the specified rectangular area to be updated.
Boilerplate 1 - Web APIs
this would allow us to focus on the interesting pieces of code that are most relevant for learning webgl.
Compressed texture formats - Web APIs
this allows for additional detail while limiting the added video memory necessary.
Introduction to the Real-time Transport Protocol (RTP) - Web APIs
instead, it only offers the information necessary to allow qos to be implemented elsewhere in the stack.
Establishing a connection: The WebRTC perfect negotiation pattern - Web APIs
then, finally, the media source for the self-view <video> element indicated by the selfvideo constant is set to the camera and microphone stream, allowing the local user to see what the other peer sees.
Taking still photos with WebRTC - Web APIs
when the promise is fulfilled with an array of mediadeviceinfo objects describing the available devices, find the ones that you want to allow and specify the corresponding deviceid or deviceids in the mediatrackconstraints object passed into getusermedia().
Using WebRTC data channels - Web APIs
automatic negotiation often, you can allow the peer connection to handle negotiating the rtcdatachannel connection for you.
WebRTC API - Web APIs
establishing a connection: the perfect negotiation pattern perfect negotiation is a design pattern which is recommended for your signaling process to follow, which provides transparency in negotiation while allowing both sides to be either the offerer or the answerer, without significant coding needed to differentiate the two.
Writing a WebSocket server in C# - Web APIs
it allows usage of a namespace's classes without typing the full namespace every time.
WebXR application life cycle - Web APIs
if the session type you want to use is available, provide the appropriate interface to the user to allow them to activate it.
Spaces and reference spaces: Spatial tracking in WebXR - Web APIs
if your app provides a way for the user to move through the virtual world without physically moving in the real world (a so-called teleportation mechanic), you can simply accept the new position and continue, allowing the jump from your previously-assumed position to be immediately corrected with the new position.
Web Animations API - Web APIs
the web animations api allows for synchronizing and timing changes to the presentation of a web page, i.e.
Background audio processing using AudioWorklet - Web APIs
slider controls are available to allow controlling the gain of both the oscillator and the audio worklet's output.
Using IIR filters - Web APIs
}, false); frequency response we only have one method available on iirfilternode instances, getfrequencyresponse(), this allows us to see what is happening to the frequencies of the audio being passed into the filter.
Web audio spatialization basics - Web APIs
as if its extensive variety of sound processing (and other) options wasn't enough, the web audio api also includes facilities to allow you to emulate the difference in sound as a listener moves around a sound source, for example panning as you move around a sound source inside a 3d game.
Attestation and Assertion - Web APIs
android safetynet -prior to android key attestation, the only option for android devices was to create android safetynet attestations fido u2f - security keys that implement the fido u2f standard use this format none - browsers may prompt users whether they want a site to be allowed to see their attestation data and/or may remove attestation data from the authenticator's response if the `attestation` parameter in `navigator.credentials.create()` is set to `none` the purpose of attestation is to cryptographically prove that a newly generated key pair came from a specific device.
Web Crypto API - Web APIs
the web crypto api is an interface allowing a script to use cryptographic primitives in order to build systems using cryptography.
Web NFC API - Web APIs
the web nfc api allows exchanging data over nfc via light-weight nfc data exchange format (ndef) messages.
Web Speech API - Web APIs
grammar is defined using jspeech grammar format (jsgf.) speech synthesis is accessed via the speechsynthesis interface, a text-to-speech component that allows programs to read out their text content (normally via the device's default speech synthesiser.) different voice types are represented by speechsynthesisvoice objects, and different parts of text that you want to be spoken are represented by speechsynthesisutterance objects.
Web Storage API - Web APIs
web storage interfaces storage allows you to set, retrieve and remove data for a specific domain and storage type (session or local.) window the web storage api extends the window object with two new properties — window.sessionstorage and window.localstorage — which provide access to the current domain's session and local storage objects respectively, and a window.onstorage event handler that fires when a storage area changes ...
Window.close() - Web APIs
WebAPIWindowclose
this is no longer the case; for security reasons, scripts are no longer allowed to close windows they didn't open.
Window.crypto - Web APIs
WebAPIWindowcrypto
this object allows web pages access to certain cryptographic related services.
Window.devicePixelRatio - Web APIs
use window.devicepixelratio to determine how much extra pixel density should be added to allow for a sharper image.
Window.history - Web APIs
WebAPIWindowhistory
for security reasons the history object doesn't allow the non-privileged code to access the urls of other pages in the session history, but it does allow it to navigate the session history.
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.
Window.openDialog() - Web APIs
WebAPIWindowopenDialog
if the features parameter is a zero-length string, or contains only one or more of the behavior features (chrome, dependent, dialog and modal) the chrome features are assumed "os' choice." that is, window creation code is not given specific instructions, but is instead allowed to select the chrome that best fits a dialog on that operating system.
window.postMessage() - Web APIs
normally, scripts on different pages are allowed to access each other if and only if the pages they originate from share the same protocol, port number, and host (also known as the "same-origin policy").
Window: resize event - Web APIs
there is a proposal to allow all elements to be notified of resize changes.
Window: unhandledrejection event - Web APIs
bubbles no cancelable yes interface promiserejectionevent event handler property onunhandledrejection usage notes allowing the unhandledrejection event to bubble will eventually result in an error message being output to the console.
WindowEventHandlers.onafterprint - Web APIs
the beforeprint and afterprint events allow pages to change their content before printing starts (perhaps to remove a banner, for example) and then revert those changes after printing has completed.
WindowEventHandlers.onbeforeprint - Web APIs
the beforeprint and afterprint events allow pages to change their content before printing starts (perhaps to remove a banner, for example) and then revert those changes after printing has completed.
Worker() - Web APIs
WebAPIWorkerWorker
exceptions a securityerror is raised if the document is not allowed to start workers, e.g.
WorkerGlobalScope.console - Web APIs
example this property allows you to have access to a browser console for debugging purposes, inside a worker.
WorkerGlobalScope.dump() - Web APIs
the dump() method of the workerglobalscope interface allows you to write a message to stdout — i.e.
WorkerGlobalScope - Web APIs
for example: importscripts('foo.js', 'bar.js'); non-standard methods workerglobalscope.dump() allows you to write a message to stdout — i.e.
WorkerNavigator - Web APIs
the workernavigator interface represents a subset of the navigator interface allowed to be accessed from a worker.
WritableStreamDefaultController - Web APIs
the writablestreamdefaultcontroller interface of the the streams api represents a controller allowing control of a writablestream's state.
WritableStreamDefaultWriter - Web APIs
properties writablestreamdefaultwriter.closedread only allows you to write code that responds to an end to the streaming process.
XDomainRequest - Web APIs
the requested url's server must have the access-control-allow-origin header set to either all ("*") or to include the origin of the request.
HTML in XMLHttpRequest - Web APIs
this feature allows web apps to obtain an html resource as a parsed dom using xmlhttprequest.
Synchronous and asynchronous requests - Web APIs
all new xhr features such as timeout or abort are not allowed for synchronous xhr.
XMLHttpRequest() - Web APIs
mozsystem boolean: setting this flag to true allows making cross-site connections without requiring the server to opt-in using cors.
XMLHttpRequest.response - Web APIs
ms-stream the response is part of a streaming download; this response type is only allowed for download requests, and is only supported by internet explorer.
XMLHttpRequest.responseType - Web APIs
ms-stream the response is part of a streaming download; this response type is only allowed for download requests, and is only supported by internet explorer.
XMLHttpRequestResponseType - Web APIs
ms-stream the response is part of a streaming download; this response type is only allowed for download requests, and is only supported by internet explorer.
XPathEvaluator.evaluate() - Web APIs
result optional allows to specify a result object which may be reused and returned by this method.
XPathExpression.evaluate() - Web APIs
result optional allows to specify a result object which may be reused and returned by this method.
XRBoundedReferenceSpace.boundsGeometry - Web APIs
the read-only xrboundedreferencespace property boundsgeometry is an array of dompointreadonly objects which specifies the points making up a polygon inside which the viewer is allowed to move.
XRBoundedReferenceSpace - Web APIs
these bounds are defined using an array of points, each of which defines a vertex in a polygon inside which the user is allowed to move.
XRInputSource.targetRaySpace - Web APIs
this shared space represents the same location as the space returned by the xrsession method requestreferencespace(), but is maintained as a different object to allow for future enhancements to the api.
XRInputSourceArray.length - Web APIs
examples in this example, a game that requires at least one input source uses length to check this before proceeding to allow the user to play the game.
XRInputSourceArray - Web APIs
in addition to being able to access the input sources in the list using standard array notation (that is, with index numbers insize square brackets), methods are available to allow the use of iterators and the foreach() method is also available.
XRPermissionDescriptor.mode - Web APIs
usage notes examples the example below checks to ensure that permission has been granted to allow the user to use webxr for an immersive virtual reality experience.
XRPermissionDescriptor.optionalFeatures - Web APIs
xrreferencespace unbounded a tracking space which allows the user total freedom of movement, possibly over extremely long distances from their origin point.
XRPermissionDescriptor.requiredFeatures - Web APIs
xrreferencespace unbounded a tracking space which allows the user total freedom of movement, possibly over extremely long distances from their origin point.
XRPermissionStatus.granted - Web APIs
xrreferencespace unbounded a tracking space which allows the user total freedom of movement, possibly over extremely long distances from their origin point.
XRReferenceSpace.getOffsetReferenceSpace() - Web APIs
in order to use mouse, keyboard, or other input devices to move or otherwise transform objects in the 3d space—or to allow the user to move through the space—you'll need to write some code to read the inputs and move perform the movements.
XRReferenceSpace: reset event - Web APIs
instead of allowing this to happen, you can integrate the emulatedposition into the teleportation offset calculated prior to calling getoffsetreferencespace() to create a new reference space whose updated effective origin is adjusted by the distance the viewer's position jumped since the previous frame.
XRReferenceSpaceEvent.transform - Web APIs
the transform is defined using the old coordinate system, which allows it to be used to convert coordinates from the pre-event coordinate system to the post-event coordiante system.
XRReferenceSpaceEventInit.transform - Web APIs
the transform is defined using the old coordinate system, which allows it to be used to convert coordinates from the pre-event coordinate system to the post-event coordiante system.
XRReferenceSpaceType - Web APIs
xrreferencespace unbounded a tracking space which allows the user total freedom of movement, possibly over extremely long distances from their origin point.
XRSession.requestAnimationFrame() - Web APIs
syntax requestid = xrsession.requestanimationframe(animationframecallback); parameters animationframecallback a function which is called before the next repaint in order to allow you to update and render the xr scene based on elapsed time, animation, user input changes, and so forth.
XRSession.requestReferenceSpace() - Web APIs
xrreferencespace unbounded a tracking space which allows the user total freedom of movement, possibly over extremely long distances from their origin point.
XRSession.updateRenderState() - Web APIs
the inlineverticalfieldofview property was set, but the session is immersive and therefore does not allow this property to be used.
XRView - Web APIs
WebAPIXRView
this allows the two views, when projected in isolation into the appropriate eyes, to simulate a 3d world.
XRWebGLLayer - Web APIs
although xrwebgllayer is currently the only type of framebuffer layer supported by webgl, it's entirely possible that future updates to the webxr specification may allow for other layer types and corresponding image sources.
XRWebGLLayerInit.ignoreDepthValues - Web APIs
using a depth buffer while compositing allows the xr compositor to help ensure the compositing is done as accurately as possible.
Using the aria-valuemax attribute - Accessibility
description the aria-valuemax attribute is used to define the maximum value allowed for a range widget such as a slider, spinbutton or progressbar.
Using the aria-valuemin attribute - Accessibility
the aria-valuemin attribute is used to define the minimum value allowed for a range widget such as a slider, spinbutton or progressbar.
Using the article role - Accessibility
assistive technologies may provide a feature allowing the user to navigate the hierarchy of any nested article elements.
Using the link role - Accessibility
opening a page using the open() method counts as being a popup, and certain browsers may issue a warning when you try to activate it, or make you explicitly agree to allowing popups form the domain it exists on.
x-ms-aria-flowfrom - Accessibility
the x-ms-aria-flowfrom property specifies the id of the previous element in an alternative reading order, allowing assistive technology to override the general default of reading in document source order.
ARIA annotations - Accessibility
wai-aria version 1.3 sees the addition of a set of new features, collectively known as aria annotations, which allow the creation of accessible annotations inside web documents.
ARIA: application role - Accessibility
in addition, a set of so-called quick navigation keys has been established over the years that allows blind users to skim through a page via a certain element type.
ARIA: article role - Accessibility
it is the only role allowed as a direct child of an element with the feed role.
ARIA: feed role - Accessibility
implementing the feed pattern allows a screen reader to reliably read and trigger the loading of feed content while in reading mode.
ARIA: row role - Accessibility
if the interaction provides for the selection state of individual cells, if left to right and top to botton navigation is provided, or if the user interface allows the rearranging of cell order or otherwise changing individual cell order such as through drag and drop, use grid or treegrid instead.
ARIA: tab role - Accessibility
delete when allowed removes the currently selected tab from the tab list.
ARIA: dialog role - Accessibility
note that for non-modal dialogs there will have to be a global keyboard shortcut that allows focus to be moved between opened dialogs and the main page.
ARIA: textbox role - Accessibility
the textbox role is used to identify an element that allows the input of free-form text.
WAI-ARIA Roles - Accessibility
ctivated, displays its associated tabpanel.aria: table rolethe table value of the aria role attribute identifies the element containing the role as having a non-interactive table structure containing data arranged in rows and columns, similar to the native <table> html element.aria: tabpanel rolethe aria tabpanel role indicatesaria: textbox rolethe textbox role is used to identify an element that allows the input of free-form text.
Accessibility and Spacial Patterns - Accessibility
adobe illustrator, for example, allows one to typeset ada braille for printing out.
Accessibility
css and javascript accessibility best practices css and javascript, when used properly, also have the potential to allow for accessible web experiences ...
Custom properties (--*): CSS variables - CSS: Cascading Style Sheets
WebCSS--*
initial valuesee proseapplies toall elementsinheritedyescomputed valueas specified with variables substitutedanimation typediscrete syntax --somekeyword: left; --somecolor: #0000ff; --somecomplexvalue: 3px 6px rgb(20, 32, 54); <declaration-value> this value matches any sequence of one or more tokens, so long as the sequence does not contain an unallowed token.
-moz-image-rect - CSS: Cascading Style Sheets
description this property allows you to, for example, use different parts of one larger image as backgrounds in different parts of your content.
-moz-image-region - CSS: Cascading Style Sheets
this allows elements to use different pieces of the same image to improve performance.
-webkit-line-clamp - CSS: Cascading Style Sheets
the -webkit-line-clamp css property allows limiting of the contents of a block container to the specified number of lines.
-webkit-print-color-adjust - CSS: Cascading Style Sheets
background colors and images are only printed if the user explicitly allows it in their browser's print settings dialog.
-webkit-touch-callout - CSS: Cascading Style Sheets
this property allows disabling that behavior.
:-moz-locale-dir(ltr) - CSS: Cascading Style Sheets
(this can vary from window to window, and even from tab to tab.) it also allows extensions to work even when they don't support the user's default locale, since they can support both left-to-right and right-to-left layouts regardless of locale specifics.
:-moz-locale-dir(rtl) - CSS: Cascading Style Sheets
(this can vary from window to window, and even from tab to tab.) it also allows extensions to work even when they don't support the user's default locale, since they can support both left-to-right and right-to-left layouts regardless of locale specifics.
::-webkit-search-results-button - CSS: Cascading Style Sheets
the ::-webkit-search-results-button css pseudo-element represents a button (the "search results button") at the left edge of an <input> of type="search" which when clicked displays a menu which allows the user to choose from previous recent search queries.
::after (:after) - CSS: Cascading Style Sheets
WebCSS::after
working draft allows animations on properties defined on pseudo-elements.
::before (:before) - CSS: Cascading Style Sheets
WebCSS::before
css animations working draft allows animations on properties defined on pseudo-elements.
::grammar-error - CSS: Cascading Style Sheets
allowable properties only a small subset of css properties can be used in a rule with ::grammar-error in its selector: color background-color cursor caret-color outline and its longhands text-decoration and its associated properties text-emphasis-color text-shadow syntax ::grammar-error examples simple document grammar check in this example, eventual supporting browsers should highlight any flagged grammatical errors with the styles shown.
::marker - CSS: Cascading Style Sheets
WebCSS::marker
::marker { color: blue; font-size: 1.2em; } allowable properties only certain css properties can be used in a rule with ::marker as a selector: all font properties the white-space property color text-combine-upright, unicode-bidi and direction properties the content property all animation and transition properties the specification states that additional css properties may be supported in future.
::selection - CSS: Cascading Style Sheets
::selection { background-color: cyan; } allowable properties only certain css properties can be used with ::selection: color background-color cursor caret-color outline and its longhands text-decoration and its associated properties text-emphasis-color text-shadow in particular, background-image is ignored.
::slotted() - CSS: Cascading Style Sheets
WebCSS::slotted
this allows them to stand out better next to the slots that haven't been successfully filled.
::spelling-error - CSS: Cascading Style Sheets
allowable properties only a small subset of css properties can be used in a rule with ::spelling-error in its selector: color background-color cursor caret-color outline and its longhands text-decoration and its associated properties text-emphasis-color text-shadow syntax ::spelling-error examples simple document spell check in this example, eventual supporting browsers should highlight any flagged spelling errors with the styles shown.
:host - CSS: Cascading Style Sheets
WebCSS:host
the :host css pseudo-class selects the shadow host of the shadow dom containing the css it is used inside — in other words, this allows you to select a custom element from inside its shadow dom.
:hover - CSS: Cascading Style Sheets
WebCSS:hover
allows :hover to be applied to any pseudo-element.
:not() - CSS: Cascading Style Sheets
WebCSS:not
working draft extends its argument to allow some non-simple selectors.
:read-only - CSS: Cascading Style Sheets
input:read-only, textarea:read-only { background-color: #ccc; } p:read-only { background-color: #ccc; } syntax :read-only examples confirming form information in read-only/read-write controls one use of readonly form controls is to allow the user to check and verify information that they may have entered in an earlier form (for example, shipping details), while still being able to submit the information along with the rest of the form.
:read-write - CSS: Cascading Style Sheets
input:read-write, textarea:read-write { background-color: #bbf; } p:read-write { background-color: #bbf; } syntax :read-write examples confirming form information in read-only/read-write controls one use of readonly form controls is to allow the user to check and verify information that they may have entered in an earlier form (for example, shipping details), while still being able to submit the information along with the rest of the form.
:valid - CSS: Cascading Style Sheets
WebCSS:valid
this allows to easily make valid fields adopt an appearance that helps the user confirm that their data is formatted properly.
system - CSS: Cascading Style Sheets
extends allows authors to use the algorithm of another counter style, but alter its other aspects.
@counter-style - CSS: Cascading Style Sheets
the @counter-style at-rule addresses this shortcoming in an open-ended manner, by allowing authors to define their own counter styles when the pre-defined styles aren't fitting their needs.
font-family - CSS: Cascading Style Sheets
the font-family css descriptor allows authors to specify the font family for the font specified in an @font-face rule.
font-variation-settings - CSS: Cascading Style Sheets
the font-variation-settings css descriptor allows authors to specify low-level opentype or truetype font variations in the @font-face rule.
unicode-range - CSS: Cascading Style Sheets
description the purpose of this descriptor is to allow the font resources to be segmented so that a browser only needs to download the font resource needed for the text content of a particular page.
-webkit-device-pixel-ratio - CSS: Cascading Style Sheets
although the value is a <number>, and thus doesn't syntactically allow units, its implicit unit is dppx.
Coordinate systems - CSS: Cascading Style Sheets
the class "outer" is used for the containing box, which is intentionally too wide to show in the mdn window, to allow you to scroll it horizontally.
CSS Backgrounds and Borders - CSS: Cascading Style Sheets
styles in the css backgrounds and borders module allow filling backgrounds with color or an image (clipped or resized), or modifying them in other ways.
Box alignment in grid layout - CSS: Cascading Style Sheets
this allows them to be used for other layout methods where a gap between items makes sense.
CSS Box Alignment - CSS: Cascading Style Sheets
the gap property is a shorthand for row-gap and column-gap, which allows us to set these properties at once: row-gap column-gap gap in the below example, a grid layout uses the gap shorthand to set a 10px gap between row tracks, and a 2em gap between column tracks.
Handling Overflow in Multicol - CSS: Cascading Style Sheets
in a future version of the specification it would be useful to be able to have overflow columns in continuous media display in the block direction, therefore allowing the reader to scroll down to view the next set of columns.
Spanning and Balancing Columns - CSS: Cascading Style Sheets
limitations of column-span in the current level 1 specification there are only two allowable values for column-span.
Styling Columns - CSS: Cascading Style Sheets
the allowed value for column-gap is a <length-percentage>, this means percentages are allowed.
CSS Conditional Rules - CSS: Cascading Style Sheets
css conditional rules is a css module that allows to define a set of rules that will only apply based on the capabilities of the processor or the document the style sheet is being applied to.
Cross-browser Flexbox mixins - CSS: Cascading Style Sheets
align-self allows this default alignment to be overridden for individual flex items.
Auto-placement in CSS Grid Layout - CSS: Cascading Style Sheets
in my example i am allowing auto-placement to place the items, however i have classes that start a dt in column 1, and dd in column 2, this ensure that terms go on one side and definitions on the other - no matter how many of each we have.
Relationship of grid layout to other layout methods - CSS: Cascading Style Sheets
when you use css grid layout you create a layout and then you place items into it, or you allow the auto-placement rules to place the items into the grid cells according to that strict grid.
Subgrid - CSS: Cascading Style Sheets
as with any nested grid however, the size of content in the subgrid can change the track sizing, assuming a track sizing method is used that allows content to affect the size.
Using CSS gradients - CSS: Cascading Style Sheets
this only makes sense if the gradients are partially transparent allowing subsequent gradients to show through the transparent areas, or if you include different background-sizes, optionally with different background-position property values, for each gradient image.
Logical properties for floating and positioning - CSS: Cascading Style Sheets
example: inset properties for positioned layout positioning generally allows us to position an element in a manner relative to its containing block — we essentially inset the item relative to where it would fall based on normal flow.
Logical properties for margins, borders and padding - CSS: Cascading Style Sheets
padding shorthands as with margin, there are two-value shorthands for padding — padding-inline and padding-block — which allow you to set the padding of the two inline, and two block dimensions, respectively.
Logical properties for sizing - CSS: Cascading Style Sheets
using resize: inline allows resizing in the inline dimension and resize: block allow resizing in the block dimension.
CSS Namespaces - CSS: Cascading Style Sheets
css namespaces is a css module that allows authors to specify xml namespaces in css.
CSS Overflow - CSS: Cascading Style Sheets
working draft changed syntax to allow one or two keywords instead of only one css level 2 (revision 1)the definition of 'overflow' in that specification.
Understanding CSS z-index - CSS: Cascading Style Sheets
(from css 2.1 section 9.9.1 - layered presentation) this means that css style rules allow you to position boxes on layers in addition to the normal rendering layer (layer 0).
Basic concepts of CSS Scroll Snap - CSS: Cascading Style Sheets
this allows for different amounts of space for different child elements, and can be used in conjunction with scroll-padding on the parent.
CSS selectors - CSS: Cascading Style Sheets
pseudo pseudo classes the : pseudo allow the selection of elements based on state information that is not contained in the document tree.
Shapes from box values - CSS: Cascading Style Sheets
the box values allowable as a shape value are: content-box padding-box border-box margin-box the border-radius values are also supported, this means that you can have something in your page with a curved border, and your shape can follow the created shape.
CSS Custom Properties for Cascading Variables - CSS: Cascading Style Sheets
css custom properties for cascading variables is a css module that allows for the creation of custom properties that can be used over and over.
Introducing the CSS Cascade - CSS: Cascading Style Sheets
WebCSSCascade
specifications specification status comment css cascading and inheritance level 4 candidate recommendation added the revert keyword, which allows rolling a property back a cascade level.
Comments - CSS: Cascading Style Sheets
WebCSSComments
syntax comments can be placed wherever white space is allowed within a style sheet.
Questions about CSS - CSS: Cascading Style Sheets
WebCSSFAQ
cascading style sheets (css) is a rule-based language allowing developers to define styles to apply to html elements (or other markup structures).
Grid wrapper - CSS: Cascading Style Sheets
the grid wrapper pattern is useful for aligning grid content within a central wrapper, while also allowing items to break out and align to the edge of the containing element or page when desired.
Recipe: Media objects - CSS: Cascading Style Sheets
the recipe download this example choices made i have chosen to use grid layout for the media object as it allows me to control the layout in two dimensions when i need to.
Paged media - CSS: Cascading Style Sheets
it allows you to set page breaks, control printable area, style left and right pages differently, and control breaks inside elements.
Privacy and the :visited selector - CSS: Cascading Style Sheets
before about 2010, the css :visited selector allowed websites to uncover a user's browsing history and figure out what sites the user had visited.
CSS reference - CSS: Cascading Style Sheets
WebCSSReference
te3d()translatex()translatey()translatez()turnuunicode-bidiunicode-range (@font-face)unset<url>url()user-zoom (@viewport)v:validvar()vertical-alignvh@viewportviewport-fit (@viewport)visibility:visitedvmaxvminvwwwhite-spacewidowswidthwidth (@viewport)will-changeword-breakword-spacingword-wrapwriting-modexxzz-indexzoom (@viewport)others--* selectors the following are the various selectors, which allow styles to be conditional based on various features of elements within the dom.
Universal selectors - CSS: Cascading Style Sheets
recommendation defines behavior regarding namespaces and adds hint that omitting the selector is allowed within pseudo-elements css level 2 (revision 1)the definition of 'universal selector' in that specification.
animation-timing-function - CSS: Cascading Style Sheets
the non-step keyword values (ease, linear, ease-in-out, etc.) each represent cubic bézier curve with fixed four point values, with the cubic-bezier() function value allowing for a non-predefined value.
background-position-x - CSS: Cascading Style Sheets
(some browsers allow assigning the right edge for offset).
background-position-y - CSS: Cascading Style Sheets
(some browsers allow assigning the bottom edge for offset).
background-position - CSS: Cascading Style Sheets
recommendation allows for keyword values and <length> and <percentage> values to be mixed.
<blend-mode> - CSS: Cascading Style Sheets
below it we have a provided a <select> menu that allows you to change the background-blend-mode applied to the <div>, allowing you to compare the different blend mode effects.
border-bottom-left-radius - CSS: Cascading Style Sheets
as absolute length it can be expressed in any unit allowed by the css <length> data type.
border-bottom-right-radius - CSS: Cascading Style Sheets
as absolute length it can be expressed in any unit allowed by the css <length> data type.
border-end-end-radius - CSS: Cascading Style Sheets
as absolute length it can be expressed in any unit allowed by the css <length> data type.
border-end-start-radius - CSS: Cascading Style Sheets
as absolute length it can be expressed in any unit allowed by the css <length> data type.
border-image-slice - CSS: Cascading Style Sheets
however, we have also provided two sliders to allow you to dynamically change the values of the above two properties, allowing you to appreciate the effect they have: border-image-slice changes the size of the image slice sampled for use in each border and border corner (and the content area, if the fill keyword is used) — varying this away from 30 causes the border to look somewhat irregular, but can have some interesting effects.
border-radius - CSS: Cascading Style Sheets
constituent properties this property is a shorthand for the following css properties: border-bottom-left-radius border-bottom-right-radius border-top-left-radius border-top-right-radius syntax /* the syntax of the first radius allows one to four values */ /* radius is set for all 4 sides */ border-radius: 10px; /* top-left-and-bottom-right | top-right-and-bottom-left */ border-radius: 10px 5%; /* top-left | top-right-and-bottom-left | bottom-right */ border-radius: 2px 4px 2px; /* top-left | top-right | bottom-right | bottom-left */ border-radius: 1px 0 3px 4px; /* the syntax of the second radius allows one to four value...
border-start-end-radius - CSS: Cascading Style Sheets
as absolute length it can be expressed in any unit allowed by the css <length> data type.
border-start-start-radius - CSS: Cascading Style Sheets
as absolute length it can be expressed in any unit allowed by the css <length> data type.
border-top-left-radius - CSS: Cascading Style Sheets
as absolute length it can be expressed in any unit allowed by the css <length> data type.
border-top-right-radius - CSS: Cascading Style Sheets
as absolute length it can be expressed in any unit allowed by the css <length> data type.
box-ordinal-group - CSS: Cascading Style Sheets
formal definition initial value1applies tochildren of box elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax <integer> examples basic usage example in an older version of the spec, box-ordinal-group was included to allow you to change the display order of flex children inside a flex container: article:nth-child(1) { -webkit-box-ordinal-group: 2 -moz-box-ordinal-group: 2 box-ordinal-group: 2 } article:nth-child(2) { -webkit-box-ordinal-group: 1 -moz-box-ordinal-group: 1 box-ordinal-group: 1 } the modern flexbox equivalent is order.
break-after - CSS: Cascading Style Sheets
values generic break values auto allows, but does not force, any break (page, column, or region) to be inserted right after the principal box.
break-before - CSS: Cascading Style Sheets
values generic break values auto allows, but does not force, any break (page, column, or region) to be inserted right before the principal box.
break-inside - CSS: Cascading Style Sheets
values auto allows, but does not force, any break (page, column, or region) to be be inserted within the principal box.
color - CSS: Cascading Style Sheets
WebCSScolor
allows alpha values in rgb() and hsl(), turning rgba() and hsla() into (deprecated) aliases for them.
column-count - CSS: Cascading Style Sheets
if the column-width is also set to a non-auto value, it merely indicates the maximum allowed number of columns.
columns - CSS: Cascading Style Sheets
WebCSScolumns
if neither this value nor the column's width are auto, it merely indicates the maximum allowable number of columns.
content - CSS: Cascading Style Sheets
WebCSScontent
html <h2>paperback best sellers</h2> <ol> <li>political thriller</li> <li class="new-entry">halloween stories</li> <li>my biography</li> <li class="new-entry">vampire romance</li> </ol> css .new-entry::after { content: " new!"; /* the leading space creates separation between the added content and the rest of the content */ color: red; } result images and element attributes this example inserts an image before each link, and adds i...
flex-wrap - CSS: Cascading Style Sheets
WebCSSflex-wrap
if wrapping is allowed, it sets the direction that lines are stacked.
float - CSS: Cascading Style Sheets
WebCSSfloat
the float css property places an element on the left or right side of its container, allowing text and inline elements to wrap around it.
font-smooth - CSS: Cascading Style Sheets
auto - allow the browser to select an optimization for font smoothing, typically grayscale.
font-stretch - CSS: Cascading Style Sheets
negative values are not allowed for this property.
font-variant-alternates - CSS: Cascading Style Sheets
this property allows those human-readable names (defined in @font-feature-values) in the stylesheet.
font-variant-numeric - CSS: Cascading Style Sheets
tabular-nums activating the set of figures where numbers are all of the same size, allowing them to be easily aligned like in tables.
font-variant - CSS: Cascading Style Sheets
the font-variant css shorthand property allows you to set all the font variants for a font.
grid-template-columns - CSS: Cascading Style Sheets
repeat( [ <positive-integer> | auto-fill | auto-fit ] , <track-list> ) represents a repeated fragment of the track list, allowing a large number of columns that exhibit a recurring pattern to be written in a more compact form.
grid-template-rows - CSS: Cascading Style Sheets
repeat( [ <positive-integer> | auto-fill | auto-fit ] , <track-list> ) represents a repeated fragment of the track list, allowing a large number of rows that exhibit a recurring pattern to be written in a more compact form.
grid-template - CSS: Cascading Style Sheets
note: the repeat() function isn’t allowed in these track listings, as the tracks are intended to visually line up one-to-one with the rows/columns in the “ascii art”.
image-set() - CSS: Cascading Style Sheets
WebCSSimage-set
image-set() allows the author to provide options rather than determining what each individual user needs.
image() - CSS: Cascading Style Sheets
while this can and should be done by including a background-color on every background image, the css image() function allows adding allows only including background colors should an image fail to load, which means you can add a fall back color should a transparent png/gif/webp not load.
ime-mode - CSS: Cascading Style Sheets
WebCSSime-mode
description unlike internet explorer, firefox's implementation of ime-mode allows this property on <input type="password">.
Inheritance - CSS: Cascading Style Sheets
notes the inherit keyword allows authors to explicitly specify inheritance.
initial-letter - CSS: Cascading Style Sheets
negative values are not allowed.
letter-spacing - CSS: Cascading Style Sheets
unlike a value of 0, this keyword allows the user agent to alter the space between characters in order to justify text.
linear-gradient() - CSS: Cascading Style Sheets
the following changes from red to yellow at the 30% mark, and then transitions from yellow to blue over 35% of the gradient linear-gradient(red 40%, yellow 30%, blue 65%); multi-position color stop are allowed.
list-style - CSS: Cascading Style Sheets
the list-style css shorthand property allows you set all the list style properties at once.
margin-trim - CSS: Cascading Style Sheets
the margin-trim property allows the container to trim the margins of its children where they adjoin the container’s edges.
mask - CSS: Cascading Style Sheets
WebCSSmask
this will ensure that mask-border has also been reset to allow the new styles to take effect.
max-block-size - CSS: Cascading Style Sheets
the writing modes lr, lr-tb, rl, rb, and rb-tl are no longer allowed in html contexts; they may only be used in svg 1.x contexts.
min() - CSS: Cascading Style Sheets
WebCSSmin
the min() function can be used anywhere a <length>, <frequency>, <angle>, <time>, <percentage>, <number>, or <integer> is allowed.
offset-anchor - CSS: Cascading Style Sheets
this allows you to see what effect the different offset-anchor values have — the first one, auto, causes the <div>'s center point to move along the path.
Guide to scroll anchoring - CSS: Cascading Style Sheets
in bug 1584285 the layout.css.scroll-anchoring.suppressions.enabled flag was added to firefox nightly in order to allow the disabling of these triggers further reading explainer document on the wicg site scroll anchoring for web developers on the chromium blog implement a pin-to-bottom scrolling element using scroll anchoring ...
overflow-wrap - CSS: Cascading Style Sheets
break-word the same as the anywhere value, with normally unbreakable words allowed to be broken at arbitrary points if there are no otherwise acceptable break points in the line, but soft wrap opportunities introduced by the word break are not considered when calculating min-content intrinsic sizes.
padding-bottom - CSS: Cascading Style Sheets
unlike margins, negative values are not allowed for padding.
padding-left - CSS: Cascading Style Sheets
unlike margins, negative values are not allowed for padding.
padding-right - CSS: Cascading Style Sheets
unlike margins, negative values are not allowed for padding.
padding-top - CSS: Cascading Style Sheets
unlike margins, negative values are not allowed for padding.
page-break-inside - CSS: Cascading Style Sheets
working draft allows this property on more elements.
place-content - CSS: Cascading Style Sheets
the place-content css shorthand property allows you to align content along both the block and inline directions at once (i.e.
place-items - CSS: Cascading Style Sheets
the css place-items shorthand property allows you to align items along both the block and inline directions at once (i.e.
place-self - CSS: Cascading Style Sheets
the place-self css shorthand property allows you to align an individual item in both the block and inline directions at once (i.e.
pointer-events - CSS: Cascading Style Sheets
if one of the element's children has pointer-events explicitly set to allow that child to be the target of pointer events, then any events targeting that child will pass through the parent as the event travels along the parent chain, and trigger event listeners on the parent as appropriate.
<ratio> - CSS: Cascading Style Sheets
WebCSSratio
in addition a single <number> as a value is allowable.
repeat() - CSS: Cascading Style Sheets
WebCSSrepeat
the repeat() css function represents a repeated fragment of the track list, allowing a large number of columns or rows that exhibit a recurring pattern to be written in a more compact form.
<resolution> - CSS: Cascading Style Sheets
} valid resolutions 96dpi 50.82dpcm 3dppx invalid resolutions 72 dpi spaces are not allowed between the number and the unit.
rotate - CSS: Cascading Style Sheets
WebCSSrotate
the rotate css property allows you to specify rotation transforms individually and independently of the transform property.
scale - CSS: Cascading Style Sheets
WebCSSscale
the scale css property allows you to specify scale transforms individually and independently of the transform property.
scroll-behavior - CSS: Cascading Style Sheets
user agents are allowed to ignore this property.
scroll-padding-block-end - CSS: Cascading Style Sheets
this allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or simply to put more breathing room between a targetted element and the edges of the scrollport.
scroll-padding-block-start - CSS: Cascading Style Sheets
this allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or simply to put more breathing room between a targetted element and the edges of the scrollport.
scroll-padding-block - CSS: Cascading Style Sheets
this allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or simply to put more breathing room between a targeted element and the edges of the scrollport.
scroll-padding-bottom - CSS: Cascading Style Sheets
this allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or simply to put more breathing room between a targetted element and the edges of the scrollport.
scroll-padding-inline-end - CSS: Cascading Style Sheets
this allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or simply to put more breathing room between a targetted element and the edges of the scrollport.
scroll-padding-inline-start - CSS: Cascading Style Sheets
this allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or simply to put more breathing room between a targetted element and the edges of the scrollport.
scroll-padding-inline - CSS: Cascading Style Sheets
this allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or simply to put more breathing room between a targetted element and the edges of the scrollport.
scroll-padding-left - CSS: Cascading Style Sheets
this allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or simply to put more breathing room between a targetted element and the edges of the scrollport.
scroll-padding-right - CSS: Cascading Style Sheets
this allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or simply to put more breathing room between a targetted element and the edges of the scrollport.
scroll-padding-top - CSS: Cascading Style Sheets
this allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or simply to put more breathing room between a targetted element and the edges of the scrollport.
scroll-padding - CSS: Cascading Style Sheets
this allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars), or simply to put more breathing room between a targeted element and the edges of the scrollport.
scroll-snap-points-x - CSS: Cascading Style Sheets
only positive lengths are allowed.
scroll-snap-points-y - CSS: Cascading Style Sheets
only positive lengths are allowed.
scroll-snap-stop - CSS: Cascading Style Sheets
the scroll-snap-stop css property defines whether the scroll container is allowed to "pass over" possible snap positions.
scrollbar-width - CSS: Cascading Style Sheets
the scrollbar-width property allows the author to set the maximum thickness of an element’s scrollbars when they are shown.
text-indent - CSS: Cascading Style Sheets
negative values are allowed.
text-size-adjust - CSS: Cascading Style Sheets
the text-size-adjust property allows web authors to disable or modify this behavior, as web pages designed with small screens in mind do not need it.
text-transform - CSS: Cascading Style Sheets
full-width is a keyword that forces the writing of a character — mainly ideograms and latin scripts — inside a square, allowing them to be aligned in the usual east asian scripts (like chinese or japanese).
scale() - CSS: Cascading Style Sheets
if you need to include such animations on your website, you should provide a control to allow users to turn off animations, preferrably site-wide.
transform-style - CSS: Cascading Style Sheets
we also provide a checkbox allowing you to toggle between this, and transform-style: flat.
transform - CSS: Cascading Style Sheets
WebCSStransform
if you need to include such animations on your website, you should provide a control to allow users to turn off animations, preferrably site-wide.
transition-timing-function - CSS: Cascading Style Sheets
the non-step keyword values (ease, linear, ease-in-out, etc.) each represent cubic bézier curve with fixed four point values, with the cubic-bezier() function value allowing for a non-predefined value.
translate - CSS: Cascading Style Sheets
WebCSStranslate
the translate css property allows you to specify translation transforms individually and independently of the transform property.
<url> - CSS: Cascading Style Sheets
WebCSSurl
relative urls are allowed, and are relative to the url of the stylesheet (not to the url of the web page).
user-select - CSS: Cascading Style Sheets
-select: inherit; user-select: initial; user-select: unset; /* mozilla-specific values */ -moz-user-select: none; -moz-user-select: text; -moz-user-select: all; /* webkit-specific values */ -webkit-user-select: none; -webkit-user-select: text; -webkit-user-select: all; /* doesn't work in safari; use only "none" or "text", or else it will allow typing in the <html> container */ /* microsoft-specific values */ -ms-user-select: none; -ms-user-select: text; -ms-user-select: element; note: user-select is not an inherited property, though the initial auto value makes it behave like it is inherited most of the time.
var() - CSS: Cascading Style Sheets
WebCSSvar
) note: the syntax of the fallback, like that of custom properties, allows commas.
visibility - CSS: Cascading Style Sheets
this value allows for the fast removal of a row or column from a table without forcing the recalculation of widths and heights for the entire table.
will-change - CSS: Cascading Style Sheets
this will let browser prepare the transition ahead of time and allow for snappy transitions between the pages as soon as the key is pressed.
word-spacing - CSS: Cascading Style Sheets
allows up to three values describing the optimum, minimum, and maximum value.
CSS: Cascading Style Sheets
WebCSS
previously development of various parts of css specification was done synchronously, which allowed versioning of the latest recommendation.
regexp:test() - EXSLT
WebEXSLTregexptest
the character flags are: g global match has no effect for this function; it's allowed for consistency with other regexp functions.
Regular expressions (regexp) - EXSLT
WebEXSLTregexp
xslt/xpath reference: xslt elements, exslt functions, xpath functions, xpath axes the exslt regular expressions package provides functions that allow testing, matching, and replacing text using javascript style regular expressions.
Strings (str) - EXSLT
WebEXSLTstr
xslt/xpath reference: xslt elements, exslt functions, xpath functions, xpath axes the exslt strings package provides functions that allow the manipulation of strings.
Getting Started - Developer guides
the two major features of ajax allow you to do the following: make requests to the server without reloading the page receive and work with data from the server step 1 – how to make an http request in order to make an http request to the server with javascript, you need an instance of an object with the necessary functionality.
Ajax - Developer guides
WebGuideAJAX
this feature allows web apps to obtain an html resource as a parsed dom using xmlhttprequest.
Setting up adaptive streaming media sources - Developer guides
ondemand profile this profile will allow switching between streams 'on demand' - that is to say that you only need provide a set of contiguous files and specify the bandwidth for each one and the appropriate file will be chosen automatically.
Writing Web Audio API code that works in every browser - Developer guides
if it's using, for example, oscillatornode, you will have to wait until it is supported, or maybe, if you're really eager, hack in some replacement using scriptprocessornode, which allows you to write a node with callbacks that get called periodically, so that your javascript code generates or processes audio.
Media buffering, seeking, and time ranges - Developer guides
byte range requests allow parts of the media file to be delivered from the server and so can be ready to play almost immediately — thus they are seekable.
Mutation events - Developer guides
&& (desc === root || isdescendant(desc.parentnode, root)); }; var onremove = function (element, callback) { var observer = new mutationobserver(function (mutations) { _.foreach(mutations, function (mutation) { _.foreach(mutation.removednodes, function (removed) { if (isdescendant(element, removed)) { callback(); // allow garbage collection observer.disconnect(); observer = undefined; } }); }); }); observer.observe(document, { childlist: true, subtree: true }); }; usage you can register a listener for mutation events using element.addeventlistener as follows: element.addeventlistener("domnodeinserted", functi...
Overview of events and handlers - Developer guides
the innovation of the dynamic approach allows for a page to be partially rendered even when the browser has not finished retrieving all resources; this approach also allows for event driven actions, which javascript leverages.
HTML5 Parser - Developer guides
WebGuideHTMLHTML5HTML5 Parser
calling document.write() during parsing prior to html5, gecko and webkit allowed calls to document.write() during parsing to insert content into the source stream.
Separate sites for mobile and desktop - Developer guides
finally, it also allows for completely different user experiences on desktop and mobile — they’re two different sites, after all!
The Unicode Bidirectional Text Algorithm - Developer guides
base direction to rtl, isolating the embedded content from the surrounding text first strong isolate (fsi) u+2068 &#x2068; dir="auto" isolates the content and sets the base direction according to the first strongly-typed directional character in the embedded content left-to-right embedding (lre) u+202a &#x202a; dir="ltr" sets the base direction to ltr but allows the embedded text to interact with the surrounding content; this risks the effect spilling over to the outer content right-to-left embedding (rle) u+202b &#x202b; dir="rtl" sets the base direction to rtl, but lets the embedded text interact with the surrounding content, risking spillover effects left-to-right override (lro) u+202d &#x202d; <bdo dir="ltr"> ...
The Web Open Font Format (WOFF) - Developer guides
WebGuideWOFF
it uses a compressed version of the same table-based sfnt structure used by truetype, opentype, and open font format, but adds metadata and private-use data structures, including predefined fields allowing foundries and vendors to provide license information if desired.
Developer guides
ajax ajax is a term that defines a group of technologies allowing web applications to make quick, incremental updates to the user interface without reloading the entire browser page.
Applying color to HTML elements using CSS - HTML: Hypertext Markup Language
the default value of color-adjust, economy, indicates that the browser is allowed to make appearance changes as it deems necessary in order to try to optimize the legibility and/or print economy of the content, given the type of output device the document is being drawn onto.
The HTML autocomplete attribute - HTML: Hypertext Markup Language
"on" the browser is allowed to automatically complete the input.
HTML attribute: capture - HTML: Hypertext Markup Language
examples when set on a file input type, operating systems with microphones and cameras will display a user interface allowing the selection from an existing file or the creating of a new one.
HTML attribute: maxlength - HTML: Hypertext Markup Language
constraint validation while the browser will generally prevent user from entering more text than the maxlength attribute allows, should the length be longer than the maxlength allows, the read-only toolong property of a validitystate object will be true.
<a>: The Anchor element - HTML: Hypertext Markup Language
WebHTMLElementa
allowed values are the same as the global lang attribute.
<acronym> - HTML: Hypertext Markup Language
WebHTMLElementacronym
summary the html acronym element (<acronym>) allows authors to clearly indicate a sequence of characters that compose an acronym or abbreviation for a word.
<applet>: The Embed Java Applet element - HTML: Hypertext Markup Language
WebHTMLElementapplet
mayscript in the netscape implementation, this attribute allows access to an applet by programs in a scripting language embedded in the document.
<area> - HTML: Hypertext Markup Language
WebHTMLElementarea
allowed values are determined by bcp47.
<base>: The Document Base URL element - HTML: Hypertext Markup Language
WebHTMLElementbase
absolute and relative urls are allowed.
<bdi>: The Bidirectional Isolate element - HTML: Hypertext Markup Language
WebHTMLElementbdi
though the same visual effect can be achieved using the css rule unicode-bidi: isolate on a <span> or another text-formatting element, html authors should not use this approach because it is not semantic and browsers are allowed to ignore css styling.
<blink>: The Blinking Text element (obsolete) - HTML: Hypertext Markup Language
WebHTMLElementblink
blinking text is frowned upon by several accessibility standards and the css specification allows browsers to ignore the <blink> element.
<col> - HTML: Hypertext Markup Language
WebHTMLElementcol
<col> allows styling columns using css, but only a few properties will have an effect on the column (see the css 2.1 specification for a list).
<dl>: The Description List element - HTML: Hypertext Markup Language
WebHTMLElementdl
<dl> <dt>name</dt> <dd>godzilla</dd> <dt>born</dt> <dd>1952</dd> <dt>birthplace</dt> <dd>japan</dd> <dt>color</dt> <dd>green</dd> </dl> tip: it can be handy to define a key-value separator in the css, such as: dt::after { content: ": "; } wrapping name-value groups in <div> elements whatwg html allows wrapping each name-value group in a <dl> element in a <div> element.
<fieldset>: The Field Set element - HTML: Hypertext Markup Language
WebHTMLElementfieldset
it takes few attributes, the most notable of which are form, which can contain the id of a <form> on the same page, allowing you to make the <fieldset> part of that <form> even if it is not nested inside it, and disabled, which allows you to disable the <fieldset> and all its contents in one go.
<frame> - HTML: Hypertext Markup Language
WebHTMLElementframe
frameborder this attribute allows you to specify a frame’s border.
<header> - HTML: Hypertext Markup Language
WebHTMLElementheader
this allowed <header> to be free to fill a different role later on.
<hgroup> - HTML: Hypertext Markup Language
WebHTMLElementhgroup
the <hgroup> element allows the primary heading for a document section to be grouped with any secondary headings—such as subheadings or alternative titles—to form a multi-level heading.
<input type="button"> - HTML: Hypertext Markup Language
WebHTMLElementinputbutton
the top two controls allow you to choose the color and size of the drawing pen.
<input type="color"> - HTML: Hypertext Markup Language
WebHTMLElementinputcolor
only simple colors (without alpha channel) are allowed though css colors has more formats, e.g.
<input type="date"> - HTML: Hypertext Markup Language
WebHTMLElementinputdate
a string value of any means that no stepping is implied, and any value is allowed (barring other constraints, such as min and max).
<input type="hidden"> - HTML: Hypertext Markup Language
WebHTMLElementinputhidden
the content to be edited is taken from the database and loaded into an html form to allow the user to make changes.
<input type="submit"> - HTML: Hypertext Markup Language
WebHTMLElementinputsubmit
multipart/form-data uses the formdata api to manage the data, allowing for files to be submitted to the server.
<keygen> - HTML: Hypertext Markup Language
WebHTMLElementkeygen
the user may be given a choice of dsa key sizes, allowing the user to choose one of the sizes defined in the dsa standard.
<label> - HTML: Hypertext Markup Language
WebHTMLElementlabel
no labelable elements other than the labeled control are allowed.
<li> - HTML: Hypertext Markup Language
WebHTMLElementli
the only allowed value for this attribute is a number, even if the list is displayed with roman numerals or letters.
<main> - HTML: Hypertext Markup Language
WebHTMLElementmain
skip navigation skip navigation, also known as "skipnav", is a technique that allows an assistive technology user to quickly bypass large sections of repeated content (main navigation, info banners, etc.).
<meter>: The HTML Meter element - HTML: Hypertext Markup Language
WebHTMLElementmeter
this is allowed, as it will default to 0.
<multicol>: The HTML Multi-Column Layout element (Obsolete) - HTML: Hypertext Markup Language
WebHTMLElementmulticol
the html multi-column layout element (<multicol>) was an experimental element designed to allow multi-column layouts and must not be used.
<nextid>: The NeXT ID element (Obsolete) - HTML: Hypertext Markup Language
WebHTMLElementnextid
html "1.k" - version 1 (first release) in this first published draft of html, <nextid> is the same as it would take in html 2, finally allowing the use of a name instead of only a number for its attribute value.
<picture>: The Picture element - HTML: Hypertext Markup Language
WebHTMLElementpicture
permitted parents any element that allows embedded content.
<pre>: The Preformatted Text element - HTML: Hypertext Markup Language
WebHTMLElementpre
a combination of the <figure> and <figcaption> elements, supplemented by a combination of an id and the aria role and aria-labelledby attributes allow the preformatted text to be announced as an image, with the figcaption serving as the image's alternate description.
<progress>: The Progress Indicator element - HTML: Hypertext Markup Language
WebHTMLElementprogress
note: unlike the <meter> element, the minimum value is always 0, and the min attribute is not allowed for the <progress> element.
<samp>: The Sample Output element - HTML: Hypertext Markup Language
WebHTMLElementsamp
for example, consider this text presenting a transcript of a linux (or macos) console session: html <pre> <samp><span class="prompt">mike@interwebz:~$</span> <kbd>md5 -s "hello world"</kbd> md5 ("hello world") = 3e25960a79dbc69b674cd4ec67a72c62 <span class="prompt">mike@interwebz:~$</span> <span class="cursor">█</span></samp></pre> note the use of <span> to allow customization of the appearance of specific portions of the sample text such as the shell prompts and the cursor.
<spacer> - HTML: Hypertext Markup Language
WebHTMLElementspacer
<spacer> is an obsolete html element which allowed insertion of empty spaces on pages.
<style>: The Style Information element - HTML: Hypertext Markup Language
WebHTMLElementstyle
in the same manner as <link> elements, <style> elements can include media attributes that contain media queries, allowing you to selectively apply internal stylesheets to your document depending on media features such as viewport width.
<template>: The Content Template element - HTML: Hypertext Markup Language
WebHTMLElementtemplate
also allowed as a child of a <colgroup> element that does not have a span attribute.
<time> - HTML: Hypertext Markup Language
WebHTMLElementtime
it may include the datetime attribute to translate dates into machine-readable format, allowing for better search engine results or custom features such as reminders.
<track>: The Embed Text Track element - HTML: Hypertext Markup Language
WebHTMLElementtrack
the following keywords are allowed: subtitles subtitles provide translation of content that cannot be understood by the viewer.
<xmp> - HTML: Hypertext Markup Language
WebHTMLElementxmp
the html2 specification recommended that it should be rendered wide enough to allow 80 characters per line.
class - HTML: Hypertext Markup Language
classes allow css and javascript to select and access specific elements via the class selectors or functions like the dom method document.getelementsbyclassname.
contextmenu - HTML: Hypertext Markup Language
html5 now allows us to customize this menu.
data-* - HTML: Hypertext Markup Language
the data-* global attributes form a class of attributes called custom data attributes, that allow proprietary information to be exchanged between the html and its dom representation by scripts.
dir - HTML: Hypertext Markup Language
browsers might allow users to change the directionality of <input> and <textarea>s in order to assist with authoring content.
is - HTML: Hypertext Markup Language
the is global attribute allows you to specify that a standard html element should behave like a defined custom built-in element (see using custom elements for more details).
itemref - HTML: Hypertext Markup Language
for example, it allows authors to mark up data in a table so that each column defines a separate item while keeping the properties in the cells.
itemscope - HTML: Hypertext Markup Language
a global identifier allows the item to relate to other items found on pages across the web.
itemtype - HTML: Hypertext Markup Language
it is left to such specifications to define whether multiple items of the same global identifier (whether on the same page or different pages) are allowed to exist, and what processing rules for that vocabulary are, with respect to handling the case of multiple items with the same id.
part - HTML: Hypertext Markup Language
part names allows css to select and style specific elements in a shadow tree via the ::part pseudo-element.
spellcheck - HTML: Hypertext Markup Language
this means that the explicit usage of one of the values true or false is mandatory, and that a shorthand like <textarea spellcheck></textarea> is not allowed.
style - HTML: Hypertext Markup Language
this attribute and the <style> element have mainly the purpose of allowing for quick styling, for example for testing purposes.
Inline elements - HTML: Hypertext Markup Language
for example, even if the display of the span element is changed to "block", it still would not allow to nest a div element inside it.
Microdata - HTML: Hypertext Markup Language
search engines benefit greatly from direct access to this structured data because it allows search engines to understand the information on web pages and provide more relevant results to users.
HTML reference - HTML: Hypertext Markup Language
date and time formats used in html certain html elements allow you to specify dates and/or times as the value or as the value of an attribute.
Microformats - HTML: Hypertext Markup Language
search engines benefit greatly from direct access to this structured data because it allows them to understand the information on web pages and provide more relevant results to users.
Data URLs - HTTP
data urls, urls prefixed with the data: scheme, allow content creators to embed small files inline in documents.
Basics of HTTP - HTTP
this article explains how http frames allow multiplexing and solve the 'head-of-line' blocking problem of former http versions.
Reason: CORS header ‘Origin’ cannot be added - HTTP
this can happen if the javascript code is running with enhanced privileges allowing it access to multiple domains' content, for example.
Compression in HTTP - HTTP
te and transfer-encoding are mostly used to send a response by chunks, allowing to start transmitting a resource without knowing its length.
Connection management in HTTP/1.x - HTTP
conclusion improved connection management allows considerable boosting of performance in http.
Cross-Origin Resource Policy (CORP) - HTTP
these vulnerabilities allowed sensitive data disclosure due to a race condition which arose as part of speculative execution functionality, designed to improve performance.
Accept-Charset - HTTP
browsers usually don't send this header, as the default value for each resource is usually correct and transmitting it would allow fingerprinting.
Accept-Patch - HTTP
accept-patch in response to any method means that patch is allowed on the resource identified by the request-uri.
Access-Control-Max-Age - HTTP
the access-control-max-age response header indicates how long the results of a preflight request (that is the information contained in the access-control-allow-methods and access-control-allow-headers headers) can be cached.
Clear-Site-Data - HTTP
it allows web developers to have more control over the data stored locally by a browser for their origins.
Connection - HTTP
if the value sent is keep-alive, the connection is persistent and not closed, allowing for subsequent requests to the same server to be done.
Content-Language - HTTP
the content-language entity header is used to describe the language(s) intended for the audience, so that it allows a user to differentiate according to the users' own preferred language.
Cross-Origin-Embedder-Policy - HTTP
allows the document to fetch cross-origin resources without giving explicit permission through the cors protocol or the cross-origin-resource-policy header.
Cross-Origin-Resource-Policy - HTTP
header type response header forbidden header name no syntax cross-origin-resource-policy: same-site | same-origin | cross-origin examples the response header below will cause compatible user agents to disallow cross-origin no-cors requests: cross-origin-resource-policy: same-origin for more examples, see https://resourcepolicy.fyi/.
DNT - HTTP
WebHTTPHeadersDNT
header type request header forbidden header name yes syntax dnt: 0 dnt: 1 dnt: null directives 0 the user prefers to allow tracking on the target site.
Keep-Alive - HTTP
the keep-alive general header allows the sender to hint about how the connection may be used to set a timeout and a maximum amount of requests.
Proxy-Authenticate - HTTP
it authenticates the request to the proxy server, allowing it to transmit the request further.
Public-Key-Pins - HTTP
some browsers might allow other hashing algorithms than sha-256 in the future.
Referer - HTTP
WebHTTPHeadersReferer
the referer header allows servers to identify where people are visiting them from and may use that data for analytics, logging, or optimized caching, for example.
Save-Data - HTTP
a value of on indicates explicit user opt-in into a reduced data usage mode on the client, and when communicated to origins allows them to deliver alternative content to reduce the data downloaded such as smaller image and video resources, different markup and styling, disabled polling and automatic updates, and so on.
Strict-Transport-Security - HTTP
should it be necessary to disable strict transport security, setting the max-age to 0 (over a https connection) will immediately expire the strict-transport-security header, allowing access via http.
Upgrade - HTTP
WebHTTPHeadersUpgrade
http/2 explicitly disallows the use of this mechanism/header; it is specific to http/1.1.
WWW-Authenticate - HTTP
the only allowed value is the case insensitive string "utf-8".
X-DNS-Prefetch-Control - HTTP
the implementation of this prefetching in some browsers allows domain name resolution to occur in parallel with (instead of in serial with) the fetching of actual page content.
X-XSS-Protection - HTTP
chrome has removed their xss auditor firefox have not, and will not implement x-xss-protection edge have retired their xss filter this means that if you do not need to support legacy browsers, it is recommended that you use content-security-policy without allowing unsafe-inline scripts instead.
Link prefetching FAQ - HTTP
in fact, the html 4.01 specification explicitly allows for the definition of new link relation types (see section 6.12: link types).
CONNECT - HTTP
WebHTTPMethodsCONNECT
request has body no successful response has body yes safe no idempotent no cacheable no allowed in html forms no syntax connect www.example.com:443 http/1.1 example some proxy servers might need authority to create a tunnel.
DELETE - HTTP
WebHTTPMethodsDELETE
request has body may successful response has body may safe no idempotent yes cacheable no allowed in html forms no syntax delete /file.html http/1.1 example request delete /file.html http/1.1 responses if a delete method is successfully applied, there are several response status codes possible: a 202 (accepted) status code if the action will likely succeed but has not yet been enacted.
GET - HTTP
WebHTTPMethodsGET
request has body no successful response has body yes safe yes idempotent yes cacheable yes allowed in html forms yes syntax get /index.html specifications specification title rfc 7231, section 4.3.1: get hypertext transfer protocol (http/1.1): semantics and content ...
HEAD - HTTP
WebHTTPMethodsHEAD
request has body no successful response has body no safe yes idempotent yes cacheable yes allowed in html forms no syntax head /index.html specifications specification title rfc 7231, section 4.3.2: head hypertext transfer protocol (http/1.1): semantics and content ...
PUT - HTTP
WebHTTPMethodsPUT
request has body yes successful response has body no safe no idempotent yes cacheable no allowed in html forms no syntax put /new.html http/1.1 example request put /new.html http/1.1 host: example.com content-type: text/html content-length: 16 <p>new file</p> responses if the target resource does not have a current representation and the put request successfully creates one, then the origin server must inform the user agent by sending a 201 (created) response.
TRACE - HTTP
WebHTTPMethodsTRACE
request has body no successful response has body no safe no idempotent yes cacheable no allowed in html forms no syntax trace /index.html specifications specification title rfc 7231, section 4.3.8: trace hypertext transfer protocol (http/1.1): semantics and content ...
Network Error Logging - HTTP
this experimental header allows web sites and applications to opt-in to receive reports about failed (and, if desired, successful) network fetches from supporting browsers.
Proxy servers and tunneling - HTTP
forward proxies can also be anonymous proxies and allow users to hide their ip address while browsing the web or using other internet services.
103 Early Hints - HTTP
WebHTTPStatus103
the http 103 early hints information response status code is primarily intended to be used with the link header to allow the user agent to start preloading resources while the server is still preparing a response.
202 Accepted - HTTP
WebHTTPStatus202
the request might or might not eventually be acted upon, as it might be disallowed when processing actually takes place.
406 Not Acceptable - HTTP
WebHTTPStatus406
if a server returns such an error status, the body of the message should contain the list of the available representations of the resources, allowing the user to choose among them.
451 Unavailable For Legal Reasons - HTTP
WebHTTPStatus451
http/1.1 451 unavailable for legal reasons link: <https://spqr.example.org/legislatione>; rel="blocked-by" content-type: text/html <html> <head><title>unavailable for legal reasons</title></head> <body> <h1>unavailable for legal reasons</h1> <p>this request may not be serviced in the roman province of judea due to the lex julia majestatis, which disallows access to resources hosted on servers deemed to be operated by the people's front of judea.</p> </body> </html> specifications specification title rfc 7725: 451 unavailable for legal reasons an http status code to report legal obstacles ...
501 Not Implemented - HTTP
WebHTTPStatus501
if the server does recognize the method, but intentionally does not support it, the appropriate response is 405 method not allowed.
HTTP response status codes - HTTP
WebHTTPStatus
405 method not allowed the request method is known by the server but has been disabled and cannot be used.
JavaScript data types and data structures - JavaScript
this allows garbage collection optimizations in the latter case.
Equality comparisons and sameness - JavaScript
which one is the better model for understanding depends on how you choose to view things.) however, this way of thinking about the built-in sameness operators is not a model that can be stretched to allow a place for es2015's object.is on this "spectrum".
Expressions and operators - JavaScript
this operator is primarily used inside a for loop, to allow multiple variables to be updated each time through the loop.
Keyed collections - JavaScript
objects allow you to set keys to values, retrieve those values, delete keys, and detect whether something is stored at a key.
Character classes - JavaScript
es2018 added the s "dotall" flag, which allows the dot to also match line terminators.
Regular expression syntax cheatsheet - JavaScript
es2018 added the s "dotall" flag, which allows the dot to also match line terminators.
Text formatting - JavaScript
multi-line template literals template literals are string literals allowing embedded expressions.
Working with objects - JavaScript
this method can be very useful, because it allows you to choose the prototype object for the object you want to create, without having to define a constructor function.
Private class fields - JavaScript
there is however an experimental proposal to allow defining private class fields using a hash # prefix is added.
Public class fields - JavaScript
in subclasses, super lets you access the superclass prototype, allowing you to call methods from the superclass.
Deprecated and obsolete features - JavaScript
object.getnotifier() creates an object that allows to synthetically trigger a change.
TypeError: property "x" is non-configurable and can't be deleted - JavaScript
message typeerror: calling delete on 'x' is not allowed in strict mode (edge) typeerror: property "x" is non-configurable and can't be deleted.
Warning: String.x is deprecated; use String.prototype.x instead - JavaScript
string generics provide string instance methods on the string object allowing string methods to be applied to any object.
SyntaxError: "0"-prefixed octal literals and octal escape seq. are deprecated - JavaScript
message syntaxerror: octal numeric literals and escape characters not allowed in strict mode (edge) syntaxerror: "0"-prefixed octal literals and octal escape sequences are deprecated; for octal literals use the "0o" prefix instead error type syntaxerror in strict mode only.
Warning: Date.prototype.toLocaleFormat is deprecated - JavaScript
märz 2017" or, you can make use of the intl.datetimeformat object, which allows you to cache an object with most of the computations done so that formatting is fast.
TypeError: setting getter-only property "x" - JavaScript
message typeerror: assignment to read-only properties is not allowed in strict mode (edge) typeerror: setting getter-only property "x" (firefox) typeerror: cannot set property "prop" of #<object> which has only a getter (chrome) error type typeerror in strict mode only.
SyntaxError: JSON.parse: bad parsing - JavaScript
examples json.parse() does not allow trailing commas both lines will throw a syntaxerror: json.parse('[1, 2, 3, 4,]'); json.parse('{"foo": 1,}'); // syntaxerror json.parse: unexpected character // at line 1 column 14 of the json data omit the trailing commas to parse the json correctly: json.parse('[1, 2, 3, 4]'); json.parse('{"foo": 1}'); property names must be double-quoted strings you cannot use single-quotes around proper...
RangeError: repeat count must be non-negative - JavaScript
the range of allowed values can be described like this: [0, +∞).
TypeError: "x" is read-only - JavaScript
message typeerror: assignment to read-only properties is not allowed in strict mode (edge) typeerror: "x" is read-only (firefox) typeerror: 0 is read-only (firefox) typeerror: cannot assign to read only property 'x' of #<object> (chrome) typeerror: cannot assign to read only property '0' of [object array] (chrome) error type typeerror what went wrong?
SyntaxError: redeclaration of formal parameter "x" - JavaScript
redeclaring the same variable within the same function or block scope using let is not allowed in javascript.
RangeError: repeat count must be less than infinity - JavaScript
the range of allowed values can be described like this: [0, +∞).
SyntaxError: Unexpected token - JavaScript
examples expression expected for example, when chaining expressions, trailing commas are not allowed.
JavaScript error reference - JavaScript
are deprecatedsyntaxerror: "use strict" not allowed in function with non-simple parameterssyntaxerror: "x" is a reserved identifiersyntaxerror: json.parse: bad parsingsyntaxerror: malformed formal parametersyntaxerror: unexpected tokensyntaxerror: using //@ to indicate sourceurl pragmas is deprecated.
Arrow function expressions - JavaScript
this code sample using chrome 81 demonstrates that arrow functions allow the creation of global variables in such situations (both for a concise body and for a normal function body): > f1 = x => { y = x; console.log(`x: ${x}, y: ${y}`); return x + 1; } x => { y = x; console.log(`x: ${x}, y: ${y}`); return x + 1; } > y vm51587:1 uncaught referenceerror: y is not defined at <anonymous>:1:1 (anonymous) @ vm51587:1 > f1(3) vm51533:1 x: 3, y: 3 4 > y 3 > f2 = x =>...
Default parameters - JavaScript
default function parameters allow named parameters to be initialized with default values if no value or undefined is passed.
getter - JavaScript
description sometimes it is desirable to allow access to a property that returns a dynamically computed value, or you may want to reflect the status of an internal variable without requiring the use of explicit method calls.
Rest parameters - JavaScript
the rest parameter syntax allows us to represent an indefinite number of arguments as an array.
Array.prototype.reduceRight() - JavaScript
you can work around this by inserting the following code at the beginning of your scripts, allowing use of reduceright in implementations which do not natively support it.
Array.prototype.copyWithin() - JavaScript
the copywithin() method shallow copies part of an array to another location in the same array and returns it without modifying its length.
Array.prototype.every() - JavaScript
you can work around this by inserting the following code at the beginning of your scripts, allowing use of every in implementations which do not natively support it.
Array.prototype.filter() - JavaScript
you can work around this by inserting the following code at the beginning of your scripts, allowing use of filter() in ecma-262 implementations which do not natively support it.
Array.prototype.flatMap() - JavaScript
in other words, it allows you to map many items to many items (by handling each input item separately), rather than always one-to-one.
Array.prototype.indexOf() - JavaScript
this will allow you to use indexof() when there is still no native support.
Array.prototype.lastIndexOf() - JavaScript
you can work around this by inserting the following code at the beginning of your scripts, allowing use of lastindexof in implementations which do not natively support it.
Array.prototype.map() - JavaScript
you can work around this by inserting the following code at the beginning of your scripts, allowing use of map in implementations which do not natively support it.
Array.prototype.push() - JavaScript
instead, we store the collection on the object itself and use call on array.prototype.push to trick the method into thinking we are dealing with an array—and it just works, thanks to the way javascript allows us to establish the execution context in any way we want.
Array.prototype.some() - JavaScript
you can work around this by inserting the following code at the beginning of your scripts, allowing use of some() in implementations which do not natively support it.
Array - JavaScript
console.log(vegetables) // ["cabbage", "carrot"] (the original array is changed) console.log(removeditems) // ["turnip", "radish"] copy an array let shallowcopy = fruits.slice() // this is how to make a copy // ["strawberry", "mango"] accessing array elements javascript arrays are zero-indexed.
Atomics.add() - JavaScript
exceptions throws a typeerror, if typedarray is not one of the allowed integer types.
Atomics.and() - JavaScript
exceptions throws a typeerror, if typedarray is not one of the allowed integer types.
Atomics.compareExchange() - JavaScript
exceptions throws a typeerror, if typedarray is not one of the allowed integer types.
Atomics.exchange() - JavaScript
exceptions throws a typeerror, if typedarray is not one of the allowed integer types.
Atomics.load() - JavaScript
exceptions throws a typeerror, if typedarray is not one of the allowed integer types.
Atomics.or() - JavaScript
exceptions throws a typeerror, if typedarray is not one of the allowed integer types.
Atomics.store() - JavaScript
exceptions throws a typeerror, if typedarray is not one of the allowed integer types.
Atomics.sub() - JavaScript
exceptions throws a typeerror, if typedarray is not one of the allowed integer types.
Atomics.wait() - JavaScript
note: this operation only works with a shared int32array and may not be allowed on the main thread.
Atomics.xor() - JavaScript
exceptions throws a typeerror, if typedarray is not one of the allowed integer types.
Date.prototype.toLocaleDateString() - JavaScript
the new locales and options arguments let applications specify the language whose formatting conventions should be used and allow to customize the behavior of the function.
Date.prototype.toLocaleString() - JavaScript
however, this might change in the future, and isn't guaranteed for all languages; output variations are by design, and allowed by the specification.
Function.prototype.apply() - JavaScript
const array = ['a', 'b']; const elements = [0, 1, 2]; array.push.apply(array, elements); console.info(array); // ["a", "b", 0, 1, 2] using apply and built-in functions clever usage of apply allows you to use built-in functions for some tasks that would probably have otherwise been written by looping over the array values.
Function.prototype.bind() - JavaScript
internal iscallable function throw new typeerror('function.prototype.bind - ' + 'what is trying to be bound is not callable'); } return function(){ var funcargs = args.concat(slice.call(arguments)) return thatfunc.apply(thatarg, funcargs); }; }; })(); you can partially work around this by inserting the following code at the beginning of your scripts, allowing use of much of the functionality of bind() in implementations that do not natively support it.
Function.prototype.call() - JavaScript
description the call() allows for a function/method belonging to one object to be assigned and called for a different object.
Function.caller - JavaScript
the special property __caller__, which returned the activation object of the caller thus allowing to reconstruct the stack, was removed for security reasons.
Intl.Collator() constructor - JavaScript
the following unicode extension keys are allowed: co variant collations for certain locales.
Intl.DateTimeFormat() constructor - JavaScript
the following unicode extension keys are allowed: nu numbering system.
Intl.DateTimeFormat.prototype.format() - JavaScript
however, this might change in the future and isn't guaranteed for all the languages — output variations are by design and allowed by the specification.
Intl.DateTimeFormat.prototype.formatRangeToParts() - JavaScript
the intl.datetimeformat.prototype.formatrangetoparts() method allows locale-specific tokens representing each part of the formatted date range produced by datetimeformat formatters.
Intl.DateTimeFormat.prototype.formatToParts() - JavaScript
the intl.datetimeformat.prototype.formattoparts() method allows locale-aware formatting of strings produced by datetimeformat formatters.
Intl.DisplayNames() constructor - JavaScript
the following unicode extension key is allowed: nu the numbering system to be used.
Intl.ListFormat() constructor - JavaScript
when style is short or narrow, unit is the only allowed value for the type option.
Intl.Locale.prototype.toString() - JavaScript
the tostring method allows locale instances to be provided as an argument to existing intl constructors, serialized in json, or any other context where an exact string representation is useful.
Intl.Locale - JavaScript
description the intl.locale object was created to allow for easier manipulation of unicode locales.
Intl.NumberFormat() constructor - JavaScript
the following unicode extension key is allowed: nu the numbering system to be used.
Intl.NumberFormat.prototype.formatToParts() - JavaScript
the intl.numberformat.prototype.formattoparts() method allows locale-aware formatting of strings produced by numberformat formatters.
Intl.RelativeTimeFormat.prototype.format() - JavaScript
this allows to not always have to use numeric values in the output.
Intl.RelativeTimeFormat.prototype.resolvedOptions() - JavaScript
the "auto" value allows to not always have to use numeric values in the output.
JSON.parse() - JavaScript
}); // 1 // 2 // 4 // 6 // 5 // 3 // "" json.parse() does not allow trailing commas // both will throw a syntaxerror json.parse('[1, 2, 3, 4, ]'); json.parse('{"foo" : 1, }'); json.parse() does not allow single quotes // will throw a syntaxerror json.parse("{'foo': 1}"); specifications specification ecmascript (ecma-262)the definition of 'json.parse' in that specification.
Map - JavaScript
ad syntax console.log([...mymap]) // or use the keys() or values() iterators, and convert them to an array console.log(array.from(mymap.keys())) // ["key1", "key2"] cloning and merging maps just like arrays, maps can be cloned: let original = new map([ [1, 'one'] ]) let clone = new map(original) console.log(clone.get(1)) // one console.log(original === clone) // false (useful for shallow comparison) important: keep in mind that the data itself is not cloned.
Math.clz32() - JavaScript
fill in all the higher bits after the first one // asmjs for some reason does not allow ^=,&=, or |= integer = integer | (integer << 16); integer = integer | (integer << 8); integer = integer | (integer << 4); integer = integer | (integer << 2); integer = integer | (integer << 1); // 2.
Number.prototype.toExponential() - JavaScript
implementations are allowed to support larger and smaller values as well.
Number.prototype.toFixed() - JavaScript
implementations are allowed to support larger and smaller values as chosen.
Number.prototype.toPrecision() - JavaScript
implementations are allowed to support larger and smaller values as well.
Number - JavaScript
number.prototype allows the addition of properties to the number object.
Object.prototype.__defineGetter__() - JavaScript
description the __definegetter__ allows a getter to be defined on a pre-existing object.
Object.prototype.__defineSetter__() - JavaScript
description the __definesetter__ method allows a setter to be defined on a pre-existing object.
Object.getOwnPropertyDescriptors() - JavaScript
examples creating a shallow clone whereas the object.assign() method will only copy enumerable and own properties from a source object to a target object, you are able to use this method and object.create() for a shallow copy between two unknown objects: object.create( object.getprototypeof(obj), object.getownpropertydescriptors(obj) ); creating a subclass a typical way of creating a subclass is to define the subcl...
Object.prototype.isPrototypeOf() - JavaScript
description the isprototypeof() method allows you to check whether or not an object exists within another object's prototype chain.
Object.prototype.__proto__ - JavaScript
(that is, if the constructor didn't return an other object explicitly, or the fun.prototype has been reassigned since the instance was created.) the __proto__ setter allows the [[prototype]] of an object to be mutated.
Object.prototype.toString() - JavaScript
ing() { return `dog ${this.name} is a ${this.sex} ${this.color} ${this.breed}`; } with the preceding code in place, any time thedog is used in a string context, javascript automatically calls the dogtostring() function, which returns the following string: "dog gabby is a female chocolate lab" using tostring() to detect object class tostring() can be used with every object and (by default) allows you to get its class.
Promise.prototype.then() - JavaScript
}); chaining the then method returns a promise which allows for method chaining.
handler.setPrototypeOf() - JavaScript
examples if you want to disallow setting a new prototype for your object, your handler's setprototypeof() method can either return false, or it can throw an exception.
RangeError() constructor - JavaScript
the rangeerror() constructor creates an error when a value is not in the set or range of allowed values.
Reflect.construct() - JavaScript
description reflect.construct() allows you to invoke a constructor with a variable number of arguments.
Reflect.defineProperty() - JavaScript
description the reflect.defineproperty method allows precise addition to or modification of a property on an object.
Reflect.get() - JavaScript
description the reflect.get method allows you to get a property on an object.
Reflect.has() - JavaScript
description the reflect.has method allows you to check if a property is in an object.
Reflect.isExtensible() - JavaScript
description the reflect.isextensible method allows you determine if an object is extensible (whether it can have new properties added to it).
Reflect.preventExtensions() - JavaScript
description the reflect.preventextensions() method allows you to prevent new properties from ever being added to an object (i.e., prevents future extensions to the object).
Reflect.set() - JavaScript
description the reflect.set method allows you to set a property on an object.
RegExp() constructor - JavaScript
s ("dotall") allows .
RegExp.prototype.sticky - JavaScript
with the sticky flag var str = '#foo#'; var regex = /foo/y; regex.lastindex = 1; regex.test(str); // true regex.lastindex = 5; regex.test(str); // false (lastindex is taken into account with sticky flag) regex.lastindex; // 0 (reset after match failure) anchored sticky flag for several versions, firefox's spidermonkey engine had a bug with regard to the ^ assertion and the sticky flag which allowed expressions starting with the ^ assertion and using the sticky flag to match when they shouldn't.
RegExp - JavaScript
�усском языке' let regex = /[\u0400-\u04ff]+/g let match = regex.exec(text) console.log(match[0]) // logs 'Образец' console.log(regex.lastindex) // logs '7' let match2 = regex.exec(text) console.log(match2[0]) // logs 'на' [did not log 'text'] console.log(regex.lastindex) // logs '15' // and so on the unicode property escapes feature introduces a solution, by allowing for a statement as simple as \p{scx=cyrl}.
String.prototype.charAt() - JavaScript
= str.charcodeat(i - 1); // (could change last hex to 0xdb7f to treat high private // surrogates as single characters) if (0xd800 > prev || prev > 0xdbff) { throw 'low surrogate without preceding high surrogate'; } // we can pass over low surrogates now as the second component // in a pair which we have already processed return false; } in an ecmascript 2016 environment which allows destructured assignment, the following is a more succinct and somewhat more flexible alternative in that it does increment for an incrementing variable automatically (if the character warrants it in being a surrogate pair).
String.prototype.charCodeAt() - JavaScript
s single characters) if (0xd800 <= code && code <= 0xdbff) { hi = code; low = str.charcodeat(idx + 1); if (isnan(low)) { throw 'high surrogate not followed by ' + 'low surrogate in fixedcharcodeat()'; } return ( (hi - 0xd800) * 0x400) + (low - 0xdc00) + 0x10000; } if (0xdc00 <= code && code <= 0xdfff) { // low surrogate // we return false to allow loops to skip // this iteration since should have already handled // high surrogate above in the previous iteration return false; // hi = str.charcodeat(idx - 1); // low = code; // return ((hi - 0xd800) * 0x400) + // (low - 0xdc00) + 0x10000; } return code; } fixing charcodeat() to handle non-basic-multilingual-plane characters if their presence earlier in the ...
String.fromCharCode() - JavaScript
for this reason, it's more convenient to use string.fromcodepoint() (part of the es2015 standard), which allows for returning supplementary characters based on their actual code point value.
String.prototype.repeat() - JavaScript
count = +count; // check nan if (count != count) count = 0; if (count < 0) throw new rangeerror('repeat count must be non-negative'); if (count == infinity) throw new rangeerror('repeat count must be less than infinity'); count = math.floor(count); if (str.length == 0 || count == 0) return ''; // ensuring count is a 31-bit integer allows us to heavily optimize the // main part.
Symbol.species - JavaScript
description the species accessor property allows subclasses to override the default constructor for objects.
TypedArray - JavaScript
array(2); int16[0] = 42; console.log(int16[0]); // 42 // indexed properties on prototypes are not consulted (fx 25) int8array.prototype[20] = 'foo'; (new int8array(32))[20]; // 0 // even when out of bound int8array.prototype[20] = 'foo'; (new int8array(8))[20]; // undefined // or with negative integers int8array.prototype[-1] = 'foo'; (new int8array(8))[-1]; // undefined // named properties are allowed, though (fx 30) int8array.prototype.foo = 'bar'; (new int8array(32)).foo; // "bar" specifications specification ecmascript (ecma-262)the definition of 'typedarray objects' in that specification.
WeakMap - JavaScript
primitive data types as keys are not allowed (e.g.
WebAssembly.Global() constructor - JavaScript
this allows dynamic linking of multiple modules.
WebAssembly.Global - JavaScript
this allows dynamic linking of multiple modules.
WebAssembly.Instance.prototype.exports - JavaScript
the exports readonly property of the webassembly.instance object prototype returns an object containing as its members all the functions exported from the webassembly module instance, to allow them to be accessed and used by javascript.
WebAssembly.Memory() constructor - JavaScript
maximum optional the maximum size the webassembly memory is allowed to grow to, in units of webassembly pages.
WebAssembly.Module.customSections() - JavaScript
(read high level structure for information on section structures, and how normal sections ("known sections") and custom sections are distinguished.) this provides developers with a way to include custom data inside wasm modules for other purposes, for example the name custom section, which allows developers to provide names for all the functions and locals in the module (like "symbols" in a native build).
WebAssembly.Table() constructor - JavaScript
maximum optional the maximum number of elements the webassembly table is allowed to grow to.
WebAssembly.instantiate() - JavaScript
the webassembly.instantiate() function allows you to compile and instantiate webassembly code.
WebAssembly - JavaScript
this allows dynamic linking of multiple modules.
encodeURI() - JavaScript
also, encodeuri() does not encode a few additional characters, known as "unreserved marks", which do not have a reserved purpose but are allowed in a uri "as is".
Destructuring assignment - JavaScript
destructuring assignment allows you to unpack the parts out of this array easily, ignoring the full match if it is not needed.
Pipeline operator (|>) - JavaScript
this allows the creation of chained function calls in a readable manner.
Property accessors - JavaScript
document['createelement']('pre') a space before bracket notation is allowed.
await - JavaScript
an await can split execution flow, allowing the caller of the await's function to resume execution before the deferred continuation of the await's function.
Function expression - JavaScript
syntax the expression is not allowed at the start of a statement.
typeof - JavaScript
typeof document.all === 'undefined'; although the specification allows custom type tags for non-standard exotic objects, it requires those type tags to be different from the predefined ones.
void operator - JavaScript
syntax void expression description this operator allows evaluating expressions that produce a value into places where an expression that evaluates to undefined is desired.
empty - JavaScript
the opposite behavior, where you want multiple statements, but javascript only allows a single one, is possible using a block statement, which combines several statements into a single one.
async function - JavaScript
} foo().catch(() => {}) // attempt to swallow all errors...
block - JavaScript
it allows you to use multiple statements where javascript expects only one statement.
break - JavaScript
description the break statement includes an optional label that allows the program to break out of a labeled statement.
class - JavaScript
but unlike a class expression, a class declaration doesn't allow an existing class to be declared again and will throw a syntaxerror if attempted.
continue - JavaScript
the continue statement can include an optional label that allows the program to jump to the next iteration of a labeled loop statement instead of the current loop.
import - JavaScript
only single quoted and double quoted strings are allowed.
let - JavaScript
description let allows you to declare variables that are limited to the scope of a block statement, or expression on which it is used, unlike the var keyword, which defines a variable globally, or locally to an entire function regardless of block scope.
return - JavaScript
no line terminator is allowed between the return keyword and the expression.
throw - JavaScript
n exception with a string value throw 42; // generates an exception with the value 42 throw true; // generates an exception with the value true throw new error('required'); // generates an error object with the message of required also note that the throw statement is affected by automatic semicolon insertion (asi) as no line terminator between the throw keyword and the expression is allowed.
Strict mode - JavaScript
both extensions are problematic for "secure" javascript because they allow "secured" code to access "privileged" functions and their (potentially unsecured) arguments.
JavaScript shells - JavaScript
a javascript shell allows you to quickly test snippets of javascript code without having to reload a web page.
JavaScript
javascript shells a javascript shell allows you to quickly test snippets of javascript code.
icons - Web app manifests
the purpose of this member is to allow a user agent to quickly ignore images with media types it does not support.
start_url - Web app manifests
note: the start_url member is purely advisory, and a user agent may ignore it or allow the user to alter it at install time or afterwards.
Web app manifests
it is a json-formatted file, with one exception: it is allowed to contain "//"-style comments.
<math> - MathML
WebMathMLElementmath
overflow specifies how an expression behaves if it is too long to fit in the allowed width.
<mi> - MathML
WebMathMLElementmi
the following values are allowed: normal (default value for more than one character) ; example bold ; example italic (default value for a single character) ; example bold-italic ; example double-struck ; example bold-fraktur ; example script ; example bold-script ; example fraktur ; example sans-serif ; example bold-sans-serif ; example sans-serif-italic ; example sans-serif-bold-italic ; ...
<mpadded> - MathML
prior to gecko 7.0 (firefox 7.0 / thunderbird 7.0 / seamonkey 2.4) the mathml2 pseudo-unit lspace was allowed, which is no longer present in the mathml3 recommendation and has been removed now.
<mrow> - MathML
WebMathMLElementmrow
it allows for more intelligent line-breaking and indentation.
<ms> - MathML
WebMathMLElementms
the following values are allowed: normal (default value) ; example bold ; example italic ; example bold-italic ; example double-struck ; example bold-fraktur ; example script ; example bold-script ; example fraktur ; example sans-serif ; example bold-sans-serif ; example sans-serif-italic ; example sans-serif-bold-italic ; example monospace ; example initial ; مثال tailed ; ...
<mtext> - MathML
WebMathMLElementmtext
the following values are allowed: normal (default value) ; example bold ; example italic ; example bold-italic ; example double-struck ; example bold-fraktur ; example script ; example bold-script ; example fraktur ; example sans-serif ; example bold-sans-serif ; example sans-serif-italic ; example sans-serif-bold-italic ; example monospace ; example normal (default) ; مثال ...
Image file type and format guide - Web media technologies
this allows different data types to be used for the same properties.
Digital video concepts - Web media technologies
doing so allows color data to be represented using fewer total bits of space in a video stream.
Media type and format guide: image, audio, and video content - Web media technologies
WebMediaFormats
web audio codec guide a guide to the audio codecs allowed for by the common media containers, as well as by the major browsers.
Guide to streaming audio and video - Web media technologies
hls uses playlists to allow the user to not only select the media to stream, but also to choose among versions or forms of the same media.
Using images in HTML - Web media technologies
WebMediaimages
it supports a wide range of attributes that control how the image behaves and allows you to add important information like alt text for people who don't see the image.
CSS and JavaScript animation performance - Web Performance
css animations, on the other hand, allow developers to make animations between a set of starting property values and a final set rather than between two states.
Critical rendering path - Web Performance
while painting is a very fast process, and therefore likely not the most impactful place to focus on in improving performance, it is important to remember to allow for both layout and re-paint times when measuring how long an animation frame may take.
Lazy loading - Web Performance
polyfill include this polyfill to provide support for older and currently incompatible browsers: loading-attribute-polyfill intersection observer api intersection observers allow the user to know when an observed element enters or exits the browser’s viewport.
Performance Monitoring: RUM vs synthetic monitoring - Web Performance
knowing your user trends helps you better define your business plan and, from a monitoring perspective, allows you to identify key areas to target for optimization and performance improvements.
Media - Progressive web apps (PWAs)
the document's markup language might allow the media type to be specified when the stylesheet is linked to the document.
alignment-baseline - SVG: Scalable Vector Graphics
for example, this allows alphabetic baselines in roman text to stay aligned across font size changes.
baseline-shift - SVG: Scalable Vector Graphics
the baseline-shift attribute allows repositioning of the dominant-baseline relative to the dominant-baseline of the parent text content element.
bias - SVG: Scalable Vector Graphics
WebSVGAttributebias
this allows representation of values that would otherwise be clamped to 0 or 1.
data-* - SVG: Scalable Vector Graphics
WebSVGAttributedata-*
the * can be replaced by any characters allowed in xml's rules for names, with the following restrictions: can't start with xml.
direction - SVG: Scalable Vector Graphics
for other cases, such as when using right-to-left languages, it may be sufficient to add the direction attribute to the outermost <svg> element, and allow that direction to inherit to all text elements: note: as a presentation attribute, direction can be used as a css property.
enable-background - SVG: Scalable Vector Graphics
the optional <x>, <y>, <width>, and <height> parameters are <number> values that indicate the subregion of the container elementʼs user space where access to the background image is allowed to happen.
font-size-adjust - SVG: Scalable Vector Graphics
« svg attribute reference home the font-size-adjust attribute allows authors to specify an aspect value for an element that will preserve the x-height of the first choice font in a substitute font.
gradientTransform - SVG: Scalable Vector Graphics
this allows for things such as skewing the gradient.
id - SVG: Scalable Vector Graphics
WebSVGAttributeid
candidate recommendation defines the allowed values in more detail.
markerHeight - SVG: Scalable Vector Graphics
candidate recommendation allowed percentage and number values.
markerWidth - SVG: Scalable Vector Graphics
candidate recommendation allowed percentage and number values.
name - SVG: Scalable Vector Graphics
WebSVGAttributename
unlike the syntax allowed between the parentheses of the local(…) clause in an @font-face rule src descriptor, the font name specified in this attribute is not surrounded in single or double quotes.
orient - SVG: Scalable Vector Graphics
WebSVGAttributeorient
note: this allows a single arrowhead marker to be defined that can be used for both the start and end of a path, i.e.
patternTransform - SVG: Scalable Vector Graphics
note: as of svg2, it is also allowed to use the css transform property.
pointer-events - SVG: Scalable Vector Graphics
the pointer-events attribute is a presentation attribute that allows defining whether or when an element may be the target of a mouse event.
rendering-intent - SVG: Scalable Vector Graphics
only one element is using this attribute: <color-profile> usage notes value auto | perceptual | relative-colorimetric | saturation | absolute-colorimetric default value auto animatable yes auto this value allows the user agent to determine the best intent based on the content type.
requiredFeatures - SVG: Scalable Vector Graphics
see feature strings below for a list of allowed values.
rotate - SVG: Scalable Vector Graphics
WebSVGAttributerotate
usage notes value auto | auto-reverse | <number> default value 0 animatable no the auto and auto-reverse values allow the animated element's rotation to change dynamically as it travels along the path.
startOffset - SVG: Scalable Vector Graphics
150%) are allowed.
stop-opacity - SVG: Scalable Vector Graphics
candidate recommendation refers to the definition in css colors 3, but allows percentage values.
style - SVG: Scalable Vector Graphics
WebSVGAttributestyle
the style attribute allows to style an element using css declarations.
systemLanguage - SVG: Scalable Vector Graphics
the prefix rule simply allows the use of prefix tags if this is the case.
tabindex - SVG: Scalable Vector Graphics
the tabindex attribute allows you to control whether an element is focusable and to define the relative order of the element for the purposes of sequential focus navigation.
textLength - SVG: Scalable Vector Graphics
candidate recommendation allowed percentages and numbers as values.
transform - SVG: Scalable Vector Graphics
as a presentation attribute, transform can be used by any element (in svg 1.1, only these 16 elements were allowed to use it: <a>, <circle>, <clippath>, <defs>, <ellipse>, <foreignobject>, <g>, <image>, <line>, <path>, <polygon>, <polyline>, <rect>, <switch>, <text>, and <use>).
type - SVG: Scalable Vector Graphics
WebSVGAttributetype
the other keywords represent convenience shortcuts to allow commonly used color operations to be performed without specifying a complete matrix.
version - SVG: Scalable Vector Graphics
WebSVGAttributeversion
it is only allowed on the root <svg> element.
xml:lang - SVG: Scalable Vector Graphics
it is a universal attribute allowed in all xml dialects to mark up the natural human language that an element contains.
SVG Attribute reference - SVG: Scalable Vector Graphics
WebSVGAttribute
svg attributes a to z a accent-height accumulate additive alignment-baseline allowreorder alphabetic amplitude arabic-form ascent attributename attributetype autoreverse azimuth b basefrequency baseline-shift baseprofile bbox begin bias by c calcmode cap-height class clip clippathunits clip-path clip-rule color color-interpolation color-interpolation-filters color-profile color-rendering contentscripttype contentstyletype cursor cx cy d d decelerate...
<altGlyph> - SVG: Scalable Vector Graphics
WebSVGElementaltGlyph
the <altglyph> svg element allows sophisticated selection of the glyphs used to render its child character data.
<animateTransform> - SVG: Scalable Vector Graphics
the animatetransform element animates a transformation attribute on its target element, thereby allowing animations to control translation, scaling, rotation, and/or skewing.
<color-profile> - SVG: Scalable Vector Graphics
the <color-profile> element allows describing the color profile used for the image.
<discard> - SVG: Scalable Vector Graphics
WebSVGElementdiscard
the <discard> svg element allows authors to specify the time at which particular elements are to be discarded, thereby reducing the resources required by an svg user agent.
<feComponentTransfer> - SVG: Scalable Vector Graphics
it allows operations like brightness adjustment, contrast adjustment, color balance or thresholding.
<feMerge> - SVG: Scalable Vector Graphics
WebSVGElementfeMerge
the <femerge> svg element allows filter effects to be applied concurrently instead of sequentially.
<feOffset> - SVG: Scalable Vector Graphics
WebSVGElementfeOffset
the <feoffset> svg filter primitive allows to offset the input image.
<fePointLight> - SVG: Scalable Vector Graphics
the <fepointlight> filter primitive defines a light source which allows to create a point light effect.
<feSpotLight> - SVG: Scalable Vector Graphics
the <fespotlight> svg filter primitive defines a light source which allows to create a spotlight effect.
<feTile> - SVG: Scalable Vector Graphics
WebSVGElementfeTile
the <fetile> svg filter primitive allows to fill a target rectangle with a repeated, tiled pattern of an input image.
<feTurbulence> - SVG: Scalable Vector Graphics
it allows the synthesis of artificial textures like clouds or marble.
<hkern> - SVG: Scalable Vector Graphics
WebSVGElementhkern
the <hkern> svg element allows to fine-tweak the horizontal distance between two glyphs.
<image> - SVG: Scalable Vector Graphics
WebSVGElementimage
candidate recommendation allows omitting height and width scalable vector graphics (svg) 1.1 (second edition)the definition of '<image>' in that specification.
<metadata> - SVG: Scalable Vector Graphics
WebSVGElementmetadata
candidate recommendation allowed global event attributes on the element.
<script> - SVG: Scalable Vector Graphics
WebSVGElementscript
the svg script element allows to add scripts to an svg document.
<set> - SVG: Scalable Vector Graphics
WebSVGElementset
the additive and accumulate attributes are not allowed, and will be ignored if specified.
<style> - SVG: Scalable Vector Graphics
WebSVGElementstyle
the svg <style> element allows style sheets to be embedded directly within svg content.
<symbol> - SVG: Scalable Vector Graphics
WebSVGElementsymbol
candidate recommendation allowed geometry properties to be specified on a symbol scalable vector graphics (svg) 1.1 (second edition)the definition of '<symbol>' in that specification.
<tspan> - SVG: Scalable Vector Graphics
WebSVGElementtspan
it allows for adjustment of the style and/or position of that subtext as needed.
<vkern> - SVG: Scalable Vector Graphics
WebSVGElementvkern
the <vkern> svg element allows to fine-tweak the vertical distance between two glyphs in top-to-bottom fonts.
SVG animation with SMIL - SVG: Scalable Vector Graphics
smil allows you to: animate the numeric attributes of an element (x, y, ...) animate transform attributes (translation or rotation) animate color attributes follow a motion path this is done adding an svg element like <animate> inside the svg element to animate.
Scripting - SVG: Scalable Vector Graphics
WebSVGScripting
although the adobe svg viewer plugin allows the use of functionname(), it's not the preferred way to do things.
Basic Transformations - SVG: Scalable Vector Graphics
embedding svg in svg in contrast to html, svg allows you to embed other svg elements seamlessly.
Clipping and masking - SVG: Scalable Vector Graphics
masking on the other hand allows soft edges by taking transparency and grey values of the mask into account.
Fills and Strokes - SVG: Scalable Vector Graphics
note: in firefox 3+, rgba values are also allowed, and will give the same effect.
Getting started - SVG: Scalable Vector Graphics
due to the potentially massive size svg files can reach when used for some applications (e.g., geographical applications), the svg specification also allows for gzip-compressed svg files.
Gradients in SVG - SVG: Scalable Vector Graphics
setting these three attributes will allow you to move the gradient around and change its size, as shown in the second rect above.
SVG image element - SVG: Scalable Vector Graphics
« previousnext » the svg <image> element allows for raster images to be rendered within an svg object.
Texts - SVG: Scalable Vector Graphics
WebSVGTutorialTexts
it is meant to allow the rendering engine to fine-tune the positions of the glyphs when its own measured text length doesn't meet the one provided here.
SVG: Scalable Vector Graphics
WebSVG
this allows developers to create rich animations and interactive images.
Securing your site - Web security
the x-frame-options response header the x-frame-options: http response header can be used to indicate whether or not a browser should be allowed to render a page in a <frame>.
Transport Layer Security - Web security
web servers that enable tls 1.3 might need to adjust configuration to allow tls 1.3 to operate successfully.
Using templates and slots - Web Components
slots are identified by their name attribute, and allow you to define placeholders in your template that can be filled with any markup fragment you want when the element is used in the markup.
XPath snippets - XPath
context.ownerdocument : document); resolver = resolver || null; context = context || doc; result = doc.evaluate(expr, context, resolver, xpathresult.ordered_node_snapshot_type, null); for(i = 0; i < result.snapshotlength; i++) { a[i] = result.snapshotitem(i); } return a; } getxpathforelement the following function allows one to pass an element and an xml document to find a unique string xpath expression leading back to that element.
<xsl:copy> - XSLT: Extensible Stylesheet Language Transformations
WebXSLTElementcopy
xslt/xpath reference: xslt elements, exslt functions, xpath functions, xpath axes the <xsl:copy> element transfers a shallow copy (the node and any associated namespace node) of the current node to the output document.
PI Parameters - XSLT: Extensible Stylesheet Language Transformations
possible future developments should we allow any xslt functions in the expression?
Resources - XSLT: Extensible Stylesheet Language Transformations
xsl results firefox extension (presently awaiting review) - allows one to experiment with xsl, by applying xsl stylesheets (which are manually entered, found via a url or on the file-system) to an xml document (the currently-loaded document or a manually entered/pasted one).
Transforming XML with XSLT - XSLT: Extensible Stylesheet Language Transformations
xslt allows a stylesheet author to transform a primary xml document in two significant ways: manipulating and sorting the content, including a wholesale reordering of it if so desired, and transforming the content into a different format (and in the case of firefox, the focus is on converting it on the fly into html which can then be displayed by the browser).
Advanced Example - XSLT: Extensible Stylesheet Language Transformations
the example allows sorting the content multiple times, alternating between ascending and descending order.
Basic Example - XSLT: Extensible Stylesheet Language Transformations
this allows fetching of data after the page has been loaded, without initiating a fresh page load.
Introduction - XSLT: Extensible Stylesheet Language Transformations
xslt allows the author to directly manipulate the structure of a document.
JavaScript/XSLT Bindings - XSLT: Extensible Stylesheet Language Transformations
document.importnode() allows transferring a dom fragment between documents, in this case from an html document to an xml document.
Web technology for developers
svg scalable vector graphics let you describe images as sets of vectors and shapes in order to allow them to scale smoothly regardless of the size at which they're drawn.
Compiling from Rust to WebAssembly - WebAssembly
it allows javascript to call a rust api with a string, or a rust function to catch a javascript exception.