Search completed in 1.35 seconds.
451 Unavailable For Legal Reasons - HTTP
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 qualitylimitation
reason 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 qualitylimitation
reason = rtcoutboundrtpstreamstats.qualitylimitation
reason; value a map whose keys are domstrings whose values come from the rtcqualitylimitation
reason 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.qualitylimitation
reason' in that specification.
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.
Index - Web APIs
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
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(areject
reason) { console.warn('newpromise failed with
reason: ', areject
reason); }); 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(asuccess
reason) { alert('mypromise was succesful and
reason was = "' + asuccess
reason + '"'); }, function(areject
reason) { alert('mypromise failed for
reason = "' + uneval(areject
reason) + '"'); } ); 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 asuccess
reason 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 next
reason; } 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] a
reason); 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( a
reason ); parameters a
reason 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
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(areject
reason) { console.log('rename failed, areject
reason = ', areject
reason) } ) 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] a
reason); 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
(
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, np
reason 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(actordestroy
reason 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(actordestroy
reason 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(actordestroy
reason 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] a
reason); 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( a
reason ); parameters a
reason 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 aprompt
reason, 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 a
reason); 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 a
reason); 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 (a
reason) 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
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 un
reasonable 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 un
reasonable 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::responsereject
reason&& 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> responsereject
reason, true> asyncinitpromise; typedef mozpromise<bool, responsereject
reason, 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(actordestroy
reason why); ...
...*/ virtual bool answer__delete__(pplugininstancechild* actor) = 0; /* notification that actor deallocation is imminent, ipdl mechanisms are now unusable */ virtual void actordestroy(actordestroy
reason 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 un
reasonably 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
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 a
reason); 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 a
reason ); parameters a
reason 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 a
reason); 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 a
reason ); parameters acontext user defined context.
... a
reason 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
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
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.
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, a
reason) 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 a
reason 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_findcrlentry
reasonexten (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 a
reason); 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 a
reason ); parameters acode the status of the connection when closed; see status codes for possible values.
... a
reason 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, np
reason 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
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
<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
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); } } ...
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, a
reason) { // ...
...} and then on shutdown of your bootstrapped addon make sure to destroy the factory: function shutdown(adata, a
reason) { if (a
reason == app_shutdown) { return } // ...
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, np
reason 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.
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?
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 un
reasonable 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.
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.
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.
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.
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(a
reason) { console.error('rejected - promise_domyfunctrue - ', a
reason); } ).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 - ', a
reason); } ).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_findcrlentry
reasonexten 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_getdisabled
reason 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
* 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 a
reason); methods cancel() call this method to request that this object abort whatever operation it may be performing.
... void cancel( in nsresult a
reason ); parameters a
reason 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 a
reason); 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 a
reason ); parameters a
reason 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(a
reason) { if (a
reason != 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, a
reason) { 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, a
reason) { 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” nonincremental
reason 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.
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
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.
... qualitylimitation
reason a value from the rtcqualitylimitation
reason 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
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
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
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 – 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...
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.
<i>: The Idiomatic Text element - HTML: Hypertext Markup Language
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
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
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
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
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
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...
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
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.
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.
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.
self - Archive of obsolete content
load
reason 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...
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.").
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...
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.
Menu - Archive of obsolete content
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.
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.
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.
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.
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-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.
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.
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...
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.
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.
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.
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
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><blockquote></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.
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.
HTML table basics - Learn web development
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.
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.
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 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.
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 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.
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.
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...
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, a
reason = "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...
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_findcrlentry
reasonexten 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_getdisabled
reason 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
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.
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
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: valueor
reason, gen ⇒ promise resolve or reject the current async function's result promise with 'valueor
reason'.
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.
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
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.
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.
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(a
reason) { // 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.
xptcall FAQ
xptcall exists for two
reasons: to support invoking arbitrary methods on xpcom interfaces.
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.
Animation - Web APIs
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.
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.
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.
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.
CryptoKey - Web APIs
for security
reasons, the cryptokey interface can only be used in a secure context.
Binary strings - Web APIs
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 - 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.
Document.anchors - Web APIs
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
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.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
(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: 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
pointerout fired when a pointer is moved out of the hit test boundaries of an element (among other
reasons).
Element.classList - Web APIs
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.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
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.
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".
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.
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.
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.
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.
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.
LocalMediaStream - Web APIs
the primary
reason for this interface to exist was to add a stop() method to its mediastream parent interface.
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.
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 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.
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.
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
important: for compatibility
reasons, this property has been replaced by the node.getrootnode() method.
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.
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.
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.
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: 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.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.
Request.clone() - Web APIs
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
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.
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.
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
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
the wakelock.request method is wrapped in a try...catch statement to account for if the browser refuses the request for any
reason.
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.
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.
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.close() - Web APIs
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
for security
reasons the history object doesn't allow the non-privileged code to access the urls of other pages in the session history, but it does allow it to navigate the session history.
Window.pkcs11 - Web APIs
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: 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
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
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.
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.
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
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.
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.
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.
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).
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.
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.
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
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.
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.
Upgrade - HTTP
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).
POST - HTTP
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
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.
416 Range Not Satisfiable - HTTP
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
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.
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.
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.
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.
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 - 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.
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.
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.
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.