Search completed in 1.35 seconds.
1043 results for "reason":
Your results are loading. Please wait...
451 Unavailable For Legal Reasons - HTTP
WebHTTPStatus451
the hypertext transfer protocol (http) 451 unavailable for legal reasons client error response code indicates that the user requested a resource that is not available due to legal reasons, such as a web page for which a legal action has been issued.
... status 451 unavailable for legal reasons example this example response is taken from the ietf rfc (see below) and contains a reference to monty python's life of brian.
... 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 ho...
...sted 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 ...
PromiseRejectionEvent.reason - Web APIs
the promiserejectionevent reason read-only property is any javascript value or object which provides the reason passed into promise.reject().
... syntax reason = promiserejectionevent.reason value a value or object which provides information you can use to understand why the promise was rejected.
... examples window.onunhandledrejection = function(e) { console.log(e.reason); } specifications specification status comment html living standardthe definition of 'promiserejectionevent.reason' in that specification.
RTCOutboundRtpStreamStats.qualityLimitationReason - Web APIs
the qualitylimitationreason property of the rtcoutboundrtpstreamstats dictionary is a string indicating the reason why the media quality in the stream is currently being reduced by the codec during encoding, or none if no quality reduction is being performed.
... syntax var qualitylimitationreason = rtcoutboundrtpstreamstats.qualitylimitationreason; value a map whose keys are domstrings whose values come from the rtcqualitylimitationreason enumerated type, and whose values are the duration of the media, in seconds, whose quality was reduced for that reason.
... examples specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcoutboundrtpstreamstats.qualitylimitationreason' in that specification.
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?
... 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’.
Reason: CORS preflight channel did not succeed - HTTP
reason reason: cors preflight channel did not succeed what went wrong?
...there are a couple of reasons why preflighting might fail: a cross-site request has previously been performed that already did a preflight, and doing the preflight again is not permitted.
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?
Reason: CORS request did not succeed - HTTP
reason reason: cors request did not succeed what went wrong?
Reason: CORS disabled - HTTP
WebHTTPCORSErrorsCORSDisabled
reason reason: cors disabled what went wrong?
Reason: CORS request external redirect not allowed - HTTP
reason reason: cors request external redirect not allowed what went wrong?
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?
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?
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?
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?
Reason: CORS header 'Access-Control-Allow-Origin' missing - HTTP
reason reason: cors header 'access-control-allow-origin' missing what went wrong?
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?
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?
Reason: CORS header ‘Origin’ cannot be added - HTTP
reason reason: cors header ‘origin’ cannot be added what went wrong?
Reason: CORS request not HTTP - HTTP
reason reason: cors request not http what went wrong?
Index - Web APIs
WebAPIIndex
this field is used for historical reasons.
... 1003 document: pointerlockerror event document, event, reference, web, pointerlockerror the pointerlockerror event is fired when locking the pointer failed (for technical reasons or because the permission was denied).
... 1005 document: pointerout event document, event, pointerevent, reference, web, onpointerout, pointerout the pointerout event is fired for several reasons including: pointing device is moved out of the hit test boundaries of an element; firing the pointerup event for a device that does not support hover (see pointerup); after firing the pointercancel event (see pointercancel); when a pen stylus leaves the hover range detectable by the digitizer.
...And 19 more matches
HTTP Index - HTTP
WebHTTPIndex
22 reason: cors disabled authentication, authentication article, cors, cross-origin, disabled, errors, http, https, messages, resource, same origin, same-origin, security, sharing, validation, secure, troubleshooting a request that needs to use cors was attempted, but cors is disabled in the user's browser.
... 23 reason: cors header 'access-control-allow-origin' does not match 'xyz' cors, corsalloworiginnotmatchingorigin, cross-origin, error, http, https, messages, reasons, security, console, troubleshooting simply put, the origin making the request does not match any of the origins permitted by the access-control-allow-origin header.
... 24 reason: cors header 'access-control-allow-origin' missing cors, corsmissingalloworigin, cross-origin, error, http, https, messages, reasons, security, console, troubleshooting 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.
...And 15 more matches
Bootstrapped extensions - Archive of obsolete content
void startup( data, reason ); parameters data a bootstrap data structure.
... reason one of the reason constants, indicating why the extension is being started up.
... void shutdown( data, reason ); parameters data a bootstrap data structure.
...And 10 more matches
Search Extension Tutorial (Draft) - Archive of obsolete content
changing default search setting from extensions many add-ons, for monetization or other reasons, change several search-related settings at install time.
... if (firstrun || userprefs.getcharpref(name) == value) userprefs.clearuserpref(name); } function startup(data, reason) { firstrun = reason == addon_install; // change the default engine name.
... setpref("browser.search.defaultenginename", "example engine", true); } function shutdown(data, reason) { // no need to do this if this is app shutdown.
...And 9 more matches
Promise
a rejection reason becomes permanently associated with the promise.
... note: you should always handle, forward, or report errors (rejection reasons).
...for example, the os.file.exists function returns a promise that will eventually fulfill with a boolean: promise<boolean> exists(string path); the rejection reason may be specified separately in the function's documentation, and is considered to be an error object unless otherwise specified.
...And 8 more matches
Examples
let lastpromise = newpromise.then(function onfulfill(){ }) .catch(function onreject(arejectreason) { console.warn('newpromise failed with reason: ', arejectreason); }); using a promise returned by a function (verbose) this example uses a verbose syntax, showing all the involved promises.
... components.utils.import("resource://gre/modules/promise.jsm"); var mypromise = myuserdefinedpromise(); mypromise.then( function(asuccessreason) { alert('mypromise was succesful and reason was = "' + asuccessreason + '"'); }, function(arejectreason) { alert('mypromise failed for reason = "' + uneval(arejectreason) + '"'); } ); function myuserdefinedpromise() { try { //var myvariscommented = 'hi'; // i commented this out s oit is undefined, this will cause rejected alert(myvariscommented); return promise.reso...
...lve('yay success'); // this makes the success function trigger with asuccessreason being 'yay success' but because i commented out the var 2 lines above, it will error out on the alert(myvariscommented) and never get to this success line.
...And 7 more matches
Promise - JavaScript
it allows you to associate handlers with an asynchronous action's eventual success value or failure reason.
... a pending promise can either be fulfilled with a value, or rejected with a reason (error).
... handlefulfilled(value) { /*...*/; return nextvalue; } handlerejection(reason) { /*...*/; throw nextreason; } handlerejection(reason) { /*...*/; return nextvalue; } the returned nextvalue can be another promise object, in which case the promise gets dynamically inserted into the chain.
...And 7 more matches
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.
...although this approach was considered reasonable at the time, this approach caused problems for browser vendors right from the beginning.
...standards are important for web developers due to the increased flexibility, power of presentation, support for users with disabilities to name just a few reasons.
...And 6 more matches
Deferred
nction cb(good) { if (good) deferred.resolve(); else deferred.reject(); }); return deferred.promise; would be return new promise(function(resolve, reject) { dosomething(function cb(good) { if (good) resolve(); else reject(); }); }); method overview void resolve([optional] avalue); void reject([optional] areason); properties attribute type description promise read only promise a newly created promise, initially in the pending state.
... reject() rejects the associated promise with the specified reason.
... void reject( areason ); parameters areason optional the rejection reason for the associated promise.
...And 6 more matches
core/promise - Archive of obsolete content
while this has a good reason and many advantages, it comes with a price.
...if the promise is rejected and the rejection is not explicitly observed, any derived promises will be implicitly rejected for the same reason.
...}, function failure(reason) { // ...
...And 4 more matches
How to convert an overlay extension to restartless - Archive of obsolete content
restartless extensions don't (for no good reason).
...well, two reasons: prior to extractionless add-ons, all of your files got extracted.
... components.utils.import("resource://gre/modules/services.jsm"); var stylesheets = ["chrome://myextension/skin/mystylesheet.css"]; function startup(data,reason) { ...
...And 4 more matches
/loader - Archive of obsolete content
these graphs can be used to reason about modules without diving into implementation details.
... getservice(ci.nsiobserverservice); let observer = { observe: function onunload(subject, topic, reason) { // if this module is unloaded then `subject.wrappedjsobject` will be // `unloadsubject`.
... `topic` will be `'sdk:loader:destroy'`, and // `reason` will be a string describing the reason (e.g.
...And 3 more matches
Notes on HTML Reflow - Archive of obsolete content
reflow reason all reflows have a reason , which is maintained in the reflow state object (and may mutate, as described below).
... the reflow reason controls how a frame reacts during a reflow, and is one of the following: initial, for the very first time that the frame hierarchy is flowed.
...a reflow state object is created with a reflow reason of incremental, the reflow command is stored in the state, and the reflow method of the root frame is invoked.
...And 3 more matches
The Implementation of the Application Object Model - Archive of obsolete content
the first section of the document describes the motivation and reasoning behind using rdf as the foundation of xul.
...this capability is desirable for two reasons.
... the first reason to have local/remote merging is that a remote file must be able to reference local data and have it merged in with the information that it specified.
...And 3 more matches
Storing the information you need — Variables - Learn web development
the reasons are somewhat historical.
...there is no reason to redeclare variables — it just makes things more confusing.
... for these reasons and more, we recommend that you use let as much as possible in your code, rather than var.
...And 3 more matches
OS.File for the main thread
it uses an atomic write to ensure that the file is not modified if, for some reason, the write cannot complete (typically because the computer is turned off, the battery runs out, or the application is stopped.) let encoder = new textencoder(); // this encoder can be reused for several writes let array = encoder.encode("this is some text"); // convert the text to an array let promise = os.file.writeatomic("file.txt", array, ...
...romise = os.file.move("oldname.txt", "newname.txt", {nooverwrite:true}); here's a working example which renames test.txt to testrenamed.txt if the file is located in directory c:\jean\ var promise = os.file.move(os.path.join('c:', 'jean', 'test.txt'), os.path.join('c:', 'jean', 'testrenamed.txt')); promise.then( function() { console.log('rename successful') }, function(arejectreason) { console.log('rename failed, arejectreason = ', arejectreason) } ) the nooverwrite true is important, as default is false which means if a file in the directory exists already with the same name it will no longer be there after this "rename" operation, which is a "move".
... example: determine if a file is a directory the following snippet determines if some path represents a file or a directory: let promise = os.file.stat(somepath); promise = promise.then( function onsuccess(stat) { if (stat.isdir) { // the path represents a directory } else { // the path represents a file, not a directory } }, function onfailure(reason) { if (reason instanceof os.file.error && reason.becausenosuchfile) { // the file does not exist } else { // some other error throw reason; } } ); example: copy a file by chunks the following snippet writes a (presumably large) buffer by chunks.
...And 3 more matches
Promise.jsm
a rejection reason becomes permanently associated with the promise.
... method overview deferred defer(); obsolete since gecko 30 promise resolve([optional] avalue); promise reject([optional] areason); methods defer() creates a new pending promise and provides methods to resolve or reject it.
... reject() creates a new promise rejected with the specified reason.
...And 3 more matches
Rendering and the WebXR frame animation callback - Web APIs
this is another reason the timestamp passed into your render callback is useful.
...for that reason, the occasional dropped frame isn't usually particularly noticeable, but if it starts to happen a lot—especially if several frames are dropped in a very short span of time—it can become jarring or even leave your display unusable.
... for these reasons, unless your renderer is fairly small and lightweight, with little to do, you should consider offloading everything you can to a worker so you can be computing the next frame while the browser handles other things.
...And 3 more matches
CORS errors - HTTP
WebHTTPCORSErrors
(reason: additional information here).
... note: for security reasons, specifics about what went wrong with a cors request are not available to javascript code.
...part of the error text is a "reason" message that provides added insight into what went wrong.
...And 3 more matches
Listening for Load and Unload - Archive of obsolete content
if your add-on exports a function called main(), then that function will be called whenever the add-on is loaded, and it will be passed an object containing a string describing the reason it was loaded as well as any arguments passed to it.
... if your add-on exports a function called onunload(), then that function will be called when the add-on is unloaded, and it will be passed a string describing the reason it was unloaded.
...it will be loaded in the same circumstances, but you won't get access to the load/unload reason or arguments.
...And 2 more matches
Index - Archive of obsolete content
or for "reasons," your company is required to use very old software and you need to build web content that runs on that software.
... 295 search extension tutorial (draft) extensions, search, tutorial many add-ons, for monetization or other reasons, change several search-related settings at install time.
...the first section of the document describes the motivation and reasoning behind using rdf as the foundation of xul.
...And 2 more matches
New Skin Notes - Archive of obsolete content
--callek i tried this, but it gets totally screwed up in ie for some reason.
...there's no real reason for user to give him info that he already visited xml main page.
...i cannot think of any reason for writers or editors to add "clear:both" brs to their document.
...And 2 more matches
NPP_URLNotify - Archive of obsolete content
syntax #include <npapi.h> void npp_urlnotify(npp instance, const char* url, npreason reason, void* notifydata); parameters the function has the following parameters: instance pointer to the current plug-in instance.
... reason reason code for completion of request.
... description the browser calls npp_urlnotify() after the completion of a npn_geturlnotify() or npn_posturlnotify() request to inform the plug-in that the request was completed and supply a reason code for the completion.
...And 2 more matches
Index - MDN Web Docs Glossary: Definitions of Web-related terms
it is designed to be easily understood by humans and for this reason they must be translated by another software.
...slowly ipv6 is replacing ipv4, among other reasons because ipv6 allows for many different ip addresses.
... an object can be immutable for various reasons, for example: 229 index glossary, index, mdn meta, navigation found 528 pages: 230 indexeddb api, codingscripting, database, glossary, sql indexeddb is a web api for storing large data structures within browsers and indexing them for high-performance searching.
...And 2 more matches
Graceful asynchronous programming with Promises - Learn web development
prerequisites: basic computer literacy, a reasonable understanding of javascript fundamentals.
...it returns a reason, an error message stating why the promise was rejected.
... this reason can be accessed by chaining a .catch() block onto the end of the promise chain.
...And 2 more matches
Extending a Protocol
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.
... mozilla::ipc::ipcresult recvecho(const nscstring& astring, echoparent::echoresolver&& aresolver); mozilla::ipc::ipcresult recv__delete__() override; void actordestroy(actordestroyreason awhy) override; private: ~echoparent() = default; bool mactoralive; }; } // end of namespace dom } // end of namespace mozilla #endif now, and add the echoparent.h to dom/ipc/moz.build, as part of the exports.mozilla.dom array.
...create dom/ipc/echochild.cpp and implement: #include "echochild.h" namespace mozilla { namespace dom { echochild::echochild() : mactoralive(true) {} void echochild::actordestroy(actordestroyreason awhy) { mactoralive = false; } } // end of namespace dom } // end of namespace mozilla ok, now add 'echochild.cpp' to the unified_sources of dom/ipc/moz.build.
...And 2 more matches
Deferred
method overview void resolve([optional] avalue); void reject([optional] areason); properties attribute type description promise read only promise a newly created promise, initially in the pending state.
... reject() rejects the associated promise with the specified reason.
... void reject( areason ); parameters areason optional the rejection reason for the associated promise.
...And 2 more matches
A guide to searching crash reports
or instead of a signature foo, a moz crash reason or something else.
... grouping by platform for example, if we start with a default search for all firefox crashes in the past week, but then replace the "signature" facet with "platform" and "moz crash reason", we get search results with two facet tabs.
... grouping by "moz crash reason" the second facet tab is a "moz crash reason facet" tab, with results like those shown in the following screenshot.
...And 2 more matches
nsIAuthPromptProvider
netwerk/base/public/nsiauthpromptprovider.idlscriptable this interface requests a prompt interface for the given prompt reason.
... inherits from: nsisupports last changed in gecko 1.9 (firefox 3) method overview void getauthprompt(in pruint32 apromptreason, in nsiidref iid, [iid_is(iid),retval] out nsqiresult result); constants constant value description prompt_normal 0 normal (non-proxy) prompt request.
... methods getauthprompt() this method requests a prompt interface for the given prompt reason.
...And 2 more matches
nsIDownloadManagerUI
1.0 66 introduced gecko 1.9 inherits from: nsisupports last changed in gecko 1.9 (firefox 3) method overview void getattention(); void show([optional] in nsiinterfacerequestor awindowcontext, [optional] in unsigned long aid, [optional] in short areason); attributes attribute type description visible boolean true if the download manager ui is visible; otherwise false.
... constants constant value description reason_user_interacted 0 when opening the download manager user interface, this value indicates that it's being done at the user's request.
... reason_new_download 1 when opening the download manager user interface, this value indicates that the user interface is being displayed because a new download is being started.
...And 2 more matches
nsIProtocolProxyService
; nsicancelable asyncresolve(in nsiuri auri, in unsigned long aflags,in nsiprotocolproxycallback acallback); nsiproxyinfo newproxyinfo(in acstring atype, in autf8string ahost,in long aport, in unsigned long aflags, in unsigned long afailovertimeout, in nsiproxyinfo afailoverproxy); nsiproxyinfo getfailoverforproxy(in nsiproxyinfo aproxyinfo, in nsiuri auri, in nsresult areason); void registerfilter(in nsiprotocolproxyfilter afilter, in unsigned long aposition); void unregisterfilter(in nsiprotocolproxyfilter afilter); constants constant value description resolve_non_blocking 1<<0 this flag may be passed to the resolve method to request that it fail instead of block the calling thread.
...if canceled, the cancellation status (areason) will be forwarded to the callback's nsiprotocolproxycallback.onproxyavailable() method via the astatus parameter.
... getfailoverforproxy() if the proxy identified by aproxyinfo is unavailable for some reason, this method may be called to access an alternate proxy that may be used instead.
...And 2 more matches
Getting Started Guide
a good place to learn about the basic rules and reasoning behind com is in essential com by don box.
...you should also have a reasonable knowledge of c++.
... */ mfooptr = afooptr; additionally, the class using raw xpcom interface pointers will need a destructor to release mfooptr; and a constructor to ensure that mfooptr is initially set to null (or some other reasonable value).
...And 2 more matches
Window.open() - Web APIs
WebAPIWindowopen
tip: for accessibility reasons, it is strongly recommended to set this feature always on scrollbars if this feature is on, the new secondary window will show horizontal and/or vertical scrollbar(s) if the document doesn't fit into the window's viewport.
... tip: for accessibility reasons, it is strongly encouraged to set this feature always on window functionality features noopener if this feature is set, the newly-opened window will open as normal, except that it will not have access back to the originating window (via window.opener — it returns null).
... more reading on the cross-domain script security restriction: http://www.mozilla.org/projects/secu...me-origin.html usability issues avoid resorting to window.open() generally speaking, it is preferable to avoid resorting to window.open() for several reasons: most modern desktop browsers offer tab-browsing, and tab-capable browser users overall prefer opening new tabs than opening new windows in a majority of webpage situations.
...And 2 more matches
Relationship of flexbox to other layout methods - CSS: Cascading Style Sheets
the box alignment module for many people the first reason they start to look at flexbox is because of the ability to properly align flex items inside a flex container.
... the reason that the box alignment properties remain detailed in the flexbox specification as well as being in box alignment is to ensure that completion of the flexbox spec is not held up by box alignment, which has to detail these methods for all layout types.
... it is worth noting that we might want to change the writing mode of our document for reasons other than publishing content in a language that uses a different writing mode.
...And 2 more matches
system/unload - Archive of obsolete content
the destructor will be called with a single argument describing the reason for the unload; see when().
...it is called with a single argument, one of the following strings describing the reason for unload: "uninstall", "disable", "shutdown", "upgrade", or "downgrade".
... if a reason could not be determined, undefined will be passed instead.
... note that if an add-on is unloaded with reason "disable", it will not be notified about "uninstall" while it is disabled.
Adding Toolbars and Toolbar Buttons - Archive of obsolete content
you should normally set this to true, unless you have strong reasons not to want users changing your toolbar.
...this is also the reason this is the only theme that still has colorful icons for its buttons.
...one reason is that it would be complicated to manage that many files, and it becomes more likely that changes made to some of the files lead to an inconsistent appearance that is not obvious by looking at the individual files.
...if for some reason you want to override these styles (not recommended), you'll need the following rule: -moz-appearance: none; -moz-appearance can be used in many cases where you want to strip the native look out of an element.
Why use RSS - Archive of obsolete content
you will not yet be creating your own rss files, but you will be learning about reasons to use it.
... if you are reading this, you probably already have your own reasons for wanting to use rss.
... there are, in fact, many reasons to use rss, but the two biggest reasons can be broadly dictated by: #1 (obviously only use it if) it fits your needs and #2 it has a huge amount of momentum -- everyone is using it.
... rss aggregators are everywhere one reason to use rss to syndicate is because there are an enormous amount of desktop and web-based rss aggregators out there.
CSS and JavaScript accessibility best practices - Learn web development
unless of course, there is a good reason why you want this content to be hidden from screen readers.
... users might do this for a variety of reasons.
...this is not ideal — really you should just use the right element for the right job — but it shows that it is possible in situations where for some reason you can't control the markup that is used.
...it is arguable that such a game doesn't really have this group of people as a part of its main target audience, and it would be unreasonable to expect you to make it 100% accessible to blind people, however you could implement keyboard controls so it is usable by non-mouse users, and make the color scheme contrasting enough to be usable by those with color deficiencies.
Fundamental text and font styling - Learn web development
the list of actual web safe fonts will change as operating systems evolve, but it's reasonable to consider the following fonts web safe, at least for now (many of them have been popularized thanks to the microsoft core fonts for the web initiative in the late 90s and early 2000s): name generic type notes arial sans-serif it's often considered best practice to also add helvetica as a preferred alternative to arial as, although their font faces are almo...
...serif, sans-serif and monospace are quite predictable and should provide something reasonable.
... my big red elephant font stacks since you can't guarantee the availability of the fonts you want to use on your webpages (even a web font could fail for some reason), you can supply a font stack so that the browser has multiple fonts it can choose from.
...possible values are as follows (you'll rarely use this, unless you want to turn some italic styling off for some reason): normal: sets the text to the normal font (turns existing italics off.) italic: sets the text to use the italic version of the font if available; if not available, it will simulate italics with oblique instead.
Index - Learn web development
beginner, css, design, html, needsactivelearning there's a reason we talk about web design.
... 81 storing the information you need — variables arrays, booleans, javascript, numbers, objects, updating, variables, declaring, initializing, l10n:priority, loose typing, strings by now you should know a reasonable amount about javascript variables and how to create them.
... 263 implementing feature detection article, beginner, css, codingscripting, javascript, learn, modernizr, testing, tools, cross browser, feature detection this article covered feature detection in a reasonable amount of detail, going through the main concepts and showing you how to both implement your own feature detection tests and use the modernizr library to implement tests more easily.
...however, for historical and technical reasons it's not always obvious how to use them to their full potential.
Properly configuring server MIME types - Learn web development
serving content using the correct mime type can also be important for security reasons; it's possible for malicious content to affect the user's computer by pretending to be a safe type of document when it is in fact not.
...for security reasons, gecko 2.0 will no longer do this for stylesheets loaded from a different origin than the requesting document.
... why browsers should not guess mime types apart from violating the http specification, it is a bad strategy for browsers to guess mime types for the following reasons: loss of control if the browser ignores the reported mime type, web administrators and authors no longer have control over how their content is to be processed.
...for this reason these mime types are usually restricted in terms of what actions a web browser will take when given content of that type.
Handling common accessibility problems - Learn web development
instead, it is more about making a reasonable effort to make as much of your content accessible to as many people as possible via defensive coding and sticking to best practices.
...if you remove the defaults for stylistic reasons, make sure you include some replacement styles.
...unless of course, there is a good reason why you want this content to be hidden from screenreaders.
...for example, it would be unreasonable to expect you to make a complex 3d game written using webgl 100% accessible to a blind person, but you could implement keyboard controls so it is usable by non-mouse users, and make the color scheme contrasting enough to be usable by those with color deficiencies.
Introduction to automated testing - Learn web development
a reasonable set of basic functionalities to run on our project is as follows: html-tidy, css-lint, and js-hint to lint and report/fix common html/css/js errors (see gulp-htmltidy, gulp-csslint, gulp-jshint).
....hashed_id; request({uri: baseurl + "builds/" + buildid + "/sessions.json"}, function(err, res, body){ console.log(json.parse(body)); }); /* response: [ { automation_session: { name: <string>, duration: <int>, os: <string>, os_version: <string>, browser_version: <string>, browser: <string>, device: <string>, status: <string>, hashed_id: <string>, reason: <string>, build_name: <string>, project_name: <string>, logs: <string>, browser_url: <string>, public_url: <string>, video_url: <string>, browser_console_logs_url: <string>, har_logs_url: <string> } }, { automation_session: { name: <string>, duration: <int>, os: <string>, os_version: <string>, browser_version: <string>, browser: <...
...string>, device: <string>, status: <string>, hashed_id: <string>, reason: <string>, build_name: <string>, project_name: <string>, logs: <string>, browser_url: <string>, public_url: <string>, video_url: <string>, browser_console_logs_url: <string>, har_logs_url: <string> } }, ...
...n.automation_session.hashed_id; request({uri: baseurl + "sessions/" + sessionid + ".json"}, function(err, res, body){ console.log(json.parse(body)); }); /* response: { automation_session: { name: <string>, duration: <int>, os: <string>, os_version: <string>, browser_version: <string>, browser: <string>, device: <string>, status: <string>, hashed_id: <string>, reason: <string>, build_name: <string>, project_name: <string>, logs: <string>, browser_url: <string>, public_url: <string>, video_url: <string>, browser_console_logs_url: <string>, har_logs_url: <string> } } */ } advanced: automated tests we'll cover actually running automated browserstack tests in the next article.
IME handling guide
the reason is, inputting an ideographic space causes a composition.
...when you need to check if a password field has focus for security reasons, you should use inputcontext::ispasswordeditor().
...the reason why nsiwidget::setinputcontext() is called is stored in inputcontextaction::mcause.
...the reason is that, notifying unexpected text or selection changes to tsf and/or tip during composition may behave them odd.
IPDL Tutorial
on the other hand the reject/failure callbacks take a mozilla::ipc::responserejectreason&& and are called in case of a fatal error, such as an ipc error.
... the generated c++ will result in something containing: class pplugininstanceparent { public: typedef mozpromise<tuple<bool, bool> responserejectreason, true> asyncinitpromise; typedef mozpromise<bool, responserejectreason, true> otherfunctionpromise; void sendasyncinit(mozilla::ipc::resolvecallback<tuple<bool, bool>>&& aresolve, mozilla::ipc::rejectcallback&& areject); refptr<asyncinitpromise> sendasyncinit(); void sendotherfunction(mozilla::ipc::resolvecallback<bool>&& aresolve, mozilla::ipc::rejectcallback&& areject); refptr<otherfunctionpromise> sendotherfunction(); }; on the callee side, in addition to the declared mes...
...l callpplugininstanceconstructor(pplugininstanceparent* actor, const nscstring& type, const nstarray<nscstring>& args, int* rv) { /* generated code */ } /* destructor message */ virtual bool call__delete__(pplugininstanceparent* actor) { /* generated code */ } /* notification that actor deallocation is imminent, ipdl mechanisms are now unusable */ virtual void actordestroy(actordestroyreason why); ...
...*/ virtual bool answer__delete__(pplugininstancechild* actor) = 0; /* notification that actor deallocation is imminent, ipdl mechanisms are now unusable */ virtual void actordestroy(actordestroyreason why); ...
Gecko Profiler FAQ
it is quite reasonable to actually run the browser for 40 minutes and once the said leaks have happened capture the profiles and study what went wrong.
... if so, how complicated is to find out the reason the page has been purged?
... many times the reason you incur a page fault is merely that you are touching a memory page that hasn’t been touched in awhile.
... for example, we have observed that the first access to large hashtables when doing a hashtable lookup can incur a page fault in many cases, and while the specific reason behind each one of those page faults may be different, the general conclusion from that observation would be something about the overall efficiency of your memory access patterns.
Python binding for NSS
the following classes were replaced signaturealgorithm replaced by new class algorithmid the following classes were added algorithmid pkcs12decodeitem pkcs12decoder the following class methods were added pk11slot.authenticate() pk11slot.get_disabled_reason() pk11slot.has_protected_authentication_path() pk11slot.has_root_certs() pk11slot.is_disabled() pk11slot.is_friendly() pk11slot.is_internal() pk11slot.is_logged_in() pk11slot.is_removable() pk11slot.logout() pk11slot.need_login() pk11slot.need_user_init() pk11slot.user_disable() pk11slot.user_enable() pkcs12decodeitem.format() ...
...ed_cert_der pkcs12decodeitem.type signeddata.data signeddata.der the following module functions were added nss.nss.dump_certificate_cache_info() nss.nss.find_slot_by_name() nss.nss.fingerprint_format_lines() nss.nss.get_internal_slot() nss.nss.is_fips() nss.nss.need_pw_init() nss.nss.nss_init_read_write() nss.nss.pk11_disabled_reason_name() nss.nss.pk11_disabled_reason_str() nss.nss.pk11_logout_all() nss.nss.pkcs12_cipher_from_name() nss.nss.pkcs12_cipher_name() nss.nss.pkcs12_enable_all_ciphers() nss.nss.pkcs12_enable_cipher() nss.nss.pkcs12_export() nss.nss.pkcs12_map_cipher() nss.nss.pkcs12_set_nickname_collision_callback() nss.nss.pkcs12_set_preferred_cipher() nss.nss...
...ssl, connection class, http class usage the following classes were added: authkeyid basicconstraints crldistributionpoint crldistributionpts certificateextension generalname signedcrl dn rdn ava certificaterequest the following module functions were added: nss.nss.nss_is_initialized() nss.nss.cert_crl_reason_from_name() nss.nss.cert_crl_reason_name() nss.nss.cert_general_name_type_from_name() nss.nss.cert_general_name_type_name() nss.nss.cert_usage_flags() nss.nss.decode_der_crl() nss.nss.der_universal_secitem_fmt_lines() nss.nss.import_crl() nss.nss.make_line_pairs() nss.nss.oid_dotted_decimal() nss.nss.oid_str() nss.nss.oid_tag() nss.nss.o...
...method if the name is suffixed with (), a propety otherwise socket.next() socket.readlines() socket.sendall() sslsocket.next() sslsocket.readlines() sslsocket.sendall() authkeyid.key_id authkeyid.serial_number authkeyid.get_general_names() crldistributionpoint.issuer crldistributionpoint.get_general_names() crldistributionpoint.get_reasons() certdb.find_crl_by_cert() certdb.find_crl_by_name() certificate.extensions certificateextension.critical certificateextension.name certificateextension.oid certificateextension.oid_tag certificateextension.value generalname.type_enum generalname.type_name generalname.type_string secitem.der_to_hex() secitem.get_oid_sequence() ...
Invariants
(one reason for this is that the object may have watchpoints set; the watchpoint machinery assumes that all objects with watched properties are native.
... there may be other reasons that cover more cases, but nobody can remember one.) all jsobjects and heap-allocated jsstrings must be 8-byte-aligned.
...the same slot being allocated to more than one property would be a problem for obvious reasons.) all jsshapes in dictionary-mode objects have the in_dictionary flag set.
...we do this in order to save some cpu cycles (in other words, for no good reason whatsoever).
Handling Mozilla Security Bugs
also, as with other mozilla module owners, mozilla.org staff will oversee the work of the security module owner and select a new security module owner should that ever be necessary for any reason.
...we reserve the right to cap the membership at some reasonable level, either by refusing new applications or, if necessary and appropriate, by removing existing members of the security bug group to make room for new ones.
... please try not to keep bugs in the security-sensitive category for an unreasonably long amount of time.
... please try to be understanding and accommodating if a mozilla distributor has a legitimate need to keep a bug in the security-sensitive category for some reasonable additional time period, e.g., to get a new release distributed to users.
Index
MozillaTechXPCOMIndex
347 nsiauthpromptprovider authentication, interfaces, interfaces:scriptable, xpcom, xpcom api reference, xpcom interface reference this method requests a prompt interface for the given prompt reason.
...the interface name has been kept for compatibility reasons for code using the export service.
... 933 nsisupports proxies needshelp, needsupdate, obsolete, xpcom the main reason for nsisupports proxies is that javascript and ui are on a single thread.
...constants that callers can use to indicate the reason for an add-on update check.
mozIStorageStatementCallback
last changed in gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) inherits from: nsisupports method overview void handlecompletion(in unsigned short areason); void handleerror(in mozistorageerror aerror); void handleresult(in mozistorageresultset aresultset); constants constant value description reason_finished 0 the statement has finished executing normally.
... reason_canceled 1 the statement stopped executing because it was canceled.
... reason_error 2 the statement stopped executing because an error occurred.
... void handlecompletion( in unsigned short areason ); parameters areason the reason the statement stopped executing; see the list of possible values in the constants section.
nsIWebSocketListener
8.0 (firefox 8.0 / thunderbird 8.0 / seamonkey 2.5) method overview void onacknowledge(in nsisupports acontext, in pruint32 asize); void onbinarymessageavailable(in nsisupports acontext, in acstring amsg); void onmessageavailable(in nsisupports acontext, in autf8string amsg); void onserverclose(in nsisupports acontext, in unsigned short acode, in autf8string areason); void onstart(in nsisupports acontext); void onstop(in nsisupports acontext, in nsresult astatuscode); methods onacknowledge() called to acknowledge a message sent via nsiwebsocketchannel.sendmsg() or nsiwebsocketchannel.sendbinarymsg().
...void onserverclose( in nsisupports acontext, in unsigned short acode, in autf8string areason ); parameters acontext user defined context.
... areason a text string explaining the reason for the closure of the connection.
... astatuscode reason for stopping (ns_ok if completed successfully).
Reference Manual
_queryreferent(nsiweakreference*), do_queryreferent(nsiweakreference*, nsresult*) don't addref dont_addref(t*), getter_addrefs(t*) n/a e.g., one of the possibilities for assigning into an nscomptr, but you don't want to addref the pointer you are assigning (because it has already been addrefed for some reason) is dont_addref(t*) found at the intersection of "don't addref" and "don't qi".
...several reasons: it would become inconvenient take the address of an nscomptr in all other situations; the name "getter_addrefs" enforces the notion that a certain behavior is required of the getter; and once upon a time, there was another possibility (as you're about to learn).
...once upon a time, there was, but it went away for three reasons: it is against the rules of xpcom for a getter to return a non-addrefed interface pointer through a parameter (if you see it, report a bug).
...prefer construction over assignment whenever reasonable.
WebIDL bindings
return; } // for some reason we want to catch and rethrow exceptions from setsomenumber, say.
... return; } // now for some reason we want to catch and rethrow exceptions from the callback, // and use "this" as the this value for the call to js.
... throwing exceptions from js-implemented apis there are two reasons a js implemented api might throw.
... the first reason is that some unforeseen condition occurred and the second is that a specification requires an exception to be thrown.
Streams - Plugins
nperror npp_destroystream(npp instance, npstream *stream, nperror reason); the instance parameter is the current plug-in instance; the stream parameter specifies the stream to be deleted.
... the reason parameter specifies why the stream was destroyed.
... nperror npn_destroystream(npp instance, npstream* stream, nperror reason); the instance parameter is the current plug-in; the stream parameter specifies the stream, created by either the browser or the plug-in.
... the reason parameter represents the reason the stream was stopped, as follows: npres_done (most common): the stream completed normally; the plug-in sent all data to the browser.
Waterfall - Firefox Developer Tools
javascript functions executed in the page are labeled with the reason the function was called: script tag setinterval settimeout requestanimationframe promise callback promise init worker javascript uri event handler stack call stack, with links to functions.
... reason a string indicating the reason gc was performed.
... non-incremental reason if the gc event was non-incremental, the string indicates the reason non-incremental gc was performed.
...in general, though: gc is needed when a lot of memory is being allocated non-incremental gc is usually needed when the memory allocation rate is high enough that spidermonkey may run out of memory during incremental gc when the waterfall records a gc marker it indicates: whether the gc was incremental or not the reason the gc was performed if the gc was non-incremental, the reason it was non-incremental starting in firefox 46, if the gc event was caused by allocation pressure, a link appears, labeled "show allocation triggers".
CrashReportBody - Web APIs
for security reasons, no details of the crash are communicated in the body except for a general crash reason.
... properties reason a string representing the reason for the crash.
... current possible reasons are: oom: the browser ran out of memory.
... some sample json might look like this: { "type": "crash", "age": 42, "url": "https://example.com/", "user_agent": "mozilla/5.0 (x11; linux x86_64; rv:60.0) gecko/20100101 firefox/60.0", "body": { "reason": "oom" } } note: crash reports are always delivered to the endpoint group named default; there is currently no way to override this.
FileSystemFlags - Web APIs
13prefixed prefixed implemented with the vendor prefix: webkitedge full support ≤79prefixed full support ≤79prefixed prefixed implemented with the vendor prefix: webkitfirefox partial support 50notes partial support 50notes notes for security reasons, firefox does not support creating files.
...fixed prefixed implemented with the vendor prefix: webkitchrome android full support yesprefixed full support yesprefixed prefixed implemented with the vendor prefix: webkitfirefox android partial support 50notes partial support 50notes notes for security reasons, firefox does not support creating files.
... 13prefixed prefixed implemented with the vendor prefix: webkitedge full support ≤79prefixed full support ≤79prefixed prefixed implemented with the vendor prefix: webkitfirefox partial support 50notes partial support 50notes notes for security reasons, firefox does not support creating files.
...fixed prefixed implemented with the vendor prefix: webkitchrome android full support yesprefixed full support yesprefixed prefixed implemented with the vendor prefix: webkitfirefox android partial support 50notes partial support 50notes notes for security reasons, firefox does not support creating files.
MediaDevices.getUserMedia() - Web APIs
if one cannot be included for any reason, the call to getusermedia() will result in an error.
... while information about a user's cameras and microphones are inaccessible for privacy reasons, an application can request the camera and microphone capabilities it needs and wants, using additional constraints.
... the reason for the difference in behaviour is that the keywords min, max, and exact are inherently mandatory.
...a secure context is one the browser is reasonably confident contains a document which was loaded securely, using https/tls, and has limited exposure to insecure contexts.
PromiseRejectionEvent() - Web APIs
reason any value or object which represents the reason the promise was rejected.
... examples this example creates a new unhandledrejection event for the promise mypromise with the reason being the string "my house is on fire".
... the reason could just as easily be a number, or even an object with detailed information including the home address, how serious the fire is, and the phone number of an emergency contact who should be notified.
... let myrejectionevent = new promiserejectionevent("unhandledrejection", { promise : mypromise, reason : "my house is on fire" }); specifications specification status comment html living standardthe definition of 'the promiserejectionevent interface' in that specification.
WindowOrWorkerGlobalScope.setTimeout() - Web APIs
this syntax is not recommended for the same reasons that make using eval() a security risk.
...note that in either case, the actual delay may be longer than intended; see reasons for delays longer than specified below.
... reasons for delays longer than specified there are a number of reasons why a timeout may take longer to fire than anticipated.
... this section describes the most common reasons.
:visited - CSS: Cascading Style Sheets
WebCSS:visited
for privacy reasons, the styles that can be modified using this selector are very limited.
... 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.
... note: for more information on these limitations and the reasons behind them, see privacy and the :visited selector.
...lets browsers restrict its behavior for privacy reasons.
Controlling Ratios of Flex Items Along the Main Axis - CSS: Cascading Style Sheets
however there are two reasons why it isn’t quite the same.
... while it is usually subtle, defined in the specification is one reason why flex-shrink isn’t quite the same for negative space as flex-grow is for positive space: “note: the flex shrink factor is multiplied by the flex base size when distributing negative space.
...a small item won’t shrink to zero before a larger item has been noticeably reduced.” the second reason is that flexbox prevents small items from shrinking to zero size during this removal of negative free space.
... in practice the shrinking behaviour does tend to give you reasonable results.
Event reference
fullscreenerror it was impossible to switch to fullscreen mode for technical reasons or because the permission was denied.
... pointerlockerror it was impossible to lock the pointer for technical reasons or because the permission was denied.
... fullscreenerror event full screen it was impossible to switch to fullscreen mode for technical reasons or because the permission was denied.
... pointerlockerror event pointer lock it was impossible to lock the pointer for technical reasons or because the permission was denied.
<img>: The Image Embed element - HTML: Hypertext Markup Language
WebHTMLElementimg
alt text is also displayed on the page if the image can't be loaded for some reason: for example, network errors, content blocking, or linkrot.
...there are a number of situations in which a browser might not display images, such as: non-visual browsers (such as those used by people with visual impairments) the user chooses not to display images (saving bandwidth, privacy reasons) the image is invalid or an unsupported type in these cases, the browser may replace the image with the text in the element's alt attribute.
... for these reasons and others, provide a useful value for alt whenever possible.
...the intent is to avoid the network and storage bandwidth needed to handle the image until it's reasonably certain that it will be needed.
Browser detection using the user agent - HTTP
this is the worst reason to use user agent detection because odds are eventually all the other browsers will catch up.
...there is never any reason to check the user agent string for this.
...the pictures are kept to a maximum reasonable size even on large screens.
... mobile, tablet or desktop the most common reason to perform user agent sniffing is to determine which type of device the browser runs on.
Closures - JavaScript
the reason is that functions in javascript form closures.
...for this reason, when myfunc is invoked, the variable name remains available for use, and "mozilla" is passed to alert.
... the reason for this is that the functions assigned to onfocus are closures; they consist of the function definition and the captured environment from the setuphelp function's scope.
...the reason is that whenever the constructor is called, the methods would get reassigned (that is, for every object creation).
Promise.reject() - JavaScript
the promise.reject() method returns a promise object that is rejected with a given reason.
... syntax promise.reject(reason); parameters reason reason why this promise rejected.
... return value a promise that is rejected with the given reason.
...for debugging purposes and selective error catching, it is useful to make reason an instanceof error.
Web audio codec guide - Web media technologies
generally speaking, the most common reasons to choose lossless audio are because you require archival-quality storage, or because the audio samples will be remixed and recompressed, and you wish to avoid the amplification of artifacts in the audio due to recompression.
... for that reason, speech-specific codecs often begin by dropping sound that falls outside a set range.
...r opera safari mp3 support yes yes yes[1] 9 yes 3.1 container support mpeg-1, mpeg-2, mp4, adts, 3gp rtp / webrtc compatible no licensing patent-free in the eu as of 2012; patent-free in the united states as of april 16, 2017; now free to use [1] for patent reasons, firefox did not directly support mp3 prior to version 71; instead, platform-native libraries were used to support mp3.
... if you have plenty of network bandwidth to work with, and are reasonably certain your users will as well, g.722 is the better choice.
Web video codec guide - Web media technologies
for this and other reasons, the more motion there is in a video, the larger the output file will typically be.
...for this reason, encoding a video into av1 format takes a very long time, since all the work is done in software.
...the only real reason to use h.263 in new projects is if you require support on very old devices on which h.263 is your best choice.
...the reason for this is simple: video is huge.
Content Scripts - Archive of obsolete content
but a content script will not: // main.js var tabs = require("sdk/tabs"); var mod = require("sdk/page-mod"); var self = require("sdk/self"); var pageurl = self.data.url("page.html") var pagemod = mod.pagemod({ include: pageurl, contentscript: "console.log(window.foo);" }) tabs.open(pageurl); console.log: my-addon: null there are good reasons for this insulation.
...);" + "}"; require("sdk/page-mod").pagemod({ include: "*", contentscript: myscript, contentscriptwhen: "start" }); this will work fine on most pages, but will fail on pages which also assign to onclick: <html> <head> </head> <body> <script> window.onclick = function() { window.alert("it's my click now!"); } </script> </body> </html> for these reasons, it's better to add event listeners using addeventlistener(), defining the listener as a function: var themessage = "hello from content script!"; anelement.onclick = function() { alert(themessage); }; anotherelement.addeventlistener("click", function() { alert(themessage); }); communicating with the add-on to enable add-on scripts and content scripts to communicate with each other, each...
... the postmessage api before the port object was added, add-on code and content scripts communicated using a different api: the content script called self.postmessage() to send and self.on() to receive the add-on script called worker.postmessage() to send and worker.on()to receive the api is still available and documented, but there's no reason to use it instead of the port api described here.
The Essentials of an Extension - Archive of obsolete content
helloitem.setattribute("label", somestringbundle.getstring("xulschoolhello.hello2.label")); this is the reason dtd strings are not a solution for all localization cases, and the reason we often need to include string bundles in xul files: <stringbundleset id="stringbundleset"> <stringbundle id="xulschoolhello-string-bundle" src="chrome://xulschoolhello/locale/browseroverlay.properties" /> </stringbundleset> the stringbundleset element is just a container for stringbundle elements.
... there should only be one per document, which is the reason why we overlay the stringbundleset that is in browser.xul, hence the very generic id.
...for this reason it's better to use parameters in the properties: xulschoolhello.search.label = found %s words matching the search query!
MMgc - Archive of obsolete content
for this reason, rcobject's always have finalizers.
...the reason is that our collector zeroes memory upon free and this was hurting performance.
...this approach was not chosen for the following reasons: coordinating the marking thread and the main thread will require locking and may suffer due to lock overhead/contention supporting mac classic's cooperative threads makes this approach harder flash's frame based architecture gives us a very natural place to do this work we have better control over how much time is spent marking without threads when smp systems become more prevalent it may be ...
Migrate apps from Internet Explorer to Mozilla - Archive of obsolete content
document fragments for performance reasons, you can create documents in memory, rather than working on the existing document's dom.
...mozilla uses it for the following conditions: if a page is sent with a text/xml mimetype or any other xml or xhtml mimetype for any "doctype html system" doctype (for example, <!doctype html system "http://www.w3.org/tr/rec-html40/strict.dtd">), except for the ibm doctype for unknown doctypes or doctypes without dtds almost standards mode mozilla introduced almost standards mode for one reason: a section in the css 2 specification breaks designs based on a precise layout of small images in table cells.
...this is the most common reason why xslt won't run in mozilla but will in internet explorer.
Modularization techniques - Archive of obsolete content
on windows they expand to virtual nsresult __stdcall and virtual type __stdcall for com compatibility reasons.
... /* * the nsifactory interface */ class nsifactory: public nsisupports { public: ns_imethod createinstance(nsisupports *aouter, const nsiid &aiid, void **aresult) = 0; ns_imethod lockfactory(prbool alock) = 0; the reason for using factories is that it provides a mechanism for creating an object without having access to the class declaration for that object.
...the technology can be licensed from microsoft, but for obvious reasons we are not going to be doing that.
Menus - Archive of obsolete content
for this reason, a window should only have one menu bar, however, each window can have a different menu bar.
...for this reason, a menupopup should be placed as a direct child of the menu.
...for this reason, the access key should always correspond to a character that appears in the menu label.
Multiple Rule Example - Archive of obsolete content
there is no reason for this -- it is only used in this example to show that there is no connection between the variables used in the two rules.
... you can use different variables if it makes sense in the context of the template or the data, although in this example it would seem more reasonable to use the same variable name.
...the reason for this is due to the manner in which the builder processes the data.
Writing JavaScript for XHTML - Archive of obsolete content
there are a number of reasons for this.
... this article shows some of the reasons alongside with strategies to remedy the problems.
...there are reasons why this decision was made, one being that a string of invalid markup will instantly break the whole document.
Archive of obsolete content
or for "reasons," your company is required to use very old software and you need to build web content that runs on that software.
... there are many reasons older documentation can be useful.
...the main reason for this is that there is no guarantee of java compatibility on a binary level due to the jri/jni switch.
bootstrap.js - Extensions
function startup(data, reason) { /// bootstrap data structure @see /docs/extensions/bootstrapped_extensions#bootstrap_data /// string id /// string version /// nsifile installpath /// nsiuri resourceuri /// /// reason types: /// app_startup /// addon_enable /// addon_install /// addon_upgrade /// addon_downgrade } function shutdown(data, reason) { /// bootstrap data structure @see /...
...docs/extensions/bootstrapped_extensions#bootstrap_data /// string id /// string version /// nsifile installpath /// nsiuri resourceuri /// /// reason types: /// app_shutdown /// addon_disable /// addon_uninstall /// addon_upgrade /// addon_downgrade } function install(data, reason) { /// bootstrap data structure @see /docs/extensions/bootstrapped_extensions#bootstrap_data /// string id /// string version /// nsifile installpath /// nsiuri resourceuri /// /// reason types: /// addon_install /// addon_upgrade /// addon_downgrade } function uninstall(data, reason) { /// bootstrap data structure @see /docs/extensions/bootstrapped_extensions#bootstrap_data /// string id ...
.../// string version /// nsifile installpath /// nsiuri resourceuri /// /// reason types: /// addon_uninstall /// addon_upgrade /// addon_downgrade } ...
HTML basics - Learn web development
there is no reason not to set this and it can help avoid some problems later on.
...in this attribute, you specify descriptive text for users who cannot see the image, possibly because of the following reasons: they are visually impaired.
...don't use heading elements to make text bigger or bold, because they are used for accessibility and other reasons such as seo.
Getting started with HTML - Learn web development
however, it is best practice to write all tags in lowercase for consistency, readability, and other reasons.
...one reason html5 dropped these terms was to prevent this rather common confusion.
...there is no reason not to set this, and it can help avoid some problems later.
Introducing asynchronous JavaScript - Learn web development
prerequisites: basic computer literacy, a reasonable understanding of javascript fundamentals.
... asynchronous javascript for reasons illustrated earlier (e.g.
... note: for security reasons, you can't fetch() files from your local filesystem (or run other such operations locally); to run the above example locally you'll have to run the example through a local webserver.
Cooperative asynchronous JavaScript: Timeouts and intervals - Learn web development
prerequisites: basic computer literacy, a reasonable understanding of javascript fundamentals.
...the browser also doesn't waste time running it if the animation is offscreen for some reason, etc.
... so, unless you need to support older versions of ie, there is little reason to not use requestanimationframe().
Focus management with Vue refs - Learn web development
for custom vue components, you can also use refs to directly access the internal structure of a child component, however this should be done with caution as it can make code harder to reason about and understand.
...this makes it a reasonable place to move focus to when we delete a node.
...this should provide a reasonable focus experience for all of our users.
Eclipse CDT
headers are only parsed once for performance reasons, eclipse only processes header files that have include guards once, using the compiler options for the first source file it encounters that includes that header (eclipse bug 380511).
...this is the reason that the instructions in the initial project properties section above instruct users that have their object directory outside their source directory to explicitly add {objdir}/dist/include to the project's "cdt user setting entries".
... to provide good code assistance eclipse needs you to have a build directory for two reasons.
Displaying Places information using views
for this reason views implement interface nsiplacesview.
...good reasons for needing a custom view might include (but are in no way limited to): displaying custom columns alongside those provided by the built-in tree view.
... potentially bad reasons for creating a custom view might include (but are not limited to): changing only the superficial appearance of a built-in view rather than the content it displays.
CustomizableUI.jsm
onareanodeunregistered(aarea, anode, areason) fired when an area's dom node is unregistered.
... aarea is the area for which a node was unregistered, anode the dom node which was unregistered, and areason indicates whether the area as a whole was unregistered (reason_area_unregistered), or whether a window closed (reason_window_closed).
...do not use, this will be removed as soon as reasonably possible.
NSS_3.12_release_notes.html
ert_checknamespace (see cert.h) cert_encodecertpoliciesextension (see cert.h) cert_encodeinfoaccessextension (see cert.h) cert_encodeinhibitanyextension (see cert.h) cert_encodenoticereference (see cert.h) cert_encodepolicyconstraintsextension (see cert.h) cert_encodepolicymappingextension (see cert.h) cert_encodesubjectkeyid (see certdb/cert.h) cert_encodeusernotice (see cert.h) cert_findcrlentryreasonexten (see cert.h) cert_findcrlnumberexten (see cert.h) cert_findnameconstraintsexten (see cert.h) cert_getclassicocspdisabledpolicy (see cert.h) cert_getclassicocspenabledhardfailurepolicy (see cert.h) cert_getclassicocspenabledsoftfailurepolicy (see cert.h) cert_getpkixverifynistrevocationpolicy (see cert.h) cert_getusepkixforvalidation (see cert.h) cert_getvaliddnspatternsfromcert (see cert.h) ...
...hmac_sha384 sec_oid_hmac_sha512 sec_oid_pkix_timestamping sec_oid_pkix_ca_repository sec_oid_iso_sha1_with_rsa_signature changed oids (see secoidt.h) sec_oid_pkcs12_key_usage changed to sec_oid_bogus_key_usage sec_oid_ansix962_ecdsa_signature_with_sha1_digest changed to sec_oid_ansix962_ecdsa_sha1_signature note: sec_oid_ansix962_ecdsa_signature_with_sha1_digest is also kept for compatibility reasons.
...bug 132485: built-in root certs slot description is empty bug 177184: nss_cmsdecoder_cancel might have a leak bug 232392: erroneous root ca tests in nss libraries bug 286642: util should be in a shared library bug 287052: function to get crl entry reason code has incorrect prototype and implementation bug 299308: need additional apis in the crl cache for libpkix bug 335039: nssckfwcryptooperation_updatecombo is not declared bug 340917: crlutil should init nss read-only for some options bug 350948: freebl macro change can give 1% improvement in rsa performance on amd64 bug 352439: reference leaks in modutil bug 369144: certutil needs option to gen...
NSS Developer Tutorial
for historical reasons, the buffer length is unsigned int, as opposed to size_t.
...unfortunately, public headers may declare private functions, for historical reasons.
...for critical code reviews, such as a patch release of a stable branch, two reviews may be more reasonable.
sslfnc.html
for this reason, the ssl3 spec allows ssl3 client hellos to be sent in ssl2 format, and it recommends that ssl3 servers all accept ssl3 client hellos in ssl2 format.
...however, there is no good reason for these to be mutually exclusive.
...if the callback returns secfailure, the callback should indicate the reason for the failure (if possible) by calling pr_geterror with the appropriate error code.
JIT Optimization Strategies
an outcome is either success or a reason why the strategy failed to apply.
... this optimization can fail for a number of reasons.
... this optimization can fail for a number of reasons.
Introduction to XPCOM for the DOM
however, ifooptr does not give you access to that function, since it is a pointer to nsifoo, for the reasons mentioned in section 1.b.
...additionally, the return value of a call to queryinterface should not be returned unless there is a good reason for that.
...you could want to add a new interface for several reasons, like the addition of a new dom object, or to respect an eventual "interface freeze".
nsIWebSocketChannel
to create an instance, use: var websocketchannel = components.classes["@mozilla.org/????????????????????????????"] .createinstance(components.interfaces.nsiwebsocketchannel); method overview void asyncopen(in nsiuri auri, in acstring aorigin, in nsiwebsocketlistener alistener, in nsisupports acontext); void close(in unsigned short acode, in autf8string areason); void sendbinarymsg(in acstring amsg); void sendmsg(in autf8string amsg); attributes attribute type description extensions acstring sec-websocket-extensions response header value.
... close() void close( in unsigned short acode, in autf8string areason ); parameters acode the status of the connection when closed; see status codes for possible values.
... areason a human-readable string describing the reason the connection closed.
URLs - Plugins
for this reason as well, calling npn_geturlnotify may be more useful than npn_geturl; the plug-in is notified upon either successful or unsuccessful completion of the request.
...both functions pass the notifydata value to npp_urlnotify, which tells the plug-in that the url request was completed and the reason for completion.
... void npp_urlnotify(npp instance, const char* url, npreason reason, void* notifydata); the instance and url parameters have the same definitions as those of npn_geturl.
DOM Inspector internals - Firefox Developer Tools
for obvious reasons, the contents of dynamic menus are not defined here.
...for that reason, only those menuitems' ids are referenced here, and the complete definitions are imported from editingoverlay.xul.
...as of this writing, all of the keys that correspond to edit menu items live in editingoverlay for no good reason.
Debugger - Firefox Developer Tools
for this reason, onnewglobalobject is only available to privileged code.
...for this reason, addallglobalsasdebuggees is only available to privileged code.
...for this reason, findallglobals is only available to privileged code.
CloseEvent.initCloseEvent() - Web APIs
syntax event.initmouseevent(type, canbubble, cancelable, wasclean, reasoncode, reason); parameters type the string to set the event's type to.
... reasoncode the reason of the close.
... reason a domstring describing the reason of the close in shuman-readable way.
DOMException - Web APIs
this field is used for historical reasons.
... unknownerror the operation failed for an unknown transient reason (e.g.
... operationerror the operation failed for an operation-specific reason (no legacy code value and constant name).
FileError - Web APIs
WebAPIFileError
a web app could fail for various reasons, so you don't want to spend the rest of your day guessing what's going on and going through maddening troubleshooting.
... don't run your app from file:// for security reasons, browsers do not allow you to run your app from file://.
... security_err 2 access to the files were denied for one of the following reasons: the files might be unsafe for access within a web application.
Introduction to the File and Directory Entries API - Web APIs
usefulness of the api the file and directory entries api is an important api for the following reasons: it lets apps have offline and storage features that involve large binary blobs.
...the api is a better choice for apps that deal with blobs for the following reasons: the file and directory entries api offers client-side storage for use cases that are not addressed by databases.
... restrictions for security reasons, browsers impose restrictions on file access.
GlobalEventHandlers.onerror - Web APIs
syntax for historical reasons, different arguments are passed to window.onerror and element.onerror handlers (as well as on error-type window.addeventlistener handlers).
... a good example for this is when you are using an image tag, and need to specify a backup image in case the one you need is not available on the server for any reason.
... <img src="imagenotfound.gif" onerror="this.onerror=null;this.src='imagefound.gif';" /> the reason we have the this.onerror=null in the function is that the browser will be stuck in an endless loop if the onerror image itself generates an error.
Page Visibility API - Web APIs
with tabbed browsing, there is a reasonable chance that any given webpage is in the background and thus not visible to the user.
...see reasons for delays longer than specified for more details.
... windows are subjected to throttling after 30 seconds, with the same throttling delay rules as specified for window timers (again, see reasons for delays longer than specified).
PromiseRejectionEvent.promise - Web APIs
you can examine the event's promiserejectionevent.reason property to learn why the promise was rejected.
... examples this example listens for unhandled promises and, if the reason is an object with a code field containing the text "module not ready", it sets up an idle callback that will retry the task that failed to execute correctly.
... window.onunhandledrejection = function(event) { if (event.reason.code && event.reason.code == "module not ready") { window.requestidlecallback(function(deadline) { loadmodule(event.reason.modulename) .then(performstartup); }); event.preventdefault(); } } specifications specification status comment html living standardthe definition of 'promiserejectionevent.promise' in that specification.
ReadableStream.ReadableStream() - Web APIs
cancel(reason) optional this method, also defined by the developer, will be called if the app signals that the stream is to be cancelled (e.g.
...the reason parameter contains a domstring describing why the stream was cancelled.
...a cancel() fuction is also provided to stop the generation if readablestream.cancel() is called for any reason.
ReadableStream.cancel() - Web APIs
the supplied reason parameter will be given to the underlying source, which may or may not use it.
... syntax var promise = readablestream.cancel(reason); parameters reason a domstring providing a human-readable reason for the cancellation.
... return value a promise, which fulfills with the value given in the reason parameter.
ReadableStreamBYOBReader.cancel() - Web APIs
the supplied reason parameter will be given to the underlying source, which may or may not use it.
... syntax var promise = readablestreambyobreader.cancel(reason); parameters reason a domstring providing a human-readable reason for the cancellation.
... return value a promise, which fulfills with the value given in the reason parameter.
ReadableStreamDefaultReader.cancel() - Web APIs
the supplied reason argument will be given to the underlying source, which may or may not use it.
... syntax var promise = readablestreamdefaultreader.cancel(reason); parameters reason optional a domstring providing a human-readable reason for the cancellation.
... return value a promise, which fulfills with the value given in the reason parameter.
Screen Wake Lock API - Web APIs
a request may be rejected for a number of reasons, including system settings (such as power save mode or low battery level) or if the document is not active or visible.
... wakelock.release() .then(() => { wakelock = null; }); listening for wake lock release this example updates the ui if the wake lock has been released for any reason (such as navigating away from the active window/tab).
...the ui also updates if the wake lock is released automatically for any reason.
Using Service Workers - Web APIs
this is already available with native apps, which is one of the main reasons native apps are often chosen over web apps.
... you’ll also need to serve your code via https — service workers are restricted to running across https for security reasons.
... this could be for the following reasons: you are not running your application through https.
WritableStreamDefaultWriter.abort() - Web APIs
syntax var promise = writablestreamdefaultwriter.abort(reason); parameters reason optional a domstring representing a human-readable reason for the abort.
... return value a promise, which fulfills with the value given in the reason parameter.
... // abort the stream when desired writer.abort.then((reason) => { console.log(reason); }) specifications specification status comment streamsthe definition of 'abort()' in that specification.
ARIA annotations - Accessibility
this is useful when the element’s label is available in the ui, but for some reason a conventional <label> won’t work.
...the semantics for this have long been available in html, via the <ins> and <del> elements: <p>freida’s pet is a <del>black cat called luna</del><ins>purple tyrannosaurus rex called tiny</ins>.</p> with the new additions, you now have new roles available to provide the same semantics, should you be unable to use <ins> and <del> elements for some reason: <p>freida’s pet is a <span role="deletion">black cat called luna</span><span role="insertion">purple tyrannosaurus rex called tiny</span>.</p> however, this often isn’t enough — when you’ve got a content change like the one above that involves an insertion and a deletion, there is no way for a screenreader user to work out if the two are related or not.
...song is a slow-rising crescendo that peaks at the <mark aria-details="thread-1">end of the guitar solo</mark>, before fading away sharply.</p> <div role="comment" id="thread-1" data-author="chris"> <h3>chris said</h3> <p class="comment-text">i really think this moment could use more cowbell.</p> <p><time datetime="2019-03-30t19:29">march 30 2019, 19:29</time></p> </div> note: if for some reason you can’t use the <mark> element in your application, you could also use <span role="mark"></span>.
Variable fonts guide - CSS: Cascading Style Sheets
for comparison, it is typical in a typographic system for a magazine to use 10–15 or more different weight and width combinations throughout the publication — giving a much wider range of styles than currently typical on the web (or indeed practical for performance reasons alone).
...the reason for this is that most typefaces have very specific designs for bolder weights and italics that often include completely different characters (lower-case 'a' and 'g' are often quite different in italics, for example).
...the option to provide a specific value is provided so that should it be necessary to override the default — for legibility, aesthetic, or some other reason — a specific value can be applied.
HTML elements reference - HTML: Hypertext Markup Language
WebHTMLElement
<i> the html idiomatic text element (<i>) represents a range of text that is set off from the normal text for some reason, such as idiomatic text, technical terms, taxonomical designations, among others.
... <sub> the html subscript element (<sub>) specifies inline text which should be displayed as subscript for solely typographical reasons.
... <sup> the html superscript element (<sup>) specifies inline text which is to be displayed as superscript for solely typographical reasons.
HTML documentation index - HTML: Hypertext Markup Language
WebHTMLIndex
114 <i>: the idiomatic text element element, html, html text-level semantics, reference, web, em the html idiomatic text element (<i>) represents a range of text that is set off from the normal text for some reason, such as idiomatic text, technical terms, taxonomical designations, among others.
... 199 <sub>: the subscript element baseline, element, footnotes, html, html text-level semantics, html:flow content, html:palpable content, html:phrasing content, reference, subscript, web, sub the html subscript element (<sub>) specifies inline text which should be displayed as subscript for solely typographical reasons.
... 201 <sup>: the superscript element element, html, html text-level semantics, html:flow content, html:palpable content, html:phrasing content, reference, web the html superscript element (<sup>) specifies inline text which is to be displayed as superscript for solely typographical reasons.
Connection management in HTTP/1.x - HTTP
unless dealing with a very old system, which doesn't support a persistent connection, there is no compelling reason to use this model.
... for these reasons, pipelining has been superseded by a better algorithm, multiplexing, that is used by http/2.
... today, every http/1.1-compliant proxy and server should support pipelining, though many have limitations in practice: a significant reason no modern browser activates this feature by default.
Network Error Logging - HTTP
dns.failed request to the dns server failed due to reasons not covered by previous errors (e.g.
... servfail) dns.address_changed for security reasons, if the server ip address that delivered the original report is different to the current server ip address at time of error generation, the report data will be downgraded to only include information about this problem and the type set to dns.address_changed.
...med_out tcp connection to the server timed out tcp.closed the tcp connection was closed by the server tcp.reset the tcp connection was reset tcp.refused the tcp connection was refused by the server tcp.aborted the tcp connection was aborted tcp.address_invalid the ip address is invalid tcp.address_unreachable the ip address is unreachable tcp.failed the tcp connection failed due to reasons not covered by previous errors http.error the user agent successfully received a response, but it had a 4xx or 5xx status code http.protocol.error the connection was aborted due to an http protocol error http.response.invalid response is empty, has a content-length mismatch, has improper encoding, and/or other conditions that prevent user agent from processing the response http.response.r...
Redirections in HTTP - HTTP
others may or may not be changed to get.[2] the web page is temporarily unavailable for unforeseen reasons.
... 307 temporary redirect method and body not changed the web page is temporarily unavailable for unforeseen reasons.
...but there are reasons for alternative names for a resource: expanding the reach of your site a common case is when a site resides at www.example.com, but accessing it from example.com should also work.
Promise() constructor - JavaScript
resolutionfunc(value) // call on fulfilled rejectionfunc(reason) // call on rejected the returned value can be another promise object, in which case the promise gets dynamically inserted into the chain.
...the second (reject) is called when the task fails, and returns the reason for failure, which is typically an error object.
... const myfirstpromise = new promise((resolve, reject) => { // do something asynchronous which eventually calls either: // // resolve(somevalue) // fulfilled // or // reject("failure reason") // rejected }); making functions return a promise to provide a function with promise functionality, have it return a promise: function myasyncfunction(url) { return new promise((resolve, reject) => { const xhr = new xmlhttprequest() xhr.open("get", url) xhr.onload = () => resolve(xhr.responsetext) xhr.onerror = () => reject(xhr.statustext) xhr.send() }); } specifications specification ecmascript (ecma-262)the definition of 'promise constructor' in that specification.
Promise.allSettled() - JavaScript
if the status is rejected, then a reason is present.
... the value (or reason) reflects what value each promise was fulfilled (or rejected) with.
... examples using promise.allsettled promise.allsettled([ promise.resolve(33), new promise(resolve => settimeout(() => resolve(66), 0)), 99, promise.reject(new error('an error')) ]) .then(values => console.log(values)); // [ // {status: "fulfilled", value: 33}, // {status: "fulfilled", value: 66}, // {status: "fulfilled", value: 99}, // {status: "rejected", reason: error: an error} // ] specifications specification ecmascript (ecma-262)the definition of 'promise.allsettled' in that specification.
Promise.prototype.catch() - JavaScript
syntax p.catch(onrejected); p.catch(function(reason) { // rejection }); parameters onrejected a function called when the promise is rejected.
... this function has one argument: reason the rejection reason.
...is never called }); // errors thrown after resolve is called will be silenced var p3 = new promise(function(resolve, reject) { resolve(); throw new error('silenced exception!'); }); p3.catch(function(e) { console.error(e); // this is never called }); if it is resolved //create a promise which would not call onreject var p1 = promise.resolve("calling next"); var p2 = p1.catch(function (reason) { //this is never called console.error("catch p1!"); console.error(reason); }); p2.then(function (value) { console.log("next promise's onfulfilled"); /* next promise's onfulfilled */ console.log(value); /* calling next */ }, function (reason) { console.log("next promise's onrejected"); console.log(reason); }); specifications specification ecma...
Promise.prototype.then() - JavaScript
syntax p.then(onfulfilled[, onrejected]); p.then(value => { // fulfillment }, reason => { // rejection }); parameters onfulfilled optional a function called if the promise is fulfilled.
...this function has one argument, the rejection reason.
...}, reason => { console.error(reason); // error!
Mobile first - Progressive web apps (PWAs)
the concept is the same regardless of the target device — you want to provide a mechanism for users to search for things and get to different views/pages of the application — but because mobile screens are so much smaller, a reasonable desktop navigation can spoil the experience by filling up most of the initial view of the app, covering up the content.
...f="#">contact</a></li> </ul> </nav> <header> <a id="top" href="#bottom">jump to menu</a> <h1>my article</h1> </header> <div class="main"> <p>lorem ipsum … </p> <a id="bottom" href="#top">back to top</a> </div> </article> <button id="install-btn">install</button> default mobile css for the css, i first added some styles into our app.css stylesheet to provide a reasonable narrow-screen layout.
...the reason why it is so useful is that it provides a mechanism to selectively serve both css and javascript.
Using the WebAssembly JavaScript API - WebAssembly
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.
... while memory provides a resizable typed array of raw bytes, it is unsafe for references to be stored in a memory since a reference is an engine-trusted value whose bytes must not be read or written directly by content for safety, portability, and stability reasons.
... in a native implementation of c/c++, a function pointer is represented by the raw address of the function’s code in the process’s virtual address space and so, for the safety reasons mentioned above, cannot be stored directly in linear memory.
ui/frame - Archive of obsolete content
if you send a json object, the sdk takes care of serializing and deserializing it for you: // frame.js var label = window.document.getelementbyid("linky"); label.addeventlistener("click", function() { window.parent.postmessage({ "type" : "ping", "reason" : "they clicked me" }, "*"); }, true); // main.js var { frame } = require("sdk/ui/frame"); var frame = new frame({ url: "./frame.html" }); frame.on("message", pong); function pong(e) { if (e.data.type == "ping") { console.log(e.data.reason); e.source.postmessage("pong", event.origin); } } globals constructors frame(options) creates an frame.
...if the payload was a json object, you can access it like an object: // frame.js var label = window.document.getelementbyid("linky"); label.addeventlistener("click", function() { window.parent.postmessage({ "type" : "ping", "reason" : "they clicked me" }, "*"); }, true); // main.js var { frame } = require("sdk/ui/frame"); var frame = new frame({ url: "./frame.html" }); frame.on("message", pong); function pong(e) { if (e.data.type == "ping") { console.log(e.data.reason); e.source.postmessage("pong", e.origin); } } ...
HTML in XUL for rich tooltips - Archive of obsolete content
this is recommended for security reasons, especially if remote html is to be inserted.
...for security reasons, the conversion will strip out some of the more dangerous elements in the html string, like javascript and iframes.
Custom about: URLs - Archive of obsolete content
this.component.classdescription, this.component.contractid, this); } unregister() { cm.unregisterfactory(this.component.prototype.classid, this); } } instantiation firefox 4+ now in the startup procedure of your bootstrapped addon make sure to do register the factory, for example: let factory; function startup(adata, areason) { // ...
...} and then on shutdown of your bootstrapped addon make sure to destroy the factory: function shutdown(adata, areason) { if (areason == app_shutdown) { return } // ...
Appendix C: Avoiding using eval in Add-ons - Archive of obsolete content
also, calling .bind() in a tight (inner) loop should be avoided for performance reasons, as calling .bind() does require some work and memory.
...at the same time, it is also not safe to "un-string-patch" a function, for the exact same reason.
Setting Up a Development Environment - Archive of obsolete content
the "bash -c" part forces komodo to use bash, which for some reason can't be set properly as the default command shell.
...this is the reason why we introduced "make install".
JavaScript Client API - Archive of obsolete content
further, you agree (a) to maintain and link to (including on websites from which your third party client may be downloaded) a separate, conspicuous, and reasonably detailed privacy policy detailing how data collected or transmitted by your third party client is managed and protected; (b) that your third party client will only store data in encrypted form on the firefox sync servers operated by mozilla; (c) that you and your third party client will use the firefox sync apis solely for their intended purpose; (d) that your third party client will not hide...
...reason for this is, weave will iterate through the registerengines preference and try to instantiate each engine it has there before you the line mentioned above ever has a chance to execute.this means the constructor to your engine is not ready when weave tries to instantiate it.
Plug-n-Hack Phase1 - Archive of obsolete content
the configuration document should then listen for a number of other events: configuresectoolstarted - this notifies the document that the browser is processing the configuration; if this event is not received within a reasonable amount of time after the configuresectool event has been fired, you might want to warn the user that pnh does not seem to be supported by this browser (perhaps prompting them to install the appropriate addon).
... configuresectoolfailed - this notifies the document that configuration has failed for some reason.
Frequently Asked Questions - Archive of obsolete content
there are two possible reasons for this: a simple mistake in the svg file, or a misconfigured server.
...it's also useful to know that you can check whether mozilla has recognised your plug-ins by typing 'about:plugins' into your address bar (linking to that doesn't work for security reasons).
Running Tamarin acceptance tests - Archive of obsolete content
reason: 2531 running abcasm/adhoc.abs skipping...
... reason: inconsistencies in different debug output, need to implement regex matching of diffs 2527 running abcasm/branchtocommon.abs 2530 running abcasm/arithmetic.abs 2529 running abcasm/bkpt.abs 2528 running abcasm/bkptline.abs 2526 running abcasm/bug_476556.abs 2524 running abcasm/bug_491056.abs ...
modDateChanged - Archive of obsolete content
example filesource1 = getfolder("program", "file1.txt"); filesource2 = getfolder("program", "file2.txt"); err1 = file.moddate(filesource1); // the baseline returned err2 = file.moddatechanged(filesource1, err1); logcomment("file.moddatechanged should return 'false' = " + err2); // the reason it expects false is we're comparing // the return 'time stamp' value for // file1.txt with the actual file1.txt itself.
... err3 = file.moddatechanged(filesource2, err1); logcomment("file.moddatechanged should return 'true' = " + err2); // the reason it expects true is we're comparing // the return 'time stamp' value for // file1.txt with another file, file2.txt, with a different // 'time stamp' value.
Introduction to XUL - Archive of obsolete content
for this reason, we've defined a mime type "text/xul" mapped to files with the extension ".xul".
... internationalization for practical reasons, the locale-specific attributes of a ui description would be most happily developed (and possibly distributed) in separate files, where localization can be performed by altering only a subset of the ui description devoted expressly to localization issues.
The Joy of XUL - Archive of obsolete content
also described are some reasons application developers might choose to leverage xul and mozilla technology for building cross-platform applications.
...for this reason, xul is oriented toward application artifacts such as windows, labels, and buttons instead of pages, heading levels, and hypertext links.
Adding HTML Elements - Archive of obsolete content
(there are some reasons, and the main one concerns the control of the layout described later).
...invalid html elements <html:po>case 1</html:po> <div>case 2</div> <html:description value="case 3"/> all three of the cases above will not display, each for a different reason.
Simple Menu Bars - Archive of obsolete content
for that reason, you should specify a character that exists in the text (although the key will still work if it doesn't).
...for that reason, you should specify a character that exists in the text.
XUL Structure - Archive of obsolete content
http://localhost/~username/ ), regardless of whether they are html or xul or another document type, are limited in the type of operations they can perform, for security reasons.
... for this reason, mozilla provides a method of installing content locally and registering the installed files as part of its chrome system.
XUL accessibility guidelines - Archive of obsolete content
in all other dialogs, focus should just start on the first control (although it can be on any other control if there is a good reason for, just not on the dialog itself).
...respect these defaults unless you have a specific and unavoidable reason to change them.
Mozilla release FAQ - Archive of obsolete content
beyond technical reasons, the operating system market is currently glutted, and a new entry would be unlikely to attract enough users to ensure the writing of drivers for a new system, a critical mass point.
...for these reasons, this is generally considered a bad idea.
NPN_DestroyStream - Archive of obsolete content
syntax #include <npapi.h> nperror npn_destroystream(npp instance, npstream* stream, nperror reason); parameters the function has the following parameters: instance pointer to current plug-in instance.
... reason reason the stream was stopped so the application can give the user appropriate feedback.
NPP_DestroyStream - Archive of obsolete content
syntax #include <npapi.h> nperror npp_destroystream(npp instance, npstream* stream, npreason reason); parameters the function has the following parameters: instance pointer to current plug-in instance.
... reason reason the stream was destroyed.
Introduction to SSL - Archive of obsolete content
if the client doesn't get to step 5 for any reason, the server identified by the certificate cannot be authenticated, and the user will be warned of the problem and informed that an encrypted and authenticated connection cannot be established.
...if the server doesn't get to step 6 for any reason, the user identified by the certificate cannot be authenticated, and the user is not allowed to access any server resources that require authentication.
Vulnerabilities - Archive of obsolete content
the arp protocol was standardized over 25 years ago, and threats have changed a great deal since then, so the trust assumptions inherent in its design then are unlikely to still be reasonable today.
...security configuration issues are also unavoidable for two reasons.
Styling the Amazing Netscape Fish Cam Page - Archive of obsolete content
the reason for the class value being card is that the original idea was to style each fish's description like a trading card.
...it just seemed like a fish cam page should have a lot of floating for some reason.
Reference - Archive of obsolete content
the reason object instanceof function evaluates to true is because object can be used as a constructor function.
...sevenspade 22:34, 26 february 2007 (pst) since it doesn't look like the reorganization is going to happen in the very near future, is there any reason i shouldn't take care of this now?
Mozilla XForms Specials - Archive of obsolete content
for security reasons, it is not per default possible for an xforms to submit data to another domain.
... this is due to security reasons.
Choosing Standards Compliance Over Proprietary Practices - Archive of obsolete content
sure, there are other reasons -– accountability, checkpoints, and scheduling, for example.
...the reason it is consistent and predictable is because microsoft has established a corporate set of usability standards and supports the relevant international standards.
RDF in Mozilla FAQ - Archive of obsolete content
a datasource is a subgraph (or collection of statements, depending on your viewpoint) that are for some reason collected together.
... for this reason, there is an observer interface that allows you to spy on a datasource's progress.
Common causes of memory leaks in extensions - Extensions
the following example shows how to unload your modules again (bootstrap.js): components.utils.import("resource://gre/modules/services.jsm"); function startup(data, reason) { // this assumes your add-on did register some chrome components.utils.import("chrome://myaddon/content/mymodule.jsm"); } function shutdown(data, reason) { // no need to do regular clean up when the application is closed // unless you need to break circular references that might negatively // impact the shutdown process.
... if (reason == app_shutdown) return; // your add-on needs to unload all modules it ships and imported!
Audio for Web games - Game development
to prime audio like this we want to play a part of it; for this reason it is useful to include a moment of silence at the end of your audio sample.
...the reason often given is that the user should be in control of the volume at the os level and this shouldn't be overridden.
Implementing controls using the Gamepad API - Game development
(we could use the gamepad.connected boolean for this purpose, but we wanted to have a separate variable for turning on turbo mode without needing to have a gamepad connected, for reasons explained above.) disconnect: function(evt) { gamepadapi.turbo = false; delete gamepadapi.controller; console.log('gamepad disconnected.'); }, the disconnect function sets the gamepad.turbo property to false and removes the variable containing the gamepad object.
...for this reason, it can be good to set a threshold for the value of the axis to take effect.
Efficient animation for web games - Game development
the reason for this is that css transitions/animations are much higher level than javascript, and express a very specific intent.
...one of the goals for the puzzowl game is for it to be a solid 60fps on reasonable hardware (for the record, it’s almost there on galaxy nexus-class hardware) while still being playable on low-end devices (such as a firefox os geeksphone keon).
Polyfill - MDN Web Docs Glossary: Definitions of Web-related terms
the reason why polyfills are not used exclusively is for better functionality and better performance.
...although this reason for polyfilling is very rare today, it was especially prevalent back in the days of ie6, netscape, and nnav where each browser implemented javascript very differently.
HTML: A good basis for accessibility - Learn web development
the following seems like a reasonable enough example: fill in your name: <input type="text" id="name" name="name"> however, this is not so useful for disabled users.
... the reason to use an empty alt instead of not including it is because many screen readers announce the whole image url if no alt is provided.
HTML: A good basis for accessibility - Learn web development
the following seems like a reasonable enough example: fill in your name: <input type="text" id="name" name="name"> however, this is not so useful for disabled users.
... the reason to use an empty alt instead of not including it is because many screen readers announce the whole image url if no alt is provided.
What is accessibility? - Learn web development
on the other hand, if you are working on a gallery website showing interesting 3d art, it would be unreasonable to expect every piece of art to be perfectly accessible to visually impaired people, given that it is an entirely visual medium.
...if someone does complain that your site has an accessibility problem, start a dialog with them, be empathic, and take reasonable steps to try to fix the problem.
A cool-looking box - Learn web development
styling the box we'd like you to style the provided <p>, giving it the following: a reasonable width for a large button, say around 200 pixels.
... a reasonable height for a large button, centering the text vertically in the process.
Organizing your CSS - Learn web development
what you should comment are the things where you made a particular decision for a reason.
... defining variables css now has native custom properties, making this feature increasingly less important, however one of the reasons you might use sass is to be able to define all of the colors and fonts used in a project as settings, then use that variable around the project.
Styling links - Learn web development
cursor for the mouse pointer style — you shouldn't turn this off unless you've got a very good reason.
...the reason for this is that if we used real links, you would be able to load an external site in the <iframe> the live example is embedded in, thereby losing the example.
How much does it cost to do something on the Web? - Learn web development
isp access make sure that you have sufficient bandwidth: low-bandwidth access may be adequate to support a 'simple' website: reasonably-sized images, texts, some css and javascript.
...for example, your provider may have a plan that includes up to several thousand visitors per day, for “reasonable” bandwidth usage.
Client-side form validation - Learn web development
prerequisites: computer literacy, a reasonable understanding of html, css, and javascript.
...there are three main reasons: we want to get the right data, in the right format.
How to build custom form controls - Learn web development
as seen previously, we already use a native select control as a fallback for accessibility reasons; we can simply synchronize its value with that of our custom control: // this function updates the displayed value and synchronizes it with the native control.
...for this reason, you can not have the screen reader focus on an off-screen element.
JavaScript basics - Learn web development
you should see something like this: note: the reason the instructions (above) place the <script> element near the bottom of the html file is that the browser reads code in the order it appears in the file.
...you should end up with a title that reads mozilla is cool, for fairly obvious reasons.
Tips for authoring fast-loading HTML pages - Learn web development
for this reason, height and width should be specified for images, whenever possible.
... choose your user-agent requirements wisely to achieve the greatest improvements in page design, make sure that reasonable user-agent requirements are specified for projects.
Making asynchronous programming easier with async and await - Learn web development
prerequisites: basic computer literacy, a reasonable understanding of javascript fundamentals, an understanding of async code in general and promises.
...status: ${response.status}`); } else { return response.blob(); } }) .then(myblob => { let objecturl = url.createobjecturl(myblob); let image = document.createelement('img'); image.src = objecturl; document.body.appendchild(image); }) .catch(e => { console.log('there has been a problem with your fetch operation: ' + e.message); }); by now, you should have a reasonable understanding of promises and how they work, but let's convert this to use async/await to see how much simpler it makes things: async function myfetch() { let response = await fetch('coffee.jpg'); if (!response.ok) { throw new error(`http error!
Manipulating documents - Learn web development
you might think that such limitations are a bad thing, but browsers are locked down for good reasons, mostly centering around security.
... active learning: getting useful information from the window object so far we've only really looked at using node and document features to manipulate documents, but there is no reason why you can't get data from other sources and use it in your ui.
Third-party APIs - Learn web development
we did create an example to show how to use it, but in the end we went with mapquest for a couple of reasons: it is much easier to get started with.
... get a developer key most apis require you to use some kind of developer key, for reasons of security and accountability.
Video and Audio APIs - Learn web development
this is so that, if the javascript doesn't load for some reason, users can still use the video with the native controls.
... icon fonts are very cool for many reasons — cutting down on http requests because you don't need to download those icons as image files, great scalability, and the fact that you can use text properties to style them — like color and text-shadow.
Aprender y obtener ayuda - Learn web development
this is also a reasonable approach, and some learning sites tend to favor it.
... the following are not quite as reasonable: i want to go from a complete beginner to becoming a senior web developer in three months.
Routing in Ember - Learn web development
typically, when writing web applications, you want the page to be represented by the url so that if (for any reason), the page needs to refresh, the user isn't surprised by the state of the web app — they can link directly to significant views of the app.
...the reason for this is that we want the template to have a dynamic reference to the todo list, and if we returned the list directly, the data would never re-compute, which would result in the navigations appearing to fail / not actually filter.
Getting started with React - Learn web development
suppose we wanted to wrap our heading in a <header> tag, for semantic reasons?
...a few other html attributes are written differently in jsx than they are in html too, for the same kind of reason.
Componentizing our Svelte app - Learn web development
it will help you understand how they relate to each other, it will promote reuse, and it will make your code easier to reason about, maintain, and extend.
...this pattern establishes a two-way flow of information, which is predictable and easier to reason about.
Working with Svelte stores - Learn web development
having a unique place to handle state modifications makes it easier to reason about the state flow and spot issues.
...for security reasons the svelte repl works in a sandboxed environment which will not let you access web torage, and you will get a "the operation is insecure" error.
Introduction to cross browser testing - Learn web development
there are many different reasons why cross browser issues occur, and note that here we are talking about issues where things behave different across different browsers / devices / browsing preferences.
... and more reasons besides.
Strategies for carrying out testing - Learn web development
you'll probably want something like the following, for a reasonable low-level device lab: a mac, with the browsers installed that you need to test — this can include firefox, chrome, opera, and safari.
...if you want something a bit more lightweight, andy is a reasonable option that runs on both windows and mac.
Setting up your own test automation environment - Learn web development
ceholders in the code with your actual user name and access key values): driver.sleep(2000).then(function() { driver.gettitle().then(function(title) { if(title === 'webdriver - google search') { console.log('test passed'); request({uri: "https://your-user-name:your-access-key@www.browserstack.com/automate/sessions/" + sessionid + ".json", method:"put", form:{"status":"passed","reason":"google results showed correct title"}}); } else { console.log('test failed'); request({uri: "https://your-user-name:your-access-key@www.browserstack.com/automate/sessions/" + sessionid + ".json", method:"put", form:{"status":"failed","reason":"google results showed wrong title"}}); } }); }); these are fairly intuitive — once the test completes, we send an api call to...
... browserstack to update the test with a passed or failed status, and a reason for the result.
Client-side tooling overview - Learn web development
although it is still entirely reasonable to write html, css, and javascript "by hand" there is now a wealth of tools that developers can use to speed up the process of building a web site, or app.
...this is one reason we wrote this series of articles, to hopefully provide that first step that is hard to find otherwise.
Mozilla accessibility architecture
the reason that the doc accessible is not created directly in the widget code where it's needed is that the widget code has no knowledge what nsidomnode is associated with the current window's document object.
...common reasons for these mutations are web page scripts, and user actions in the editor.
Gecko info for Windows accessibility vendors
we do not currently support role_system_row, although internet explorer doesn't either, and the reason seems apparent.
... the accname is also reflected in the accname of a form control that this labels, which is a good reason to check navrelation_label_for.
Accessible Toolkit Checklist
this is one reason why a label must be created together with each widget, rather than separately.
...ark border when link is focused) msaa support, including linked and traversed states, and accessible value that holds destination url text fields - single and multiple line it's probably best to use native widgets for these, otherwise accessibility support will be quite difficult tab should always focus the next item, not insert a tab, unless there's a really good reason and another way to navigate always use system selection color, otherwise screen reader won't read the text make sure the caret is never blinking when focus is not in text field handle standard editing keys, such as arrow keys, home, end, pageup, pagedown, ctrl+left/right, shifted keys for selection, delete, ctrl+delete, backspace, ctrl+backspace, ctrl+a, ctrl+b, ctrl+c, ctrl+i, ...
Creating reftest-based unit tests
this is probably going to be a more fragile test, for the reasons described above.
... the reason for using the 'mozreftestinvalidate' event is because a document's initial painting is not typically finished when the 'load' event fires.
Debugging Frame Reflow
it provides the following information for each frame at the start of its reflow reflow reason available width, available height computed width, computed height the previous and the next frame in flow and a count number.
...other reflow reasons are: incremental reflow resize reflow style change reflow dirty reflow the available width is 9180 twips.
Cross Process Object Wrappers
for this reason, it’s best not to mix cpows with normal message manager messages.
... safe and unsafe cpows the main reason cpows can be bad for responsiveness is that they make the chrome process block on the content process.
Gecko SDK
that's the reason why the gecko sdk was devised.
... issues with the os x sdk if you need to use the xpidl utility to compile idl files on os x, it's likely that you will receive a strange error when running the tool that looks something along the lines of this: dyld: library not loaded: /opt/local/lib/libintl.3.dylib referenced from: /users/varmaa/xulrunner-sdk/bin/./xpidl reason: image not found trace/bpt trap unfortunately, this is caused by a problem with the sdk build process which cannot currently be resolved (see bugzilla bug #430274).
Addon
overview of required methods void iscompatiblewith(in string appversion, in string platformversion) void findupdates(in updatelistener listener, in integer reason, in string appversion, in string platformversion) overview of optional methods void uninstall() void canceluninstall() boolean hasresource(in string path) nsiuri getresourceuri(in string path) void getdatadirectory(in datadirectorycallback callback) required properties attribute type description appdisabled read...
... void findupdates( in updatelistener listener, in integer reason, in string appversion, in string platformversion ) parameters listener an updatelistener for the update process reason a reason code for performing the update appversion an application version to check for updates for platformversion a platform version to check for updates for optional methods uninstall() uninstalls this add-on.
Following the Android Toasts Tutorial from a JNI Perspective
this is the template that will follow our object of signatures: var my_jenv = null; try { my_jenv = jni.getforthread(); // do the jni work here } finally { if (my_jenv) { jni.unloadclasses(my_jenv); } } the reason we choose my_jenv for a variable name, and not jenv, is because the global privileged window scope of firefox for android has a variable jenv already, and we don't want to mix.
...the reason is that methods accept arguments and return something.
PromiseWorker.jsm
t { utils: cu } = components; const { basepromiseworker } = cu.import('resource://gre/modules/promiseworker.jsm', {}); var myworker = new basepromiseworker('chrome://path/to/content/myworker.js'); var promise_domyfunctrue = myworker.post('resolvetest', [true]); promise_domyfunctrue.then( function(aval) { console.log('fullfilled - promise_domyfunctrue - ', aval); }, function(areason) { console.error('rejected - promise_domyfunctrue - ', areason); } ).catch( function(acaught) { console.error('caught - promise_domyfunctrue - ', acaught); } ); var promise_domyfuncfalse = myworker.post('resolvetest', [false]); promise_domyfuncfalse.then( function(aval) { console.log('fullfilled - promise_domyfuncfalse - ', aval); }, function(areas...
...on) { console.error('rejected - promise_domyfuncfalse - ', areason); } ).catch( function(acaught) { console.error('caught - promise_domyfuncfalse - ', acaught); } ); result running the code above will log the following information to the console: "fullfilled - promise_domyfunctrue - " "you sent to promiseworker argument of: `true`" bootstrap.js line 8 "rejected - promise_domyfuncfalse - " "you passed in a non-true value for shouldresolve argument and therefore this will reject the main thread promise" bootstrap.js line 25 other examples github :: promiseworker with backward compatability - this example is of a firefox addon that copies and pastes in the contents of promiseworker.js and pro...
Task.jsm
if the promise is rejected, its rejection reason is thrown as an exception.
...if the reason for the exception is that the file doesn't exist, this is treated as an expected condition, and the task will complete succesfully.
Application Translation with Mercurial
for this reason, updating patches kann be necessary so mercurial is still able to find the lines in the files which it has to replace or where it has to add them.
...this detects often more than 90 percent of the possible reasons for the reviewer to not accept the patch.
Fonts for Mozilla 2.0's MathML engine
they contain support for many mathematical characters, and mozilla will display some mathml reasonably on systems with these fonts installed, even without stix fonts.
...the font has good support for mathematical characters, and so, with any of these products installed, mozilla will be able to display some mathml reasonably even without stix fonts.
Mozilla Port Blocking
"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.
...you must have a good reason for the change, a deep understanding of the security risk involved and be able to justify it.
L20n Javascript API
the callback function is passed an l10n object with the following properties: entities: an object whose keys are the identifiers and value are the entity objects as returned by getentitysync, reason: an object with the reason why callback was invoked.
... the reason object can be: { locales: array<string> } if callback was invoked because of a change of the current locale (see requestlocales), { global: string } if callback was invoked because the value of one of the globals used in the translation of ids has changed.
NSPR Contributor Guide
we reject contributions for a variety of reasons.
... some of these reasons are not obvious to an outside observer.
PR_NOT_REACHED
syntax #include <prlog.h> void pr_not_reached(const char *_reasonstr); parameters the macro has this parameter: reasonstr a string that describes why you should not have reached this statement.
... returns nothing description this macro writes the specified reason string to the log and terminates the application.
Index
* add revocation reason code extension: the reasoncode is a non-critical crl entry extension that identifies the reason for the certificate revocation.
... reasoncode non-critical code where: reasoncode: identifies the name of an extension non-critical: should be set to 0 since this is non-critical extension code: the following codes are available: unspecified (0), keycompromise (1), cacompromise (2), affiliationchanged (3), superseded (4), cessationofoperation (5), certificatehold (6), removefromcrl (8), privilegewithdrawn (9), aacompromise (10) * add invalidity date extension: the invalidity date is a non-critical crl entry extension that provides the date on which it is known or suspected that the private key was compromised or that the certificate otherwise became invalid.
NSS API Guidelines
there seem to be three reasonable options: enum members have the same standard as exposed data structure members.
...unfortunately, there are good reasons to maintain all these types.
nss tech note1
for this reason, i will first describe all the common functionality of the two decoders, before outlining their differences.
...see bug 175163 for more information about the reason for this recommendation.
nss tech note6
if your application modifies nss binaries for any reason after they were built, then : the fips 140 mode of operation will no longer work, because the chk files will no longer match the softoken and freebl shared libraries .
... if your build process modifies nss libraries in any way (for example, to strip the symbols), it should consider not doing so for the reasons cited above.
NSS functions
6 and later cert_encodepolicyconstraintsextension mxr 3.12 and later cert_encodepolicymappingextension mxr 3.12 and later cert_encodesubjectkeyid mxr 3.12 and later cert_encodeusernotice mxr 3.12 and later cert_extractpublickey mxr 3.2 and later cert_findcertbyname mxr 3.2 and later cert_findcrlentryreasonexten mxr 3.12 and later cert_findcrlnumberexten mxr 3.12 and later cert_findnameconstraintsexten mxr 3.12 and later cert_filtercertlistbycanames mxr 3.4 and later cert_filtercertlistbyusage mxr 3.4 and later cert_filtercertlistforusercerts mxr 3.6 and later cert_findcertbydercert mxr 3.2 and later ...
...mxr 3.2 and later pk11_getblocksize mxr 3.2 and later pk11_getcertfromprivatekey mxr 3.9.3 and later pk11_getcurrentwrapindex mxr 3.2 and later pk11_getdefaultarray mxr 3.8 and later pk11_getdefaultflags mxr 3.8 and later pk11_getdisabledreason mxr 3.8 and later pk11_getfirstsafe mxr 3.2 and later pk11_getinternalkeyslot mxr 3.2 and later pk11_getinternalslot mxr 3.2 and later pk11_getkeygen mxr 3.4 and later pk11_getkeylength mxr 3.2 and later pk11_getkeystrength m...
NSS tools : crlutil
* add revocation reason code extension: the reasoncode is a non-critical crl entry extension that identifies the reason for the certificate revocation.
... reasoncode non-critical code where: reasoncode: identifies the name of an extension non-critical: should be set to 0 since this is non-critical extension code: the following codes are available: unspecified (0), keycompromise (1), cacompromise (2), affiliationchanged (3), superseded (4), cessationofoperation (5), certificatehold (6), removefromcrl (8), privilegewithdrawn (9), aacompromise (10) * add invalidity date extension: the invalidity date is a non-critical crl entry extension that provides the date on which it is known or suspected that the private key was compromised or that the certificate otherwise became invalid.
NSS Tools crlutil
add revocation reason code extension: the reasoncode is a non-critical crl entry extension that identifies the reason for the certificate revocation.
... reasoncode non-critical code where: reasoncode: identifies the name of an extension non-critical: should be set to 0 since this is non-critical extension code: the following codes are available: unspecified (0), keycompromise (1), cacompromise (2), affiliationchanged (3), superseded (4), cessationofoperation (5), certificatehold (6), removefromcrl (8), privilegewithdrawn (9), aacompromise (10) add invalidity date extension: the invalidity date is a non-critical crl entry extension that provides the date on which it is known or suspected that the private key was compromised or that the certificate otherwise became invalid.
NSS tools : crlutil
MozillaProjectsNSStoolscrlutil
* add revocation reason code extension: the reasoncode is a non-critical crl entry extension that identifies the reason for the certificate revocation.
... reasoncode non-critical code where: reasoncode: identifies the name of an extension non-critical: should be set to 0 since this is non-critical extension code: the following codes are available: unspecified (0), keycompromise (1), cacompromise (2), affiliationchanged (3), superseded (4), cessationofoperation (5), certificatehold (6), removefromcrl (8), privilegewithdrawn (9), aacompromise (10) * add invalidity date extension: the invalidity date is a non-critical crl entry extension that provides the date on which it is known or suspected that the private key was compromised or that the certificate otherwise became invalid.
Scripting Java
the reason is that javascript has its own top-level objects boolean, math, number, object, and string that are different from the classes by those names defined in the java.lang package.
...for these reasons there is a javaadapter constructor.
GCIntegration - SpiderMonkey Redirect 1
if, in the middle of an incremental gc, a pointer to an object x is destroyed (meaning overwritten or no longer traced for some reason), then x will be marked.
... to understand the problem more, let's consider some reasons why barriers are not needed in common areas of firefox: if a pointer is never changed after it's initialized, then there's no need for a write barrier.
GC Rooting Guide
there are some situations when using js::rooted<t> is not possible, or is undesirable for performance reasons.
... use js::persistentrooted<t> for things that are alive until the process exits (or until you manually delete the persistentrooted for a reason not based on gc finalization.) ...
Exact Stack Rooting
for this reason it is highly recommended that this rooting mechanism only be used on the cstack.
...there is basically never a good reason to do any of these.
Statistics API
nonincremental_reason: string - a string representing the reason that an incremental gc was aborted or forced to finish in a single slice.
... reason: string - a string describing the api that initiated this gc slice.
JSAPI User Guide
creating an object from a script one reason to create a custom js object from a script is when you only need an object to exist as long as the script that uses it is executing.
...it is easy to implement, easy to reason about, and fast.
Web Replay
this requires using the same build of firefox and a reasonably similar version of the operating system; otherwise the tab will probably crash.
... this feature has had little testing or polishing and there is not yet a good definition of 'reasonably similar'.
History Service Design
for this reason visits and favicons are added lazily on a timer.
... expiration expiration is an important part of data management for two reasons: privacy: expiring data based on user interaction is important, nothing must be left behind on a page removal database maintenance: having cleaner and smaller tables helps queries performances expiration is done at certain moments, but in future will most likely be moved to async queries, to be executed on a separate thread.
Using XPCOM Utilities to Make Things Easier
if for some reason you need to adjust the reference count, you must assign the nscomptr to a new variable and addref that.
...if queryinterface fails, localfile will be null, and rv will be set to a specific error code corresponding to the reason for the failure.
mozIVisitInfoCallback
void handleerror( in nsresult aresultcode, in moziplaceinfo aplaceinfo ); parameters aresultcode nsresult indicating the reason why the change failed.
...void oncomplete( in nsresult aresultcode, in moziplaceinfo aplaceinfo ); parameters aresultcode nsresult of the change indicating success or failure reason.
nsIAsyncOutputStream
method overview void asyncwait(in nsioutputstreamcallback acallback, in unsigned long aflags, in unsigned long arequestedcount, in nsieventtarget aeventtarget); void closewithstatus(in nsresult reason); constants constant value description wait_closure_only (1<<0) if passed to asyncwait(), this flag overrides the default behavior, causing the onoutputstreamready notification to be suppressed until the stream becomes closed (either as a result of closewithstatus()/close being called on the stream or possibly due to some error in the underlying stream).
...void closewithstatus( in nsresult reason ); parameters reason the error that will be reported if this stream is accessed after it has been closed.
nsICancelable
1.0 66 introduced gecko 1.8 inherits from: nsisupports last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) method overview void cancel(in nsresult areason); methods cancel() call this method to request that this object abort whatever operation it may be performing.
... void cancel( in nsresult areason ); parameters areason a failure code indicating why the operation is being canceled.
nsIContentPrefCallback2
dom/interfaces/base/nsicontentprefservice2.idlscriptable callback used by nsicontentprefservice2 methods 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) method overview void handlecompletion(in unsigned short reason); void handleerror(in nsresult error); void handleresult(in nsicontentpref pref); constants constant value description complete_ok 0 complete_error 1 methods handlecompletion() called when the method finishes.
...void handlecompletion( in unsigned short reason ); parameters reason one of the complete_* values indicating the manner in which the method completed.
nsILocalFile
for security reasons, this cannot contain '..' or cannot start with a directory separator '/'.
...for security reasons, this cannot contain '..' or cannot start with a directory separator '/' .
nsIRadioInterfaceLayer
ance, use: var radiointerfacelayer = components.classes["@mozilla.org/telephony/system-worker-manager;1"] .getservice(components.interfaces.nsiinterfacerequestor) .createinstance(components.interfaces.nsiradiointerfacelayer); method overview void answercall(in unsigned long callindex); void deactivatedatacall(in domstring cid, in domstring reason); void dial(in domstring number); void enumeratecalls(in nsiriltelephonycallback callback); void getdatacalllist(); unsigned short getnumberofmessagesfortext(in domstring text); void hangup(in unsigned long callindex); void registercallback(in nsiriltelephonycallback callback); void registerdatacallcallback(in nsirildatacallback callback); void rejectcall(in unsigned long callinde...
...acall_state_connected 2 datacall_state_disconnecting 3 datacall_state_disconnected 4 call_state_ringing 2 obsolete since gecko 14.0 methods answercall() void answercall( in unsigned long callindex ); parameters callindex missing description exceptions thrown missing exception missing description deactivatedatacall() void deactivatedatacall( in domstring cid, in domstring reason ); parameters cid missing description reason missing description exceptions thrown missing exception missing description dial() functionality for making and managing phone calls.
nsIRequest
it is not recommended for normal browsing as it may likely violate reasonable assumptions made by the server and confuse users.
... void cancel( in nsresult astatus ); parameters astatus the reason for canceling this request.
nsIServerSocketListener
onstoplistening() this method is called when the listening socket stops for some reason.
... astatus the reason why the server socket stopped listening.
nsITransport
method overview void close(in nsresult areason); nsiinputstream openinputstream(in unsigned long aflags, in unsigned long asegmentsize, in unsigned long asegmentcount); nsioutputstream openoutputstream(in unsigned long aflags, in unsigned long asegmentsize, in unsigned long asegmentcount); void seteventsink(in nsitransporteventsink asink, in nsieventtarget aeventtarget); constants open flags.
...void close( in nsresult areason ); parameters areason the reason for closing the stream.
Storage
otherwise, it's strongly recommended that you use asynchronous execution, for performance reasons.
...something like this to execute a statement asynchronously: statement.executeasync({ handleresult: function(aresultset) { for (let row = aresultset.getnextrow(); row; row = aresultset.getnextrow()) { let value = row.getresultbyname("column_name"); } }, handleerror: function(aerror) { print("error: " + aerror.message); }, handlecompletion: function(areason) { if (areason != components.interfaces.mozistoragestatementcallback.reason_finished) print("query canceled or aborted!"); } }); the call to executeasync takes an object that implements mozistoragestatementcallback.
Troubleshooting XPCOM components registration
there are several common reasons that registration can fail: a component that is a binary (shared library) fails to load a javascript component has parsing errors the shared library loaded correctly, but registration was not successful did registration succeed?
...see xpcom changes in gecko 2.0 parsing errors in javascript components the most common reason for components written in javascript to fail is that there are parsing errors.
Using the clipboard
one reason is that some systems do not copy the data right away.
...another reason is that the transferable can hold multiple representations of the same data.
Weak reference
if ( weakfooptr ) status = weakfooptr->somefoomethod(...); this is a reasonable thing to want.
...it seems reasonable to want to simply queryinterface between the two.
Index
the reason this file name scheme was chosen was is this is how netscape 7.0 im stores buddy icons on disk.
...things appear confusing for several reasons: 45 message interfaces interfaces, interfaces:scriptable, needscontent, xpcom api reference, thunderbird nsimsghdr - this interface describes headers for all mail messages.
Working with data
making non-null terminated strings if for some reason non-null terminated strings are needed, this can also be accomplished.
...for that reason, 64-bit and pointer-sized c values of numeric types don't get automatically converted to javascript numbers.
ctypes.open
function startup(adata, areason) { var nsifile_folder = adata.installpath; // if addon is unpacked, this will be the addon folder.
... if addon is packed, this will be addon xpi } this can then be joined with your file name to obtain it's path like this: function startup(adata, areason) { var jarpath_folder = 'jar:' + os.path.tofileuri(adata.installpath.path) + '!/'; // if unpacked is false in install.rdf this will look like: "jar:file:///c:/users/vayeate/appdata/roaming/mozilla/firefox/profiles/aksozfjt.unnamed%20profile%2010/extensions/asynczip@jetpack!/" var filepath_folder = adata.installpath.path; // if unpacked is set to false in install.rdf this will look like: "c:\users\vayeate\appdata\roaming\mozilla\firefox\profiles\aksozfjt.unnamed profile 10\extensions\asynczip@jetpack" var filepath_mylib = os.path.join(filepath_folder, 'mysubfolder', 'mycfunctionsforunix.so'); var jarpath_mylib = jarpath_folder...
Debugger.Memory - Firefox Developer Tools
reason a very short string describing the reason why the collection was triggered.
...ils” “component_utils” “mem_pressure” “cc_waiting” “cc_forced” “load_end” “page_hide” “nsjscontext_destroy” “set_new_document” “set_doc_shell” “dom_utils” “dom_ipc” “dom_worker” “inter_slice_gc” “refresh_frame” “full_gc_timer” “shutdown_cc” “user_inactive” nonincrementalreason if spidermonkey’s collector determined it could not incrementally collect garbage, and had to do a full gc all at once, this is a short string describing the reason it determined the full gc was necessary.
AbstractRange - Web APIs
there are a few good reasons for that.
...by defining points within the document as offsets within a given node, those positions remain consistent with the content even as nodes are added to, removed from, or moved around within the dom tree—within reason.
Comparison of Event Targets - Web APIs
event.explicitoriginaltarget event.webidl if the event was retargeted for some reason other than an anonymous boundary crossing, this will be set to the target before the retargeting occurs.
...nal target dispatching the event <small>event.target</small></td> <td class="standard">target who's event listener is being processed <small>event.currenttarget</small></td> <td class="standard">identify other element (if any) involved in the event <small>event.relatedtarget</small></td> <td class="non-standard">if there was a retargetting of the event for some reason <small> event.explicitoriginaltarget</small> contains the target before retargetting (never contains anonymous targets)</td> <td class="non-standard">if there was a retargetting of the event for some reason <small> event.originaltarget</small> contains the target before retargetting (may contain anonymous targets)</td> </tr> </thead> <tr> <td id="target"></td> ...
FileEntrySync - Web APIs
invalid_state_err the file is no longer valid for some reason other than it having been deleted.
... invalid_state_err the file is no longer valid for some reason other than it having been deleted.
FileSystemDirectoryEntry.getDirectory() - Web APIs
absolute paths may not be able to be used, for security reasons.
... fileerror.security_err the request to access the directory was denied for security reasons.
FileSystemDirectoryEntry.removeRecursively() - Web APIs
fileerror.security_err the directory could not be removed for security reasons.
... possible reasons include: the directory and/or its contents may not be safe to access from a web application.
FileSystemFlags.create - Web APIs
13prefixed prefixed implemented with the vendor prefix: webkitedge full support ≤79prefixed full support ≤79prefixed prefixed implemented with the vendor prefix: webkitfirefox partial support 50notes partial support 50notes notes for security reasons, firefox does not support creating files.
...fixed prefixed implemented with the vendor prefix: webkitchrome android full support yesprefixed full support yesprefixed prefixed implemented with the vendor prefix: webkitfirefox android partial support 50notes partial support 50notes notes for security reasons, firefox does not support creating files.
FileSystemFlags.exclusive - Web APIs
13prefixed prefixed implemented with the vendor prefix: webkitedge full support ≤79prefixed full support ≤79prefixed prefixed implemented with the vendor prefix: webkitfirefox partial support 50notes partial support 50notes notes for security reasons, firefox does not support creating files.
...fixed prefixed implemented with the vendor prefix: webkitchrome android full support yesprefixed full support yesprefixed prefixed implemented with the vendor prefix: webkitfirefox android partial support 50notes partial support 50notes notes for security reasons, firefox does not support creating files.
FileHandle API - Web APIs
secured write operation for performance reasons, write (and read) operations are done in memory.
...if for some reason a problem occurs before that, you can lose the results of some operations.
FocusEvent.relatedTarget - Web APIs
focus the eventtarget receiving focus the eventtarget losing focus (if any) focusin the eventtarget receiving focus the eventtarget losing focus (if any) focusout the eventtarget losing focus the eventtarget receiving focus (if any) note that many elements can't have focus, which is a common reason for relatedtarget to be null.
... relatedtarget may also be set to null for security reasons, like when tabbing in or out of a page.
HTMLImageElement.alt - Web APIs
perhaps the most important reason to use the alt tag is to support accessibility, as the alt text may be used by screen readers and other assistive technologies to help differently-abled users make full use of your content.
...for compatibility reasons, browsers generally will accept an image without an alt attribute, but you should try to get into the habit of using it.
HTMLMediaElement.play() - Web APIs
failure to begin playback for any reason, such as permission issues, result in the promise being rejected.
... return value a promise which is resolved when playback has been started, or is rejected if for any reason playback cannot be started.
Headers.delete() - Web APIs
WebAPIHeadersdelete
this method throws a typeerror for the following reasons: the value of the name parameter is not the name of an http header.
... for security reasons, some headers can only be controller by the user agent.
IDBDatabaseException - Web APIs
timeout_err 10 a lock for the transaction could not be obtained in a reasonable time.
... unknown_err 1 the operation failed for reasons unrelated to the database itself, and it is not covered by any other error code--for example, a failure due to disk io errors.
IDBTransaction - Web APIs
transaction failures transactions can fail for a fixed number of reasons, all of which (except the user agent crash) will trigger an abort callback: abort due to bad requests, e.g.
... if you must ensure durability for some reason (e.g.
IIRFilterNode - Web APIs
there are several reasons why: biquad filters are typically less sensitive to numeric quirks.
...you may also find this interface useful if you don't need automation, or for other reasons.
KeyboardEvent - Web APIs
oard location identifiers constant value description dom_key_location_standard 0x00 the key described by the event is not identified as being located in a particular area of the keyboard; it is not located on the numeric keypad (unless it's the numlock key), and for keys that are duplicated on the left and right sides of the keyboard, the key is, for whatever reason, not to be associated with that location.
...in the case of ui events, this is important for security reasons, as it prevents scripts from simulating user actions that interact with the browser itself.
MediaTrackSettings - Web APIs
this value is a target value; actual latency may vary to some extent for various reasons.
...if the value can't be determined for any reason, the value will match the vertical sync rate of the device the user agent is running on.
Capabilities, constraints, and settings - Web APIs
} else { let constraints = { width: { min: 640, ideal: 1920, max: 1920 }, height: { min: 400, ideal: 1080 }, aspectratio: 1.777777778, framerate: { max: 30 }, facingmode: { exact: "user" } }; mytrack.applyconstraints(constraints).then(function() => { /* do stuff if constraints applied successfully */ }).catch(function(reason) { /* failed to apply constraints; reason is why */ }); } here, after ensuring that the constrainable properties for which matches must be found are supported (width, height, framerate, and facingmode), we set up constraints which request a width no smaller than 640 and no larger than 1920 (but preferably 1920), a height no smaller than 400 (but ideally 1080), an aspect ratio of 16:9 (1.7...
... function log(msg) { logelement.innerhtml += (msg + "<br>"); } function handleerror(reason) { log("error <code>" + reason.name + "</code> in constraint <code>" + reason.constraint + "</code>: " + reason.message); } result here you can see the complete example in action.
PaymentRequest.show() - Web APIs
for security reasons, the paymentrequest.show() method can't just be initiated at any time.
...other reasons a securityerror may be thrown are at the discretion of the user agent, and may include situations such as too many calls to show() being made in a short time or show() being called while payment requests are blocked by parental controls.
PromiseRejectionEvent - Web APIs
promiserejectionevent.reason read only a value or object indicating why the promise was rejected, as passed to promise.reject().
... window.onunhandledrejection = function(e) { console.log(e.reason); } specifications specification status comment html living standardthe definition of 'promiserejectionevent' in that specification.
RTCOutboundRtpStreamStats - Web APIs
qualitylimitationdurations a record mapping each of the quality limitation reasons in the rtcremoteinboundrtpstreamstats enumeration to a floating-point value indicating the number of seconds the stream has spent with its quality limited for that reason.
... qualitylimitationreason a value from the rtcqualitylimitationreason enumerated type explaining why the resolution and/or frame rate is being limited for this rtp stream.
RTCPeerConnection.addIceCandidate() - Web APIs
operationerror this can happen for a number of reasons: the value specified for sdpmid is non-null and doesn't match the media description id of any media description included within the remotedescription.
... attempting to add the candidate fails for any reason.
RTCPeerConnection.createOffer() - Web APIs
operationerror examining the state of the system to determine resource availability in order to generate the offer failed for some reason.
... mypeerconnection.createoffer().then(function(offer) { return mypeerconnection.setlocaldescription(offer); }) .then(function() { sendtoserver({ name: myusername, target: targetusername, type: "video-offer", sdp: mypeerconnection.localdescription }); }) .catch(function(reason) { // an error occurred, so handle the failure to connect }); in this code, the offer is created, and once successful, the local end of the rtcpeerconnection is configured to match by passing the offer (which is represented using an object conforming to rtcsessiondescriptioninit) into setlocaldescription().
Using the Screen Capture API - Web APIs
this is done for security reasons, as the content that cannot be seen by the user may contain data which they do not want to share.
... note: for privacy and security reasons, screen sharing sources are not enumerable using enumeratedevices().
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.
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.
Storage API - Web APIs
the "persistent-storage" feature's permission-related flags, algorithms, and types are all set to the standard defaults for a permission, except that the permission state must be the same across the entire origin, and that if the permission state isn't "granted" (meaning that for whatever reason, access to the persistent storage feature was denied), the origin's site storage unit's box mode is always "best-effort".
...both of these values are estimates; there are several reasons why they're not precise: user agents are encouraged to obscure the exact size of the data used by a given origin, to prevent these values from being used for fingerprinting purposes.
Using writable streams - Web APIs
the syntax skeleton looks like this: const stream = new writablestream({ start(controller) { }, write(chunk,controller) { }, close(controller) { }, abort(reason) { } }, { highwatermark, size() }); the constructor takes two objects as parameters.
... abort(reason) — a method that will be called if the app signals that it wishes to abruptly close the stream and put it in an errored state.
SubtleCrypto.encrypt() - Web APIs
operationerror raised when the operation failed for an operation-specific reason (e.g.
...gcm does provide built-in authentication, and for this reason it's often recommended over the other two aes modes.
WebGL model view projection - Web APIs
the reason to flip the z axis is that the clip space coordinate system is a left-handed coordinate system (wherein the z-axis points away from the viewer and into the screen), while the convention in mathematics, physics and 3d modeling, as well as for the view/eye coordinate system in opengl, is to use a right-handed coordinate system (z-axis points out of the screen towards the viewer) .
...this value should be kept reasonably close to the distance of the geometry in order to avoid precision errors creeping in while rendering.
WebSocket.close() - Web APIs
WebAPIWebSocketclose
reason optional a human-readable string explaining why the connection is closing.
... syntax_err the reason string is too long or contains unpaired surrogates.
Writing WebSocket client applications - Web APIs
connection errors if an error occurs while attempting to connect, first a simple event with the name error is sent to the websocket object (thereby invoking its onerror handler), and then the closeevent is sent to the websocket object (thereby invoking its onclose handler) to indicate the reason for the connection's closing.
...we can at least be sure that attempting to send data only takes place once a connection is established by defining an onopen event handler to do the work: examplesocket.onopen = function (event) { examplesocket.send("here's some text that the server is urgently awaiting!"); }; using json to transmit objects one handy thing you can do is use json to send reasonably complex data to the server.
Writing WebSocket servers - Web APIs
websocket servers are often separate and specialized servers (for load-balancing or other practical reasons), so you will often use a reverse proxy (such as a regular http server) to detect websocket handshakes, pre-process them, and send those clients to a real websocket server.
...as usual, it may also give the reason why the handshake failed in the http response body, but the message may never be displayed (browsers do not display it).
Spaces and reference spaces: Spatial tracking in WebXR - Web APIs
converting between webxr session types another common reason you may need to convert positional information from one reference space to another is when it's necessary to change the session type from inline to immersive-vr or back.
... another reason reset may be sent is because the user has exited the bounds of a reference space and entered another reference space, or because the user has been transitioned programmatically from one reference space to another.
Starting up and shutting down a WebXR session - Web APIs
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.
...by calling freeresources() in the end event handler, we call it both when the user clicks a button that triggers a shutdown such as by calling the shutdownxr() function shown above and when the session ends automatically, whether due to an error or some other reason.
Migrating from webkitAudioContext - Web APIs
as the specification evolved and changes were made to the spec, some of the old implementation pieces were not removed from the webkit (and blink) implementations due to backwards compatibility reasons.
... there is no reason why you should need this attribute.
Window.confirm() - Web APIs
WebAPIWindowconfirm
for this reason, you should not overuse any function that creates a dialog box (or modal window).
... regardless, there are good reasons to avoid using dialog boxes for confirmation.
Window: unhandledrejection event - Web APIs
reason the reason that would have been passed into the rejection handler if one had existed.
... window.addeventlistener("unhandledrejection", event => { console.warn(`unhandled promise rejection: ${event.reason}`); }); you can also use the onunhandledrejection event handler property to set up the event listener: window.onunhandledrejection = event => { console.warn(`unhandled promise rejection: ${event.reason}`); }; preventing default handling many environments (such as node.js) report unhandled promise rejections to the console by default.
Window.window - Web APIs
WebAPIWindowwindow
another reason, is that without this property you wouldn't be able to write, for example, "window.open('http://google.com/')".
... yet another reason to use this property, is for libraries which wish to offer oop-versions, and non-oop versions (especially javascript modules).
WindowEventHandlers.onunhandledrejection - Web APIs
examples this example simply logs unhandled rejections' reason values to the console.
... window.onunhandledrejection = function(e) { console.log(e.reason); } specifications specification status comment html living standardthe definition of 'onunhandledrejection' in that specification.
WindowOrWorkerGlobalScope.setInterval() - Web APIs
this syntax is not recommended for the same reasons that make using eval() a security risk.
...note also that the actual amount of time that elapses between calls to the callback may be longer than the given delay; see reasons for delays longer than specified in windoworworkerglobalscope.settimeout() for examples.
WritableStream.WritableStream() - Web APIs
abort(reason) optional this method, also defined by the developer, will be called if the app signals that it wishes to abruptly close the stream and put it in an errored state.
...the reason parameter contains a domstring describing why the stream was aborted.
WritableStream.abort() - Web APIs
syntax var promise = writablestream.abort(reason); parameters reason a domstring providing a human-readable reason for the abort.
... return value a promise, which fulfills with the value given in the reason parameter.
Using XMLHttpRequest - Web APIs
for this reason, here we place a complete (yet didactic) framework, able to use all four ways to submit, and to upload files: <!doctype html> <html> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>sending forms with pure ajax &ndash; mdn</title> <script type="text/javascript"> "use strict"; /*\ |*| |*| :: xmlhttprequest.prototype.sendasbinary() polyfill :: |*| |*| https:...
...for this reason, the ajax-only upload is considered an experimental technique.
XRSystem: requestSession() - Web APIs
this can happen for a number of reasons, which are covered in more detail in permissions and security in webxr device api.
...on.innerhtml = 'enter xr'; immersivebutton.disabled = false; } else { console.log("webxr doesn't support immersive-vr mode!"); } }); } else { console.log("webxr is not available!"); } function onbuttonclicked() { if (!xrsession) { navigator.xr.requestsession('immersive-vr') .then((session) => { xrsession = session; // onsessionstarted() not shown for reasons of brevity and clarity.
Accessibility and Spacial Patterns - Accessibility
math spatial reasoning affects math learning; consequently, spatial relationships in how math is presented affects cognition.
...ee also mdn accessibiltity: what users can do to browse more safely web accessibiltity for seizures and physical reactions web accessibility: understanding colors and luminance braille part 3: a step-by-step guide to typesetting ada braille correctly in adobe illustrator spatial math in brailleblaster (4 of 5) government literature nasa: designing with blue math spatial reasoning: why math talk is about more than numbers scientific literature colour constancy in context: roles for local adaptation and levels of reference gamma oscillations and photosensitive epilepsy characterizing the patterned images that precipitate seizures and optimizing guidelines to prevent them arnold wilkins, john emmett, and graham harding contributers: heartfelt thanks to jim alla...
Implementing a Microsoft Active Accessibility (MSAA) Server - Accessibility
when to use msaa, and when not to it's a common mistake to say that msaa is not worth using, for a number of reasons.
...be patient, and set your expectations to a reasonable level.
Aligning Items in a Flex Container - CSS: Cascading Style Sheets
one of the reasons that flexbox quickly caught the interest of web developers is that it brought proper alignment capabilities to the web for the first time.
... the reason the items become the same height is that the initial value of align-items, the property that controls alignment on the cross axis, is set to stretch.
WebKit CSS extensions - CSS: Cascading Style Sheets
microsoft edge and ie mobile support this property with the -webkit- prefix, rather than -ms- for interopability reasons as well.
... pseudo-elements for web-compatibility reasons, blink, webkit, and gecko browsers treat all pseudo-elements starting with ::-webkit- as valid.
color-adjust - CSS: Cascading Style Sheets
usage notes there are a number of reasons a browser might wish to deviate from the specified appearance, such as: the content uses text and background colors that will be too similar on the output device for legibility purposes.
...for whatever reason, this is the desired appearance in any rendering environment, including on paper, so we also use color-adjust: exact to tell the browser not to make color or style adjustments to the box when rendering it.
Adapting to the new two-value syntax of display - CSS: Cascading Style Sheets
this guide explains the change to the syntax, including the reasoning behind this change.
...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.
Video player styling basics - Developer guides
it is also given a slight rounded corner for aesthetic reasons.
...there is a reason for this!
<i>: The Idiomatic Text element - HTML: Hypertext Markup Language
WebHTMLElementi
the html idiomatic text element (<i>) represents a range of text that is set off from the normal text for some reason, such as idiomatic text, technical terms, taxonomical designations, among others.
... usage notes use the <i> element for text that is set off from the normal prose for readability reasons.
<input type="file"> - HTML: Hypertext Markup Language
WebHTMLElementinputfile
notes you cannot set the value of a file picker from a script — doing something like the following has no effect: const input = document.queryselector("input[type=file]"); input.value = "foo"; when a file is chosen using an <input type="file">, the real path to the source file is not shown in the input's value attribute for obvious security reasons.
...there are some historical reasons for this quirk, but it is supported across all modern browsers, and in fact is defined in the spec.
<input>: The Input (Form Input) element - HTML: Hypertext Markup Language
WebHTMLElementinput
isindex: for historical reasons, the name isindex is not allowed.
...ty object includes: validitystate.valuemissing validitystate.typemismatch validitystate.patternmismatch validitystate.toolong validitystate.tooshort validitystate.rangeunderflow validitystate.rangeoverflow validitystate.stepmismatch validitystate.badinput validitystate.valid validitystate.customerror for each of these boolean properties, a value of true indicates that the specified reason validation may have failed is true, with the exception of the valid property, which is true if the element's value obeys all constraints.
<sub>: The Subscript element - HTML: Hypertext Markup Language
WebHTMLElementsub
the html subscript element (<sub>) specifies inline text which should be displayed as subscript for solely typographical reasons.
... usage notes the <sub> element should be used only for typographical reasons—that is, to change the position of the text to comply with typographical conventions or standards, rather than solely for presentation or appearance purposes.
<sup>: The Superscript element - HTML: Hypertext Markup Language
WebHTMLElementsup
the html superscript element (<sup>) specifies inline text which is to be displayed as superscript for solely typographical reasons.
... usage notes the <sup> element should only be used for typographical reasons—that is, to change the position of the text to comply with typographical conventions or standards, rather than solely for presentation or appearance purposes.
Identifying resources on the Web - HTTP
there are sometimes reasons identity and location are not given by the same uri: http uses a specific http header, alt-svc when the resource requested wants the client to access it at another location.
...increasingly, browsers are removing support for using ftp to load subresources, for security reasons.
MIME types (IANA media types) - HTTP
for historical reasons, the mime sniffing standard (the definition of how browsers should interpret media types and figure out what to do with content that doesn't have a valid one) allows javascript to be served using any mime type that essentially matches any of the following: application/javascript application/ecmascript application/x-ecmascript application/x-javascript text/javascript text/ecmascript ...
...for security reasons, most browsers do not allow setting a custom default action for such resources, forcing the user to save it to disk to use it.
Cross-Origin Resource Sharing (CORS) - HTTP
WebHTTPCORS
for security reasons, browsers restrict cross-origin http requests initiated from scripts.
... cors failures result in errors, but for security reasons, specifics about the error are not available to javascript.
Link prefetching FAQ - HTTP
for this reason, link prefetching may not be appropriate for all content.
...this is one reason why prefetching is enabled by default.
Concurrency model and the event loop - JavaScript
this offers some nice properties when reasoning about your program, including the fact that whenever a function runs, it cannot be pre-empted and will run entirely before any other code runs (and can modify data the function manipulates).
...for this reason, the second argument indicates a minimum time—not a guaranteed time.
Using Promises - JavaScript
in both cases, the event (of type promiserejectionevent) has as members a promise property indicating the promise that was rejected, and a reason property that provides the reason given for the promise to be rejected.
...you can capture these for analysis and handling by your code—or just to avoid having them cluttering up your output—by adding a handler for the unhandledrejection event, like this: window.addeventlistener("unhandledrejection", event => { /* you might start here by adding code to examine the promise specified by event.promise and the reason in event.reason */ event.preventdefault(); }, false); by calling the event's preventdefault() method, you tell the javascript runtime not to do its default action when rejected promises go unhandled.
Inheritance and the prototype chain - JavaScript
while used by popular frameworks such as prototype.js, there is still no good reason for cluttering built-in types with additional non-standard functionality.
... the only good reason for extending a built-in prototype is to backport the features of newer javascript engines, like array.foreach.
Promise.all() - JavaScript
with value "555", so it gets rejected var p3 = promise.all([1,2,3, promise.reject(555)]); // using settimeout we can execute code after the stack is empty settimeout(function() { console.log(p); console.log(p2); console.log(p3); }); // logs // promise { <state>: "fulfilled", <value>: array[3] } // promise { <state>: "fulfilled", <value>: array[4] } // promise { <state>: "rejected", <reason>: 555 } asynchronicity or synchronicity of promise.all this following example demonstrates the asynchronicity (or synchronicity, if the iterable passed is empty) of promise.all: // we are passing as argument an array of promises that are already resolved, // to trigger promise.all as soon as possible var resolvedpromisesarray = [promise.resolve(33), promise.resolve(44)]; var p = promise.all(r...
...lfilled", <value>: array[2] } the same thing happens if promise.all rejects: var mixedpromisesarray = [promise.resolve(33), promise.reject(44)]; var p = promise.all(mixedpromisesarray); console.log(p); settimeout(function() { console.log('the stack is now empty'); console.log(p); }); // logs // promise { <state>: "pending" } // the stack is now empty // promise { <state>: "rejected", <reason>: 44 } but, promise.all resolves synchronously if and only if the iterable passed is empty: var p = promise.all([]); // will be immediately resolved var p2 = promise.all([1337, "hi"]); // non-promise values will be ignored, but the evaluation will be done asynchronously console.log(p); console.log(p2) settimeout(function() { console.log('the stack is now empty'); console.log(p2); }); ...
Promise.prototype.finally() - JavaScript
this use case is for precisely when you do not care about the rejection reason, or the fulfillment value, and so there's no need to provide it.
... note: a throw (or returning a rejected promise) in the finally callback will reject the new promise with the rejection reason specified when calling throw.
Promise.race() - JavaScript
the promise.race() method returns a promise that fulfills or rejects as soon as one of the promises in an iterable fulfills or rejects, with the value or reason from that promise.
...nsole.log(value); // "two" // both fulfill, but p2 is faster }); var p3 = new promise(function(resolve, reject) { settimeout(() => resolve('three'), 100); }); var p4 = new promise(function(resolve, reject) { settimeout(() => reject(new error('four')), 500); }); promise.race([p3, p4]) .then(function(value) { console.log(value); // "three" // p3 is faster, so it fulfills }, function(reason) { // not called }); var p5 = new promise(function(resolve, reject) { settimeout(() => resolve('five'), 500); }); var p6 = new promise(function(resolve, reject) { settimeout(() => reject(new error('six')), 100); }); promise.race([p5, p6]) .then(function(value) { // not called }, function(error) { console.log(error.message); // "six" // p6 is faster, so it rejects }); specifica...
The "codecs" parameter in common media types - Web media technologies
for that reason, the codecs parameter can be added to the mime type describing media content.
...for this reason, you can add the codecs parameter to the media type.
Performance fundamentals - Web Performance
the reason is, once again, hardware acceleration.
...the reason is that these don’t have a delay that makes the interaction with the app appear sluggish.
Populating the page: how browsers work - Web Performance
if you’ve ever heard of the 14kb rule for initial page load, tcp slow start is the reason why the initial response is 14kb, and why web performance optimization calls for focusing optimizations with this initial 14kb response in mind.
...these nodes will be painted onto their own layer, along with their descendants, unless a descendant necessitates its own layer for one (or more) of the above reasons.
<set> - SVG: Scalable Vector Graphics
WebSVGElementset
it supports all attribute types, including those that cannot reasonably be interpolated, such as string and boolean values.
... for attributes that can be reasonably be interpolated, the <animate> is usualy prefered.
SVG documentation index - SVG: Scalable Vector Graphics
WebSVGIndex
drop shadows, to provide a popular example, cannot be created reasonably with a combination of gradients.
...this page lists those deviations/extensions and our reasoning for them.
mimeTypes.rdf corruption - SVG: Scalable Vector Graphics
symptoms previously you were able to open and display svg content with mozilla, but for no apparent reason its behaviour changes and now it always pops up the "open or save file" dialog when you try to open local svg files, and displays the "additional plugins are required to display all the media on this page" bar when you try to view html with embedded svg.
... note: the "additional plugins are required" bar can appear for legitimate reasons when the svg or its embedding html is broken or served incorrectly over the network (see the svg faq).
How to turn off form autocompletion - Web security
for this reason, many modern browsers do not support autocomplete="off" for login fields: if a site sets autocomplete="off" for a <form>, and the form includes username and password input fields, then the browser still offers to remember this login, and if the user agrees, the browser will autofill those fields the next time the user visits the page.
...however modern browsers have stopped autofilling <input> elements with autocomplete="new-password" for this very reason.
2015 MDN Fellowship Program - Archive of obsolete content
fellows are responsible for obtaining their own visas if any are required (mozilla will provide reasonable supporting documentation).
Communicating using "postMessage" - Archive of obsolete content
ndow.addeventlistener('mouseover', function(event) {" + " self.postmessage(event.target.tostring());" + "}, false);"; var pagemod = require('sdk/page-mod').pagemod({ include: ['*'], contentscript: pagemodscript, onattach: function(worker) { worker.on('message', function(message) { console.log('mouseover: ' + message); }); } }); the reason to prefer user-defined events is that as soon as you need to send more than one type of message, then both sending and receiving messages gets more complex.
Content Processes - Archive of obsolete content
the reason for this extra complexity is that the code for add-on modules and content scripts have different privileges.
Modules - Archive of obsolete content
this makes it possible to reason about which modules have chrome capabilities and which don't.
SDK API Lifecycle - Archive of obsolete content
backwards-compatibility will be maintained if reasonable.
XUL Migration Guide - Archive of obsolete content
the main reason for this design is security: it reduces the risk that a malicious web page will be able to access privileged apis.
passwords - Archive of obsolete content
the callback is passed an error containing a reason of a failure: this is an nsiexception object.
self - Archive of obsolete content
loadreason this property contains of the following strings describing the reason your add-on was loaded: install enable startup upgrade downgrade isprivatebrowsingsupported this property indicates whether or not the add-on supports private browsing.
ui/button/action - Archive of obsolete content
the reason for using this, rather than setting properties individually, is that you can define an object with the properties to set in one place, then apply it to the global state with a single line: const defaultstate = { "label": "default label", "icon": "./default.png", } const differentstate = { "label": "different label", "icon": "./different.png", } var { actionbutton } = require("sdk/ui/bu...
ui/button/toggle - Archive of obsolete content
the reason for using this, rather than setting state properties individually, is that you can define an object with the properties to set in one place, then apply it to the global state with a single line: const defaultstate = { "label": "default label", "icon": "./default.png", } const differentstate = { "label": "different label", "icon": "./different.png", } var { togglebutton } = require("sdk...
File I/O - Archive of obsolete content
for legacy reasons, there is also an nsilocalfile interface.
Examples and demos from articles - Archive of obsolete content
here is a possible and minimalist example of such abstraction, which for this reason we named minidaemon.
Miscellaneous - Archive of obsolete content
another one is to utilize bootstrap.js startup function data argument: function startup(data, reason) { // some code ...
Preferences - Archive of obsolete content
for example this code will also read the value of accessibility.typeaheadfind.enablesound preference: var prefs = components.classes["@mozilla.org/preferences-service;1"] .getservice(components.interfaces.nsiprefservice); var branch = prefs.getbranch("acce"); var enablesound = branch.getboolpref("ssibility.typeaheadfind.enablesound"); this is the reason why you should usually pass strings ending with a dot to getbranch(), like prefs.getbranch("accessibility.").
StringView - Archive of obsolete content
since stringview, unlike c strings, has a length property, there is no reason to add a null codepoint ('\0') after the termination of a string.
Communication between HTML and your extension - Archive of obsolete content
this was non-optimal and the timeout wasn't very reliable for some reason.
Creating custom Firefox extensions with the Mozilla build system - Archive of obsolete content
reasons why you might want to include c++ components in your extension include: need for high-performance beyond what can be delivered by javascript code.
Enhanced Extension Installation - Archive of obsolete content
this function returns the guid, version, and type of the item, and also an error code listing either success, or the reason for a failure, such as invalid guid, version, or incompatible item.
Install Manifests - Archive of obsolete content
for security reasons, gecko 1.9 applications require that if you specify an updateurl, it must be an https url, or you must include an updatekey.
Installing Extensions and Themes From Web Pages - Archive of obsolete content
for this reason you should always use the installtrigger api to install themes.
Listening to events in Firefox extensions - Archive of obsolete content
it is used to update the ui for many different reasons: update the progress bar and status messages as pages load turn on and off the throbber as pages load set the site icon when available update the address bar as the user navigates hide notification bars when appropriate as the user navigates apply the site zoom preferences to newly loading pages update the bookmarking star button ui update the identity display as the site's security ch...
Migrating raw components to add-ons - Archive of obsolete content
if this is the only reason you are using a binary component instead of javascript, take a look at the new javascript c-types support introduced in firefox 3.6.
Appendix: What you should know about open-source software licenses - Archive of obsolete content
for this reason, the debian project, which distributes free software as a volunteer effort, has a browser based on firefox, but with a different name and logo.
Adding Events and Commands - Archive of obsolete content
there's a reason for the division between remote content and local chrome, so make sure you respect it.
Appendix B: Install and Uninstall Scripts - Archive of obsolete content
then you'll have reasonable certainty that the add-on will be removed and you can perform any cleanup operations safely.
Appendix F: Monitoring DOM changes - Archive of obsolete content
for this reason, it is best to avoid using mutation listeners at all costs, especially from extensions.
Appendix E: DOM Building and Insertion (HTML & XUL) - Archive of obsolete content
for security reasons, and to prevent errors, care needs to be taken to avoid evaluating arbitrary text as html.
Local Storage - Archive of obsolete content
we normally add a comment that indicates that logging is not done there for performance reasons.
Security best practices in extensions - Archive of obsolete content
this blog post offers some excellent reasons not to use eval().
Underscores in class and ID Names - Archive of obsolete content
although underscores are, as of this writing, technically permitted in class and id names, there are many historical and practical reasons why they should be avoided.
JXON - Archive of obsolete content
the choice of using a true value instead of a null value to represent empty nodes is due to the fact that when in an xml document there is an empty node the reason is often to express a boolean, as in this case: <car> <type>ferrari</type> <bought /> </car> if the value were null it would be more cumbersome to launch a code like this: if (myobject.car.bought) { // do something } note: according to our third algorithm and our fourth algorithm, just cdatasection nodes which contain nothing but white spaces (precisely: /^\s+$/) will be parsed as nul...
Images, Tables, and Mysterious Gaps - Archive of obsolete content
if you're using strict markup, or you need for other reasons to be in "standards" rendering, then remember these guidelines: any image alone in a table cell (e.g., single-pixel spacer images) should be made block-level.
No Proxy For configuration - Archive of obsolete content
the field is relatively short, but can hold reasonably long (2k+ characters) entries.
Kill the XUL.mfl file for good - Archive of obsolete content
with quicklauncer (see above), mozilla's speed is actually quite adequate, even without xul.mfl for these reasons, it is desirable to disable the xul.mfl functionality.
Structure of an installable bundle - Archive of obsolete content
themes are limited for security reasons, and can normally only provide a chrome.manifest which registers the theme and a jar file.
Getting Started - Archive of obsolete content
for this reason we suggest that you install a second copy into a second directory (make sure that you use a different profile as stated in the release notes) extract the chrome the chrome is stored in \mozilla\chrome and the individual modules are stored in jar files.
Repackaging Firefox - Archive of obsolete content
the reason is that if you create and ship a dex that supports 2 locales (for example), and later decide to ship on a 3rd locale, you will need to re-create the dex to support it.
Gecko Coding Help Wanted - Archive of obsolete content
roc is willing to work closely with anyone with reasonable c++ experience to get them started on this.
Creating a Help Content Pack - Archive of obsolete content
nesting theoretically can work to any number of levels, but for practical reasons nesting is limited to roughly 20 levels.
Hidden prefs - Archive of obsolete content
ect addresses" prefs from mailnews.js: // by default, only collect addresses the user sends to (outgoing) pref("mail.collect_email_address_incoming", false); pref("mail.collect_email_address_outgoing", true); pref("mail.collect_email_address_newsgroup", false); // by default, use the personal addressbook for collection pref("mail.collect_addressbook","moz-abmdbdirectory://abook.mab"); for the reasons why the defaults changed, see this document on the collected address book.
Java in Firefox Extensions - Archive of obsolete content
a good reason for calling java from within an xpcom component rather than from xul is to maintain a singleton (some singular java object) across all firefox windows.
Menu - Archive of obsolete content
ArchiveMozillaJetpackUIMenu
for example, to add an item to the tabs' context menu, try: jetpack.menu.context.browser.beforeshow = function (menu, context) { menu.reset(); if (context.node.localname === "tab") menu.add("hey, a tab!"); }; (the reason this problem exists is because document.queryselectorall() does not match anonymous content in xul.
Mozilla Crypto FAQ - Archive of obsolete content
for these reasons we strongly recommend that mozilla developers and others access the key and certificate database only through public apis provided by the nss library.
How to Write and Land Nanojit Patches - Archive of obsolete content
(note: this document is called nanojitmerge for historical reasons -- adobe and mozilla used to have separate copies of nanojit, but this was a maintenance headache so they were merged.
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.
Remote debugging - Archive of obsolete content
(that is, there's a legitimate reason it happens only on some computers, but that reason just hasn't been discovered.) the crash victim, in turn, trusts the developer with full access to his computer.
Tamarin build documentation - Archive of obsolete content
the flash player builds tamarin with the debugging hooks off for codesize reasons, but the mozilla client will build tamarin with the debugging hooks on.
TraceVis - Archive of obsolete content
the second part lists the reasons tracemonkey transitioned to the interpreter, and the amount of interpreter time charged to each reason.
Tuning Pageload - Archive of obsolete content
the reason for this is that nscssframeconstructor is most efficient when doing a bunch of stuff at once instead of constructing rendering objects for one dom node at a time.
URIs and URLs - Archive of obsolete content
together these segments form the url spec with the following syntax: scheme://username:password@host:port/directory/filebasename.fileextension;param?query#ref for performance reasons the complete spec is stored in escaped form in the nsstandardurl object with pointers (position and length) to each basic segment and for the more global segments like path and prehost for example.
XBL 1.0 Reference - Archive of obsolete content
for this reason it contains many comments and some blocks could be avoided in a more compact solution yet used here for demonstration purposes.
XML in Mozilla - Archive of obsolete content
heme obsolete since gecko 1.9.1 w3c recommendation xpointer fixptr() scheme obsolete since gecko 1.9.1 this scheme is simply a wrapper for fixptr xpointer xpath1() scheme obsolete since gecko 1.9.1 internet-draft document.load(), document.async part of dom level 3 load & save module, a w3c working draft xhtml we have reasonable xhtml support, most things should work.
panel.level - Archive of obsolete content
for these reasons, you should avoid setting the level if not needed.
Moving, Copying and Deleting Files - Archive of obsolete content
for this reason, you may wish to check if the file exists using nsifile.exists() before moving the file.
Index - Archive of obsolete content
ArchiveMozillaXULIndex
the first section of the document describes the motivation and reasoning behind using rdf as the foundation of xul.
appendNotification - Archive of obsolete content
n1callback(thenotification, buttoninfo, eventtarget) { window.alert("button 1 pressed"); //prevent notification from closing: return true; }; function testnotificationbutton2callback(thenotification, buttoninfo, eventtarget) { window.alert("button 2 pressed"); //do not prevent notification from closing: }; function testnotificationcallback(reason) { window.alert("reason is: " + reason); }; let notifybox = gbrowser.getnotificationbox(); let buttons = []; let button1 = { isdefault: false, accesskey: "1", label: "button 1", callback: testnotificationbutton1callback, type: "", // if a popup, then must be: "menu-button" or "menu".
OpenClose - Archive of obsolete content
for this reason, you should not assume that a user has used the mouse to open the context menu.
PopupEvents - Archive of obsolete content
the reason for this is if, as is quite common, the menu item's action is to open a modal dialog.
SeaMonkey - making custom toolbar (SM ver. 1.x) - Archive of obsolete content
this may not be the most relevant spot for this addition, i posted this here because the above approach proved successful after hours of unsuccessful tinkering with methods that proved to be obsolete or broken for various reasons.
Adding Event Handlers - Archive of obsolete content
thus, the click event should be avoided in xul, unless you have a reason to have an element that can only be handled with a mouse.
Adding Event Handlers to XBL-defined Elements - Archive of obsolete content
a common reason to set handlers is to modify the custom properties when an event occurs.
Adding Style Sheets - Archive of obsolete content
the reason is so that different looks, or skins, can be applied easily.
Additional Install Features - Archive of obsolete content
this will occur if a file or directory cannot be found, there is insufficient disk space or for a number of other reasons.
Broadcasters and Observers - Archive of obsolete content
you can also have only one if you wanted to but that would accomplish very little since the main reason for using broadcasters is to have attributes forwarded to multiple places.
Creating a Skin - Archive of obsolete content
for this reason, we'll modify only the file findfile.css rather than the global.css file.
Document Object Model - Archive of obsolete content
however, for various reasons, including better performance, you should always put scripts in separate files, except for short fragments which can be put directly in the event handler.
Install Scripts - Archive of obsolete content
for this reason, installers include an install script to handle the installation process.
Manifest Files - Archive of obsolete content
for this reason, the install scripts are not used often.
Manipulating Lists - Archive of obsolete content
this is one reason why it is useful to manipulate the list by the item rather than by index.
Skinning XUL Files by Hand - Archive of obsolete content
for this reason, it can be very efficient to use button classes that appear in the global skin and to make new classes only when necessary.
Templates - Archive of obsolete content
for security reasons, mozilla doesn't allow access to them from other sources.
Updating Commands - Archive of obsolete content
the code for this function is only a few lines long so you could include it directly in your code if for some reason you didn't want to include the library.
Using Spacers - Archive of obsolete content
the reason we're seeing this effect is that both the spacer and the find button have a flex attribute.
XPCOM Interfaces - Archive of obsolete content
it is for these reasons that two steps are involved in getting an interface to call functions through.
Using Remote XUL - Archive of obsolete content
in case you're wondering, the reason the buttons and menu items had style before we added the stylesheet reference is that some xul elements are defined in mozilla using another xml-based language called xbl which provides building blocks for creating ui widgets.
XUL Questions and Answers - Archive of obsolete content
support for non-rdf datasources for xul template is planned (bug 321170): xml datasources (bug 321171) storage (sqlite) datasources (bug 321172) when loading an xslt stylesheet into an xml i get the error: "error loading stylesheet: an xslt stylesheet load was blocked for security reasons." that error is from a security check that has been put up to safeguard against cross-site-scripting attacks.
XUL and RDF - Archive of obsolete content
the first section of the document describes the motivation and reasoning behind using rdf as the foundation of xul.
XUL Coding Style Guidelines - Archive of obsolete content
<?xml version="1.0" encoding='utf-8'?> <!-- do not localize this file: [reason...] it isn't part of the build; --> when translators see this line, they won't bother to look at the rest of the file.
panel - Archive of obsolete content
ArchiveMozillaXULpanel
for these reasons, you should avoid setting the level if not needed.
Application Update - Archive of obsolete content
use what you need, %product%,%version%,%build_id%,%channel% for example pref("app.update.url", "https://yourserver.net/update/3/%product%/%version%/%build_id%/%build_target%/%locale%/%channel%/%os_version%/%distribution%/%distribution_version%/update.xml"); // url user can browse to manually if for some reason all update installation // attempts fail.
Creating XULRunner Apps with the Mozilla Build System - Archive of obsolete content
the only obvious reason for this would be if you need to implement part of your application in c++, as described in the introduction to the now classic creating custom firefox extensions with the mozilla build system.
Getting started with XULRunner - Archive of obsolete content
step 2: install xulrunner on windows, unzip the archive someplace reasonable.
Gecko Compatibility Handbook - Archive of obsolete content
many older versions of cross-browser apis in common use around the web such as dynapi do not support gecko for one or more of the reasons listed above.
2006-10-20 - Archive of obsolete content
boris zbarsky's said: the reason why gtk1 builds are still being performed is because: when requests are made to change build boxes to newer versions the people responsible for making the change reply with "that would require an os upgrade".
2006-10-20 - Archive of obsolete content
decommissioning sparky on friday preed wants to get rid of sparky (a linux build box) and wants to know if there are reasons wy not to do it.
2006-11-03 - Archive of obsolete content
the idea was that such certs would be presented differently in the ui, to give the cas a reason to go to the extra effort, and to give customers a reason to buy them.
NPN_PostURL - Archive of obsolete content
for this reason, you may find it useful to call npn_posturlnotify instead; this function notifies your plug-in upon successful or unsuccessful completion of the request.
NPP_HandleEvent - Archive of obsolete content
for this reason, npp_handleevent is only way the plug-in can receive events from its host application on mac os.
NPSavedData - Archive of obsolete content
can be any reasonable size; its contents are private to the plug-in and are not modified by the browser.
XEmbed Extension for Mozilla Plugins - Archive of obsolete content
for backwards compatibility reasons if you don't tell mozilla that you support it it will try to hand you an xt widget as a parent.
Why RSS Content Module is Popular - Including HTML Contents - Archive of obsolete content
html</title> <guid>d77d2e80-0487-4e8c-a35d-a93f12a0ff7d:2005/05/15/112</guid> <pubdate>sun, 15 may 2005 08:14:11 -0500</pubdate> <link>http://www.example.com/blog/2005/05/15/112</link> <content:encoded><![cdata[this is <b>bold</b>.]]></content:encoded> </item> </channel> </rss> the <content:encoded> element is the reason that the rss content module is popular.
Why RSS Slash is Popular - Counting Your Comments - Archive of obsolete content
<title>first article!</title> <guid>d77d2e80-0487-4e8c-a35d-a93f12a0ff7d:2005/05/15/112</guid> <pubdate>sun, 15 may 2005 08:14:11 -0500</lastbuilddate></pubdate> <link>http://www.example.com/blog/2005/05/15/112</link> <slash:comments>118</slash:comments> </item> </channel> </rss> the <slash:comments> element is it reason that the rss slash module is popular.
Why Well-Formed Web RSS Module is Popular - Syndicating Your Comments - Archive of obsolete content
54320/comments</wfw:commentrss> </item> <item> <title>huh?!</title> <guid>d77d2e80-0487-4e8c-a35d-a93f12a0ff7d:article:54319</guid> <pubdate>sun, 15 may 2005 08:14:11 -0500</pubdate> <link>http://www.example.com/article/54319</link> <wfw:commentrss>http://www.example.com/feed/rss/54319/comments</wfw:commentrss> </item> </channel> </rss> the <wfw:commentrss> element is the reason that the well-formed web rss module is popular.
Security Controls - Archive of obsolete content
the goal should be to strike a proper balance: provide a reasonably secure solution while offering the functionality and usability that users require.
Introduction to Public-Key Cryptography - Archive of obsolete content
however, it's important to note that these two assumptions are true only if unauthorized personnel have not gained access to the user's machine or password, the password for the client software's private key database has been set, and the software is set up to request the password at reasonable frequent intervals.
Table Reflow Internals - Archive of obsolete content
table reflow example <table width=300> <tr> <td>foo</td> <td>bar zap</td> </tr> </table> key: r = reflow reason, 0 (initial), 2 (resize) a = avail w, h c = computed w, h d = desired w, h me = max elem w debugging frame reflow gives instructions for turning this on: tblo 030176cc r=0 a=8940,uc c=0,0 cnt=429 tbl 030178c4 r=0 a=8940,uc c=4470,uc cnt=430 rowg 03017a7c r=0 a=uc,uc c=uc,uc cnt=431 row 03017c08 r=0 a=uc,uc c=uc,uc cnt=432 cell 03017da8 r=0 a=uc,uc c=uc,uc cn...
Tamarin Tracing Build Documentation - Archive of obsolete content
the flash player builds tamarin with the debugging hooks off for codesize reasons, but the mozilla client will build tamarin with the debugging hooks on.
-ms-ime-align - Archive of obsolete content
in some cases, the ime may enforce a reasonable minimum size.
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.
Window.importDialog() - Archive of obsolete content
this function was only available in the original, xul-based version of firefox for android, which is no longer supported; for that reason, this function is obsolete and should never be used.
Implementation Status - Archive of obsolete content
xforms submission model section title status notes bugs 11.1 submission partial from 1.1 we do not yet support @mode, @indent, @replace='text', @separator, @serialize, @target, header or method child elements 11.2 xforms-submit partial we currently limit (for security reasons) submission only back to the server that served the document.
RFE to the Custom Controls - Archive of obsolete content
this page could be of particular interest to people using custom controls in xul documents for the following reason.
Requests For Enhancement - Archive of obsolete content
ArchiveWebXFormsRFE
this section could be of particular interest to people using custom controls in xul documents for the following reasons: xul, in many cases, is much better suited for application development than xhtml.
Mozilla XForms User Interface - Archive of obsolete content
there are several possible reasons for this restriction.
RDF in Fifty Words or Less - Archive of obsolete content
and fundamentally, there's no reason that you shouldn't be able to treat these as "bookmarks" as well, grouping them together into folders as you please, or maybe even creating "smart" folders that, when you open them, dynamically generate their contents by running common search that you define.
Using the Right Markup to Invoke Plugins - Archive of obsolete content
g the unique identifier for the jre 1.4.1: <!-- ie only code --> <object classid="clsid:8ad9c840-044e-11d1-b3e9-00805f499d93" width="460" height="160" codebase="http://java.sun.com/products/plugin/autodl/jinstall-1_4_1-windows-i586.cab#version=1,4,1"> <param...> <param...> </object> the above invocation won't work for mozilla-based browsers such as netscape 7 because of the same reason mentioned above: classid used in conjunction with a unique identifier references an architecture (activex) that mozilla code (and thus netscape 7) does not support.
Windows Media in Netscape - Archive of obsolete content
the name geckoactivexobject rather than activexobject was introduced for two reasons: geckoactivexobject is limited to creating instances of windows media player activex controls.
Obsolete: XPCOM-based scripting for NPAPI plugins - Archive of obsolete content
the main reason for this is that there is no guarantee of java compatibility on a binary level due to the jri/jni switch.
3D collision detection - Game development
the axis-aligned constraint is there because of performance reasons.
CDN - MDN Web Docs Glossary: Definitions of Web-related terms
using cdn for those library files is preferable for a number of reasons: serving libraries' static assets over cdn lowers the request burden on an organization's own servers.
First interactive - MDN Web Docs Glossary: Definitions of Web-related terms
minimally interactive is defined as when some, but not necessarily all, ui elements on the page have loaded and are interactive, and, on average, respond to user input in a reasonable amount of time.
High-level programming language - MDN Web Docs Glossary: Definitions of Web-related terms
it is designed to be easily understood by humans and for this reason they must be translated by another software.
IDL - MDN Web Docs Glossary: Definitions of Web-related terms
html specifications try to make this as developer-friendly as possible, but for various reasons (mostly historical), some attributes behave oddly (select.size, for example) and you should read the specifications to understand how exactly they behave.
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.
Immutable - MDN Web Docs Glossary: Definitions of Web-related terms
an object can be immutable for various reasons, for example: to improve performance (no planning for the object's future changes) to reduce memory use (make object references instead of cloning the whole object) thread-safety (multiple threads can reference the same object without interfering with one other) learn more general knowledge immutable on wikipedia ...
VoIP - MDN Web Docs Glossary: Definitions of Web-related terms
the main reason for using voip technology is because of cost.
Modularity - MDN Web Docs Glossary: Definitions of Web-related terms
the advantage of a modular system is that one can reason the parts independently learn more modularity on wikipedia ...
Mobile accessibility - Learn web development
for this reason, it is worth trying to minimize the amount of typing needed.
Accessible multimedia - Learn web development
add the following, again at the bottom of your javascript: player.removeattribute('controls'); doing it this way round rather than just not including the controls attribute in the first place has the advantage that if our javascript fails for any reason, the user still has some controls available.
WAI-ARIA basics - Learn web development
and if for some reason your site is built using just <div>s, you should definitely include the aria roles to provide these much needed semantics!
Cascade and inheritance - Learn web development
important declarations in author style sheets important declarations in user style sheets it makes sense for web developers' stylesheets to override user stylesheets, so the design can be kept as intended, but sometimes users have good reasons to override web developer styles, as mentioned above — this can be achieved by using !important in their rules.
Handling different text directions - Learn web development
logical properties and values the reason to talk about writing modes and direction at this point in your learning however, is because of the fact we have already looked at a lot of properties which are tied to the physical dimensions of the screen, and make most sense when in a horizontal writing mode.
The box model - Learn web development
for this reason, css had an alternative box model introduced some time after the standard box model.
Supporting older browsers - Learn web development
testing older browsers with the majority of browsers supporting flexbox and grid, it can be reasonably hard to test older browsers.
What is CSS? - Learn web development
for this reason, being able to check implementation status is useful.
Styling lists - Learn web development
if both a type and an image are specified, the type is used as a fallback if the image can't be loaded for some reason.
What do common web layouts contain? - Learn web development
summary there's a reason we talk about web design.
How can we design for all types of users? - Learn web development
for all these reasons, please provide a text transcript of the video/audio file.
How do I start to design my website? - Learn web development
is it reasonable to build a single website to cover all those goals?
What is a web server? - Learn web development
for all these reasons, finding a good hosting provider is a key part of building your website.
How do you set up a local testing server? - Learn web development
this can be due to a variety of reasons, the most likely being: they feature asynchronous requests.
Advanced form styling - Learn web development
there are many reasons why scripts may fail, especially in the mobile world, and you need to design your web site or app to handle these cases as well as possible.
The HTML5 input types - Learn web development
this is another good reason for using these newer input types — improving the user experience for users of these devices.
HTML forms in legacy browsers - Learn web development
for that reason, it's considered best practice to work with "unobtrusive" javascript.
Other form controls - Learn web development
so value attributes are not needed, but you might find a reason to want to send a shortened or different value to the server than what is visually shown in the select box.
CSS property compatibility table for form controls - Learn web development
how to read the tables values for each property, there are four possible values: yes there's reasonably consistent support for the property across browsers.
Sending form data - Learn web development
this can be very important for two reasons: if you need to send a password (or any other sensitive piece of data), never use the get method or you risk displaying it in the url bar, which would be very insecure.
Styling web forms - Learn web development
this is another reason to use <button> elements over their equivalent input types!
Test your skills: Advanced styling - Learn web development
next, give the radio buttons a reasonable base style — the style they have when the page first loads.
UI pseudo-classes - Learn web development
:empty has reasonable browser support; the :blank pseudo-class's specification is not yet finished, so it not yet supported in any browser.
Your first form - Learn web development
from a ux point of view, this is considered bad practice, so you should avoid using this type of button unless you really have a good reason to include one.
Web forms — Working with user data - Learn web development
however, for historical and technical reasons it's not always obvious how to use them to their full potential.
Dealing with files - Learn web development
for these reasons, it is best to get into the habit of writing your folder and file names lowercase with no spaces and with words separated by dashes, at least until you know what you're doing.
Add a hitmap on top of an image - Learn web development
text links (perhaps styled with css) are preferable to image maps for several reasons: text links are lightweight, maintainable, often more seo-friendly, and support accessibility needs (e.g., screen readers, text-only browsers, translation services).
Use HTML to solve common problems - Learn web development
LearnHTMLHowto
how to create a list of items with html how to stress or emphasize content how to indicate that text is important how to display computer code with html how to annotate images and graphics how to mark abbreviations and make them understandable how to add quotations and citations to web pages how to define terms with html hyperlinks one of the main reasons for html is making navigation easy with hyperlinks, which can be used in many different ways: how to create a hyperlink how to create a table of contents with html images & multimedia how to add images to a webpage how to add video content to a webpage scripting & styling html only sets up document structure.
Advanced text formatting - Learn web development
there is no reason however why you couldn't link the text inside <cite> to the quote source in some way: <p>according to the <a href="/docs/web/html/element/blockquote"> <cite>mdn blockquote page</cite></a>: </p> <blockquote cite="/docs/web/html/element/blockquote"> <p>the <strong>html <code>&lt;blockquote&gt;</code> element</strong> (or <em>html block quotation element</em>) indicates that the enclosed text ...
Adding vector graphics to the Web - Learn web development
svg is not supported in older browsers, so may not be suitable if you need to support older versions of internet explorer with your web site (svg started being supported as of ie9.) raster graphics are arguably better for complex precision images such as photos, for the reasons described above.
Images in HTML - Learn web development
it can come in handy for a number of reasons: the user is visually impaired, and is using a screen reader to read the web out to them.
From object to iframe — other embedding technologies - Learn web development
however, you are unlikely to use these elements very much — applets haven't been used for years, flash is no longer very popular, due to a number of reasons (see the case against plugins, below), pdfs tend to be better linked to than embedded, and other content such as images and video have much better, easier elements to handle those.
Video and audio content - Learn web development
due to these legal and preferential reasons, web developers find themselves having to support multiple formats to capture their entire audience.
Multimedia and Embedding - Learn web development
get started prerequisites before starting this module, you should have a reasonable understanding of the basics of html, as previously covered in introduction to html.
HTML table basics - Learn web development
LearnHTMLTablesBasics
the main reasons are as follows: layout tables reduce accessibility for visually impaired users: screenreaders, used by blind people, interpret the tags that exist in an html page and read out the contents to the user.
Choosing the right approach - Learn web development
prerequisites: basic computer literacy, a reasonable understanding of javascript fundamentals.
General asynchronous programming concepts - Learn web development
prerequisites: basic computer literacy, a reasonable understanding of javascript fundamentals.
Functions — reusable blocks of code - Learn web development
javascript is set up like this for various reasons — but mainly because of security and organization.
Making decisions in your code — conditionals - Learn web development
they are mainly good for cases where you've got a couple of choices, and each one requires a reasonable amount of code to be run, and/or the conditions are complex (for example, multiple logical operators).
Client-side storage - Learn web development
this is rather confusing, but it has to work this way for security reasons.
Fetching data from the server - Learn web development
this runs if the promise fails for some reason.
Arrays - Learn web development
in an animated scene for example, you might have an array of objects representing the background graphics currently displayed, and you might only want 50 displayed at once, for performance or clutter reasons.
Useful string methods - Learn web development
this is useful for many reasons; for example, you might want to find the lengths of a series of names so you can display them in order of length, or let a user know that a username they have entered into a form field is too long if it is over a certain length.
Inheritance in JavaScript - Learn web development
it is possible to start writing code that temporarily modifies the prototypes of built-in browser objects, but you should not do this unless you have a really good reason.
Working with JSON - Learn web development
the reason we said "mostly right" is that an array is also valid json, for example: [ { "name": "molecule man", "age": 29, "secretidentity": "dan jukes", "powers": [ "radiation resistance", "turning tiny", "radiation blast" ] }, { "name": "madame uppercut", "age": 39, "secretidentity": "jane wilson", "powers": [ "million tonne punch", ...
Object-oriented JavaScript for beginners - Learn web development
note that they are using their own name value that was assigned to them when they were created; this is one reason why it is very important to use this, so each one uses its own value, and not some other value.
Object prototypes - Learn web development
you won't need to use it often, but it can be really useful when you want to create a new instance and don't have a reference to the original constructor easily available for some reason.
CSS performance optimization - Learn web development
for this reason, css is render blocking, unless the browser knows the css is not currently needed.
Multimedia: Images - Learn web development
for this reason, it's critical that you set width and height attributes so that the browser can reserve space for them in the layout.
Web performance resources - Learn web development
there are many reasons why your website should perform as well as possible.
Multimedia: video - Learn web development
there is no reason to serve audio with video that is always muted.
Introduction to the server side - Learn web development
if the file cannot be retrieved for some reason, an error status is returned (see client error responses and server error responses).
Getting started with Ember - Learn web development
ember-cli-build.js is responsible for configuring details about how your project is built — including bundling all your files together, asset minification, and creating sourcemaps — with reasonable defaults, so you don't typically need to worry about this file.
Ember resources and troubleshooting - Learn web development
mut was not covered in this tutorial and is really baggage from a transitional time when ember was moving from two-way bound data to the more common and easier-to-reason-about one-way bound data flow.
Ember app structure and componentization - Learn web development
red todo app, there are a number of ways we could decide how to break up the ui, but let's plan on splitting the html out into the following components: the component groupings are as follows: the main input / "new-todo" (red in the image) the containing body of the todo list + the mark-all-complete button (purple in the image) the mark-all-complete button, explicitly highlighted for reasons given below (yellow in the image) each todo is an individual component (green in the image) the footer (blue in the image) something odd to note is that the mark-all-complete checkbox (marked in yellow), while in the "main" section, is rendered next to the "new-todo" input.
Framework main features - Learn web development
an authorcredit component nested many levels deep might, for some reason, need data from the very root level of our application.
Beginning our React todo list - Learn web development
ing: content-box; content: ""; position: absolute; top: 11px; left: 9px; width: 18px; height: 7px; transform: rotate(-45deg); border: solid; border-width: 0 0 5px 5px; border-top-color: transparent; opacity: 0; background: transparent; } .c-cb > input[type="checkbox"]:checked + label::after { opacity: 1; } save and look back at your browser, and your app should now have reasonable styling.
Starting our Svelte Todo list app - Learn web development
note: you should only disable these warnings if you have good reasons to do so, for example while building a quick prototype.
TypeScript support in Svelte - Learn web development
this kind of developer assistance is another good reason to start using typescript in your projects.
Creating our first Vue component - Learn web development
there are a lot of reasons for this.
Getting started with Vue - Learn web development
these small blocks can help you reason about and test your code.
Adding a new todo form: Vue events, methods, and models - Learn web development
for our purposes, this is much more reasonable since we only need the final data.
Understanding client-side JavaScript frameworks - Learn web development
there is a variety of reasons for this: they are popular choices that will be around for a while — like with any software tool, it is good to stick with actively-developed choices that are likely to not be discontinued next week, and which will be desirable additions to your skill set when looking for a job.
Implementing feature detection - Learn web development
summary this article covered feature detection in a reasonable amount of detail, going through the main concepts and showing you how to both implement your own feature detection tests and use the modernizr library to implement tests more easily.
Handling common JavaScript problems - Learn web development
this is one of the main reasons why libraries like jquery came into existence — to abstract away differences in browser implementations (e.g.
Git and GitHub - Learn web development
however, it is recommended that you know some coding so that you have reasonable computer literacy, and some code to store in your repositories!
Accessibility API cross-reference
for all these reasons, aria and html are given separate columns.
Accessibility Features in Firefox
chen is a screen reader extension built just for firefox which can read mathml community contributions the real reason behind firefox's success is the great community of volunteers and organizations that realize they have something to benefit from a browser open to utilizing their ideas and hard work.
CSUN Firefox Materials
fire vox is a screen reader extension built just for firefox which can read mathml the accessibility extension, from the university of illinois, provides new menus and keyboard shortcuts for accessing every feature of a web page community contributions the real reason behind firefox's success is the great community of volunteers and organizations that realize they have something to benefit from a browser open to utilizing their ideas and hard work.
Multiprocess on Windows
however, for various reasons, our com interceptor currently only supports typelib metadata.
Software accessibility: Where are we today?
these companies were often reluctant for various reasons including the large amount of time required to do so.
Mozilla’s UAAG evaluation report
reasons: the title attribute is almost never present when the alt isn't.
Capturing a minidump
for this reason, you may prefer to generate minidumps against a clean profile where possible.
Debugging OpenGL
for various reasons, debugging opengl related code can be tricky.
HTTP logging
older editors may have problems with this, but if you're using an even reasonably modern mac os x application to view the log, you won't have any problems.
How Mozilla's build system works
it is preserved for historical reasons until this entire page is rewritten.
The Firefox codebase: CSS Guidelines
the reason you should avoid such "hardcoded" values is that, they don't necessarily work for all font-size configurations.
Creating Custom Events That Can Pass Data
same reason as above.
Commenting IDL for better documentation
comment format doxygen supports several comment formats; for style and consistency reasons, we use the following: /** * */ note the two asterisks ("**") on the first line of the comment.
Listening to events on all tabs
aflags optional: this is a value which explains the situation or the reason why the location has changed.
SVG Guidelines
pros and cons of svg for images when used as a document format there is usually a compelling reason that makes svg the only solution.
mach
another possible reason: mach gives you an error, while running, say bootstrap.py directly (that is to type in a bash shell: python2 ./bootstrap.py enter-key ) in an otherwise empty ..../subdir/ may work for you!
Experimental features in Firefox
nightly 60 no developer edition 60 no beta 60 no release 60 no preference name security.mixed_content.upgrade_display_content ftp support disabled for security reasons, mozilla intends to remove support for ftp from firefox in 2020, effective in firefox 82.
Multiple Firefox profiles
reasons to have multiple profiles the casual user may want to have different profiles for work and personal use, or different family members.
Limitations of chrome scripts
for this reason, add-ons that try to access content objects in fresh <browser> elements may run into trouble.
Using the Browser API
MozillaGeckoChromeAPIBrowser APIUsing
<iframe src="http://hostname.tld" mozbrowser remote> warning: this last attribute is necessary for security reasons if you plan to load content from an untrusted/unknown origin.
mozbrowserasyncscroll
note: for performance reasons, this event is asynchronous.
mozbrowsercaretstatechanged
erties are canselectall: a boolean indicating whether the selectall command is available (true) or not (false.) cancut: a boolean indicating whether the cut command is available (true) or not (false.) cancopy: a boolean indicating whether the copy command is available (true) or not (false.) canpaste: a boolean indicating whether the paste command is available (true) or not (false.) reason a domstring that defines the reason for the state being changed.
HTML parser threading
(for historical reasons, it also contains unrelated fragment parsing code that should be refactored into a separate class in due course.) nshtml5streamparser contains the code for dealing with data from the network.
HTTP Cache
reason is that when the writer is interrupted (by e.g.
IPDL Best Practices
while this can be worked around with actordestroy, being explicit about deleting the protocol with send__delete__ is easier to maintain, with symmetric alloc/deallocpprotocol functions also being easier to reason about.
Implementing QueryInterface
one more reason to avoid aggregation specifically, and complicated hierarchies in general.
Introduction to Layout in Mozilla
ia presshell method incremental reflows targeted at a specific frame dirty, content-changed, style-changed, user-defined nshtmlreflowcommand object encapsulates info queued and processed asynchronously, nsipressshell::appendreflowcommand, processreflowcommands incremental reflow recursively descend to target recovering reflow state child rs.reason set to incremental incremental reflow process reflow “normally” at target frame child rs.reason set based on rc’s type incremental reflow propagate damage to frames later “in the flow” incremental reflow multiple reflow commands are batched nsreflowpath maintains a tree of target frames amortize state recovery and damage propagation c...
JavaScript Tips
this was done for a reason, so use them!
AddonManager
update check reasons constant description update_when_user_requested an update check performed at the explicit request of the user.
AsyncShutdown.jsm
if, for some reason, promise is never resolved/rejected, firefox will crash during shutdown to avoid blocking system shutdown, preventing the user from restarting firefox or burning through a battery.
OS.File.Info
e, or a directory, or a symbolic link: let promise = os.file.stat(somepath); promise.then( function onsuccess(info) { // |info| is an instance of |os.file.info| if (info.isdir) { // |somepath| represents a directory } else if (info.issymlink) { // |somepath| represents a symbolic link } else { // |somepath| represents a regular file } }, function onfailure(reason) { if (reason instanceof os.file.error && reason.becausenosuchfile) { // |somepath| does not represent anything } else { // some other error } } ) example: determining the owner of a file let promise = os.file.stat() promise.then( function onsuccess(info) { if ("unixowner" in info) { // info.unixowner holds the owner of the file } else { // inf...
OSFile.jsm
for this reason, api clients can also spawn their own worker threads and make use of os.file directly from these threads.
Sqlite.jsm
note: callers are strongly encouraged to use bound parameters instead of dynamically creating sql statements for security reasons.
Webapps.jsm
, aoldapp, amanifest, aisupdate) _getids: function(aissigned, azipreader, aconverter, anewapp, aoldapp,) _checkforstoreidmatch: function(aisupdate, anewapp, astoreid, astoreversion) revertdownloadpackage: function(aid, aoldapp, anewapp, aisupdate, aerror) uninstall: function(amanifesturl) _promptforuninstall: function(adata) confirmuninstall: function(adata) denyuninstall: function(adata, areason = "error_unknown_failure") getself: function(adata, amm) checkinstalled: function(adata, amm) getinstalled: function(adata, amm) getnotinstalled: function(adata, amm) geticon: function(adata, amm) getall: function(acallback) isreceipt: function(data) addreceipt: function(adata, amm) removereceipt: function(adata, amm) replacereceipt: function(adata, amm) setenabled: function(adata) ge...
Bootstrapping a new locale
the name of that directory doesn't really matter, so no reason to change it.
Index
as a reward for your efforts, you get to move on to the very reason you've come here: to localize mozilla projects.
Translation phase
as a reward for your efforts, you get to move on to the very reason you've come here: to localize mozilla projects.
Uplifting a localization from Central to Aurora
one of the reasons why we suggested that you do the merging in a separate tree is just this.
Creating localizable web applications
for this reason, it is better to leave the <strong/> html tags inside the gettext function call and take advantage of the printf() variable that will be substituted by the date upon interpretation of the code (snippet 3).
Web Localizability
why localizability is important there are many reasons why you should start thinking about making your web app localizable as soon as possible.
MathML Demo: <mo> - operator, fence, separator, or accent
this problem can be solved using aligned arrays, as follows a b c d ⁢ a b c d however, all reasonable attempts to fence the column vector will fail because latex fences are symmetric.
Mozilla Web Developer FAQ
mozilla’s standards mode is, obviously, already compatible with other browsers that implement the same standards reasonably correctly.
Mozilla Style System Documentation
[title: c] [para: f] [para: d] | | [quote: a] [quote: a] | [span: e] the reason the rule tree shares style data naturally is that most style rules specify properties in very few structs.
Activity Monitor, Battery Status Menu and top
based on these facts it seems reasonable to assume that “energy impact” is again being used to determine which applications are "using significant energy".
GPU performance
works reasonably well with firefox.
Intel Power Gadget
these are reasonably useful for power profiling purposes, but mozilla's rapl utility provides these along with gpu and ram estimates, and in a command-line format that is often easier to use.
Memory reporting
traversal-based reporters are preferable, for the following reasons.
Power profiling overview
for this reason, integrating power measurements into the gecko profiler is unlikely to be useful, and other power profiling tools typically use much lower sampling rates (e.g.
perf
for these reasons rapl is usually a better tool for measuring power consumption on linux.
powermetrics
the sum of the process values typically exceeds the coalition value slightly, for unknown reasons.
Profile Manager
for this reason, if you attempt to launch firefox using profile manager, and it detects that another instance of firefox is already running, it will automatically add the -no-remote argument for you, regardless of whether this launch option was checked.
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.
Leak And Bloat Tests
provide reasonable coverage for the normal activities that a user performs.
MailNews automated testing
testing frameworks the asynctestutils extended framework supports: asynchronous test operation: a reasonably convenient means of writing tests that involve asynchronous operations by using generators.
About NSPR
nspr, while far from perfect, does provide a single api to which clients may program and expect reasonably consistent behavior.
NSPR build instructions
nspr build generates a "winnt" configuration by default on windows for historical reasons.
NSPR Error Handling
pr_connect_timeout_error the connection attempt did not complete in a reasonable period of time.
PR_AcceptRead
the reason for the failure can be obtained by calling pr_geterror.
PR_AttachSharedMemory
retrieve the reason for the failure by calling pr_geterror and pr_getoserror.
PR_CloseDir
the reason for the failure can be retrieved via pr_geterror.
PR_DestroyPollableEvent
the reason for the failure can be retrieved via pr_geterror.
PR_EnumerateHostEnt
you can retrieve the reason for the failure by calling pr_geterror.
PR GetAddrInfoByName
you can retrieve the reason for the failure by calling pr_geterror.
PR_GetConnectStatus
the reason for the failure can be retrieved via pr_geterror.
PR_GetHostByAddr
you can retrieve the reason for the failure by calling pr_geterror.
PR_GetHostByName
you can retrieve the reason for the failure by calling pr_geterror.
PR_GetPeerName
the reason for the failure can be obtained by calling pr_geterror.
PR_GetProtoByName
you can retrieve the reason for the failure by calling pr_geterror.
PR_GetProtoByNumber
you can retrieve the reason for the failure by calling pr_geterror.
PR_GetSockName
the reason for the failure can be obtained by calling pr_geterror.
PR_GetSocketOption
the reason for the failure can be obtained by calling pr_geterror.
PR_InitializeNetAddr
you can retrieve the reason for the failure by calling pr_geterror.
PR_Interrupt
when the interrupted thread reaches the prearranged point, it can communicate with its peer to discover the real reason behind the change in plans.
PR_LoadLibrary
use pr_geterror to find the reason for the failure.
PR_MkDir
the actual reason can be retrieved via pr_geterror.
PR_NetAddrToString
you can retrieve the reason for the failure by calling pr_geterror.
PR_OpenSharedMemory
retrieve the reason for the failure by calling pr_geterror and pr_getoserror.
PR_Poll
the reason for the failure can be obtained by calling pr_geterror.
PR_PushIOLayer
use pr_geterror to get additional information regarding the reason for the failure.
PR_Read
to get the reason for the failure, call pr_geterror.
PR_ReadDir
the reason can be retrieved via pr_geterror.
PR_Recv
the reason for the failure can be obtained by calling pr_geterror.
PR_RecvFrom
the reason for the failure can be obtained by calling pr_geterror.
PR_RmDir
the actual reason can be retrieved via pr_geterror.
PR_Send
the reason for the failure can be obtained by calling pr_geterror.
PR_SendTo
the reason for the failure can be obtained by calling pr_geterror.
PR_SetPollableEvent
the reason for the failure can be retrieved via pr_geterror.
PR_SetSocketOption
the reason for the failure can be obtained by calling pr_geterror.
PR_StringToNetAddr
you can retrieve the reason for the failure by calling pr_geterror.
PR_TransmitFile
the reason for the failure can be obtained by calling pr_geterror.
PR_UnloadLibrary
use pr_geterror to find the reason for the failure.
PR_Wait
pr_exitmonitor(&ml); a thread can be resumed from a wait for a variety of reasons.
PR_WaitForPollableEvent
the reason for the failure can be retrieved via pr_geterror.
PR_Write
the reason for the failure is obtained by calling pr_geterror.
PR_Writev
the reason for the failure can be obtained by calling pr_geterror.
Certificate functions
6 and later cert_encodepolicyconstraintsextension mxr 3.12 and later cert_encodepolicymappingextension mxr 3.12 and later cert_encodesubjectkeyid mxr 3.12 and later cert_encodeusernotice mxr 3.12 and later cert_extractpublickey mxr 3.2 and later cert_findcertbyname mxr 3.2 and later cert_findcrlentryreasonexten mxr 3.12 and later cert_findcrlnumberexten mxr 3.12 and later cert_findnameconstraintsexten mxr 3.12 and later cert_filtercertlistbycanames mxr 3.4 and later cert_filtercertlistbyusage mxr 3.4 and later cert_filtercertlistforusercerts mxr 3.6 and later cert_findcertbydercert mxr 3.2 and later ...
Cryptography functions
mxr 3.2 and later pk11_getblocksize mxr 3.2 and later pk11_getcertfromprivatekey mxr 3.9.3 and later pk11_getcurrentwrapindex mxr 3.2 and later pk11_getdefaultarray mxr 3.8 and later pk11_getdefaultflags mxr 3.8 and later pk11_getdisabledreason mxr 3.8 and later pk11_getfirstsafe mxr 3.2 and later pk11_getinternalkeyslot mxr 3.2 and later pk11_getinternalslot mxr 3.2 and later pk11_getkeygen mxr 3.4 and later pk11_getkeylength mxr 3.2 and later pk11_getkeystrength m...
JSS FAQ
MozillaProjectsNSSJSSJSS FAQ
not in the near future due to pluggability is disabled in the jsse version included in j2se 1.4.x for export control reasons.
JSS Provider Notes
there is no good design reason for this difference, but it is necessitated by a quirk in the nss implementation.
Mozilla-JSS JCA Provider notes
there is no good design reason for this difference, but it is necessitated by a quirk in the nss implementation.
NSS_3.12.2_release_notes.html
libpkix cert verification api from bug 294531 bug 302670: use the installed libz.so where available bug 305693: shlibsign generates pqg for every run bug 311483: exposing includecertchain as a parameter to sec_pkcs12addcertandkey bug 390527: get rid of pkixerrormsg variable in pkix_error bug 391560: libpkix does not consistently return pkix_validatenode tree that truly represent failure reasons bug 408260: certutil usage doesn't give enough information about trust arguments bug 412311: replace pr_interval_no_wait with pr_interval_no_timeout in client initialization calls bug 423839: add multiple pkcs#11 token password command line option to nss tools.
NSS 3.12.6 release notes
bug 275744: support for tls compression rfc 3749 bug 494603: update nss's copy of sqlite3 to 3.6.22 to get numerous bug fixes bug 496993: add accessor functions for ssl_implementedciphers bug 515279: cert_pkixverifycert considers a certificate revoked if cert_processocspresponse fails for any reason bug 515870: gcc compiler warnings in nss 3.12.4 bug 518255: the input buffer for sgn_update should be declared const bug 519550: allow the specification of an alternate library for sqlite bug 524167: crash in [[@ find_objects_by_template - nsstoken_findcertificatebyissuerandserialnumber] bug 526910: maxresponselength (initialized to pkix_default_max_re...
NSS 3.20 release notes
for backward compatibility reasons, the server side implementation of the tls library keeps all dhe ciphersuites disabled by default.
NSS 3.28 release notes
sha-1 is permitted (in tls 1.2 only) with any certificate for backward compatibility reasons.
PKCS11 FAQ
MozillaProjectsNSSPKCS11FAQ
in general, you not should use different slots unless you have a good reason.
sslerr.html
ssl_error_bad_cert_alert -12271 "ssl peer cannot verify your certificate." the remote system has received a certificate from the local system, and has rejected it for some reason.
NSS Tools pk12util
for historical export control reasons "pkcs12 v2 pbe with sha1 and 40 bit rc4" is the default for the overall package encryption when not in fips mode and no package encryption when in fips mode.
Performance Hints
constructing a new function object can be slow for the same reason, while function expressions are more efficient because the function can be compiled.
Shumway
the user has adobe flash player disabled (or set to "click-to-enable") for performance or security reasons.
Creating JavaScript tests
for this reason, the best place to find out if a change is performance sensitive is on arewefastyet.com.
Index
if either is null, the engine tries to find reasonable defaults.
Bytecode Descriptions
asyncresolve operands: (asyncfunctionresolvekind fulfillorreject) stack: valueorreason, gen ⇒ promise resolve or reject the current async function's result promise with 'valueorreason'.
Garbage collection
in other words, it is an updatable pointer to a gc thing (it is essentially a cell** that the gc knows about.) root a starting point to the gc graph traversal, a root is known to be alive for some external reason (one other than being reachable by some other part of the gc heap.) weak pointer in common cs terminology, a weak pointer is one that doesn't keep the pointed-to value live for gc purposes.
Property cache
the entry is valid only for subsequent lookups that occur at the same instruction, for several reasons: the script, not the property cache entry, contains the id of the property being accessed.
Tracing JIT
all transitions out of recording mode eventually involve returning to monitoring mode: if the recorder is asked to record a bytecode that it cannot, for various low-level reasons, faithfully record, the recorder may choose to abort the recording.
SpiderMonkey Internals
for no good reason save lack of time, the %e, %f, and %g formats cause your system's native sprintf, rather than js_dtoa(), to be used.
JIT Optimization Outcomes
genericfailure the optimization attempt failed, and the reason was not recorded.
JS_ConstructObject
if either is null, the engine tries to find reasonable defaults.
JS_InitClass
the jsapi provides reasonable default behavior for all of these; ordinarily you don't want to overload any of them.
Shell global objects
rejectpromise(promise, reason) reject a promise by calling the jsapi function js::rejectpromise.
Thread Sanitizer
clang 3.4 + tsan cannot compile firefox due to an internal compiler error; some versions of clang 3.5 packaged by linux distros do not work for the same reason.
Redis Tips
there are three reasons to look at the docs for every command you use.
Exploitable crashes
look at the crash reason, which will usually be something like "kern_protection_failure (0x0002) at 0x00000000".
Secure Development Guidelines
trncat usage buffer overflow strncat(buffer, string, sizeof(buffer)); off-by-one strncat(buffer, string, sizeof(buffer) – strlen(string)); correct usage strncat(buffer, string, sizeof(buffer) – strlen(string) – 1)); banned api list: recommendations create wrappers or replacements for standard functions with a bad design libc function name reason to ban it strcpy, strcat, gets, sprintf, vsprintf no bounds checking.
Animated PNG graphics
MozillaTechAPNG
if the the value of the numerator is 0 the decoder should render the next frame as quickly as possible, though viewers may impose a reasonable lower bound.
Places Expiration
this means on mobile and old systems expiration will be more aggressive than on high-end hardware, to try keep the database size at a reasonable (and performant) value.
Querying Places
for this reason, it is best to close a container as soon as you are done with it, since it will give better performance.
Avoiding leaks in JavaScript XPCOM components
the reason closures matter here is that the _filterradiogroup function has access to the iterator variable.
Starting WebLock
there are a few reasons for not using strings to represent file locations, but the most important one is that not all file systems can be represented by a series of characters separated by a slash.
Components.utils.importGlobalProperties
the reason this works is because js code modules actually have blob and file.
imgIContainer
if not (or if the root nsiframe is not available for some reason), this method returns nsnull.
imgIRequest
regardless, there's no reason for this flag to be public, and it should either go away or become a private state flag within imgrequest.
mozIColorAnalyzer
if imageuri points to an image that has more than 128^2 pixels, this method will fail for performance reasons before analyzing it.
nsIApplicationCache
item_opportunistic 64 this item matched an opportunistic cache namespace and was cached for that reason.
nsIBrowserHistory
for performance reasons this does not return the real number of entries.
nsIChannel
see nsicontentsniffer [en-us] note: channels may ignore this flag; however, new channel implementations should only do so with good reason.
nsIComponentManager
function startup(params, areason) { if (services.vc.compare(services.appinfo.platformversion, "10.0") < 0) components.manager.addbootstrappedmanifestlocation(params.installpath); } function shutdown(params, areason) { if (services.vc.compare(services.appinfo.platformversion, "10.0") < 0) components.manager.removebootstrappedmanifestlocation(params.installpath); } ...
nsIConsoleService
reset() to clear the message buffer (for example, for privacy reasons): void reset(); parameters none.
nsIContentSecurityPolicy
void scanrequestdata( in nsihttpchannel achannel ); parameters achannel sendreports() manually triggers violation report sending given a uri and reason.
nsIDNSListener
astatus if the lookup failed, this parameter gives the reason.
nsIDOMEvent
if the event was retargeted for some reason other than an anonymous boundary crossing, this will be set to the target before the retargeting occurs.
nsIDocShell
the rule of thumb here is that we disable js if this docshell or any of its parents disallow scripting, unless the only reason for js being disabled in this docshell is a parent docshell having a document that is in design mode.
nsIDroppedLinkHandler
exceptions thrown ns_error_dom_security_err error will be thrown and the event canceled if the receiving target should not load the uri for security reasons.
nsIFeedProgressListener
handlestartfeed() called as soon as a reasonable start to a feed is detected; this lets your code know that the feed does appear to be an actual feed rather than some other sort of document.
nsIFileInputStream
(the file will only be reopened if it is closed for some reason.) defer_open 1<<4 if this is set, the file will be opened (i.e., a call to pr_open() done) only when we do an actual operation on the stream, or more specifically, when one of the following is called: seek() tell() available() read() readline() defer_open is useful if we use the stream on a background thread, so that the opening and possible...
nsIFileProtocolHandler
note: callers should use geturlspecfromactualfile() if possible, for performance reasons.
nsIFileStreams
(the file will only be reopened if it is closed for some reason.) methods init() void init( in nsifile file, in long ioflags, in long perm, in long behaviorflags ); parameters file file to read from (must qi to nsilocalfile).
nsIIOService
this gives the protocol handler ultimate control over its own security policy while ensuring reasonable, default protection.
nsIInputStream
for this reason, it is generally the case that a blocking input stream should be implemented using thread-safe addref and release.
nsIJSON
for that reason, it has been removed in gecko 7.0.
nsIJumpListItem
1.0 66 introduced gecko 2.0 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) note: to consumers: it's reasonable to expect we'll need support for other types of jump list items (an audio file, an email message, etc.).
nsIMsgWindow
for some reason xpconnect is still hanging onto the message window even though all of our objects have let go of it.
nsINavHistoryResultNode
for hosts, this is the total number of the children under it, rather than the total number of times the host has been accessed (getting that information would require an additional query, so for performance reasons that information isn't given by default).
nsIOutputStream
for this reason, it is generally the case that a blocking output stream should be implemented using thread-safe addref and release.
nsIPlacesImportExportService
the interface name has been kept for compatibility reasons for code using the export service.
nsIProtocolProxyCallback
this is a failure code if the request could not be satisfied, in which case the value of astatus indicates the reason for the failure and aproxyinfo will be null.
nsIRequestObserver
astatuscode reason for stopping (ns_ok if completed successfully) see also nsistreamlistener ...
nsISHistory
documents can be removed from session history for various reasons.
nsISHistoryListener
entries can be removed from session history for various reasons; for example to control the browser's memory usage, to prevent users from loading documents from history, to erase evidence of prior page loads, etc.
nsISupports proxies
the main reason for nsisupports proxies is that javascript and ui are on a single thread.
nsITraceableChannel
r = { observe: function(asubject, atopic, adata) { var newlistener = new tracinglistener(); asubject.queryinterface(ci.nsitraceablechannel); newlistener.originallistener = asubject.setnewlistener(newlistener); /////// end - do not edit newlistener.promisedone.then( function() { // no error happened console.log('yay response done:', newlistener.responsebody); }, function(areason) { // promise was rejected, right now i didnt set up rejection, but i should listen to on abort or bade status code then reject maybe } ).catch( function(acatch) { console.error('something went wrong, a typo by dev probably:', acatch); } ); } }; services.obs.addobserver(httpresponseobserver, 'http-on-examine-response', false); // services.obs.removeobserver(httpresponseobse...
nsIUpdateItem
constants that callers can use to indicate the reason for an add-on update check.
nsIUploadChannel
for this reason, we have a special meaning for the acontenttype parameter.
nsIWebProgressListener
aflags this is a value which explains the situation or the reason why the location has changed.
nsIWindowMediator
for that reason this interface requires only objects one step removed from the native window (nsiwidgets), and its implementation must be very understanding of what may be completely invalid pointers in those parameters.
nsIXMLHttpRequestEventTarget
onloadend nsidomeventlistener a javascript function object that gets invoked when the operation is completed for any reason; it will always follow a an abort, error, or load event.
NS_ADDREF
ns_addref(foo) is equivalent to foo->addref(); this macro exists mainly for historical reasons, but for consistency and for symmetry with ns_release it should still be used.
Warnings
if, for some reason you cannot use an index in your order by clause, you can suppress this warning by including a sql comment in your query that contains this text: /* do not warn (bug [everything in these brackets does not matter] */ the bug mentioned should explain why the query cannot use an index.
XPCOM ownership guidelines
needing it isn't, by itself, a valid reason for owning it.
xptcall FAQ
xptcall exists for two reasons: to support invoking arbitrary methods on xpcom interfaces.
XPIDL
an out parameter is essentially an auxiliary return value, although these are moderately cumbersome to use from script contexts and should therefore be avoided if reasonable.
Autoconfiguration in Thunderbird
http is deprecated now, but will need to be supported until at least end of 2023 for both of these reasons.
Buddy icons in mail
the reason this file name scheme was chosen was is this is how netscape 7.0 im stores buddy icons on disk.
nsIMsgCloudFileProvider
uploaderr 0x8055311a returned when uploading has failed for an unknown reason.
Mail composition back end
you also have the ability to save rfc822 files to disk, should you need this data for some reason.
Main Windows
things appear confusing for several reasons: much of the code is written to be portable, so instead of duplicating it, its been put in overlays that are loaded over many different types of windows.
Add to iPhoto
the main reason i include this here is because of the last parameter, which should be a pointer to an fsref, but that's not declared until we get around to declaring the carbon api, and i think that's worth noting.
Drawing and Event Handling - Plugins
for this reason, you need to convert the x - and y - coordinates using the windows api call dptolp when you output text.
Version, UI, and Status Information - Plugins
for this reason, your message is always displayed, but you have no control over how long it stays in the status line before another message replaces it.
Accessibility Inspector - Firefox Developer Tools
for this reason, you should keep it turned off when you aren't specifically using it.
Debugger.Object - Firefox Developer Tools
promisereason return a debuggee value representing the value the promise has been rejected with.
Edit fonts - Firefox Developer Tools
empty elements will not have any fonts used and will display the message "no fonts were found for the current element." fonts will be included in this section for one of the following reasons: they are listed in the element's font-family css declaration value.
Examine and edit HTML - Firefox Developer Tools
this can happen for different reasons such as using display: none or that the element doesn't have any dimensions.
Frame rate - Firefox Developer Tools
for example, here's a screenshot of a performance profile: you can see that the average frame rate is reasonably healthy, but there are three spots where frame rate collapses for tens of milliseconds.
Animating CSS properties - Firefox Developer Tools
waterfall the timeline view shows the reason for the improved frame rate.
Intensive JavaScript - Firefox Developer Tools
as long as each function is reasonably small, the browser should be able to keep inside its frame budget.
Debugging Firefox Desktop - Firefox Developer Tools
to use a different port, pass the desired port number: /path/to/firefox --start-debugger-server 1234 note: in windows, the start-debugger-server call will only have one dash: firefox.exe -start-debugger-server 1234 note: by default, and for security reasons, the devtools.debugger.force-local option is set.
Console messages - Firefox Developer Tools
css note: css warnings and reflow messages are not shown by default, for performance reasons (see bug 1452143).
about:debugging (before Firefox 68) - Firefox Developer Tools
service workers can be unavailable for several reasons: if you are using a private browsing window.
AnalyserNode.frequencyBinCount - Web APIs
for technical reasons related to how the fast fourier transform is defined, it is always half the value of analysernode.fftsize.
Animation.onremove - Web APIs
for this reason, modern browsers automatically remove overriding forward filling animations.
Animation.persist() - Web APIs
WebAPIAnimationpersist
for this reason, modern browsers automatically remove overriding forward filling animations.
Animation.playState - Web APIs
in the game, for performance reasons, the tears should only be animating when they're visible.
Animation.replaceState - Web APIs
for this reason, modern browsers automatically remove overriding forward filling animations.
Animation - Web APIs
WebAPIAnimation
for this reason, modern browsers have implemented the part of the web animations spec that automatically removes overriding forward filling animations, unless the developer explicitly specifies to keep them.
AudioParam.setTargetAtTime() - Web APIs
however, for mathematical reasons, that method does not work if the current value or the target value is 0.
BatteryManager.chargingTime - Web APIs
even if the time returned is precise to the second, browsers round them to a higher interval (typically to the closest 15 minutes) for privacy reasons.
BatteryManager.dischargingTime - Web APIs
even if the time returned is precise to the second, browsers round them to a higher interval (typically to the closest 15 minutes) for privacy reasons.
BluetoothDevice - Web APIs
methods bluetoothdevice.watchadvertisments() a promise that resolves to undefined or is rejected with an error if advetisments can’t shown for any reason.
CSSRuleList - Web APIs
if however, for some reason the list does need to be modified but has no parent stylesheet (perhaps being a livecopy of a list that does), it cannot just be assigned one (as it has no such property), and neither can it be assigned to one (as stylesheet.cssrules is read-only), but it must unfortunately be inserted into one, rule by rule, and unless combining lists, after any existing list therein is deleted, rule by rule.
CSSStyleSheet - Web APIs
a (possibly incomplete) list of ways a stylesheet can be associated with a document follows: reason for the style sheet to be associated with the document appears in document.
CanvasRenderingContext2D - Web APIs
the methods listed below remain for historical and compatibility reasons as svgmatrix objects are used in most parts of the api nowadays and will be used in the future instead.
Drawing shapes with canvas - Web APIs
for that reason, you will almost always want to specifically set your starting position after resetting a path.
CloseEvent() - Web APIs
"reason", optional and defaulting to '', of type domstring, that is a human-readable reason why the server closed the connection.
CloseEvent - Web APIs
closeevent.reason read only returns a domstring indicating the reason the server closed the connection.
console - Web APIs
WebAPIConsole
not console), for historical reasons.
Crypto.getRandomValues() - Web APIs
there are a few reasons for this; for example, getrandomvalues() is not guaranteed to be running in a secure context.
CryptoKey - Web APIs
WebAPICryptoKey
for security reasons, the cryptokey interface can only be used in a secure context.
DOMException.code - Web APIs
WebAPIDOMExceptioncode
this field is used for historical reasons.
Binary strings - Web APIs
WebAPIDOMStringBinary
the reason that brought to use utf-16 code units as placeholders for uint8 numbers is that as web applications become more and more powerful (adding features such as audio and video manipulation, access to raw data using websockets, and so forth) it has become clear that there are times when it would be helpful for javascript code to be able to quickly and easily manipulate raw binary data.
DataTransfer.types - Web APIs
some values that are not mime types are special-cased for legacy reasons (for example "text").
DataTransfer - Web APIs
it will be false in all other cases, including if the drag failed for any other reason, for instance due to a drop over an invalid location.
DirectoryEntrySync - Web APIs
invalid_state_err this directory is not longer valid for some reason other than being deleted.
Document.anchors - Web APIs
WebAPIDocumentanchors
toc.appendchild(li); } } </script> </head> <body onload="init()"> <h1>title</h1> <h2><a name="contents">contents</a></h2> <ul id="toc"></ul> <h2><a name="plants">plants</a></h2> <ol> <li>apples</li> <li>oranges</li> <li>pears</li> </ol> <h2><a name="veggies">veggies</a></h2> <ol> <li>carrots</li> <li>celery</li> <li>beats</li> </ol> </body> </html> view on jsfiddle notes for reasons of backwards compatibility, the returned set of anchors only contains those anchors created with the name attribute, not those created with the id attribute.
Document.cookie - Web APIs
WebAPIDocumentcookie
the reason for the syntax of the document.cookie accessor property is due to the client-server nature of cookies, which differs from other client-client storage methods (like, for instance, localstorage): the server tells the client to store a cookie http/1.0 200 ok content-type: text/html set-cookie: cookie_name1=cookie_value1 set-cookie: cookie_name2=cookie_value2; expires=sun, 16 jul 3567 06:23:41 gmt ...
Document: fullscreenerror event - Web APIs
for some reasons that switching into full-screen mode might fail, see the guide to the fullscreen api.
Document.onfullscreenerror - Web APIs
since requestfullscreen() can only be called in response to user action, for security reasons, this will fail, causing the fullscreenerror to be sent to the document.
Document.ononline - Web APIs
WebAPIDocumentononline
(note: using window.ononline or window.onoffline will not work for compatibility reasons.) by specifying ononline="..." or onoffline="..." attributes on the <body> tag in the html markup.
Document: pointerlockerror event - Web APIs
the pointerlockerror event is fired when locking the pointer failed (for technical reasons or because the permission was denied).
Document: pointerout event - Web APIs
the pointerout event is fired for several reasons including: pointing device is moved out of the hit test boundaries of an element; firing the pointerup event for a device that does not support hover (see pointerup); after firing the pointercancel event (see pointercancel); when a pen stylus leaves the hover range detectable by the digitizer.
Document - Web APIs
WebAPIDocument
pointerout fired when a pointer is moved out of the hit test boundaries of an element (among other reasons).
Using the W3C DOM Level 1 Core - Web APIs
it's a reasonably clear spec, although it is formal.
Element.attachShadow() - Web APIs
there are some that can't have a shadow dom for security reasons (for example <a>), and more besides.
Element.classList - Web APIs
WebAPIElementclassList
string.prototype.trim polyfill if (!"".trim) string.prototype.trim = function(){ return this.replace(/^[\s]+|[\s]+$/g, ''); }; (function(window){"use strict"; // prevent global namespace pollution if(!window.domexception) (domexception = function(reason){this.message = reason}).prototype = new error; var wsre = /[\11\12\14\15\40]/, wsindex = 0, checkifvalidclasslistentry = function(o, v) { if (v === "") throw new domexception( "failed to execute '" + o + "' on 'domtokenlist': the token provided must not be empty." ); if((wsindex=v.search(wsre))!==-1) throw new domexception("failed to execute '"+o+"' on 'domtokenlist': " + "the token ...
Element: fullscreenerror event - Web APIs
for some reasons that switching into full-screen mode might fail, see the guide to the fullscreen api.
Element.getAttribute() - Web APIs
retrieving nonce values for security reasons, csp nonces from non-script sources, such as css selectors, and .getattribute("nonce") calls are hidden.
Element.getAttributeNS() - Web APIs
for that reason, you should use hasattributens() to check for an attribute's existence prior to calling getattributens() if it is possible that the requested attribute does not exist on the specified element.
Element.innerHTML - Web APIs
WebAPIElementinnerHTML
for example: const name = "<img src='x' onerror='alert(1)'>"; el.innerhtml = name; // shows the alert for that reason, it is recommended that you do not use innerhtml when inserting plain text; instead, use node.textcontent.
Event.explicitOriginalTarget - Web APIs
(mozilla-specific) if the event was retargeted for some reason other than an anonymous boundary crossing, this will be set to the target before the retargeting occurs.
Event.srcElement - Web APIs
WebAPIEventsrcElement
it's supported in all major browser engines, but only for compatibility reasons.
EventTarget.removeEventListener() - Web APIs
// fails element.removeeventlistener("mousedown", handlemousedown, { passive: false }); // succeeds element.removeeventlistener("mousedown", handlemousedown, false); // succeeds element.removeeventlistener("mousedown", handlemousedown, true); // fails it's worth noting that some browser releases have been inconsistent on this, and unless you have specific reasons otherwise, it's probably wise to use the same values used for the call to addeventlistener() when calling removeeventlistener().
FetchEvent.respondWith() - Web APIs
for security reasons, there are a few global rules: you can only return response objects of type "opaque" if the fetchevent.request object's mode is "no-cors".
File.fileName - Web APIs
WebAPIFilefileName
for security reasons the path is excluded from this property.
File.name - Web APIs
WebAPIFilename
for security reasons, the path is excluded from this property.
FileException - Web APIs
security_err 2 access to the files were denied for one of the following reasons: the files might be unsafe for access within a web application.
FileSystemDirectoryEntry.getFile() - Web APIs
fileerror.security_err the request to access the file was denied for security reasons.
FileSystemEntry.remove() - Web APIs
fileerror.invalid_state_err the file system's cached state is inconsistent with its state on disk, so the file could not be deleted for safety reasons.
FileSystemEntrySync - Web APIs
invalid_state_err the filesystemsync is no longer valid for some reason besides being deleted.
File and Directory Entries API support in Firefox - Web APIs
this subset of the api provided by chrome is still not fully specified; however, for web compatibility reasons, it was decided to implement a subset of the api in firefox; this was introduced in firefox 50.
FocusEvent - Web APIs
in some cases (such as when tabbing in or out a page), this property may be set to null for security reasons.
Fullscreen API - Web APIs
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).
Using the Gamepad API - Web APIs
note: the gamepad object is available on the gamepadconnected event rather than the window object itself, for security reasons.
Geolocation - Web APIs
note: for security reasons, when a web page tries to access location information, the user is notified and asked to grant permission.
GeolocationPositionError - Web APIs
the geolocationpositionerror interface represents the reason of an error occurring when using the geolocating device.
Geolocation API - Web APIs
for privacy reasons, the user is asked for permission to report location information.
GlobalEventHandlers.onabort - Web APIs
by which means and reasons (user, network/server)?
HTMLCollection - Web APIs
note: this interface is called htmlcollection for historical reasons (before the modern dom, collections implementing this interface could only have html elements as their items).
HTMLElement: pointerout event - Web APIs
the pointerout event is fired for several reasons including: pointing device is moved out of the hit test boundaries of an element; firing the pointerup event for a device that does not support hover (see pointerup); after firing the pointercancel event (see pointercancel); when a pen stylus leaves the hover range detectable by the digitizer.
HTMLElement - Web APIs
pointerout fired when a pointer is moved out of the hit test boundaries of an element (among other reasons).
HTMLFormElement.elements - Web APIs
the elements included by htmlformelement.elements and htmlformelement.length are the following: <button> <fieldset> <input> (with the exception that any whose type is "image" are omitted for historical reasons) <object> <output> <select> <textarea> no other elements are included in the list returned by elements, which makes it an excellent way to get at the elements most important when processing forms.
HTMLFormElement.length - Web APIs
the elements included by htmlformelement.elements and htmlformelement.length are the following: <button> <fieldset> <input> (with the exception that any whose type is "image" are omitted for historical reasons) <object> <output> <select> <textarea> no other elements are included in the list returned by elements, which makes it an excellent way to get at the elements most important when processing forms.
HTMLFormElement - Web APIs
elements that are considered form controls the elements included by htmlformelement.elements and htmlformelement.length are the following: <button> <fieldset> <input> (with the exception that any whose type is "image" are omitted for historical reasons) <object> <output> <select> <textarea> no other elements are included in the list returned by elements, which makes it an excellent way to get at the elements most important when processing forms.
HTMLImageElement.border - Web APIs
for compatibility (or perhaps other) reasons, you can use the older properties instead (or in addition): border-top-width, border-right-width, border-bottom-width, and border-left-width.
HTMLImageElement.isMap - Web APIs
note: for accessibility reasons, you should generally avoid using server-side image maps, as they require the use of a mouse.
Using microtasks in JavaScript with queueMicrotask() - Web APIs
the main reason to use microtasks is simply that: to ensure consistent ordering of tasks, even when results or data is available synchronously, but while simultaneously reducing the risk of user-discernible delays in operations.
Drag Operations - Web APIs
the mozusercancelled property will be set to true if the user cancelled the drag (by pressing escape), and false if the drag was cancelled for other reasons such as an invalid drop target, or if it was successful.
Headers.append() - Web APIs
WebAPIHeadersappend
for security reasons, some headers can only be controlled by the user agent.
Headers.get() - Web APIs
WebAPIHeadersget
for security reasons, some headers can only be controlled by the user agent.
Headers.getAll() - Web APIs
WebAPIHeadersgetAll
for security reasons, some headers can only be controller by the user agent.
Headers.has() - Web APIs
WebAPIHeadershas
for security reasons, some headers can only be controlled by the user agent.
Headers.set() - Web APIs
WebAPIHeadersset
for security reasons, some headers can only be controller by the user agent.
Headers - Web APIs
WebAPIHeaders
for security reasons, some headers can only be controlled by the user agent.
HmacImportParams - Web APIs
unless you have a good reason to use a different length, omit this property and use the default.
HmacKeyGenParams - Web APIs
unless you have a good reason to use a different length, omit this property and use the default.
IDBDatabase.transaction() - Web APIs
note: in firefox, if you wish to ensure durability for some reason (e.g.
IDBRequest.error - Web APIs
WebAPIIDBRequesterror
unknownerror if the operation failed for reasons unrelated to the database itself.
IDBTransaction: abort event - Web APIs
bubbles yes cancelable no interface event event handler property onabort this can happen for any of the following reasons: bad requests, (for example, trying to add the same key twice, or put the same index key when the key has a uniqueness constraint), an explicit abort() call an uncaught exception in the request's success/error handler, an i/o error (an actual failure to write to disk, for example disk detached, or other os/hardware failure) quota exceeded.
IDBTransaction.oncomplete - Web APIs
note: in firefox, if you wish to ensure durability for some reason (e.g.
Basic concepts - Web APIs
note: in firefox, if you wish to ensure durability for some reason (e.g.
Checking when a deadline is due - Web APIs
recording the date information to provide a reasonable user experience on mobile devices, and to cut down on ambiguities, i decided to create an html form with: a text input for entering a title for your to-do list.
Using IndexedDB - Web APIs
if you must ensure durability for some reason (e.g.
Timing element visibility with the Intersection Observer API - Web APIs
there's a good reason why the notion of tracking visibility of ads is being used in this example.
Intersection Observer API - Web APIs
intersection information is needed for many reasons, such as: lazy-loading of images or other content as a page is scrolled.
InterventionReportBody - Web APIs
an intervention report is generated when usage of a feature in a web document has been blocked by the browser for reasons such as security, performance, or user annoyance.
KeyboardEvent: code values - Web APIs
the reason is that some browsers choose to interpret physical keys differently, there are some differences in which keys map to which codes.
LocalMediaStream - Web APIs
the primary reason for this interface to exist was to add a stop() method to its mediastream parent interface.
LockedFile.flush() - Web APIs
WebAPILockedFileflush
for performance reasons, a lockedfile object buffers all its operation in memory.
MSCandidateWindowUpdate - Web APIs
tan ime candidate window may be identified as needing to change size for any of the following reasons: as a result of displaying new / changed alternatives or predictions web applications need only register for this event once per element (the handler will remain valid for the lifetime of the element).
MediaDeviceInfo.label - Web APIs
for security reasons, the label is always an empty string ("") if the user has not obtained permission to use at least one media device, either by starting a stream from the microphone or camera, or by persistent permissions being granted.
MediaDeviceInfo - Web APIs
for security reasons, the label field is always blank unless an active media stream exists or the user has granted persistent permission for media device access.
MediaDevices.getDisplayMedia() - Web APIs
for that reason, the specification details measures browsers are required to take in order to fully support getdisplaymedia().
MediaRecorder: dataavailable event - Web APIs
bubbles no cancelable no interface blobevent event handler property ondataavailable for details of the all the possible reasons this event may raise, see the documentation for the event handler property: ondataavailable.
MediaSessionActionDetails - Web APIs
if this property isn't present, those actions should choose a reasonable default distance to skip forward or backward (such as 7 or 10 seconds).
MediaStreamTrack.onended - Web APIs
this event occurs when the track will no longer provide data to the stream for any reason, including the end of the media input being reached, the user revoking needed permissions, the source device being removed, or the remote peer ending a connection.
Using the MediaStream Recording API - Web APIs
the error/failure callback: the code is run if the getusermedia call fails for whatever reason.
MediaTrackSettings.latency - Web APIs
this is, of course, an approximation, since latency can vary for many reasons including cpu, transmission, and storage overhead.
Using the Media Capabilities API - Web APIs
there are a few reasons why an error might occur, including: the specified type isn't one of the two permtited values: file or media-source the contenttype given is the error can be due to the type not being one of the two possible values, the contenttype not being a valid codec mime type, or invalid or omitted definitions required in the videoconfiguration.
Transcoding assets for Media Source Extensions - Web APIs
note: the prebuilt ffmpeg does not include libfdk_aac due to licensing reasons.
MutationEvent - Web APIs
the practical reasons to avoid the mutation events are performance issues and cross-browser support.
Navigator.geolocation - Web APIs
note: for security reasons, when a web page tries to access location information, the user is notified and asked to grant permission.
Navigator.registerContentHandler() - Web APIs
for security reasons, it's not possible for an extension or web site to register content handlers targeting other sites.
Navigator.registerProtocolHandler() - Web APIs
permitted schemes for security reasons, registerprotocolhandler() restricts which schemes can be registered.
Online and offline events - Web APIs
(note: using window.ononline or window.onoffline will not work for compatibility reasons.) by specifying ononline="..." or onoffline="..." attributes on the <body> tag in the html markup.
Node.rootNode - Web APIs
WebAPINoderootNode
important: for compatibility reasons, this property has been replaced by the node.getrootnode() method.
Using the Notifications API - Web APIs
error triggered if something goes wrong with the notification; this is usually because the notification couldn't be displayed for some reason.
OfflineAudioCompletionEvent.OfflineAudioCompletionEvent() - Web APIs
offlineaudiocompletionevents are despatched to offlineaudiocontext instances for legacy reasons.
OfflineAudioCompletionEvent - Web APIs
note: this interface is marked as deprecated; it is still supported for legacy reasons, but it will soon be superseded when the promise version of offlineaudiocontext.startrendering is supported in browsers, which will no longer need it.
OfflineAudioContext.startRendering() - Web APIs
the former will eventually be removed, but currently both mechanisms are provided for legacy reasons.
OfflineAudioContext.suspend() - Web APIs
for this reason, it is not allowed to schedule multiple suspends at the same quantized frame.
PaymentRequest: shippingaddresschange event - Web APIs
bubbles no cancelable no interface paymentrequestupdateevent event handler property onshippingaddresschange usage notes depending on the browser, the shipping address information may be redacted for privacy reasons.
PaymentResponse.complete() - Web APIs
{ var fetchoptions = { method: 'post', credentials: include, body: json.stringify(paymentresponse) }; var serverpaymentrequest = new request('secure/payment/endpoint'); fetch(serverpaymentrequest, fetchoptions).then( response => { if (response.status < 400) { paymentresponse.complete("success"); } else { paymentresponse.complete("fail"); }; }).catch( reason => { paymentresponse.complete("fail"); }); }).catch(function(err) { console.error("uh oh, something bad happened", err.message); }); specifications specification status comment payment request apithe definition of 'paymentresponse: complete' in that specification.
PaymentResponse.retry() - Web APIs
typically you will use this by calling show(), then entering a loop or recursive function that checks the paymentresponse for errors or other reasons to retry the payment request.
PointerEvent - Web APIs
pointerout this event is fired for several reasons including: pointing device is moved out of the hit test boundaries of an element; firing the pointerup event for a device that does not support hover (see pointerup); after firing the pointercancel event (see pointercancel); when a pen stylus leaves the hover range detectable by the digitizer.
Pointer events - Web APIs
pointerout onpointerout fired for several reasons including: pointer is moved out of the hit test boundaries of an element; firing the pointerup event for a device that does not support hover (see pointerup); after firing the pointercancel event (see pointercancel); when a pen stylus leaves the hover range detectable by the digitizer.
PushSubscription.endpoint - Web APIs
for this reason, it is a good idea to keep your endpoint a secret, so others do not hijack it and abuse the push functionality.
RTCConfiguration.iceTransportPolicy - Web APIs
the agent—or the browser itself—may still perform some form of ip filtering on the incoming candidates for reasons including privacy and security, as well as to simply limit the number of candidates.
RTCDTMFSender - Web APIs
for that reason, dtmf can't be used between two webrtc-based devices, because there is no mechanism provided by webrtc for receiving dtmf codes.
RTCDtlsTransport - Web APIs
for this reason, you'll sometimes see separate transports created at first, one for each track, then see them get bundled up once it's known that bundling is possible.
RTCIceCandidate.relatedPort - Web APIs
they may in fact be omitted for security reasons, but if present can be a useful tool during debugging.
RTCIceCandidate.usernameFragment - Web APIs
note: there is no api to obtain the ice password, for what should be fairly obvious security reasons.
RTCIceCandidatePairStats.state - Web APIs
if the check fails for any reason, the pair moves into its final state, failed.
RTCIceCandidateStats.networkType - Web APIs
this may be because the browser isn't able to determine the network type for some reason or it may be intentionally getting obscured for security reasons, such as to avoid device fingerprinting.
RTCInboundRtpStreamStats.bytesReceived - Web APIs
this value can be used to calculate an approximation of the average media data rate: avgdatarate = rtcinboundrtpstreamstats.bytesreceived / elapsedtime; this value gets reset to zero if the sender's ssrc identifier changes for any reason.
RTCNetworkType - Web APIs
this may be because the browser isn't able to determine the network type for some reason or it may be intentionally getting obscured for security reasons, such as to avoid device fingerprinting.
RTCPeerConnection.createAnswer() - Web APIs
operationerror generation of the sdp failed for some reason; this is a general failure catch-all exception.
RTCPeerConnection: icecandidate event - Web APIs
bubbles no cancelable no interface rtcpeerconnectioniceevent event handler property rtcpeerconnection.onicecandidate description there are three reasons why the icecandidate event is fired on an rtcpeerconnection.
RTCPeerConnection.onicegatheringstatechange - Web APIs
you don't need to watch for this event unless you have specific reasons to want to closely monitor the state of ice gathering.
RTCPeerConnection.setConfiguration() - Web APIs
renegotiation of the connection is needed, and a different set of ice servers needs to be used for some reason.
RTCPeerConnection.setLocalDescription() - Web APIs
they're interchangeable: mypeerconnection.createoffer().then(function(offer) { return mypeerconnection.setlocaldescription(offer); }); this is equivalent to: mypeerconnection.createoffer().then(function(offer) { return mypeerconnection.setlocaldescription(new rtcsessiondescription(offer)); }); for this reason, the rtcsessiondescription() constructor is deprecated.
RTCPeerConnectionIceErrorEvent - Web APIs
errortext read only a domstring containing the stun reason text returned by the stun or turn server.
RTCRtpReceiver.getCapabilities() static function - Web APIs
for that reason, in privacy-sensitive contexts, the browser may choose to obscure the capabilities; this might be done, for example, by leaving out rarely-used codec configurations.
RTCRtpSender.getCapabilities() static function - Web APIs
for that reason, in privacy-sensitive contexts, the browser may choose to obscure the capabilities; this might be done, for example, by leaving out rarely-used codec configurations.
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).
RTCRtpTransceiver.stopped - Web APIs
the transceiver is stopped if the stop() method has been called or if a change to either the local or the remote description has caused the transceiver to be stopped for some reason.
Range.createContextualFragment() - Web APIs
in the html case, if the context node would be html, for historical reasons the fragment parsing algorithm is invoked with body as the context instead.
ReadableByteStreamController.close() - Web APIs
exceptions typeerror the source object is not a readablebytestreamcontroller, or the stream is not readable for some other reason.
ReadableByteStreamController.enqueue() - Web APIs
exceptions typeerror the source object is not a readablebytestreamcontroller, or the stream cannot be read for some other reason, or the chunk is not an object, or the chunk's internal array buffer is non-existant or detached.
ReadableByteStreamController.error() - Web APIs
exceptions typeerror the source object is not a readablebytestreamcontroller, or the stream is not readable for some other reason.
ReadableStream - Web APIs
the supplied reason argument will be given to the underlying source, which may or may not use it.
ReadableStreamBYOBReader - Web APIs
the supplied reason argument will be given to the underlying source, which may or may not use it.
ReadableStreamDefaultController.close() - Web APIs
a cancel() function is also provided to stop the generation if readablestream.cancel() is called for any reason.
ReadableStreamDefaultController.enqueue() - Web APIs
a cancel() function is also provided to stop the generation if readablestream.cancel() is called for any reason.
ReadableStreamDefaultController.error() - Web APIs
exceptions typeerror the source object is not a readablestreamdefaultcontroller, or the stream is not readable for some other reason.
ReadableStreamDefaultController - Web APIs
a cancel() function is also provided to stop the generation if readablestream.cancel() is called for any reason.
ReadableStreamDefaultReader - Web APIs
the supplied reason argument will be given to the underlying source, which may or may not use it.
Reporting API - Web APIs
for security or user annoyance reasons.
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.
ResizeObserverEntry.contentRect - Web APIs
note that this is better supported than resizeobserverentry.borderboxsize or resizeobserverentry.contentboxsize, but it is left over from an earlier implementation of the resize observer api, is still included in the spec for web compat reasons, and may be deprecated in future versions.
ResizeObserverEntry - Web APIs
note that this is better supported than the above two properties, but it is left over from an earlier implementation of the resize observer api, is still included in the spec for web compat reasons, and may be deprecated in future versions.
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.
RsaHashedKeyGenParams - Web APIs
unless you have a good reason to use something else, specify 65537 here ([0x01, 0x00, 0x01]).
Screen.colorDepth - Web APIs
WebAPIScreencolorDepth
per the cssom, some implementations return 24 for compatibility reasons.
Screen.pixelDepth - Web APIs
WebAPIScreenpixelDepth
per the cssom, some implementations return 24 for compatibility reasons.
Service Worker API - Web APIs
service workers only run over https, for security reasons.
StorageEstimate - Web APIs
these values are only estimates for several reasons, including both performance and preventing storage capacity data from being used for fingerprinting purposes.
StorageManager.estimate() - Web APIs
the returned values are not exact; between compression, deduplication, and obfuscation for security reasons, they will be imprecise.
Storage Access API - Web APIs
in addition, sandboxed <iframe>s cannot be granted storage access by default for security reasons.
SubtleCrypto.decrypt() - Web APIs
operationerror raised when the operation failed for an operation-specific reason (e.g.
TouchEvent - Web APIs
there are several possible reasons why this might happen (and the exact reasons will vary from device to device, as well as browser to browser): an event of some kind occurred that canceled the touch; this might happen if a modal alert pops up during the interaction.
Multi-touch interaction - Web APIs
ev.preventdefault(); // cache the touch points for later processing of 2-touch pinch/zoom if (ev.targettouches.length == 2) { for (var i=0; i < ev.targettouches.length; i++) { tpcache.push(ev.targettouches[i]); } } if (logevents) log("touchstart", ev, true); update_background(ev); } touch move handler the touchmove handler calls preventdefault() for the same reason mentioned above, and invokes the pinch/zoom handler.
ValidityState - Web APIs
properties for each of these boolean properties, a value of true indicates that the specified reason validation may have failed is true, with the exception of the valid property, which is true if the element's value obeys all constraints.
WakeLock.request() - Web APIs
WebAPIWakeLockrequest
the request() method is wrapped in a try...catch statement to account for if the browser refuses the request for any reason.
WakeLock - Web APIs
WebAPIWakeLock
the wakelock.request method is wrapped in a try...catch statement to account for if the browser refuses the request for any reason.
WebGLRenderingContext.isContextLost() - Web APIs
usage notes there are several reasons why a webgl context may be lost, making it necessary to re-establish the context before resuming rendering.
Basic scissoring - Web APIs
the reason for this distinction is that fragment color (and other fragment values, such as depth) may be manipulated and changed several times during graphics operations before finally being written to the screen.
WebRTC connectivity - Web APIs
for that reason, webrtc uses pending and current descriptions.
Introduction to WebRTC protocols - Web APIs
there are many reasons why a straight up connection from peer a to peer b simply won’t work.
Signaling and video calling - Web APIs
ending the call there are many reasons why calls may end.
WebSocket - Web APIs
WebAPIWebSocket
methods websocket.close([code[, reason]]) closes the connection.
Viewpoints and viewers: Simulating cameras in WebXR - Web APIs
the value of w is always 0 for vectors, so the aforementioned vector can also be represented using [3, 1, -2, 0] or: [31-20]\left [ \begin{matrix} 3 \\ 1 \\ -2 \\ 0 \end{matrix} \right ] webxr automatically normalizes vectors to have a length of 1 meter; however, you may find that it makes sense to do it yourself for various reasons, such as to improve performance of calculations by not having to repeatedly perform normalization.
Geometry and reference spaces in WebXR - Web APIs
const radians_per_degree = math.pi / 180.0; let degreestoradians = (deg) => deg * radians_per_degree; let radianstodegrees = (rad) => rad / radians_per_degree; times and durations note that for security reasons, domhighrestimestamp usually introduces a small amount of imprecision to the clock in order to prevent it from being used in fingerprinting and timing-based attacks.
Example and tutorial: Simple synth keyboard - Web APIs
function notepressed(event) { if (event.buttons & 1) { let dataset = event.target.dataset; if (!dataset["pressed"]) { osclist[dataset["octave"][dataset["note"]]] = playtone(dataset["frequency"]); dataset["pressed"] = "yes"; } } } we start by checking whether the primary mouse button is pressed, for two reasons.
Background audio processing using AudioWorklet - Web APIs
thus for compatibility reasons you must always return true from process(), at least on chrome.
Web Audio API - Web APIs
the scriptprocessornode is kept for historic reasons but is marked as deprecated and will be removed in a future version of the specification.
Web Authentication API - Web APIs
examples for security reasons, web authentication calls (create() and get()) are cancelled if the browser window loses focus while the call is pending.
Using Web Workers - Web APIs
for this reason they are, in general, not governed by the content security policy of the document (or parent worker) that created them.
Window.alert() - Web APIs
WebAPIWindowalert
for this reason, you should not overuse any function that creates a dialog box (or modal window).
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.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.
Privileged features - Web APIs
for compatibility reasons, it's now supported in firefox.
Window.pkcs11 - Web APIs
WebAPIWindowpkcs11
note: this property has been returned null since gecko 1.9.0.14 (firefox 3.0.14) and removed in gecko 29.0 (firefox 29 / thunderbird 29 / seamonkey 2.26)) for security reasons.
Window.prompt() - Web APIs
WebAPIWindowprompt
for this reason, you should not overuse any function that creates a dialog box (or modal window).
Window: rejectionhandled event - Web APIs
bubbles no cancelable no interface promiserejectionevent event handler property onrejectionhandled example you can use the rejectionhandled event to log promises that get rejected to the console, along with the reasons why they were rejected: window.addeventlistener("rejectionhandled", event => { console.log("promise rejected; reason: " + event.reason); }, false); specifications specification status comment html living standardthe definition of 'rejectionhandled' in that specification.
Window.resizeBy() - Web APIs
WebAPIWindowresizeBy
creating and resizing an external window for security reasons, it's no longer possible in firefox for a website to change the default size of a window in a browser if the window wasn’t created by window.open(), or contains more than one tab.
Window - Web APIs
WebAPIWindow
generally, anything that can't reasonably pertain to a tab pertains to the window instead.
WindowEventHandlers.onrejectionhandled - Web APIs
}); window.onrejectionhandled = function(event) { ...}; example window.onrejectionhandled = function(e) { console.log(e.reason); } specifications specification status comment html living standardthe definition of 'onrejectionhandled' in that specification.
Synchronous and asynchronous requests - Web APIs
in general, however, asynchronous requests should be preferred to synchronous requests for performance reasons.
XMLHttpRequest.setRequestHeader() - Web APIs
for security reasons, some headers can only be controlled by the user agent.
XMLHttpRequest - Web APIs
note: according to the http/2 specification (8.1.2.4 response pseudo-header fields), http/2 does not define a way to carry the version or reason phrase that is included in an http/1.1 status line.
XRReferenceSpace: reset event - Web APIs
there are a number of reasons why a reset might occur.
XRSession.updateRenderState() - Web APIs
invalidstateerror this may occur for one of the following reasons: the xrsession has already ended, so you cannot change its render state.
XRSystem: isSessionSupported() - Web APIs
e-vr') .then((issupported) => { if (issupported) { userbutton.addeventlistener('click', onbuttonclicked); userbutton.innerhtml = 'enter xr'; userbutton.disabled = false; } }); } function onbuttonclicked() { if (!xrsession) { navigator.xr.requestsession('immersive-vr') .then((session) => { xrsession = session; // onsessionstarted() not shown for reasons of brevity and clarity.
XRSystem - Web APIs
WebAPIXRSystem
deventlistener("click", onbuttonclicked); navigator.xr.issessionsupported('immersive-vr') .then((issupported) => { if (issupported) { immersivebutton.disabled = false; } else { immersivebutton.disabled = true; }); } function onbuttonclicked() { if (!xrsession) { navigator.xr.requestsession('immersive-vr') .then(() => { // onsessionstarted() not shown for reasons of brevity and clarity.
XRWebGLLayer() - Web APIs
the specified webgl context, context, has been lost for any reason, such as a gpu switch or reset.
XSL Transformations in Mozilla FAQ - Web APIs
mozilla won't load xslt stylesheets from a different domain for security reasons.
ARIA live regions - Accessibility
for regions which are not important, or would be annoying because of rapid updates or other reasons, silence them with aria-live="off".
ARIA Test Cases - Accessibility
note that for tabs with ajax content, for performance reasons it is optional that they only load the panel only once the user presses space on the new tab.
ARIA: application role - Accessibility
background for historic reasons, especially on windows, screen readers and some other assistive technologies (at) have traditionally grabbed the whole web content from the browser at once after it had finished loading.
ARIA: form role - Accessibility
important: use an html <form> element to contain your form controls, rather than the aria form role, unless you have a very good reason.
ARIA: listbox role - Accessibility
if there is a valid reason to expand the listbox, the combobox role may be more appropriate.
An overview of accessible web applications and widgets - Accessibility
the problem dynamic content on a web page can be particularly problematic for users who, for whatever reason, are unable to view the screen.
Architecture - Accessibility
one reason for this is that there are fewer nodes to pass across process, and that improves performance.
Web Accessibility: Understanding Colors and Luminance - Accessibility
put another way, as humans, the color blue is perceived differently than other colors, for multiple reasons.
Operable - Accessibility
for example, purchases sometimes need to be completed within a time limit for security reasons.
Understandable - Accessibility
it is better to just write all content at lower secondary level, even technical documentation like programming tutorials, unless there is a good reason not to (e.g.
Understanding the Web Content Accessibility Guidelines - Accessibility
for this reason, we have summarised the practical steps you need to take to satisfy the different recommendations, with further links to more details where required.
::selection - CSS: Cascading Style Sheets
red; } p::-moz-selection { color: white; background-color: blue; } /* make selected text gold on a red background */ ::selection { color: gold; background-color: red; } /* make selected text in a paragraph white on a blue background */ p::selection { color: white; background-color: blue; } result accessibility concerns don't override selected text styles for purely aesthetic reasons — users can customize them to suit their needs.
Resizing background images with background-size - CSS: Cascading Style Sheets
we want (for some reason likely involving horrifyingly bad site design) to tile four copies of this image into a 300x300-pixel element.
Using URL values for the cursor property - CSS: Cascading Style Sheets
if that file does not exist or is not valid for some other reason, bar.gif is tried, and if that can't be used either, auto will be used.
Spanning and Balancing Columns - CSS: Cascading Style Sheets
for this reason, some care should be taken when deciding to make an element a spanner and ensure this scenario is accounted for.
CSS Containment - CSS: Cascading Style Sheets
the specification describes this value as being "reasonably safe to apply widely".
Typical use cases of Flexbox - CSS: Cascading Style Sheets
in a perfect world of browser support, the reason you'd choose to use flexbox is because you want to lay a collection of items out in one direction or another.
Flow Layout and Writing Modes - CSS: Cascading Style Sheets
this can be used to properly typeset vertical languages or for creative reasons.
In Flow and Out of Flow - CSS: Cascading Style Sheets
for this reason methods which remove elements from being in-flow should be used with understanding of the effect that they have.
OpenType font features guide - CSS: Cascading Style Sheets
discovering availability of features in fonts this is sometimes the trickiest thing to work out if you don't have any documentation that came with the fonts (many type designers and foundries will provide sample pages and css just for this very reason).
Auto-placement in CSS Grid Layout - CSS: Cascading Style Sheets
therefore if you have some unwrapped text for some reason in your grid, be aware that it might show up somewhere unexpected as it will be auto-placed according to the auto-placement rules.
Box alignment in CSS Grid Layout - CSS: Cascading Style Sheets
the reason for this, is that if items with an aspect ratio are set to stretch, this default would distort them.
Realizing common layouts using CSS Grid Layout - CSS: Cascading Style Sheets
.listing li { border: 1px solid #ffe066; border-radius: 5px; display: flex; flex-direction: column; } .listing .cta { margin-top: auto; border-top: 1px solid #ffe066; padding: 10px; text-align: center; } .listing .body { padding: 10px; } this is really one of the key reasons i would use flexbox rather than grid, if i am just aligning or distributing something in a single dimension, that’s a flexbox use case.
Consistent list indentation - CSS: Cascading Style Sheets
set both to 1.25em, if you like -- there's no reason why you have to stick with pixel-based indentation.
Basic concepts of Logical Properties and Values - CSS: Cascading Style Sheets
when working with a site in a writing mode other than a horizontal, top to bottom one, or when using writing modes for creative reasons, being able to relate to the flow of the content makes a lot of sense.
Logical properties for margins, borders and padding - CSS: Cascading Style Sheets
border examples the border properties are the main reason that logical properties and values seems to have so many properties, as we have the longhands for the color, width, and style of the border on each side of a box, along with the shorthand to set all three at once for each side.
Stacking context example 2 - CSS: Cascading Style Sheets
the reason is that they do not belong to the same stacking context.
The stacking context - CSS: Cascading Style Sheets
for the same reason div #2 (z-index 2) is rendered under div#5 (z-index 1) because div #5 belongs to div #3, which has an higher z-index value.
Card - CSS: Cascading Style Sheets
this would be a reasonable way to lay out the card, although i have a slight preference for being able to control the tracks from the container rather than needing to add rules to the items.
Grid wrapper - CSS: Cascading Style Sheets
accessibility concerns although grid enables us to position items anwhere (within reason), it is important when placing items using css grid that your underlying markup follows a logical order (see css grid layout and accessibility for more details).
Recipe: Media objects - CSS: Cascading Style Sheets
another reason to use grid layout is in order that i can use fit-content() for the track sizing of the image.
Using media queries - CSS: Cascading Style Sheets
for example, using the max- functionality for width we might write the following: note: the media queries level 4 specification has reasonable support in modern browsers, but some media features are not well supported.
Using CSS custom properties (variables) - CSS: Cascading Style Sheets
a common best practice is to define custom properties on the :root pseudo-class, so that it can be applied globally across your html document: :root { --main-bg-color: brown; } however, this doesn't always have to be the case: you maybe have a good reason for limiting the scope of your custom properties.
Visual formatting model - CSS: Cascading Style Sheets
for this reason, we see the behavior explained above, where anonymous boxes are introduced to ensure all of the items can participate in a block or inline formatting context.
appearance (-moz-appearance, -webkit-appearance) - CSS: Cascading Style Sheets
note that firefox and edge also support -webkit-appearance, for compatibility reasons.
break-after - CSS: Cascading Style Sheets
page break aliases for compatibility reasons, the legacy page-break-after property should be treated by browsers as an alias of break-after.
break-before - CSS: Cascading Style Sheets
page break aliases for compatibility reasons, the legacy page-break-before property should be treated by browsers as an alias of break-before.
break-inside - CSS: Cascading Style Sheets
page break aliases for compatibility reasons, the legacy page-break-inside property should be treated by browsers as an alias of break-inside.
conic-gradient() - CSS: Cascading Style Sheets
for this reason, conic-gradient() won't work on background-color and other properties that use the <color> data type.
font-size-adjust - CSS: Cascading Style Sheets
this will still produce reasonable results in browsers that do not support font-size-adjust, where a 14px font will be used.
<length> - CSS: Cascading Style Sheets
WebCSSlength
for this reason, prefer relative lengths (such as em or rem) when setting font-size.
linear-gradient() - CSS: Cascading Style Sheets
for this reason, linear-gradient() won't work on background-color and other properties that use the <color> data type.
list-style-type - CSS: Cascading Style Sheets
the cjk-ideographic is identical to trad-chinese-informal; it exists for legacy reasons.
overflow - CSS: Cascading Style Sheets
WebCSSoverflow
this is necessary for technical reasons — if a float intersected with the scrolling element it would forcibly rewrap the content after each scroll step, leading to a slow scrolling experience.
page-break-after - CSS: Cascading Style Sheets
for compatibility reasons, page-break-after should be treated by browsers as an alias of break-after.
page-break-before - CSS: Cascading Style Sheets
for compatibility reasons, page-break-before should be treated by browsers as an alias of break-before.
page-break-inside - CSS: Cascading Style Sheets
for compatibility reasons, page-break-inside should be treated by browsers as an alias of break-inside.
radial-gradient() - CSS: Cascading Style Sheets
for this reason, radial-gradient() won't work on background-color and other properties that use the <color> data type.
repeating-conic-gradient() - CSS: Cascading Style Sheets
for this reason, repeating-conic-gradient() won't work on background-color and other properties that use the <color> data type.
repeating-linear-gradient() - CSS: Cascading Style Sheets
for this reason, repeating-linear-gradient() won't work on background-color and other properties that use the <color> data type.
repeating-radial-gradient() - CSS: Cascading Style Sheets
for this reason, repeating-radial-gradient() won't work on background-color and other properties that use the <color> data type.
text-justify - CSS: Cascading Style Sheets
this has the same effect as not setting text-align at all, although it is useful if you need to turn justification on and off for some reason.
WAI ARIA Live Regions/API Support - Developer guides
they are only counted as user input if the original reason they happened was because of user input.
Cross-browser audio basics - Developer guides
to ensure reasonable coverage, we should specify at least two different formats.
Setting up adaptive streaming media sources - Developer guides
other reasons to use live profile over ondemand for vod content may be: your client or server does not support range requests your server cannot cache range requests efficiently your server cannot prefetch range requests efficiently the sidx* is large and having to load it first slows down startup a little you want to use the original files for both dash and other forms of delivery (such as microsoft s...
Creating a cross-browser video player - Developer guides
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.
Challenge solutions - Developer guides
solution the following values are reasonable approximations of the named colors: strong { color: #f00; /* red */ background-color: #ddf; /* pale blue */ font: 200% serif; } .carrot { color: #fa0; /* orange */ } .spinach { color: #080; /* dark green */ } p { color: #00f; /* blue */ } content add an image challenge add a one rule to your stylesheet so that it displays the image at the start of each line.
DOM onevent handlers - Developer guides
ck")} </code><br>`); //changing handler using .setattribute log('<hr/><br> changing onclick handler using <strong> setattribute method </strong> '); el.setattribute("onclick", 'anchoronclick(event)'); log(`changed the property to: <code> ${el.onclick.tostring()} </code>`); log(`now even the html attribute has changed: <code> ${el.getattribute("onclick")} </code><br>`); result for historical reasons, some attributes/properties on the <body> and <frameset> elements instead set event handlers on their parent window object.
Media events - Developer guides
suspend sent when loading of the media is suspended; this may happen either because the download has completed or because it has been paused for any other reason.
Mutation events - Developer guides
the practical reasons to avoid the mutation events are performance issues and cross-browser support.
Making content editable - Developer guides
you can use the older firefox behavior with this line: document.execcommand("defaultparagraphseparator", false, "br"); security for security reasons, firefox doesn't let javascript code use clipboard related features (copy, paste, etc.) by default.
HTML5 Parser - Developer guides
WebGuideHTMLHTML5HTML5 Parser
however, unclosed comments often already break in existing browsers for one reason or another, so it's unlikely that you have this issue in sites that are tested in multiple browsers.
Separate sites for mobile and desktop - Developer guides
another case where you may be forced to use this approach is if you cannot, for whatever reason, modify your existing desktop site, and need to have a 100% separate mobile site.
Applying color to HTML elements using CSS - HTML: Hypertext Markup Language
if you need a lot of related colors for some reason, those are likely to be good ones.
HTML attribute: pattern - HTML: Hypertext Markup Language
this is one of the several reasons you must include information informing users how to fill out the the control to match the requirements.
HTML attribute: required - HTML: Hypertext Markup Language
for this reason, to improve code maintenance, it is recommened to either include the required attribute in every same-named radio button in the group or none.
HTML attribute reference - HTML: Hypertext Markup Language
html specifications try to make this as developer-friendly as possible, but for various reasons (mostly historical), some attributes behave oddly (select.size, for example) and you should read the specifications to understand how exactly they behave.
<input type="checkbox"> - HTML: Hypertext Markup Language
WebHTMLElementinputcheckbox
beyond accessibility, this is another good reason to properly set up <label> elements on your forms.
<input type="datetime-local"> - HTML: Hypertext Markup Language
the main reasons why this was removed are a lack of implementation in browsers, and concerns over the user interface/experience.
<input type="image"> - HTML: Hypertext Markup Language
WebHTMLElementinputimage
it will also display if the image can't be shown for any reason (for example if the path is misspelled).
<input type="radio"> - HTML: Hypertext Markup Language
WebHTMLElementinputradio
beyond accessibility, this is another good reason to properly set up <label> elements on your forms.
<input type="submit"> - HTML: Hypertext Markup Language
WebHTMLElementinputsubmit
there's a reason this kind of control is sometimes called a "simple button." specifications specification status comments html living standardthe definition of '<input type="submit">' in that specification.
<input type="tel"> - HTML: Hypertext Markup Language
WebHTMLElementinputtel
examples in this example, we present a simple interface with a <select> element that lets the user choose which country they're in, and a set of <input type="tel"> elements to let them enter each part of their phone number; there is no reason why you can't have multiple tel inputs.
<link>: The External Resource Link element - HTML: Hypertext Markup Language
WebHTMLElementlink
the values generally are given by the http protocol when it is used, but it might (for similar reasons as for the title attribute) be useful to include advisory information in advance in the link.
<style>: The Style Information element - HTML: Hypertext Markup Language
WebHTMLElementstyle
note: there is very little reason to include this attribute in modern web documents.
<wbr> - HTML: Hypertext Markup Language
WebHTMLElementwbr
for the same reason, the <wbr> element does not introduce a hyphen at the line break point.
hidden - HTML: Hypertext Markup Language
if the content is not applicable or relevant, then there is no reason to link to it.
Preloading content with rel="preload" - HTML: Hypertext Markup Language
because of various reasons, these have to be fetched using anonymous mode cors (see font fetching requirements).
Quirks Mode and Standards Mode - HTML: Hypertext Markup Language
there are no valid reasons to use a more complicated doctype.
Using the application cache - HTML: Hypertext Markup Language
the "v1" comment in the example above is there for a good reason.
HTTP authentication - HTTP
in chrome, the username:password@ part in urls is even stripped out for security reasons.
Large-Allocation - HTTP
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 - HTTP
max-age=5184000 tells the client to store this information for two months, which is a reasonable time limit according to the ietf rfc.
Save-Data - HTTP
this could be for reasons such as high transfer costs, slow connection speeds, etc.
SameSite cookies - HTTP
none used to be the default value, but recent browser versions made lax the default value to have reasonably robust defense against some classes of cross-site request forgery (csrf) attacks.
Upgrade - HTTP
WebHTTPHeadersUpgrade
the server can choose to ignore the request, for any reason, in which case it should just respond as though the upgrade header had not been sent (for example, with a  200 ok).
Firefox user agent string reference - HTTP
some gecko-based browsers may not opt into using this token; for this reason, sniffers should be looking for gecko — not firefox!
User-Agent - HTTP
for historical reasons, almost every browser today sends it.
POST - HTTP
WebHTTPMethodsPOST
non-alphanumeric characters in both keys and values are percent encoded: this is the reason why this type is not suitable to use with binary data (use multipart/form-data instead) multipart/form-data: each value is sent as a block of data ("body part"), with a user agent-defined delimiter ("boundary") separating each part.
An overview of HTTP - HTTP
WebHTTPOverview
though such constraint is a burden to the server, http headers can relax this strict separation on the server side, allowing a document to become a patchwork of information sourced from different domains; there could even be security-related reasons to do so.
HTTP Public Key Pinning (HPKP) - HTTP
max-age=5184000 tells the client to store this information for two months, which is a reasonable time limit according to the ietf rfc.
416 Range Not Satisfiable - HTTP
WebHTTPStatus416
the most likely reason is that the document doesn't contain such ranges, or that the range header value, though syntactically correct, doesn't make sense.
HTTP response status codes - HTTP
WebHTTPStatus
451 unavailable for legal reasons the user-agent requested a resource that cannot legally be provided, such as a web page censored by a government.
A re-introduction to JavaScript (JS tutorial) - JavaScript
for this reason, we sometimes speak simply of "true values" and "false values," meaning values that become true and false, respectively, when converted to booleans.
Functions - JavaScript
(the reason it is called "chaining" is explained later.) consider the following example: function a(x) { function b(y) { function c(z) { console.log(x + y + z); } c(3); } b(2); } a(1); // logs 6 (1 + 2 + 3) in this example, c accesses b's y and a's x.
Introduction - JavaScript
javascript follows most java expression syntax, naming conventions and basic control-flow constructs which was the reason why it was renamed from livescript to javascript.
JavaScript modules - JavaScript
the reasons given are: it is good for clarity, i.e.
Regular expressions - JavaScript
for this reason, if you use this form without assigning it to a variable, you cannot subsequently access the properties of that regular expression.
Working with objects - JavaScript
there is a strong convention, with good reason, to use a capital initial letter.
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.
Array.prototype.values() - JavaScript
(); // object { value: undefined, done: true } iteraror.next().value; // undefined one-use: the array iterator object is one use or temporary object example: var arr = ['a', 'b', 'c', 'd', 'e']; var iterator = arr.values(); for (let letter of iterator) { console.log(letter); } //"a" "b" "c" "d" "e" for (let letter of iterator) { console.log(letter); } // undefined reason: when next().done=true or currentindex>length the for..of loop ends.
BigInt - JavaScript
usage recommendations coercion because coercing between number and bigint can lead to loss of precision, it is recommended to only use bigint when values greater than 253 are reasonably expected and not to coerce between the two types.
Date.prototype.toLocaleString() - JavaScript
for this reason, you cannot expect to be able to compare the results of tolocalestring() to a static value: "1/1/2019, 01:00:00" === new date("2019-01-01t01:00:00z").tolocalestring("en-us"); // true in firefox and others // false in ie and edge note: see also this stackoverflow thread for more details and examples.
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.DateTimeFormat.prototype.format() - JavaScript
for this reason you cannot expect to be able to compare the results of format() to a static value: let d = new date("2019-01-01t00:00:00.000000z"); let formatteddate = intl.datetimeformat(undefined, { year: 'numeric', month: 'numeric', day: 'numeric', hour: 'numeric', minute: 'numeric', second: 'numeric' }).format(d); "1.1.2019, 01:00:00" === formatteddate; // true in firefox and others // false in...
Map - JavaScript
for this reason (and because there were no built-in alternatives), objects have been used as maps historically.
Math.atan() - JavaScript
examples using math.atan() math.atan(1); // 0.7853981633974483 math.atan(0); // 0 math.atan(-0); // -0 math.atan(infinity); // 1.5707963267948966 math.atan(-infinity); // -1.5707963267948966 // the angle that the line [(0,0);(x,y)] forms with the x-axis in a cartesian coordinate system math.atan(y / x); note that you may want to avoid using ±infinity for stylistic reasons.
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.
Math.imul() - JavaScript
the reason imul exists is because it is faster in only one (so far) circumstance: asmjs.
Number.MAX_SAFE_INTEGER - JavaScript
the reasoning behind that number is that javascript uses double-precision floating-point format numbers as specified in ieee 754 and can only safely represent numbers between -(253 - 1) and 253 - 1.
Number.MIN_SAFE_INTEGER - JavaScript
the reasoning behind that number is that javascript uses double-precision floating-point format numbers as specified in ieee 754 and can only safely represent numbers between -(253 - 1) and 253 - 1.
Object.freeze() - JavaScript
ect.freeze(new float64array(new arraybuffer(64), 63, 0)) // no elements float64array [] > object.freeze(new float64array(new arraybuffer(64), 32, 2)) // has elements typeerror: cannot freeze array buffer views with elements note that; as the standard three properties (buf.bytelength, buf.byteoffset and buf.buffer) are read-only (as are those of an arraybuffer or sharedarraybuffer), there is no reason for attempting to freeze these properties.
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.matchAll() - JavaScript
const regexp = regexp('[a-c]','g'); regexp.lastindex = 1; const str = 'abc'; array.from(str.matchall(regexp), m => `${regexp.lastindex} ${m[0]}`); // array [ "1 b", "1 c" ] better access to capturing groups (than string.prototype.match()) another compelling reason for matchall is the improved access to capture groups.
String.prototype.trimEnd() - JavaScript
however, for web compatibility reasons, trimright remains as an alias to trimend.
String.prototype.trimStart() - JavaScript
however, for web compatibility reasons, trimleft remains as an alias to trimstart.
String - JavaScript
for example: let s1 = '2 + 2' // creates a string primitive let s2 = new string('2 + 2') // creates a string object console.log(eval(s1)) // returns the number 4 console.log(eval(s2)) // returns the string "2 + 2" for these reasons, the code may break when it encounters string objects when it expects a primitive string instead, although generally, authors need not worry about the distinction.
WebAssembly.Table.prototype.grow() - JavaScript
exceptions if the grow() operation fails for whatever reason, a rangeerror is thrown.
isNaN() - JavaScript
n("37,5"); // true isnan('123abc'); // true: parseint("123abc") is 123 but number("123abc") is nan isnan(''); // false: the empty string is converted to 0 which is not nan isnan(' '); // false: a string with spaces is converted to 0 which is not nan // dates isnan(new date()); // false isnan(new date().tostring()); // true // this is a false positive and the reason why isnan is not entirely reliable isnan('blabla'); // true: "blabla" is converted to a number.
null - JavaScript
typeof null // "object" (not "null" for legacy reasons) typeof undefined // "undefined" null === undefined // false null == undefined // true null === null // true null == null // true !null // true isnan(1 + null) // false isnan(1 + undefined) // true specifications specification ecmascript (ecma-262)the definition of 'null value' in that specification.
parseInt() - JavaScript
for this reason, always specify a radix when using parseint.
undefined - JavaScript
typeof operator and undefined alternatively, typeof can be used: var x; if (typeof x === 'undefined') { // these statements execute } one reason to use typeof is that it does not throw an error if the variable has not been declared.
import - JavaScript
the following are some reasons why you might need to use dynamic import: when importing statically significantly slows the loading of your code and there is a low likelihood that you will need the code you are importing, or you will not need it until a later time.
var - JavaScript
bla = 2; var bla; // ...is implicitly understood as: var bla; bla = 2; for that reason, it is recommended to always declare variables at the top of their scope (the top of global code and the top of function code) so it's clear which variables are function scoped (local) and which are resolved on the scope chain.
Strict mode - JavaScript
for these reasons no recent browsers implement it.
Authoring MathML - MathML
mathml in xml documents (xhtml, epub, etc) if for some reason you need to use mathml in xml documents, be sure to satisfy the usual requirements: well-formed document, use of correct mime type, mathml namespace "http://www.w3.org/1998/math/mathml" on <math> roots.
Digital audio concepts - Web media technologies
there is a reason why 44.1 khz is considered the minimum "high fidelity" sampling rate.
Media container formats (file types) - Web media technologies
if for any reason you are only able to provide media in a single format, choose a format that's available on the broadest selection of devices and browsers, such as mp3 (for audio) or mp4 (for video and/or audio).
Handling media support issues in web content - Web media technologies
this places a small, but reasonably easily overcome, burden on the web developer: to properly handle the situation when the user's browser can't handle a particular type of media.
Mapping the width and height attributes of media container elements to their aspect-ratio - Web media technologies
eaking out of their containers when the container becomes narrower than the image, developers started using css like the following: img { max-width: 100%; height: auto; } this is really useful for responsive layouts, but unfortunately it causes the jank problem to return — the above css overrides the width and height attribute information, meaning that if the image has not loaded for some reason, its height will be set to 0.
Animation performance and frame rate - Web Performance
waterfall the timeline view shows the reason for the improved frame rate.
Recommended Web Performance Timings: How long is too long? - Web Performance
for this reason, script execution should be limited in scope, divided into chunks of code that can be executed in 50ms or less.
Optimizing startup performance - Web Performance
other than the reasons suggested above, consider the impact of a non-responsive page or user interface.
Privacy, permissions, and information security
while specifications for these technologies either state or recommend tactics for handling situations like this, browsers may offer different solutions to improve security even further or to try new features, or try to reduce complexity for users, among other possible reasons.
How to make PWAs re-engageable using Notifications and Push - Progressive web apps (PWAs)
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.
patternTransform - SVG: Scalable Vector Graphics
for backward compatibility reason, it is highly suggested to keep using the patterntransform attribute.
requiredFeatures - SVG: Scalable Vector Graphics
some browser support svg 1.0 feature strings for compatibility reasons.
Content type - SVG: Scalable Vector Graphics
note: for historical reasons, the delimiters are "url(" and ")", for compatibility with the css specifications.
<use> - SVG: Scalable Vector Graphics
WebSVGElementuse
for security reasons, browsers may apply the same-origin policy on use elements and may refuse to load a cross-origin url in the href attribute.
Specification Deviations - SVG: Scalable Vector Graphics
this page lists those deviations/extensions and our reasoning for them.
Basic shapes - SVG: Scalable Vector Graphics
for this reason, the next section in this tutorial will be focused on paths.
Filter effects - SVG: Scalable Vector Graphics
drop shadows, to provide a popular example, cannot be created reasonably with a combination of gradients.
Getting started - SVG: Scalable Vector Graphics
server misconfiguration is a very common reason for svg failing to load, so make sure you check yours.
Patterns - SVG: Scalable Vector Graphics
WebSVGTutorialPatterns
the reason they've been used here is described below.
SVG In HTML Introduction - SVG: Scalable Vector Graphics
for this reason, if you're behind a proxy server that caches the page, the example wont work in the second browser you load it in because it will receive the wrong content-type.) ...
SVG fonts - SVG: Scalable Vector Graphics
the value 1000 sets a reasonable value to work with.
Information Security Basics - Web security
a basic understanding of information security can help you avoid unnecessarily leaving your software and sites insecure and vulnerable to weaknesses that can be exploited for financial gain or other malicious reasons.
Same-origin policy - Web security
(a "tuple" is a set of items that together comprise a whole — a generic form for double/triple/quadruple/quintuple/etc.) the following table gives examples of origin comparisons with the url http://store.company.com/dir/page.html: url outcome reason http://store.company.com/dir2/other.html same origin only the path differs http://store.company.com/dir/inner/another.html same origin only the path differs https://store.company.com/page.html failure different protocol http://store.company.com:81/dir/page.html failure different port (http:// is port 80 by default) http://news.c...
Transport Layer Security - Web security
tls handshake timeout values if the tls handshake starts to become slow or unresponsive for some reason, the user's experience can be affected significantly.
Web security
secure contexts a secure context is a window or worker for which there is reasonable confidence that the content has been delivered securely (via https/tls), and for which the potential for communication with contexts that are not secure is limited.
XPath
note: support for xpath varies widely; it's supported reasonably well in firefox (although there are no plans to improve support further), while other browsers implement it to a lesser extent, if at all.
WebAssembly Concepts - WebAssembly
to functions) that could not otherwise be stored as raw bytes in memory (for safety and portability reasons).
Understanding WebAssembly text format - WebAssembly
webassembly could add an anyfunc type ("any" because the type could hold functions of any signature), but unfortunately this anyfunc type couldn’t be stored in linear memory for security reasons.