Search completed in 1.80 seconds.
1553 results for "local":
Your results are loading. Please wait...
Creating localizable web applications
an important step of developing a web application or creating web content is making sure that it can be localized.
... listed below are good practices and recommendations that should be followed in order to make your content easily localizable.
... don't forget about right-to-left locales.
...And 58 more matches
Localization content best practices
this document provides best practices for developers to create localizable code, and describes how to avoid some localizability (l12y) common mistakes.
... note: if you're a localizer and you want to contribute to the localization of mozilla products, you might want to read our localization quick start guide for information on localizing mozilla code.
... note on localizers mozilla localizers are volunteers with very diverse technical skills: some of them rely exclusively on translation tools, others prefer to work directly with text editors and don't have problems working with vcs systems.
...And 50 more matches
Localization - Archive of obsolete content
the sdk supports localization of strings appearing in: your main add-on's javascript code html files packaged with your add-on the title, description and homepage fields of your add-on's metadata the title and description fields of your add-on's preferences.
... it doesn't, yet, support localization of css or content scripts, or the add-on's title and description that appear in the add-ons manager.
... localized strings translated strings are kept in a directory called "locale" under your main add-on directory, one file for each locale.
...And 42 more matches
<input type="datetime-local"> - HTML: Hypertext Markup Language
<input> elements of type datetime-local create input controls that let the user easily enter both a date and a time, including the year, month, and day as well as the time in hours and minutes.
... the control is intended to simply represent a local date and time, not necessarily the user's local date and time.
... in other words, an implementation should allow any valid combination of year, month, day, hour, and minute - even if such a combination is invalid in the user's local time zone (such as times within a daylight saving time spring-forward transition gap).
...And 36 more matches
Localizing with Koala
introduction this tutorial will guide you through making a couple of changes to firefox's user interface using koala, an add-on for komodo edit created to help localizing mozilla.
... for the purposes of this tutorial, the locale code that we will use will be called "x-testing".
...included locale: en-us (this is the original locale you're translating from).
...And 34 more matches
Bootstrapping a new locale
(see also https://developer.mozilla.org/en/create_a_new_localization) the documentation here is no longer being maintained and is inaccurate.
... l10n documentation has moved to https://mozilla-l10n.github.io/localizer-documentation/ .
... to learn how to bootstrap a new locale for mozilla projects, please see those documents.
...And 31 more matches
Localizing without a specialized tool
from the create a new localization document, an interested localizer can follow a technical step-by-step process that starts the localization process by focusing on how to localize two of the primary types of localization files (dtd and properties) used in the mozilla source code.
... with that document, users can see immediately two localized files in their user interface by following closely and carefully the steps to create a language pack or a binary file that is ready for installation.
... repeating the process allows a localizer to create a testable package to see his or her work as they progress to a final version.
...And 31 more matches
Intl.Locale - JavaScript
the intl.locale object is a standard built-in property of the intl object that represents a unicode locale identifier.
... description the intl.locale object was created to allow for easier manipulation of unicode locales.
... unicode represents locales with a string, called a locale identifier.
...And 22 more matches
Localization and Plurals
you're likely here because you're localizing a .properties file and it had a link to this page.
... this page is to help explain how to localize these strings so that the correct plural form is shown to the user.
... if you're here to make your code (e.g., extensions) localizable for plural forms, you can jump straight to developing with pluralform.
...And 20 more matches
Localization technical reviews
this guide provides details on what a localization technical review is, what criteria are used for the technical reviews, and the process for requesting one and following its progress.
... the technical review process we use for new localizations can be confusing for any trying to start a new localization.
...this ensures that every user who downloads your localized mozilla application receives all of your hard work in a functional product.
...And 20 more matches
nsILocaleService
intl/locale/idl/nsilocaleservice.idlscriptable the locale service interface.
... 1.0 66 introduced gecko 1.6 inherits from: nsisupports last changed in gecko 1.9 (firefox 3) implemented by: @mozilla.org/intl/nslocaleservice;1.
... to use this service, use: var localeservice = components.classes["@mozilla.org/intl/nslocaleservice;1"] .getservice(components.interfaces.nsilocaleservice); method overview nsilocale getapplicationlocale(); astring getlocalecomponentforuseragent(); nsilocale getlocalefromacceptlanguage(in string acceptlanguage); nsilocale getsystemlocale(); nsilocale newlocale(in astring alocale); nsilocale newlocaleobject(in nsilocaledefinition localedefinition); obsolete since gecko 1.9 methods getapplicationlocale() gets the user preference for locale from the operating system.
...And 20 more matches
Localizations and character encodings - Developer guides
for most locales, the fallback encoding is windows-1252 (often called iso-8859-1), which was the encoding emitted by most windows applications in the 1990s and a superset of the encoding emitted by most unix applications in the 1990s as a deployed in the america has and in western europe.
... however, there are locales where web publishing was common already in the 1990s but the windows-1252 encoding was not suitable for the local language.
... in these locales, legacy content that doesn't declare its encoding is typically encoded using a legacy encoding other than windows-1252.
...And 20 more matches
nsILocalFile
xpcom/io/nsilocalfile.idlscriptable this interface adds methods to nsifile that are particular to a file that is accessible via the local file system.
... 66 introduced gecko 1.0 deprecated gecko 14 inherits from: nsifile last changed in gecko 1.0 implemented by: @mozilla.org/file/local;1.
... to create an instance, use: var localfile = components.classes["@mozilla.org/file/local;1"] .createinstance(components.interfaces.nsilocalfile); method overview void appendrelativenativepath(in acstring relativefilepath); native code only!
...And 19 more matches
How to enable locale switching in a XULRunner application - Archive of obsolete content
this article is for developers who have localised their xul application using dtd entity files and want to provide their users with a mechanism to switch the locale in the application itself.
... normally the application locale is inherited from the os environment of the host system, however there are situations when you might want to give users the option to override the default setting and choose a different locale.
...modify the application preferences first, you need to tell xulrunner that your application wishes to ignore the default os locale and that it will do its own choosing instead.
...And 18 more matches
Localizing an extension - Archive of obsolete content
« previousnext » this article expands upon the previous samples on extension writing by adding localization support to our stock watcher extension.
... performing a few simple steps makes your extension much easier to localize into various languages without having to edit the xul or javascript files themselves.
...download the sample localizing strings in xul files create the needed locale files each xul file that comprises the user interface for your extension should have a locale file in its locale directory.
...And 17 more matches
SVN for Localizers
welcome to the svn tutorial for localizers!
... here you'll learn the process of using svn to obtain mozilla website source files from the mozilla servers and pushing your localizations right back to them.
... brief intro to svn svn (abbreviation for subversion) is a free and open source repository tool we use to manage the localized mozilla web pages.
...And 16 more matches
Localization formats
there are 4 main approaches to web l10n with regards to the choice of technology used for localization logic: html/php .lang gettext (.po) wiki (tbd) the choice of the filetype depends on a couple of factors: how much content is there to be localized?
... will the content differ per locale?
...you may choose to present just the html for localization: we give an html file which lists several pieces of content like, <h1>getting started</h1> and the localizer translates to <h1>débuter avec firefox</h1> the localizer then submits the translated html or php back to us by either checking in changes to svn or sending us a patch that pascal checks in.
...And 15 more matches
Localizing with Pontoon
pontoon is a web-based, what-you-see-is-what-you-get (wysiwyg), localization (l10n) tool.
... at mozilla, we use pontoon to localize all mozilla products and websites, ranging from firefox to mozilla.org.
...here we'll discuss how to use pontoon to localize projects, from first sign-in to finalizing your contributions.
...And 14 more matches
RTCPeerConnection.setLocalDescription() - Web APIs
the rtcpeerconnection method setlocaldescription() changes the local description associated with the connection.
... this description specifies the properties of the local end of the connection, including the media format.
... if setlocaldescription() is called while a connection is already in place, it means renegotiation is underway (possibly to adapt to changing network conditions).
...And 14 more matches
Localizing extension descriptions
this article provides details on how to go about localizing the descriptions of mozilla add-ons, as well as for other metadata about your add-on.
... localizing in gecko 1.9 gecko 1.9 includes a new, more robust method for localizing add-on descriptions and other metadata.
... all of the different descriptions now appear in the install.rdf file using em:localized properties.
...And 13 more matches
Localizing with Mozilla Translator
like most cat tools, mozillatranslator employs glossaries and translation memory to leverage your work from previous translations, thus cutting time and effort when localizing new versions of mozilla applications.
... getting started with mozillatranslator mt uses products as groups of localization files with a common root directory (for instance, you may have a product for thunderbird, other for seamonkey, other for dom, other for toolkit, etc.) you update your repository copy using your favorite repository tool, and then update the product(s) in mt.
... if you are starting a new localization, all strings will be marked as new or updated.mt puts a fuzzy flag on each flag and saves it in its database.
...And 13 more matches
Date.prototype.toLocaleFormat() - Archive of obsolete content
the non-standard tolocaleformat() method converts a date to a string using the specified formatting.
...see also the newer version of date.prototype.tolocaledatestring().
...see warning: date.prototype.tolocaleformat is deprecated for more information and migration help.
...And 12 more matches
Array.prototype.toLocaleString() - JavaScript
the tolocalestring() method returns a string representing the elements of the array.
... the elements are converted to strings using their tolocalestring methods and these strings are separated by a locale-specific string (such as a comma “,”).
... syntax arr.tolocalestring([locales[, options]]); parameters locales optional a string with a bcp 47 language tag, or an array of such strings.
...And 12 more matches
Date.prototype.toLocaleString() - JavaScript
the tolocalestring() method returns a string with a language sensitive representation of this date.
... the new locales and options arguments let applications specify the language whose formatting conventions should be used and customize the behavior of the function.
... in older implementations, which ignore the locales and options arguments, the locale used and the form of the string returned are entirely implementation-dependent.
...And 12 more matches
Local Storage - Archive of obsolete content
« previousnext » note: you may rather be looking for dom storage (localstorage, etc.), unless you really are doing xul development.
... it is very common for an extension to require some kind of local persistent storage.
...we'll discuss logging in this section, but first let's look at the right (or at least, common and scalable) way of managing local files.
...And 11 more matches
How do you set up a local testing server? - Learn web development
this article explains how to set up a simple local testing server on your machine, and the basics of how to use it.
... objective: you will learn how to set up a local testing server.
... local files vs.
...And 10 more matches
Localizing with Mercurial
in mozilla, we use the the mercurial version control system (hg) to manage our source code and localizations.
... mercurial allows localizers to work locally (on their machines) and then push (an hg term) changes to a remote repository, which usually is hosted on the mozilla servers (hg.mozilla.org).
... localizing current versions of firefox, thunderbird and seamonkey includes working with mercurial.
...And 10 more matches
Localization sign-off reviews
this article presents an overview of why we do sign-off reviews of localizations, the details on the criteria used for the sign-off reviews, and the process for requesting a review and for following its progress.
...this ensures that every user who downloads your localized mozilla application receives all of your hard work in a functional product.
... allows us to understand how each l10n team is performing their localization work.
...And 10 more matches
Writing localizable code
this page tells you about best practices and guidelines when dealing with ui code with respect to localization.
...for technical details please also look at xul_tutorial:localization.
... about localizers a few notes about localizers for developers who rarely deal with them: localizers like tools, and they don't like editors, localization tools are often based on key-value pairs, at least some localizers have their talents focused on language skills and are not savvy in programming, or even building applications.
...And 10 more matches
Localization Use Cases
this article documents a few opportunities to improve the localization of gaia (the ui layer of firefox os) by using l20n.
... in all presented examples, we try to show the existing code, explain the problem from the localizers' or developers' perspective, and suggest a solution.
... declensions in gaia's browser app, there's an about-browser string defined as follows in apps/browser/locales/browser: about-browser=about {{browserbrandshortname}} problem definition in many inflected languages (e.g.
...And 10 more matches
Date.prototype.toLocaleDateString() - JavaScript
the tolocaledatestring() method returns a string with a language sensitive representation of the date portion of this date.
... the new locales and options arguments let applications specify the language whose formatting conventions should be used and allow to customize the behavior of the function.
... in older implementations, which ignore the locales and options arguments, the locale used and the form of the string returned are entirely implementation dependent.
...And 10 more matches
Number.prototype.toLocaleString() - JavaScript
the tolocalestring() method returns a string with a language-sensitive representation of this number.
... syntax numobj.tolocalestring([locales [, options]]) parameters the locales and options arguments customize the behavior of the function and let applications specify the language whose formatting conventions should be used.
... in implementations, which ignore the locales and options arguments, the locale used and the form of the string returned are entirely implementation dependent.
...And 10 more matches
String.prototype.localeCompare() - JavaScript
the localecompare() method returns a number indicating whether a reference string comes before, or after, or is the same as the given string in sort order.
... the new locales and options arguments let applications specify the language whose sort order should be used and customize the behavior of the function.
... in older implementations, which ignore the locales and options arguments, the locale and sort order used are entirely implementation-dependent.
...And 10 more matches
String.prototype.toLocaleUpperCase() - JavaScript
the tolocaleuppercase() method returns the calling string value converted to upper case, according to any locale-specific case mappings.
... syntax str.tolocaleuppercase() str.tolocaleuppercase(locale) str.tolocaleuppercase([locale, locale, ...]) parameters locale optional the locale parameter indicates the locale to be used to convert to upper case according to any locale-specific case mappings.
... if multiple locales are given in an array, the best available locale is used.
...And 10 more matches
Localization - Archive of obsolete content
xul and xml provide entities which are a convenient way of allowing localization.
...in the mozilla chrome system, you will find dtd files located in the locales subdirectory.
...(en-us.jar is the default for english.) you might have locale files in multiple languages, for example, us english (en-us) and french (fr).
...And 9 more matches
Patching a Localization
say you have found a problem with an existing localization.
... more specifically, it's a problem with an already released localization.
...this page will walk you through creating a patch for an existing localization.
...And 9 more matches
JS_EnterLocalRootScope
enter a local root scope.
... syntax jsbool js_enterlocalrootscope(jscontext *cx); name type description cx jscontext * pointer to the context.
... description scoped local root management allows native functions, getter/setters, etc.
...And 9 more matches
nsILocale
intl/locale/idl/nsilocale.idlscriptable represents one locale, which can be used for things like sorting text strings and formatting numbers, dates and times.
... inherits from: nsisupports last changed in gecko 1.0 method overview astring getcategory(in astring category); methods getcategory() retrieves a string with the current locale name.
... astring getcategory( in astring category ); parameters category a string representing the category to retrieve the locale for.
...And 9 more matches
Date.prototype.toLocaleTimeString() - JavaScript
the tolocaletimestring() method returns a string with a language sensitive representation of the time portion of this date.
... the new locales and options arguments let applications specify the language whose formatting conventions should be used and customize the behavior of the function.
... in older implementations, which ignore the locales and options arguments, the locale used and the form of the string returned are entirely implementation dependent.
...And 9 more matches
String.prototype.toLocaleLowerCase() - JavaScript
the tolocalelowercase() method returns the calling string value converted to lower case, according to any locale-specific case mappings.
... syntax str.tolocalelowercase() str.tolocalelowercase(locale) str.tolocalelowercase([locale, locale, ...]) parameters locale optional the locale parameter indicates the locale to be used to convert to lower case according to any locale-specific case mappings.
... if multiple locales are given in an array, the best available locale is used.
...And 9 more matches
Localization quick start guide
welcome to mozilla localization (l10n for short)!
... whether you're here to start up your own localization in the mozilla project or to join the efforts of an existing localization, you've come to the right place.
...we will take you through the steps to get started, from the initial environment setup to testing and releasing your own localization.
...And 8 more matches
JS_GetLocaleCallbacks
get and set locale specific string conversion and error message callbacks.
... syntax jslocalecallbacks * js_getlocalecallbacks(jsruntime *rt); void js_setlocalecallbacks(jsruntime *rt, jslocalecallbacks *callbacks); name type description cx jscontext * pointer to a js context from which to derive runtime information.
... callbacks jslocalecallbacks * pointer to a jslocalecallbacks struct.
...And 8 more matches
Localizing XLIFF files for iOS
firefox for ios uses the xliff xml-based file format to hold and transfer localization data.
... xliff (extensible localisation interchange file format) is a localization standard governed by the oasis standards body.
... the goal of the standard is to have an xml-based format to use when exchanging localization data between tools without the potential of data loss or corruption.
...And 7 more matches
BigInt.prototype.toLocaleString() - JavaScript
the tolocalestring() method returns a string with a language-sensitive representation of this bigint.
... syntax bigintobj.tolocalestring([locales [, options]]) parameters the locales and options arguments customize the behavior of the function and let applications specify the language whose formatting conventions should be used.
... in implementations that ignore the locales and options arguments, the locale used and the form of the string returned are entirely implementation-dependent.
...And 7 more matches
Intl.Locale.prototype.caseFirst - JavaScript
the intl.locale.prototype.casefirst property is an accessor property that returns whether case is taken into account for the locale's collation rules.
... description a locale's collation rules are used to determine how strings are ordered in that locale.
... certain locales use a character's case (uppercase or lowercase) in the collation process.
...And 7 more matches
Localizing extension metadata on addons.mozilla.org
amo supports localized metadata for each extension.
...the localizable data fields of an extension are: name homepage summary description eula privacy policy version notes developer comments when you submit a new extension to amo, the process is divided into several steps.
... in step 2, you'll be asked to provide the attributes listed above in the add-on's default locale (selected in step 1).
...And 6 more matches
Web Localizability
localizability (or l12y for short) is a characteristic found in an application or content that enables localization.
... the following list contains links to pages that highlight steps that can be taken to make web content localizable.
... the documentation is divided into 4 parts: how to create localizable content.
...And 6 more matches
compare-locales
compare-locales is a python script that helps localizers to check their work without running firefox or another application.
... if you want to run compare-locales on windows, be sure to first install mozillabuild.
... installation compare-locales needs to be installed, and it requires that you have python 2.7 or 3.5+ installed on your machine.
...And 6 more matches
Warning: Date.prototype.toLocaleFormat is deprecated - JavaScript
the javascript warning "date.prototype.tolocaleformat is deprecated; consider using intl.datetimeformat instead" occurs when the non-standard date.prototype.tolocaleformat method is used.
... message warning: date.prototype.tolocaleformat is deprecated; consider using intl.datetimeformat instead error type warning.
... the non-standard date.prototype.tolocaleformat method is deprecated and shouldn't be used anymore.
...And 6 more matches
Intl.Collator.supportedLocalesOf() - JavaScript
the intl.collator.supportedlocalesof() method returns an array containing those of the provided locales that are supported in collation without having to fall back to the runtime's default locale.
... syntax intl.collator.supportedlocalesof(locales[, options]) parameters locales a string with a bcp 47 language tag, or an array of such strings.
... for the general form of the locales argument, see the intl page.
...And 6 more matches
Intl.DateTimeFormat.supportedLocalesOf() - JavaScript
the intl.datetimeformat.supportedlocalesof() method returns an array containing those of the provided locales that are supported in date and time formatting without having to fall back to the runtime's default locale.
... syntax intl.datetimeformat.supportedlocalesof(locales[, options]) parameters locales a string with a bcp 47 language tag, or an array of such strings.
... for the general form of the locales argument, see the intl page.
...And 6 more matches
Intl.DisplayNames.supportedLocalesOf() - JavaScript
the intl.displaynames.supportedlocalesof() method returns an array containing those of the provided locales that are supported in date and time formatting without having to fall back to the runtime's default locale.
... syntax intl.displaynames.supportedlocalesof(locales[, options]) parameters locales a string with a bcp 47 language tag, or an array of such strings.
... for the general form of the locales argument, see the intl page.
...And 6 more matches
Intl.ListFormat.supportedLocalesOf() - JavaScript
the intl.listformat.supportedlocalesof() method returns an array containing those of the provided locales that are supported in date and time formatting without having to fall back to the runtime's default locale.
... syntax intl.listformat.supportedlocalesof(locales[, options]) parameters locales a string with a bcp 47 language tag, or an array of such strings.
... for the general form of the locales argument, see the intl page.
...And 6 more matches
Intl.Locale.prototype.hourCycle - JavaScript
the intl.locale.prototype.hourcycle property is an accessor property that returns the time keeping format convention used by the locale.
...the hourcycle property makes it easier for javascript programmers to access the clock type used by a particular locale.
... like other additional locale data, hour cycle type is an extension subtag, which extends the data contained in a locale string.
...And 6 more matches
Intl.Locale.prototype.numeric - JavaScript
the intl.locale.prototype.numeric property is an accessor property that returns whether the locale has special collation handling for numeric characters.
... description like intl.locale.casefirst, numeric represents a modification to the collation rules utilized by the locale.
...if numeric is set to true, then the locale will take numeric characters into account when collating strings.
...And 6 more matches
Intl.NumberFormat.supportedLocalesOf() - JavaScript
the intl.numberformat.supportedlocalesof() method returns an array containing those of the provided locales that are supported in number formatting without having to fall back to the runtime's default locale.
... syntax intl.numberformat.supportedlocalesof(locales[, options]) parameters locales a string with a bcp 47 language tag, or an array of such strings.
... for the general form of the locales argument, see the intl page.
...And 6 more matches
Intl.PluralRules.supportedLocalesOf() - JavaScript
the intl.pluralrules.supportedlocalesof() method returns an array containing those of the provided locales that are supported in plural formatting without having to fall back to the runtime's default locale.
... syntax intl.pluralrules.supportedlocalesof(locales[, options]) parameters locales a string with a bcp 47 language tag, or an array of such strings.
... for the general form of the locales argument, see the intl page.
...And 6 more matches
Intl.RelativeTimeFormat.supportedLocalesOf() - JavaScript
the intl.relativetimeformat.supportedlocalesof() method returns an array containing those of the provided locales that are supported in date and time formatting without having to fall back to the runtime's default locale.
... syntax intl.relativetimeformat.supportedlocalesof(locales[, options]) parameters locales a string with a bcp 47 language tag, or an array of such strings.
... for the general form of the locales argument, see the intl page.
...And 6 more matches
JS_ForgetLocalRoot
remove a value from the innermost current local root scope.
... syntax void js_forgetlocalroot(jscontext *cx, void *thing); name type description cx jscontext * pointer to the context in which the caller is running.
... description this function is used to interact with scoped local root management.
...And 5 more matches
NS_NewLocalFile
« xpcom api reference summary the ns_newlocalfile function creates an instance of nsilocalfile that provides a platform independent representation of a file path.
... #include "nsxpcom.h" #include "nsilocalfile.h" nsresult ns_newlocalfile( const nsastring& apath, prbool afollowlinks, nsilocalfile** aresult ); parameters apath [in] a utf-16 string object that specifies an absolute filesystem path.
... afollowlinks [in] this attribute will determine if the nsilocalfile instance will automatically resolve symbolic links.
...And 5 more matches
NS_NewNativeLocalFile
« xpcom api reference summary the ns_newnativelocalfile function creates an instance of nsilocalfile that provides a platform independent representation of a file path.
... #include "nsxpcom.h" #include "nsilocalfile.h" nsresult ns_newnativelocalfile( const nsacstring& apath, prbool afollowlinks, nsilocalfile** aresult ); parameters apath [in] a string object that specifies an absolute filesystem path.
... afollowlinks [in] this attribute will determine if the nsilocalfile instance will automatically resolve symbolic links.
...And 5 more matches
LocalFileSystemSync - Web APIs
the localfilesystemsync interface of the file system api gives you access to a sandboxed file system.
... basic concepts you can request access to a sandboxed file system by requesting localfilesystemsync object from within a web worker.
... the global methods in the window object requestfilesystemsync() and resolvelocalfilesystemsyncurl() methods are exposed to the worker's global scope.
...And 5 more matches
Window.localStorage - Web APIs
the read-only localstorage property allows you to access a storage object for the document's origin; the stored data is saved across browser sessions.
... localstorage is similar to sessionstorage, except that while data stored in localstorage has no expiration time, data stored in sessionstorage gets cleared when the page session ends — that is, when the page is closed.
... (data in a localstorage object created in a "private browsing" or "incognito" session is cleared when the last "private" tab is closed.) data stored in either localstorage is specific to the protocol of the page.
...And 5 more matches
Intl.Locale.prototype.collation - JavaScript
the intl.locale.prototype.collation property is an accessor property that returns the collation type for the locale, which is used to order strings according to the locale's rules.
...the collation property helps to make it easier for javascript programmers to access the collation type used by a particular locale.
...nyin ordering for latin, stroke order for cjk characters (used in chinese) trad traditional style ordering (such as in spanish) unihan pinyin ordering for latin, unihan radical-stroke ordering for cjk characters (used in chinese) zhuyin pinyin ordering for latin, zhuyin order for bopomofo and cjk characters (used in chinese) examples like other locale subtags, the collation type can be added to the intl.locale object via the locale string, or a configuration object argument to the constructor.
...And 5 more matches
Intl.Locale.prototype.language - JavaScript
the intl.locale.prototype.language property is an accessor property that returns the language associated with the locale.
... description language is one of the core features of a locale.
... the unicode specification treats the language identifier of a locale as the language and the region together (to make a distiction between dialects and variations, e.g.
...And 5 more matches
Intl.Locale.prototype.numberingSystem - JavaScript
the intl.locale.prototype.numberingsystem property is an accessor property that returns the numeral system used by the locale.
...as with most internationalization schemas, the numeral systems that can be represented in a locale object by numberingsystem are standardized by unicode.
...orithmic tamldec modern tamil decimal digits telu telugu digits thai thai digits tirh tirhuta digits tibt tibetan digits traditio traditional numerals — may be algorithmic vaii vai digits wara warang citi digits wcho wancho digits examples setting the numberingsystem value via the locale string in the unicode locale string spec, the values that numberingsystem represents correspond to the key nu.
...And 5 more matches
Intl.Locale.prototype.toString() - JavaScript
the intl.locale.prototype.tostring() returns the locale's full locale identifier string.
... syntax locale.tostring() return value the locale's unicode locale identifier string.
... description the locale object is a javascript representation of a concept unicode locale identifier.
...And 5 more matches
Object.prototype.toLocaleString() - JavaScript
the tolocalestring() method returns a string representing the object.
... this method is meant to be overridden by derived objects for locale-specific purposes.
... syntax obj.tolocalestring() return value a string representing the object.
...And 5 more matches
Mozilla Content Localized in Your Language
the content here should be what you and your localization team have decided, together, to follow when localizing mozilla products and web sites.
... you are free to add, edit, remove, and localize everything in this section according to how the localization team for your language agrees.
... all we ask is that you name this page according to this example, "mozilla content in spanish (es-mx)" and add your locale code tag at the bottom.
...And 4 more matches
Creating localizable web content
depending on context, find alternate strings or document an explanation of the string for localizers check that we don't link in new pages to sub-pages with anchors.
... per-locale customizations check if there are alternative links for localized pages (e.g., links to mdn, addons.mozilla.org, or other external resources, are there translated equivalents we can use).
...sometimes you can leave some freedom of modification for a block of text so that the localizers link to relevant local resources.
...And 4 more matches
JS_LeaveLocalRootScope
leave a local root scope.
... syntax void js_leavelocalrootscope(jscontext *cx); name type description cx jscontext * pointer to the context.
... this must be the same context passed to js_enterlocalrootscope().
...And 4 more matches
JS_SetDefaultLocale
this article covers features introduced in spidermonkey 24 set and reset the default locale for the ecmascript internationalization api.
... syntax bool js_setdefaultlocale(jsruntime *rt, const char *locale); void js_resetdefaultlocale(jsruntime *rt); name type description rt jsruntime * pointer to a js runtime locale const char * string represents locale.
... description js_setdefaultlocale sets the default locale for the ecmascript internationalization api (intl.collator, intl.numberformat, intl.datetimeformat).
...And 4 more matches
LocalFileSystem - Web APIs
the localfilesystem interface of the file system api gives you access to a sandboxed file system.
...so to request storage, you need to do something like the following: var requestedbytes = 1024*1024*10; // 10mb navigator.webkitpersistentstorage.requestquota ( requestedbytes, function(grantedbytes) { window.requestfilesystem(persistent, grantedbytes, oninitfs, errorhandler); }, function(e) { console.log('error', e); } ); your user must grant your app permission to store data locally before your app can use persistent storage.
... window.requestfilesystem(window.persistent, 1024*1024,oninitfs,errorhandler); method overview void requestfilesystem (in unsigned short type, in unsigned long long size, in filesystemcallback successcallback, in optional errorcallback errorcallback); void resolvelocalfilesystemurl (in domstring url, in entrycallback successcallback, in optional errorcallback errorcallback); constants constant value description temporary 0 transient storage that can be be removed by the browser at its discretion.
...And 4 more matches
Node.localName - Web APIs
WebAPINodelocalName
the node.localname read-only property returns the local part of the qualified name of this node.
... syntax name = element.localname name is the local name as a string (see notes below for details) example (must be served with xml content type, such as text/xml or application/xhtml+xml.) <html xmlns="http://www.w3.org/1999/xhtml" xmlns:svg="http://www.w3.org/2000/svg"> <head> <script type="application/javascript"><![cdata[ function test() { var text = document.getelementbyid('text'); var circle = document.getelementbyid('circle'); text.value = "<svg:circle> has:\n" + "localname = '" + circle.localname + "'\n" + "namespaceuri = '" + circle.namespaceuri + "'"; } ]]></script> </head> <body onload="test()"> <svg:svg version="1.1" width="100px" he...
...ight="100px" viewbox="0 0 100 100"> <svg:circle cx="50" cy="50" r="30" style="fill:#aaa" id="circle"/> </svg:svg> <textarea id="text" rows="4" cols="55"/> </body> </html> notes the local name of a node is that part of the node's qualified name that comes after the colon.
...And 4 more matches
RTCRemoteOutboundRtpStreamStats.localId - Web APIs
the rtcremoteoutboundrtpstreamstats dictionary's localid property is a string which can be used to identify the rtcinboundrtpstreamstats object whose remoteid matches this value.
... syntax let localid = rtcremoteoutboundrtpstreamstats.localid; value a domstring which can be compared to the value of an rtcinboundrtpstreamstats object's remoteid property to see if the two represent statistics for each of the two sides of the same set of data received by the local peer.
... usage notes you can think of the local and remote views of the same rtp stream as pairs, each of which has a reference back to the other one.
...And 4 more matches
:-moz-locale-dir(ltr) - CSS: Cascading Style Sheets
the :-moz-locale-dir(ltr) css pseudo-class is a mozilla extension that matches an element if the user interface is being displayed left-to-right.
... this is determined by the preference intl.uidirection.locale (where locale is the current locale) being set to "ltr".
... note: this selector is mainly used by extensions and themes to adapt the user interface based on the user's locale.
...And 4 more matches
:-moz-locale-dir(rtl) - CSS: Cascading Style Sheets
the :-moz-locale-dir(rtl) css pseudo-class is a mozilla extension that matches an element if the user interface is being displayed right-to-left.
... this is determined by the preference intl.uidirection.locale (where locale is the current locale) being set to "rtl".
... note: this selector is mainly used by extensions and themes to adapt the user interface based on the user's locale.
...And 4 more matches
Intl.Locale.prototype.calendar - JavaScript
the intl.locale.prototype.calendar property is an accessor property which returns the type of calendar used in the locale.
... description the calendar property returns the part of the locale that indicates the locale's calendar era.
... islamicc civil (algorithmic) arabic calendar examples adding a calendar in the locale string calendar eras fall under the category of locale key "extension keys".
...And 4 more matches
Intl.Locale.prototype.region - JavaScript
the intl.locale.prototype.region property is an accessor property that returns the region of the world (usually a country) associated with the locale.
... description the region is an essential part of the locale identifier, as it places the locale in a specific area of the world.
... knowing the locale's region is vital to identifying differences between locales.
...And 4 more matches
Making sure your theme works with RTL locales - Archive of obsolete content
the important thing to understand about these locales, is that the entire interface is mirrored right-to-left.
...should i make a special theme for these locales?" don't despair: making a theme rtl-compatible is fairly easy!
... gecko 1.9.2 and later gecko 1.9.2 introduced the :-moz-locale-dir css pseudoclass, which matches based on whether the user interface is being rendered left-to-right or right-to-left: :-moz-locale-dir(ltr) matches if the user interface is being rendered left to right.
...And 3 more matches
JS_LeaveLocalRootScopeWithResult
leave a local root scope, transferring the result value to the next enclosing root scope.
... syntax void js_leavelocalrootscopewithresult(jscontext *cx, jsval rval); name type description cx jscontext * pointer to the context.
... this must be the same context that was passed to js_enterlocalrootscope.
...And 3 more matches
nsILocalFileMac
xpcom/io/nsilocalfilemac.idlscriptable please add a summary to this article.
... inherits from: nsilocalfile last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview cfurlref getcfurl(); native code only!
...obsolete since gecko 1.9.2 boolean ispackage(); void launchwithdoc(in nsilocalfile adoctoload, in boolean alaunchinbackground); void opendocwithapp(in nsilocalfile aapptoopenwith, in boolean alaunchinbackground); void setfiletypeandcreatorfromextension(in string aextension); obsolete since gecko 1.9.2 void setfiletypeandcreatorfrommimetype(in string amimetype); obsolete since gecko 1.9.2 attributes attribute type description bundledisplayname astring returns t...
...And 3 more matches
IDBLocaleAwareKeyRange - Web APIs
the idblocaleawarekeyrange interface of the indexeddb api is a firefox-specific version of idbkeyrange — it functions in exactly the same fashion, and has the same properties and methods, but it is intended for use with idbindex objects when the original index had a locale value specified upon its creation (see createindex()'s optionalparameters) — that is, it has locale aware sorting enabled.
... bear in mind however that idblocaleawarekeyrange has its own implementation of idbkeyrange.bound.
...with locale-aware indexes, the meaning of < depends on the locale, so for example in lithuanian y is sorted between i and k.
...And 3 more matches
PaymentAddress.dependentLocality - Web APIs
the read-only dependentlocality property of the paymentaddress interface is a string containing a sublocality designation within a city, such as a neighborhood, borough, district, or, in the united kingdom, a dependent locality.
... syntax var paymentdependentlocality = paymentaddress.dependentlocality; value a domstring indicating the sublocality portion of the address.
... this may be an empty string if no sublocality is available or required.
...And 3 more matches
RTCIceTransport.getLocalCandidates() - Web APIs
the rtcicetransport method getlocalcandidates() returns an array of rtcicecandidate objects, one for each of the candidates that have been gathered by the local device during the current ice agent session.
... the local candidates are placed in this list by the ice agent prior to being delivered to the local client's code in an icecandidate event so that the client can forward the candidates to the remote peer.
... syntax localcandidates = rtcicetransport.getlocalcandidates(); parameters none.
...And 3 more matches
RTCPeerConnection.currentLocalDescription - Web APIs
the read-only property rtcpeerconnection.currentlocaldescription returns an rtcsessiondescription object describing the local end of the connection as it was most recently successfully negotiated since the last time the rtcpeerconnection finished negotiating and connecting to a remote peer.
... to change the currentlocaldescription, call rtcpeerconnection.setlocaldescription(), which triggers a series of events which leads to this value being set.
... unlike rtcpeerconnection.localdescription, this value represents the actual current state of the local end of the connection; localdescription may specify a description which the connection is currently in the process of switching over to.
...And 3 more matches
RTCPeerConnection.pendingLocalDescription - Web APIs
the read-only property rtcpeerconnection.pendinglocaldescription returns an rtcsessiondescription object describing a pending configuration change for the local end of the connection.
...use rtcpeerconnection.currentlocaldescription or rtcpeerconnection.localdescription to get the current state of the endpoint.
... syntax sessiondescription = rtcpeerconnection.pendinglocaldescription; return value if a local description change is in progress, this is an rtcsessiondescription describing the proposed configuration.
...And 3 more matches
Intl.Locale() constructor - JavaScript
the intl.locale constructor is a standard built-in property of the intl object that represents a unicode locale identifier.
... syntax new intl.locale(tag [, options]) parameters tag the unicode locale identifier string.
... options an object that contains configuration for the locale.
...And 3 more matches
Intl.Locale.prototype.maximize() - JavaScript
the intl.locale.prototype.maximize() method gets the most likely values for the language, script, and region of the locale based on existing values.
... syntax locale.maximize() return value a locale instance whose basename property returns the result of the add likely subtags algorithm executed against locale.basename.
... description sometimes, it is convenient to be able to identify the most likely locale language identifier subtags based on an incomplete langauage id.
...And 3 more matches
Intl.Locale.prototype.minimize() - JavaScript
the intl.locale.prototype.minimize() method attempts to remove information about the locale that would be added by calling locale.maximize().
... syntax locale.minimize() return value a locale instance whose basename property returns the result of the remove likely subtags algorithm executed against locale.basename.
... description this method carries out the reverse of maximize(), removing any language, script, or region subtags from the locale language identifier (essentially the contents of basename).
...And 3 more matches
Intl.Locale.prototype.script - JavaScript
the intl.locale.prototype.script property is an accessor property which returns the script used for writing the particular language used in the locale.
... description a script, sometimes called writing system, is one of the core attributes of a locale.
... examples setting the script in the locale identifer string argument the script is the second part of a valid unicode language identifier string, and can be set by adding it to the locale identifier string that is passed into the locale constructor.
...And 3 more matches
TypedArray.prototype.toLocaleString() - JavaScript
the tolocalestring() method returns a string representing the elements of the typed array.
... the elements are converted to strings and are separated by a locale-specific string (such as a comma “,”).
... this method has the same algorithm as array.prototype.tolocalestring() and, as the typed array elements are numbers, the same algorithm as number.prototype.tolocalestring() applies for each element.
...And 3 more matches
Attr.localName - Web APIs
WebAPIAttrlocalName
the attr.localname read-only property returns the local part of the qualified name of an attribute.
... syntax name = attribute.localname return value a domstring representing the local part of the attribute's qualified name.
... html content <button id="example">click me</button> javascript content const element = document.queryselector("#example"); element.addeventlistener("click", function() { const attribute = element.attributes[0]; alert(attribute.localname); }); notes the local name of an attribute is the part of the attribute's qualified name that comes after the colon.
...And 2 more matches
Element.localName - Web APIs
WebAPIElementlocalName
the element.localname read-only property returns the local part of the qualified name of an element.
... syntax name = element.localname return value a domstring representing the local part of the element's qualified name.
...erved with xml content type, such as text/xml or application/xhtml+xml.) <html xmlns="http://www.w3.org/1999/xhtml" xmlns:svg="http://www.w3.org/2000/svg"> <head> <script type="application/javascript"><![cdata[ function test() { var text = document.getelementbyid('text'); var circle = document.getelementbyid('circle'); text.value = "<svg:circle> has:\n" + "localname = '" + circle.localname + "'\n" + "namespaceuri = '" + circle.namespaceuri + "'"; } ]]></script> </head> <body onload="test()"> <svg:svg version="1.1" width="100px" height="100px" viewbox="0 0 100 100"> <svg:circle cx="50" cy="50" r="30" style="fill:#aaa" id="circle"/> </svg:svg> <textarea id="text" rows="4" cols="55"/> </body> </html> notes the local...
...And 2 more matches
LocalMediaStream - Web APIs
the localmediastream interface was part of the media capture and streams api, representing a stream of data being generated locally (such as by getusermedia().
...do not use localmediastream; you need to update any code that does use it as soon as possible or your content or application will stop working.
...the example for mediastreamtrack.stop() demonstrates how to stop a multi-track stream, which is what localmediastream.stop() used to be used for.
...And 2 more matches
RTCIceCandidatePair.local - Web APIs
the local property of the rtcicecandidatepair dictionary specifies the rtcicecandidate which describes the configuration of the local end of a viable webrtc connection.
... syntax localcandidate = rtcicecandidatepair.local; value an rtcicecandidate which describes the configuration of the local end of a viable pair of ice candidates.
... example this one-line example simply obtains the current candidate pair and then from that gets the local candidate.
...And 2 more matches
RTCIceTransport.getLocalParameters() - Web APIs
the rtcicetransport method getlocalparameters() returns an rtciceparameters object which provides information uniquely identifying the local peer for the duration of the ice session.
... the local peer's parameters are obtained during ice signaling and delivered to the transport when the client calls rtcpeerconnection.setlocaldescription().
... syntax parameters = rtcicetransport.getlocalparameters(); parameters none.
...And 2 more matches
Intl.Locale.prototype.baseName - JavaScript
the intl.locale.prototype.basename property returns a substring of the locale's string representation, containing core information about the locale.
... description an intl.locale object represents a parsed local and options for that locale.
... the basename property returns basic, core information about the locale in the form of a substring of the complete data string.
...And 2 more matches
Make your xulrunner app match the system locale - Archive of obsolete content
the first step is to get the code we're about to write to run before any of the locale specific resources are loaded.
...the second step is to figure out the system locale.
...then set the locale preference.
... from xpcom import components ps_cls = components.classes["@mozilla.org/preferences-service;1"] ps = ps_cls.getservice(components.interfaces.nsiprefservice) branch = ps.getbranch("general.useragent.") branch.setcharpref("locale", lang) i also set the language environment variable to match the system locale so that python's gettext functionality will work (it pulls straight from language instead of using setlocale): os.environ["language"] = lang ...
Locale - MDN Web Docs Glossary: Definitions of Web-related terms
locale is a set of language- or country-based preferences for a user interface.
... a program draws its locale settings from the language of the host system.
... among other things, locales represent paper format, currency, date format, and numbers according to the protocols in the given region.
... learn more general knowledge locale on wikipedia ...
Localization notes
localizers usually work on the localizable files without the context of the source files including the localized strings; it is important to add comments to the localizable files themselves, too.
... these comments are generally referred to as localization notes.
...there are a number of automated tools that parse these comments for easier access and use by localizers.
... dtd files <!-- localization note (entity name): comment --> properties files # localization note (key): comment file-wide comments should use the same format, be at the top of the file (after the license header, though) and just drop the (entity name/key) reference.
Localization at Mozilla
localization (l10n) is the process of translating software user interfaces from one language to another and adapting it to suit a foreign culture.
... these resources are for anyone with an interest in the technical aspects involved in localization.
...l10n documentation has moved to https://mozilla-l10n.github.io/localizer-documentation/ .
... to learn how to bootstrap a new locale for mozilla projects, please see those documents ...
nsLocalFile
« xpcom api reference summary a component implementing nsilocalfile.
... class id 2e23e220-60be-11d3-8c4a-000064657374 contractid @mozilla.org/file/local;1 supported interfaces nsilocalfile, nsifile remarks this component should be accessed via the xpcom component manager.
... example code function getfilesize(path) { var file = components.classes["@mozilla.org/file/local;1"].
... createinstance(components.interfaces.nsilocalfile); file.initwithpath(path); return file.filesize; } see also components, nsicomponentmanager ...
AddressErrors.dependentLocality - Web APIs
an object based on addresserrors includes a dependentlocality property when the address's dependentlocality property couldn't be validated.
... syntax var localityerror = addresserrors.dependentlocality; value if the value specified in the paymentaddress object's dependentlocality property could not be validated, this property contains a domstring offering a human-readable explanation of the validation error and offers suggestions for correcting it.
... if the dependentlocality value was validated successfully, this property is not included in the addresserrors object.
... specifications specification status comment payment request apithe definition of 'addresserrors.dependentlocality' in that specification.
IDBIndex.locale - Web APIs
WebAPIIDBIndexlocale
the locale read-only property of the idbindex interface returns the locale of the index (for example en-us, or pl) if it had a locale value specified upon its creation (see createindex()'s optionalparameters.) note that this property always returns the current locale being used in this index, in other words, it never returns "auto".
... syntax var myindex = objectstore.index('index'); console.log(myindex.locale); value a domstring.
... the locale value is logged to the console.
... function displaydatabyindex() { tableentry.innerhtml = ''; var transaction = db.transaction(['contactslist'], 'readonly'); var objectstore = transaction.objectstore('contactslist'); var myindex = objectstore.index('lname'); console.log(myindex.locale); myindex.opencursor().onsuccess = function(event) { var cursor = event.target.result; if(cursor) { var tablerow = document.createelement('tr'); tablerow.innerhtml = '<td>' + cursor.value.id + '</td>' + '<td>' + cursor.value.lname + '</td>' + '<td>' + cursor.value.fname + '</td>' + '<td>' + cursor.value.jtitle + '</td>' + '<td>' + cursor.value.company + '</td>' + '<td>' + cursor...
RTCPeerConnection.localDescription - Web APIs
the read-only property rtcpeerconnection.localdescription returns an rtcsessiondescription describing the session for the local end of the connection.
... syntax var sessiondescription = peerconnection.localdescription; on a more fundamental level, the returned value is the value of rtcpeerconnection.pendinglocaldescription if that property isn't null; otherwise, the value of rtcpeerconnection.currentlocaldescription is returned.
... example this example looks at the localdescription and displays an alert containing the rtcsessiondescription object's type and sdp fields.
... var pc = new rtcpeerconnection(); … var sd = pc.localdescription; if (sd) { alert("local session: type='" + sd.type + "'; sdp description='" + sd.sdp + "'"); } else { alert("no local session yet."); } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection.localdescription' in that specification.
Intl.getCanonicalLocales() - JavaScript
the intl.getcanonicallocales() method returns an array containing the canonical locale names.
... syntax intl.getcanonicallocales(locales) parameters locales a list of string values for which to get the canonical locale names.
... return value an array containing the canonical locale names.
... examples using getcanonicallocales intl.getcanonicallocales('en-us'); // ["en-us"] intl.getcanonicallocales(['en-us', 'fr']); // ["en-us", "fr"] intl.getcanonicallocales('en_us'); // rangeerror:'en_us' is not a structurally valid language tag specifications specification ecmascript internationalization api (ecma-402)the definition of 'intl.getcanonicallocales' in that specification.
local - SVG: Scalable Vector Graphics
WebSVGAttributelocal
the local attribute specifies the unique id for a locally stored color profile as specified by international color consortium.
... if both the xlink:href and the local attribute are specified, then the local file system is searched for the color profile first, and, if not available locally, then the resource identified by the xlink:href attribute is used.
... only one element is using this attribute: <color-profile> usage notes value <string> default value none animatable no <string> this value specifies the unique id for a locally stored color profile as specified by international color consortium.
... specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'local' in that specification.
Uplifting a localization from Central to Aurora
localizers who are working on l10n-central are responsible for getting their work onto the aurora repository.
...let's pretend it's at releases/l10n-mozilla-aurora/ab-cd here's how we do it: # set up a new local clone of your central repo hg clone l10n-central/ab-cd workrepo cd workrepo # pull in the changesets you have on aurora hg pull -r default ../releases/l10n/mozilla-aurora/ab-cd now, there are two routes forward: 1) things are pretty silent.
...that's gonna conflict, and you need to resolve that with your merge tool so that the resulting localized file doesn't have the string any more.
Profiling with the Gecko Profiler and Local Symbols on Windows
profiling local builds as of march 2018, profiling local builds on windows should work out of the box, with full symbol information.
...unfortunately, 32 bit is still the default when building firefox locally.
... profiling local talos runs if you would like to use the gecko profiler with a local talos run of a local build of firefox for windows, you will need to point talos to a zipfile containing breakpad-style symbols for your build.
IDBIndex.isAutoLocale - Web APIs
the isautolocale read-only property of the idbindex interface returns a boolean indicating whether the index had a locale value of auto specified upon its creation (see createindex()'s optionalparameters.) syntax var myindex = objectstore.index('index'); console.log(myindex.isautolocale); value a boolean.
... the isautolocale value is logged to the console.
... function displaydatabyindex() { tableentry.innerhtml = ''; var transaction = db.transaction(['contactslist'], 'readonly'); var objectstore = transaction.objectstore('contactslist'); var myindex = objectstore.index('lname'); console.log(myindex.isautolocale); myindex.opencursor().onsuccess = function(event) { var cursor = event.target.result; if(cursor) { var tablerow = document.createelement('tr'); tablerow.innerhtml = '<td>' + cursor.value.id + '</td>' + '<td>' + cursor.value.lname + '</td>' + '<td>' + cursor.value.fname + '</td>' + '<td>' + cursor.value.jtitle + '</td>' + '<td>' + cursor.value.company + '</td>' + '<td>' + ...
Navigator.mozIsLocallyAvailable() - Web APIs
the navigator.mozislocallyavailable() method allows add-ons to determine whether or not a given resource is available.
... syntax navigator.mozislocallyavailable(uri, ifoffline); parameters uri the uri of the resource whose availability is to be checked, as a string.
... example var available = navigator.mozislocallyavailable("my-image-file.png", true); if (available) { /* the offline resource is present */ } else { console.log("certain needed resources are not available offline"); } specifications not part of any specifications.
RTCIceCandidateStats.localCandidateId - Web APIs
the rtcicecandidatepairstats property localcandidateid is a string that uniquely identifies the local ice candidate which was analyzed to generate the rtcicecandidatestats used to compute the statistics for this pair of candidates.
... syntax localcandidateid = rtcicecandidatepairstats.localcandidateid; value a domstring giving a unique identifier for the local rtcicecandidate for the connection described by this rtcicecandidatepairstats object.
... specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatepairstats.localcandidateid' in that specification.
SpeechSynthesisVoice.localService - Web APIs
the localservice read-only property of the speechsynthesisvoice interface returns a boolean indicating whether the voice is supplied by a local speech synthesizer service (true), or a remote speech synthesizer service (false.) this property is provided to allow differentiation in the case that some voice options are provided by a remote service; it is possible that remote voices might have extra latency, bandwidth or cost associated with them, so such distinction may be useful.
... syntax var amilocal = speechsynthesisvoiceinstance.localservice; value a boolean.
... examples for(i = 0; i < voices.length ; i++) { var option = document.createelement('option'); option.textcontent = voices[i].name + ' (' + voices[i].lang + ')'; if(voices[i].default) { option.textcontent += ' -- default'; } console.log(voices[i].localservice); option.setattribute('data-lang', voices[i].lang); option.setattribute('data-name', voices[i].name); voiceselect.appendchild(option); } specifications specification status comment web speech apithe definition of 'localservice' in that specification.
local-name - XPath
xslt/xpath reference: xslt elements, exslt functions, xpath functions, xpath axes the local-name function returns a string representing the local name of the first node in a given node-set.
... syntax local-name( [node-set] ) arguments node-set (optional) the local name of the first node in this node-set will be returned.
... notes the local name is the local part of an expanded-name.
appLocale - Archive of obsolete content
« xul reference applocale obsolete since gecko 1.9.1 type: nsilocale returns the xpcom object which holds information about the user's locale.
... this is an object which implements nsilocale.
Local variable - MDN Web Docs Glossary: Definitions of Web-related terms
a variable whose name is bound to its value only within a local scope.
... example var global = 5; //is a global variable function fun(){ var local = 10; //is a local variable } ...
Localization - MDN Web Docs Glossary: Definitions of Web-related terms
localization (l10n) is the process of adapting a software user interface to a specific culture.
...10,000.00 in the u.s.) date format currency cultural references paper size color psychology compliance with local laws local holidays personal names learn more general knowledge localization at mozilla on mdn localization on wikipedia ...
PR_LocalTimeParameters
returns the time zone offset information that maps the specified prexplodedtime to local time.
... syntax #include <prtime.h> prtimeparameters pr_localtimeparameters ( const prexplodedtime *gmt); parameter gmt a pointer to the clock/calendar time whose offsets are to be determined.
Local Storage / Session Storage - Firefox Developer Tools
when an origin corresponding to local storage or session storage is selected within the storage inspector, the names and values of all the items corresponding to local storage or session storage will be listed in a table.
... you can edit local and session storage items by double-clicking inside cells in the table widget and editing the values they contain: you can delete local storage and session storage entries using the context menu: you can also delete local and session storage entries by selecting an item and pressing the delete or backspace key.
CompositionEvent.locale - Web APIs
the locale read-only property of the compositionevent interface returns the locale of current input method (for example, the keyboard layout locale if the composition is associated with ime).
... syntax mylocale = compositionevent.locale value a domstring representing the locale of current input method.
RTCIceCandidateStats.mozLocalTransport - Web APIs
the non-standard mozilla extension to the rtcicecandidatestats dictionary, mozlocaltransport, has been supplanted by the standard relayprotocol property.
... syntax instead of using mozlocaltransport, you should use code like this: localtransport = rtcicecandidatestats.relayprotocol; specifications not part of any specification.
Local scope - MDN Web Docs Glossary: Definitions of Web-related terms
local scope is a characteristic of variables that makes them local (i.e., the variable name is only bound to its value within a scope which is not the global scope).
Encodings for localization files
when creating a localization for mozilla products, it’s important to be aware of the encoding of the files that you generate.
Localization: Frequently asked questions
for more detailed documentation about localization in general, see our localization page.
Localization prerequisites
to work on localization, you need a subset of the mozilla build prerequisites.
nsIPrefLocalizedString
modules/libpref/public/nsipreflocalizedstring.idlscriptable this interface is simply a wrapper interface for nsisupportsstring so the preferences service can have a unique identifier to distinguish between requests for normal wide strings nsisupportsstring) and 'localized' wide strings, which get their default values from properites files.
Index - Web APIs
WebAPIIndex
33 addresserrors.dependentlocality api, addresserrors, error, locality, payment request, payment request api, property, read-only, reference, dependentlocality, payment an object based on addresserrors includes a dependentlocality property when the address's dependentlocality property couldn't be validated.
... 34 addresserrors.languagecode api, address, addresserrors, deprecated, language, languagecode, locale, payment request, payment request api, property, reference, payment an object based on addresserrors includes a languagecode property when the address's languagecode property couldn't be validated.
... 100 attr.localname api, dom, property, reference the attr.localname read-only property returns the local part of the qualified name of an element.
...And 75 more matches
Index
found 42 pages: # page tags and summary 1 localization at mozilla landing, localization, mozilla, translation, l10n localization (l10n) is the process of translating software user interfaces from one language to another and adapting it to suit a foreign culture.
... these resources are for anyone with an interest in the technical aspects involved in localization.
... 2 application translation with mercurial android, draft, editing, firefox, lightning, localization, mercurial, seamonkey, translate, patch, thunderbird first, get the required programs to compile mozilla applications like firefox and thunderbird from build instructions.
...And 59 more matches
Application Translation with Mercurial
check what is available for translation find out on which branch localization is done for your locale: read your localization team's page by clicking on the team with your language code (e.g.
...the localization lead for your language knows the branch.
... the default localization branch is aurora.
...And 40 more matches
Index - Archive of obsolete content
47 l10n add-on sdk localize strings appearing in the add-on's javascript code.
... 86 fs/path provides access to the local filesystem with the nodejs path module api.
... 88 io/file provides access to the local filesystem.
...And 36 more matches
L20n Javascript API
l20n javascript api var ctx = l20n.getcontext(); ctx.linkresource('./locales/strings.l20n'); ctx.requestlocales(); when you freeze the context by calling requestlocales, the resource files will be retrieved, parsed and compiled.
... alternatively, you can register callbacks to execute when the context is ready (or when globals change and translations need to be updated) with ctx.localize.
... ctx.localize(['hello', 'new'], function(l10n) { var node = document.queryselector('[data-l10n-id=hello]'); node.textcontent = l10n.entities.hello.value; node.classlist.remove('hidden'); }); ctx.registerlocales(defaultlocale: string?, availablelocales: array<string>?) register the default locale of the context instance, as well as all other locales available to the context instance before the language negotiation.
...And 34 more matches
The Essentials of an Extension - Archive of obsolete content
a localized description and name can be added with the following code: <em:localized> <description> <em:locale>es-es</em:locale> <em:name>xul school hola mundo</em:name> <em:description>bienvenido a xul school!</em:description> </description> </em:localized> the es-es locale string indicates that this is the spanish (es) localization for spain (es).
... you can add as many <em:localized> sections as you need.
... for firefox 2, localizing this file is a little more complicated.
...And 30 more matches
Translation phase
as a reward for your efforts, you get to move on to the very reason you've come here: to localize mozilla projects.
...at mozilla, we localize many different projects that can be categorized into three different groups.
... each group of projects employs a different type of l10n tool for, you guessed it, localizing the projects.
...And 29 more matches
The Implementation of the Application Object Model - Archive of obsolete content
the second section describes the xul/rdf architecture itself and outlines enhancements to the xul language in order to allow the markup language to reference local data and to indicate how and when it would like to be annotatable with local data.
...the data itself can be fed in from any number of different sources (e.g., from a local file system, from your bookmarks file, or from some remote downloadable rdf file), and can then be combined into a single graph.
...for example, the traditional bookmarks tree view could contain anything from mail messages to local files to maps of other sites.
...And 26 more matches
Chapter 5: Let's build a Firefox extension - Archive of obsolete content
most extensions consist of a single content package2 the locale package this package is used to contain language data that can be translated.
... to make an extension’s gui support multiple languages, you can include multiple locale packages, one for each language.
...source files represented through chrome urls run with universalxpconnect privileges; even if they haven’t been granted “use xpconnect as local file” privileges, as discussed in chapter 4, they will be able to use xpcom functions (figure 1).
...And 25 more matches
Index
MozillaTechXPCOMIndex
when the component starts up, it populates a list of urls read in from a file stored next to the gecko binary on the local system.
... 135 ns_newlocalfile functions, functions:frozen, xpcom, xpcom api reference the ns_newlocalfile function creates an instance of nsilocalfile that provides a platform independent representation of a file path.
... 136 ns_newnativelocalfile functions, functions:frozen, xpcom, xpcom api reference the ns_newnativelocalfile function creates an instance of nsilocalfile that provides a platform independent representation of a file path.
...And 24 more matches
Date - JavaScript
note: it's important to keep in mind that while the time value at the heart of a date object is utc, the basic methods to fetch the date and time or its components all work in the local (i.e.
...(this time is historically known as greenwich mean time, as utc lies along the meridian that includes london—and nearby greenwich—in the united kingdom.) the user's device provides the local time.
... in addition to methods to read and alter individual components of the local date and time (such as getday() and sethours()), there are also versions of the same methods that read and manipulate the date and time using utc (such as getutcday() and setutchours()).
...And 24 more matches
Establishing a connection: The WebRTC perfect negotiation pattern - Web APIs
= { iceservers: [{ urls: "stun:stun.mystunserver.tld" }] }; const selfvideo = document.queryselector("video.selfview"); const remotevideo = document.queryselector("video.remoteview"); const signaler = new signalingchannel(); const pc = new rtcpeerconnection(config); this code also gets the <video> elements using the classes "selfview" and "remoteview"; these will contain, respectively, the local user's self-view and the view of the incoming stream from the remote peer.
...then, finally, the media source for the self-view <video> element indicated by the selfvideo constant is set to the camera and microphone stream, allowing the local user to see what the other peer sees.
... handling the negotiationneeded event first, we implement the rtcpeerconnection event handler onnegotiationneeded to get a local description and send it using the signaling channel to the remote peer.
...And 23 more matches
Signaling and video calling - Web APIs
sdp the sdp (session description protocol) string describing the local end of the connection from the perspective of the sender (or the remote end of the connection from the receiver's point of view).
... an icecandidate event is sent to the rtcpeerconnection to complete the process of adding a local description using pc.setlocaldescription(offer).
... ice candidate exchange process when each peer's ice layer begins to send candidates, it enters into an exchange among the various points in the chain that looks like this: each side sends candidates to the other as it receives them from their local ice layer; there is no taking turns or batching of candidates.
...And 23 more matches
Chapter 4: Using XPCOM—Implementing advanced processes - Archive of obsolete content
for instance, this is the case for files (nsilocalfile).
...ons using xpconnect <?xml version="1.0" encoding="utf-8"?> <page xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <script type="application/javascript"><![cdata[ var ioservice = components.classes['@mozilla.org/network/io-service;1'] .getservice(components.interfaces.nsiioservice); alert(ioservice); ]]></script> </page> calling xpconnect using local files try saving the contents of listing 1 as the file test.xul, somewhere on your desktop, and drag and drop it into firefox to open it.
...because ordinary web pages and local files don't have privileges, it's impossible to actually try out the sample code in this chapter.
...And 22 more matches
XPCOM Interfaces - Archive of obsolete content
for example, the nsiaddressbook is the interface for interacting with an address book, nsisound is used for playing files and nsilocalfile is used for files.
...for this we can use the nsilocalfile interface.
...second, we query the file component and get the portion of it that implements the nsilocalfile interface.
...And 22 more matches
Initial setup
as a pre-requisite to contributing to the l10n program, you need to have access to code, tools, and a properly configured local environment (i.e., your personal computer).
... you also need to determine if a localization effort already exists for your locale.
... new or existing before anything else, you need to know if you will be creating a new localization or joining an existing one.
...And 21 more matches
XUL Structure - Archive of obsolete content
since xul and html are handled in the same way, you can load both from either your local file system, from a web page, or from an extension or standalone xulrunner application.
...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.
...And 20 more matches
Creating a Language Pack
please consult the documentation on localized builds on firefox-source-docs.
... to create a language pack, or a localization repack, you first need to go through the initial setup process.
... pre-build steps in the .mozconfig, you want to have mk_add_options moz_objdir=@topsrcdir@/obj-firefox-build ac_add_options --disable-compile-environment ac_add_options --with-l10n-base=../l10n-central # path relative to moz_objdir ac_add_options --enable-application=[browser or mail] the given path should have your localization directory as child (i.e., a subdirectory ab-cd where ab-cd is your locale code).
...And 20 more matches
Complete - Archive of obsolete content
js installation script for seamonkey chrome directory containing the extension code chrome/allcustom.jar the extension jar defaults/preferences directory containing a preferences file inside the jar there are three directories: content xul, javascript and other content that does not depend on the locale or theme locale files for each locale skin files for each theme version checks firefox etc.
...for more information about version checks, see: extension versioning, update and compatibility the installed jar to use disk space efficiently on the end user's computer, the three directories (content, locale, skin) are packed in a jar file.
...a combination of language and regional preferences is known as a locale.
...And 19 more matches
sslerr.html
peer does not support high-grade encryption." the local system was configured to support the cipher suites permitted for domestic use.
...the local system was configured to support only the cipher suites permitted for export use.
... ssl_error_no_cypher_overlap -12286 "cannot communicate securely with peer: no common encryption algorithm(s)." the local and remote systems share no cipher suites in common.
...And 19 more matches
Bytecode Descriptions
more fundamentally, the result of evaluating x-- is tonumeric(old value of x), a value that the sequence getlocal "x"; one; sub; setlocal "x" does not give us.
...if the function call definitely refers to a local binding, use jsop::undefined.
...format: jof_atom gimplicitthis operands: (uint32_t nameindex) stack: ⇒ this like jsop::implicitthis, but the name must not be bound in any local environments.
...And 18 more matches
RTCPeerConnection - Web APIs
the rtcpeerconnection interface represents a webrtc connection between the local computer and a remote peer.
...36" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">rtcpeerconnection</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} constructorrtcpeerconnection() the rtcpeerconnection() constructor returns a newly-created rtcpeerconnection, which represents a connection between the local device and a remote peer.propertiesalso inherits properties from: eventtargetcantrickleicecandidatesthe read-only rtcpeerconnection property cantrickleicecandidates returns a boolean which indicates whether or not the remote peer can accept trickled ice candidates.connectionstate the read-only connectionstate property of the rtcpeerconnection interface indicates the current state of the peer con...
...nection by returning one of the string values specified by the enum rtcpeerconnectionstate.currentlocaldescription read only the read-only property rtcpeerconnection.currentlocaldescription returns an rtcsessiondescription object describing the local end of the connection as it was most recently successfully negotiated since the last time the rtcpeerconnection finished negotiating and connecting to a remote peer.
...And 18 more matches
QA phase
after all of your hard work localizing we're sure that you not only want to see your work but you want to make sure it's accurate!
... if you're localizing mozilla websites, your work will display soon after you've committed it without needing a language pack.
... in order to see your work on firefox (or another mozilla application), you'll need to have a built language pack to install on your local instance.
...And 17 more matches
Using the Web Storage API - Web APIs
these three lines all set the (same) colorsetting entry: localstorage.colorsetting = '#a4509b'; localstorage['colorsetting'] = '#a4509b'; localstorage.setitem('colorsetting', '#a4509b'); note: it's recommended to use the web storage api (setitem, getitem, removeitem, key, length) to prevent the pitfalls associated with using plain objects as key-value stores.
... localstorage does the same thing, but persists even when the browser is closed and reopened.
... these mechanisms are available via the window.sessionstorage and window.localstorage properties (to be more precise, in supporting browsers the window object implements the windowlocalstorage and windowsessionstorage objects, which the localstorage and sessionstorage properties are members of) — invoking one of these will create an instance of the storage object, through which data items can be set, retrieved, and removed.
...And 16 more matches
Installing plugins to Gecko embedding browsers on Windows - Archive of obsolete content
go to hkey_local_machine\software\mozilla caveat emptor: if the mozilla subkey is not present under hkey_local_machine, look under hkey_current_user\software\mozilla\.
...traditionally, hkey_current_user is a copy of everything in hkey_local_machine.
...however, always look at hkey_local_machine first.
...And 15 more matches
Repackaging Firefox - Archive of obsolete content
the pristine firefox 2 installer files (windows .exe, mac .dmg, or linux .tar.gz) for each of the locales you need.
...this xpi has the following contents chrome.manifest components/partnerbookmarks.js defaults/preferences/partner.js install.rdf locale/ar/partner.properties locale/cs/partner.properties locale/da/partner.properties locale/de/partner.properties locale/el/partner.properties locale/en-gb/partner.properties locale/partner.properties locale/es-ar/partner.properties locale/es-es/partner.properties locale/fi/partner.properties locale/fr/partner.properties locale/he/partner.properties locale/hu/partner.properties locale/it/partner.prop...
...erties locale/ja/partner.properties locale/ja-jp-mac/partner.properties locale/ko/partner.properties locale/nb-no/partner.properties locale/nl/partner.properties locale/pl/partner.properties locale/pt-br/partner.properties locale/pt-pt/partner.properties locale/ru/partner.properties locale/sk/partner.properties locale/sv-se/partner.properties locale/tr/partner.properties locale/zh-cn/partner.properties locale/zh-tw/partner.properties partner-bookmarks.xml one by one, the files listed above are: chrome.manifest contains a specialized listing of the contents of the xpi.
...And 14 more matches
L10n Checks
l10n checks is a python script and library similar to compare-locales.
... it allows mozilla localizers to easily check their work.
...un: $ hg clone http://hg.mozilla.org/users/akalla_aviary.pl/silme-patched/ $ cd silme-patched/ $ sudo python setup.py install or, if you're on windows: $ hg clone http://hg.mozilla.org/users/akalla_aviary.pl/silme-patched/ $ cd silme-patched/ $ python setup.py install running it mercurial source (source) mode l10n checks gathers the directories to compare from an ini file, usually found in $app/locales/l10n.ini.
...And 14 more matches
Proxy Auto-Configuration (PAC) file - HTTP
(of course, the javascripts must be edited to reflect your site's domain name and/or subnets.) predefined functions and environment these functions can be used in building the pac file: hostname based conditions isplainhostname() dnsdomainis() localhostordomainis() isresolvable() isinnet() related utility functions dnsresolve() convert_addr() myipaddress() dnsdomainlevels() url/hostname based conditions shexpmatch() time based conditions weekdayrange() daterange() timerange() logging utility alert() there was one associative array (object) already defined, because at ...
... examples dnsdomainis("www.mozilla.org", ".mozilla.org") // true dnsdomainis("www", ".mozilla.org") // false localhostordomainis() syntax localhostordomainis(host, hostdom) parameters host the hostname from the url.
... examples localhostordomainis("www.mozilla.org" , "www.mozilla.org") // true (exact match) localhostordomainis("www" , "www.mozilla.org") // true (hostname match, domain not specified) localhostordomainis("www.google.com" , "www.mozilla.org") // false (domain name mismatch) localhostordomainis("home.mozilla.org", "www.mozilla.org") // false (hostname mismatch) isresolvable() syntax isresolvable(host) parameters host is the hostname from the url.
...And 14 more matches
Understanding WebAssembly text format - WebAssembly
all code in a webassembly module is grouped into functions, which have the following pseudo-code structure: ( func <signature> <locals> <body> ) the signature declares what the function takes (parameters) and returns (return values).
... the locals are like vars in javascript, but with explicit types declared.
...) after the signature, locals are listed with their type, for example (local i32).
...And 14 more matches
Working with Svelte stores - Learn web development
we then create a local variable named alertcontent.
...in the callback function we just assign the value we receive to the local variable, which will trigger the update of the component's dom.
...there we assign a new value to a local variable, and thanks to svelte reactivity all our markup and reactive dependencies are updated accordingly.
...And 13 more matches
Chrome registration
locale localizable applications keep all their localized information in locale providers.
...the two main types of localizable files are dtd files and java-style properties files.
... this chrome registry is configurable and persistent, and thus a user can install different chrome providers, and select a preferred skin and locale.
...And 13 more matches
Release phase
you've setup up your local and remote environments, you've selected your l10n tools and projects, done some localization and even some testing!
...your official release repository now that your locale has been registered, the localization files will live on mozilla mercurial server at hg.mozilla.org.
... depending on which branch you work on, the url of your repository might look like this: http://hg.mozilla.org/releases/l10n-central/x-testing if you followed the koala or plain text approach, you probably already have a local clone of the repository.
...And 13 more matches
Intl - JavaScript
intl.locale() constructor for objects that represents a unicode locale identifier.
... static methods intl.getcanonicallocales() returns canonical locale names.
... locale identification and negotiation the internationalization constructors as well as several language sensitive methods of other constructors (listed under see also) use a common pattern for identifying locales and determining the one they will actually use: they all accept locales and options arguments, and negotiate the requested locale(s) against the locales they support using an algorithm specified in the options.localematcher property.
...And 13 more matches
MCD, Mission Control Desktop, AKA AutoConfig - Archive of obsolete content
abook.mab"); lockpref("ldap_2.servers.pab.replication.lastchangenumber", 0); //account lockpref("mail.account.account1.server", "server1"); lockpref("mail.account.account2.identities", "id1"); lockpref("mail.account.account2.server", "server2"); lockpref("mail.accountmanager.accounts", "account1,account2"); lockpref("mail.accountmanager.defaultaccount", "account2"); lockpref("mail.accountmanager.localfoldersserver", "server1"); lockpref("mail.identity.id1.directoryserver", "ldap_2.servers.ldapint"); lockpref("mail.identity.id1.draft_folder", "imap://" + env_user + "@imap-int.int-evry.fr/drafts"); lockpref("mail.identity.id1.drafts_folder_picker_mode", "0"); lockpref("mail.identity.id1.fcc_folder", "imap://" + env_user + "@imap-int.int-evry.fr/sent"); lockpref("mail.identity.id1.fcc_folder_pick...
...u have to enable this function first, please see //http://technet.microsoft.com/de-de/library/cc816788(ws.10).aspx // // //put everything in a try/catch try { var userinfo = new object(); // this will hold ldap results userinfo.envuser = getenv("username"); // username userinfo.envhome = getenv("home"); // user home directory var ldaphost = "example.com"; var ldapbase = "dc=company,dc=local"; if( userinfo.envuser ) { var ldapfilter = "samaccountname=" + userinfo.envuser; } else { throw("couldn't get uid from the environment"); } // ldap attributes to retrieve from the server var ldapattrs = new array( "cn", "mail", "samaccountname" ); // add more attributes here, if needed) // define how to process ldap results before we make the call function processldapvalues(queryresults) ...
... (rpm -i) then modified /usr/src/redhat/sources/thunderbird-mozconfig by adding: ac_add_options --enable-extensions=pref compile and install: $ rpmbuild -ba /usr/src/redhat/specs/thunderbird.spec $ rpm -uvh /usr/src/redhat/rpms/i386/thunderbird-1.0.2-1.3.3.i386.rpm after instillation, autoconfig is finally back here: $ rpm -ql thunderbird | grep autoconfig /usr/lib/thunderbird-1.0.2/chrome/locale/autoconfig /usr/lib/thunderbird-1.0.2/components/autoconfig.xpt /usr/lib/thunderbird-1.0.2/components/libautoconfig.so /usr/lib/thunderbird-1.0.2/defaults/autoconfig /usr/lib/thunderbird-1.0.2/defaults/autoconfig/platform.js /usr/lib/thunderbird-1.0.2/defaults/autoconfig/prefcalls.js bugs reports related for the record, for old 1.0.x releases...
...And 12 more matches
Space Manager Detailed Design - Archive of obsolete content
this * creates a new local coordinate space relative to the current * coordinate space.
... */ void translate(nscoord adx, nscoord ady) { mx += adx; my += ady; } /** * returns the current translation from local coordinate space to * world coordinate space.
...the band data * indicates which parts of the band are available, and which parts * are unavailable * * the band data that is returned is in the coordinate space of the * local coordinate system.
...And 12 more matches
The First Install Problem - Archive of obsolete content
write a key under hkey_local_machine\software\mozillaplugins\ which is a vendor-determined plid.
... if the hkey_local_machine\software\mozillaplugins key doesn't exist, create it, and write the vendor-determined plid for each module that the vendor wishes to install.
... example: a piece of software called myapplication might create hkey_local_machine\software\mozillaplugins\@mycompany.com/myapplication,version=5.0.1/ where the plid is something the corporation that makes myapplication (mycompany inc.) determines.
...And 12 more matches
Client-side storage - Learn web development
saving data and assets locally so a site will be quicker (and potentially less expensive) to download, or be usable without a network connection.
... saving web application generated documents locally for use offline often client-side and server-side storage are used together.
... all of your web storage data is contained within two object-like structures inside the browser: sessionstorage and localstorage.
...And 12 more matches
Package management basics - Learn web development
as we touched on in the previous article, dependencies can be installed globally or locally to your project.
... although there tend to be more pros for installing globally, the pros for installing locally are more important — such as code portability and version locking.
...to mitigate this dependencies are installed locally to a project.
...And 12 more matches
WebRTC connectivity - Web APIs
each peer, then, keeps two descriptions on hand: the local description, describing itself, and the remote description, describing the other end of the call.
...regardless of whether it's a new call, or reconfiguring an existing one, these are the basic steps which must occur to exchange the offer and answer, leaving out the ice layer for the moment: the caller captures local media via navigator.mediadevices.getusermedia() the caller creates rtcpeerconnection and called rtcpeerconnection.addtrack() (since addstream is deprecating) the caller calls rtcpeerconnection.createoffer() to create an offer.
... the caller calls rtcpeerconnection.setlocaldescription() to set that offer as the local description (that is, the description of the local end of the connection).
...And 12 more matches
File I/O - Archive of obsolete content
this article describes local file input/output in chrome javascript.
...for legacy reasons, there is also an nsilocalfile interface.
... creating an nsifile object components.utils.import("resource://gre/modules/fileutils.jsm"); var file = new fileutils.file("/home"); or the same without using fileutils.jsm: var file = components.classes["@mozilla.org/file/local;1"].
...And 11 more matches
Index - MDN Web Docs Glossary: Definitions of Web-related terms
what sets it apart from previous scm systems is the ability to do common operations (branching, committing, etc.) on your local development machine, without having to change the master repository or even having write access to it.
... 205 host glossary, intermediate, web, webmechanics a host is a device connected to the internet (or a local network).
...this protocol lets two peers find and establish a connection with one another even though they may both be using network address translator (nat) to share a global ip address with other devices on their respective local networks.
...And 11 more matches
TypeScript support in Svelte - Learn web development
in each case it should end up like this: import { selectonfocus } from '../actions' migrating the stores to typescript now we have to migrate the stores.js and localstore.js files to typescript.
...this is how the contents will end up: // stores.ts import { writable } from 'svelte/store' import { localstore } from './localstore.js' import type { todotype } from './types/todo.type' export const alert = writable('welcome to the to-do list app!') const initialtodos: todotype[] = [ { id: 1, name: 'visit mdn web docs', completed: true }, { id: 2, name: 'complete the svelte tutorial', completed: false }, ] export const todos = localstore('mdn-svelte-todo', initialtodos) remember to updat...
...just remove the .js extension, like this: import { todos } from '../stores' now onto localstore.js.
...And 11 more matches
L20n HTML Bindings
the l20n html bindings you can take advantage of html bindings to localize your html documents with l20n.
... <head> … <script src="l20n.js"></script> </head> create manifest use a localization manifest to define available languages and their resource files.
... <link rel="localization" href="../locales/manifest.json"> an example of the manifest file (all keys are required): { "locales": [ "en-us", "pl"], "default_locale": "en-us", "resources": [ "../locales/{{locale}}/strings.l20n", "/shared/{{locale}}/date.l20n"¨ ] } make html elements localizable use the data-l10n-id attribute on an html element to mark it as localizable.
...And 11 more matches
A simple RTCDataChannel sample - Web APIs
note: even though both ends of our connection will be on the same page, we're going to refer to the one that starts the connection as the "local" one, and to the other as the "remote" end.
... set up the local peer localconnection = new rtcpeerconnection(); sendchannel = localconnection.createdatachannel("sendchannel"); sendchannel.onopen = handlesendchannelstatuschange; sendchannel.onclose = handlesendchannelstatuschange; the first step is to create the "local" end of the connection.
... localconnection.onicecandidate = e => !e.candidate || remoteconnection.addicecandidate(e.candidate) .catch(handleaddcandidateerror); remoteconnection.onicecandidate = e => !e.candidate || localconnection.addicecandidate(e.candidate) .catch(handleaddcandidateerror); we configure each rtcpeerconnection to have an event handler for the icecandidate event.
...And 11 more matches
<input>: The Input (Form Input) element - HTML: Hypertext Markup Language
WebHTMLElementinput
<input type="date" name="date"/> html5 datetime-local a control for entering a date and time, with no time zone.
... <input type="datetime-local" name="datetime-local"/> html5 email a field for editing an email address.
... the autocomplete attribute is valid on hidden, text, search, url, tel, email, date, month, week, time, datetime-local, number, range, color, and password.
...And 11 more matches
Details of the object model - JavaScript
this process does not explicitly put values in the mark object (local values) for the properties that mark inherits from the prototype chain.
...if the value is not there locally, javascript checks the prototype chain (using the internal [[prototype]] property).
...in this way, the mark object has the following properties and values: mark.name = ''; mark.dept = 'general'; mark.projects = []; the mark object is assigned local values for the name and dept properties by the employee constructor.
...And 11 more matches
Manifest Files - Archive of obsolete content
for themes, 'skin' is used while 'locale' is used for locales.
...this can be either a local file path using a file url or a jar archive using a jar url, which will be described in a moment.
...themes and locales the themes and locales, the syntax is similar as for content packages, but you also need to specify the content package you are providing a theme or locale for.
...And 10 more matches
XUL Coding Style Guidelines - Archive of obsolete content
to make xul files easy to read and maintain, localization friendly, and portable across user agents, we need to have a set of coding style guidelines to ensure our objectives are achievable.
... making xul localizable -- mandatory in the past, ui (display) related resource descriptions are stored in *.rc (for windows client) or *.ad (for unix client) so that they can be localized for a specific language or culture.
...to make xul stream/file localizable, several guidelines are to be adopted to make the translation work easier and less error-prone.
...And 10 more matches
Setting up the infrastructure
first, make your project's file type decision (see localization formats for details): html/php .lang gettext (.po) assuming you chose gettext, you'll need to follow the steps below to set up the infrastructure for localizing your web application.
... create a locale directory in your website (usually something like docroot/locale).
... copy the shell scripts from /addons/trunk/site/app/locale/ to your locale directory: extract-po.sh will be used to extract all english strings from your application's directories specified in source_dirs, merge the resulting template (*.pot) file with the existing (already containing translations) messages.po files for each locale (if they exist) and merge the new messages.po files to messages.mo files.
...And 10 more matches
Index
this is typically used for local variables being passed to function which requires js::handlevaluearray or a pointer to js::value array.
...this is useful as a parameter type, or a temporal local variable for it.
...to lock a value, use local roots with js_addroot.
...And 10 more matches
Introduction to the File and Directory Entries API - Web APIs
the file and directory entries api simulates a local file system that web apps can navigate around.
... it can improve performance by letting an app pre-fetch assets in the background and cache locally.
... it lets users of your web app directly edit a binary file that's in their local file directory.
...And 10 more matches
l10n - Archive of obsolete content
localize strings appearing in the add-on's javascript code.
... usage to learn how to use this module to write localizable code, read the localization tutorial.
... note that you can't currently use localize strings appearing in content scripts or html files, but you can share the localized strings you want by assigning it's values to a json serializable object.
...And 9 more matches
Bootstrapped extensions - Archive of obsolete content
notes on modifying the application user interface chrome.manifest in bootstrapped add-ons you can use a chrome.manifest file in bootstrapped add-ons to: make your add-on's content available via a chrome:// url (using the content, locale, and skin instructions in the manifest).
... localization (l10n) localizing bootstrapped add-ons is very much the same since firefox 7, as that is when chrome.manifest compatibility landed.
... js and jsm files - using property files to localize your .js and .jsm files you have to use property files.
...And 9 more matches
Preferences - Archive of obsolete content
however, there is a concept of complex types, which makes it easier for developers to save and load nsilocalfile and nsisupportsstring objects in preferences (as strings — note that from the preferences system's point of view, complex values have a nsiprefbranch.pref_string type.) there are two nsiprefbranch methods implementing the concept — setcomplexvalue() and getcomplexvalue().
... nsipreflocalizedstring almost the same as nsisupportsstring, but it is handled differently in getcomplexvalue() when there's no user value for the given preference; see below for details.
... nsilocalfile and nsirelativefilepref store paths in preferences.
...And 9 more matches
Creating a Firefox sidebar extension - Archive of obsolete content
optionally locales and skins can be included.
...package structure emptysidebar \- chrome |- content |- locale | \- en-us \- skin create all folders, except for skin.
... the locale holds the locale, only the en-us locale is created.
...And 9 more matches
Mozilla internal string guide
the most common uses of the concrete classes are as local variables, and members in classes or structs.
...drag&drop) where it's necessary to call a system api with data encoded in the windows locale-dependent legacy encoding instead of utf-16.
...representing ascii as utf-16 bad both for memory usage and cache locality.
...And 9 more matches
Date.parse() - JavaScript
when the time zone offset is absent, date-only forms are interpreted as a utc time and date-time forms are interpreted as local time.
... however, invalid values in date strings not recognized as simplified iso format as defined by ecma-262 may or may not result in nan, depending on the browser and values provided, e.g.: // non-iso string with invalid date values new date('23/25/2014'); will be treated as a local date of 25 november, 2015 in firefox 30 and an invalid date in safari 7.
... new date('10 06 2014'); will be treated as a local date of 6 october, 2014, and not 10 june, 2014.
...And 9 more matches
Chapter 6: Firefox extensions and XUL applications - Archive of obsolete content
the local variables screen should always display variables and objects during step-by-step execution.
...we can guess from the name that this has something to do with handling files, but we’ve still got the following questions: what does nsilocalfile.initwithpath do?
... how is nsilocalfile.initwithpath actually implemented?
...And 8 more matches
L20n
a javascript localization framework to unleash your natural language's power with simple code.
... introducing l20n l20n reinvents software localization.
... through l20n, mozilla is creating a new generation of technology that places more power in localizers' hands.
...And 8 more matches
How to convert an overlay extension to restartless - Archive of obsolete content
well, xul overlays and windows, jsm files, chrome & resource mappings with localization, default preferences, but no xpcom components of your own.
...the examples will also assume that you know how to properly add instructions to your add-on's chrome.manifest to add and remove resource, chrome, locale, & etc.
...you can use it in a web page to fetch a file from your server and you can use it in your add-on to fetch a local file from your installation.
...And 7 more matches
Install Manifests - Archive of obsolete content
2 extensions 4 themes 8 locale 32 multiple item package 64 spell check dictionary 128 telemetry experiment 256 webextension experiment examples <em:type>2</em:type> this property was added for firefox 1.5, and is only required for add-on types other than extensions and themes.
... localized allows you to localize the add-on's name, description, contributors and other metadata.
... the localized description must specify at least one em:locale which indicates which locales to use this information for.
...And 7 more matches
Getting started with Vue - Learn web development
in this article we'll look at a little bit of vue background, learn how to install it and create a new project, study the high-level structure of the whole project and an individual component, see how to run the project locally, and get it prepared to start building our example.
... objective: to setup a local vue development environment, create a starter app, and understand the basics of how it works.
...this object is where you locally register components, define component inputs (props), handle local state, define methods, and more.
...And 7 more matches
Introducing a complete toolchain - Learn web development
we will use npx later on this chapter to help run tools that are installed as local dependencies to the project.
... eslint is installed via npm, so as per discussions in chapter 2, you have the choice to install this tool locally or globally.
... using both is recommended: for projects you intend to share, you should always include eslint as a local dependency so that anyone making their own copy can follow the rules you've applied to the project.
...And 7 more matches
Research and prep
productization is the process of determining a user's choice of default search engines, content and protocol handlers (rss readers, web mail and web calendar), bookmarks, and links to recommended sites on the in-product pages as it relates to their locale.
... it is one of the most customizable and localizable parts of the product l10n process, as it goes beyond string translation.
... we believe that localization teams are in the best position to provide recommendations on what local providers we can use for web services because you're in the market, work in the language, and know your users.
...And 7 more matches
Streams - Plugins
stream data can be pushed by the browser, pulled by the plug-in, or saved to a local file and passed to the plug-in.
...in general, this mode is more expensive, because the entire stream must be downloaded to a temporary file before use unless the stream comes from a local file or an http server that supports the byte-range extension to http.
... file mode: the browser saves the entire stream to a local file and passes the file path to the plug-in instance through the npp_streamasfile method.
...And 7 more matches
Intl.DateTimeFormat - JavaScript
static methods intl.datetimeformat.supportedlocalesof() returns an array containing those of the provided locales that are supported without having to fall back to the runtime's default locale.
... instance methods intl.datetimeformat.prototype.format() getter function that formats a date according to the locale and formatting options of this datetimeformat object.
... intl.datetimeformat.prototype.formattoparts() returns an array of objects representing the date string in parts that can be used for custom locale-aware formatting.
...And 7 more matches
jpm - Archive of obsolete content
on debian and ubuntu, this can be remedied by ensuring you installed the compatibility package, nodejs-legacy: sudo apt-get install nodejs-legacy on other distributions, you may have to create a local symlink to nodejs manually: sudo ln -s "$(which nodejs)" /usr/local/bin/node installing jpm after you have npm installed and node on your path, install jpm just as you would any other npm package.
... installing jpm globally npm install jpm --global depending on your setup, you might need to run this as an administrator: sudo npm install jpm --global installing jpm locally if you do not wish to, or are unable to, install jpm globally, you may instead install it locally: cd $home && npm install jpm to run jpm from a terminal when installed locally, you must add the directory "$home/node_modules/.bin/" to your terminal's path first.
... jpm post --post-url http://localhost:8888/ see using post and watchpost for more information.
...And 6 more matches
Index - Archive of obsolete content
ArchiveMozillaXULIndex
485 getformattedstring xul methods, xul reference if you need to handle substitutions involving plurals, take a look at localization and plurals.
... 624 applocale xul properties, xul reference no summary!
...these applications are easily customized with alternative text, graphics, and layout so they can be readily branded or localized for various markets.
...And 6 more matches
Introduction to Public-Key Cryptography - Archive of obsolete content
the server looks up the name and password in its local password database and, if they match, accepts them as evidence authenticating the user's identity.
...a user can log in once, using a single password to the local client's private-key database, and get authenticated access to all ssl-enabled servers that user is authorized to use-without sending any passwords over the network.
...the source can be either the verifier's local certificate database (on that client or server) or the certificate chain provided by the subject (for example, over an ssl connection).
...And 6 more matches
Functions
when a name is evaluated that doesn't refer to a local variable, the interpreter consults the scope chain to find the variable.
...if we can prove at compile time that a function does not refer to any locals or arguments of enclosing functions, it is a null closure.
...an algol-like function may read the local variables and arguments of its immediate enclosing function from the stack, as if by magic.
...And 6 more matches
Setting up an update server
the goal of this document is to provide instructions for installing a locally-served firefox update.
... building a mar building a mar locally is more complicated.
...if you want to use a locally-built mar, the copy of firefox being updated will need to be built to allow un-signed mars.
...And 6 more matches
IAccessible2
tr extendedrole ); [propget] hresult extendedstates([in] long maxextendedstates, [out, size_is(,maxextendedstates), length_is(, nextendedstates)] bstr extendedstates, [out] long nextendedstates ); [propget] hresult groupposition([out] long grouplevel, [out] long similaritemsingroup, [out] long positioningroup ); [propget] hresult indexinparent([out] long indexinparent ); [propget] hresult locale([out] ia2locale locale ); [propget] hresult localizedextendedrole([out] bstr localizedextendedrole ); [propget] hresult localizedextendedstates([in] long maxlocalizedextendedstates, [out, size_is(,maxlocalizedextendedstates), length_is(, nlocalizedextendedstates)] bstr localizedextendedstates, [out] long nlocalizedextendedstates ); [propget] hresult nextendedstates([out] long nextendedstat...
...locale() returns the ia2locale of the accessible object.
... [propget] hresult locale( [out] ia2locale locale ); parameters locale return value s_ok.
...And 6 more matches
IAccessibleAction
method overview [propget] hresult description([in] long actionindex, [out] bstr description ); hresult doaction([in] long actionindex ); [propget] hresult keybinding([in] long actionindex, [in] long nmaxbindings, [out, size_is(,nmaxbindings), length_is(, nbindings)] bstr keybindings, [out] long nbindings ); [propget] hresult localizedname([in] long actionindex, [out] bstr localizedname ); hresult nactions([out,retval] long nactions ); [propget] hresult name([in] long actionindex, [out] bstr name ); methods description() returns a description of the specified action of the object.
...description the returned value is a localized string of the specified action.
...the returned strings are the localized human readable key sequences to be used to activate each action, e.g.
...And 6 more matches
nsIWebBrowserPersist
embedding/components/webbrowserpersist/nsiwebbrowserpersist.idlscriptable interface for persisting dom documents and uris to local or remote storage.
...this can only be used when persisting to a local file.
... afile target local file.
...And 6 more matches
Mozilla
creating a language pack to create a language pack, or a localization repack, you first need to go through the initial setup process.
... creating a localized windows installer of seamonkey preamble: not all of the programs listed below are necessary.
... localization at mozilla localization (l10n) is the process of translating software user interfaces from one language to another and adapting it to suit a foreign culture.
...And 6 more matches
In depth: Microtasks and the JavaScript runtime environment - Web APIs
this is frequently referred to as a "local context." using the ill-advised eval() function also creates a new execution context.
...consider the javascript program below: let outputelem = document.getelementbyid("output"); let userlanguages = { "mike": "en", "teresa": "es" }; function greetuser(user) { function localgreeting(user) { let greeting; let language = userlanguages[user]; switch(language) { case "es": greeting = `¡hola, ${user}!`; break; case "en": default: greeting = `hello, ${user}!`; break; } return greeting; } outputelem.innerhtml += localgreeting(user) + "<br>\r"; } greetuser("mike"); greetuser("teresa"); greetuser("ve...
... when greetuser() calls localgreeting(), another context is created to run that function.
...And 6 more matches
Geometry and reference spaces in WebXR - Web APIs
this may be different from the effective origin, which is the origin point for the space's local coordinate system.
... xrreferencespacetype description interface bounded-floor similar to the local type, except the user is not expected to move outside a predetermined boundary, given by the boundsgeometry in the returned object.
... xrboundedreferencespace local a tracking space whose native origin is located near the viewer's position at the time the session was created.
...And 6 more matches
Intl.DateTimeFormat() constructor - JavaScript
syntax new intl.datetimeformat([locales[, options]]) parameters locales optional a string with a bcp 47 language tag, or an array of such strings.
... to use the browser's default locale, omit this argument or pass undefined.
...for the general form and interpretation of the locales argument, see the intl page.
...And 6 more matches
No Proxy For configuration - Archive of obsolete content
new profiles contain the values "localhost, 127.0.0.1", by default.
... limitations a domain, including sub-domains domain suffix "mozilla.org" does not block domains that end in the same string (amozilla.org) sub-domains domain suffix, starting with a dot ".mozilla.org" does not block the main domain (mozilla.org) a hostname (without domain) hostname-only (see problems below) "localhost" also blocks any possible domains that start with the entry ("www.otherdomain.localhost") a hostname (with domain) domain name "www.mozilla.org" does not block hostnames or domains that end in the same string (other-www.mozilla.org) an ip address ip address "1.2.3.4" does not block hostnames that resolve to the ip address ("127.0.0.1" does not block "loc...
... all non-fqdn hosts, such as intranet hosts the string "<local>" (without quotes) "<local>" bypasses the proxy for all hostnames which have no periods in them.
...And 5 more matches
JavaScript Client API - Archive of obsolete content
please note that usage of the sync apis is governed by a terms of service: by accessing or using the firefox sync apis in connection with the development of your own client software to access the firefox sync services (a “third party client”), you acknowledge that you will need to install and use a local version of the firefox sync server for multiple account testing and that any use of mozilla’s hosted firefox sync services is subject to mozilla’s firefox sync terms of service at https://services.mozilla.com/tos/.
... getallids() must return an iterable list containing the guids of every item being stored on the local system.
... wipe() when this method is called, your store needs to completely wipe all of its stored data from the local application.
...And 5 more matches
Venkman Introduction - Archive of obsolete content
(note that venkman displays usage data when it starts up: "recorded local startup x, global yyy." this data comes from a counter built in to the application.
... the local variables view the local variables view is on the left portion of the window, at the bottom.
... when the debugger is stopped, the local variables view displays values for the current function.
...And 5 more matches
Fetching data from the server - Learn web development
to speed things up even further, some sites also store assets and data on the user's computer when they are first requested, meaning that on subsequent visits they use the local versions instead of downloading fresh copies when the page is first loaded.
... to begin this example, make a local copy of ajax-start.html and the four text files — verse1.txt, verse2.txt, verse3.txt, and verse4.txt — in a new directory on your computer.
...to fix this, add the following two lines at the bottom of your code (just above the closing </script> tag) to load verse 1 by default, and make sure the <select> element always shows the correct value: updatedisplay('verse 1'); versechoose.value = 'verse 1'; serving your example from a server modern browsers will not run xhr requests if you just run the example from a local file.
...And 5 more matches
Getting started with Svelte - Learn web development
then we will learn how to setup our development environment, create a sample app, understand the structure of the project, and see how to run it locally and build it for production.
... objective: to setup a local svelte development environment, create and build a starter app, and understand the basics of how it works.
...this is much quicker than using git clone because it will not download all the history of the repo, or create a complete local clone.
...And 5 more matches
Setting up your own test automation environment - Learn web development
we will also look at how to integrate your local testing environment with commercial tools like the ones discussed in the previous article.
... objective: to show how to set up a selenium testing environment locally and run tests with it, and how to integrate it with tools like lambdatest, sauce labs, and browserstack.
... you can use any url to point to your resource, including a file:// url to test a local document: driver.get('file:///users/chrismills/git/learning-area/tools-testing/cross-browser-testing/accessibility/fake-div-buttons.html'); or driver.get('http://localhost:8888/fake-div-buttons.html'); but it is better to use a remote server location so the code is more flexible — when you start using a remote server to run your tests (see later on), your code will break if you try to use l...
...And 5 more matches
Introduction to NSPR
nspr threads are scheduled in two separate domains: local threads are scheduled within a process only and are handled entirely by nspr, either by completely emulating threads on each host operating system (os) that doesn't support threads, or by using the threading facilities of each host os that does support threads to emulate a relatively large number of local threads by using a relatively small number of native threads.
... in general, it's preferable to create local user threads with normal priority and let nspr take care of the details as appropriate for each host os.
...it's usually preferable to create local user threads with normal priority and let nspr and the host take care of the details.
...And 5 more matches
RTCIceCandidateStats - Web APIs
for local candidates, it's value is true if the candidate has been deleted or released.
... networktype optional a string from the rtcnetworktype enumerated type which indicates the type of interface used for a local candidate.
... this property is only present for local candidates.
...And 5 more matches
RTCPeerConnection.createOffer() - Web APIs
if this value is false, the remote peer will not be offered to send audio data, even if the local side will be sending audio data.
... if this value is true, the remote peer will be offered to send audio data, even if the local side will not be sending audio data.
... the default behavior is to offer to receive audio only if the local side is sending audio, not otherwise.
...And 5 more matches
Using bounded reference spaces - Web APIs
you can create a session that supports a bounded-floor reference space if available by using code such as the following: async function onactivatexrbutton(event) { if (!xrsession) { navgator.xr.requestsession("immersive-vr"), { requiredfeatures: ["local-floor"], optionalfeatures: ["bounded-floor"] }).then((session) => { xrsession = session; startsessionanimation(); }); } } this function, called when the user clicks on a button to start the xr experience, works as usual, exiting at once if a session is already in place, then requesting a new session using immersive-vr mode.
... the options specified when requesting the session indicate that at a minimum, the session must be compatible with the local-floor reference space, but that it would be nice if the bounded-floor space were supported as well.
... once the session has been created, our startsessionanimation() function can try to establish a bounded-floor reference space, and if it fails to do so it can then fall back to requesting a local-floor reference space instead (in which we will have to handle boundaries ourselves).
...And 5 more matches
Intl.NumberFormat - JavaScript
static methods intl.numberformat.supportedlocalesof() returns an array containing those of the provided locales that are supported without having to fall back to the runtime's default locale.
... instance methods intl.numberformat.prototype.format() getter function that formats a number according to the locale and formatting options of this numberformat object.
... intl.numberformat.prototype.formattoparts() returns an array of objects representing the number string in parts that can be used for custom locale-aware formatting.
...And 5 more matches
Source code directories overview - Archive of obsolete content
intl contains c interfaces and code for supporting localization.
... it contains code for various character sets, locale formats (e.g.
... the format of the date and time for different cultures) and other localization facilities.
...And 4 more matches
Introduction to XUL - Archive of obsolete content
mozilla's xul content models also support nifty features like local/remote merging; see the xul and rdf document for details.
... 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.
... that is, a separate file of localized strings.
...And 4 more matches
Accesskey display rules - Archive of obsolete content
always appends accesskey text the basic rules are enough for western locales.
... however, in some locales, e.g., japanese localized build, its most ui labels don't have alphabets but alphabets are used to accesskey.
... for coherence of the labels on such localized builds, the accesskey text is always appended even if the labels have their accesskey characters.
...And 4 more matches
The Chrome URL - Archive of obsolete content
another advantage over other url types is that they automatically handle multiple themes and locales.
...the <part> is either 'content', 'skin' or 'locale' depending on which part you want.
...similarly, you can point to a file that is part of a locale by using 'locale' instead of 'content'.
...And 4 more matches
Getting started with React - Learn web development
we'll discover a little bit of detail about its background and use cases, set up a basic react toolchain on our local computer, and create and play with a simple starter app — learning a bit about how react works in the process.
... objective: to set up a local react development environment, create a start app, and understand the basics of how it works hello react as its official tagline states, react is a library for building user interfaces.
...the scripts installed by create-react-app will start being served at a local server at localhost:3000, and open the app in a new browser tab.
...And 4 more matches
Creating a spell check dictionary add-on
a locale code to describe the language of the dictionary.
...it is important to choose the right locale code, or the spell checker will not be able to match the language of your dictionary against the language of a web page in order to select the right dictionary to use.
... if you are creating a new dictionary, as opposed to updating an existing one, please make sure that there is not already a dictionary available for your locale.
...And 4 more matches
What every Mozilla translator should know
l10n stands for localization = l + another 10 letters + n mailing lists and other resources there are several mailing lists to keep the track of what's going on, which are available as newsgroups, as well, both on news.mozilla.org and google groups: the main l10n list also available as mozilla.dev.l10n, .l10n in short.
... discussion about localization take part here just as well as l10n-focused announcements.
...for every branch and every locale, there is a separate repository for localization files committed by the localizers.
...And 4 more matches
SpiderMonkey Build Documentation
no configure: error: installation or configuration problem: c compiler cannot create executables." you can try configuring like so: cc=clang cxx=clang++ ../configure it is also possible that baldrdash may fail to compile with /usr/local/cellar/llvm/7.0.1/lib/clang/7.0.1/include/inttypes.h:30:15: fatal error: 'inttypes.h' file not found /usr/local/cellar/llvm/7.0.1/lib/clang/7.0.1/include/inttypes.h:30:15: fatal error: 'inttypes.h' file not found, err: true this is because, starting from mohave, headers are no longer installed in /usr/include.
...this installs the shared library to /usr/local/lib, the c header files to /usr/local/include, and the js executable to/usr/local/bin.
...for example, assuming your local nspr has been installed to c:/mozilla-build/msys/local: /bin/sh ../configure.in --with-nspr-cflags="-ic:/mozilla-build/msys/local/include" \ --with-nspr-libs="c:/mozilla-build/msys/local/lib/libnspr4.a \ c:/mozilla-build/msys/local/lib/libplds4.a \ c:/mozilla-build/msys/local/lib/libplc4.a" if you get symbol loading or dyn...
...And 4 more matches
Accessing the Windows Registry Using XPCOM
a simple example here's a simple example showing how to read your windows productid: var wrk = components.classes["@mozilla.org/windows-registry-key;1"] .createinstance(components.interfaces.nsiwindowsregkey); wrk.open(wrk.root_key_local_machine, "software\\microsoft\\windows\\currentversion", wrk.access_read); var id = wrk.readstringvalue("productid"); wrk.close(); this example, while simple, shows several important things about using the interface.
... notice in the open() call that the root key to use is specified using the named constants available on the nsiwindowsregkey interface, in this case root_key_local_machine, which corresponds to hkey_local_machine in the windows registry.
...they are: root_key_classes_root — corresponds to hkey_classes_root root_key_current_user — corresponds to hkey_current_user root_key_local_machine — corresponds to hkey_local_machine the second parameter for open() and create() is the path to the key.
...And 4 more matches
Starting WebLock
this file can exist anywhere on the local system, but we've placed it next to the application to keep things simple.
...a related interface called nsilocalfile provides access to operations specific to local files, but the nsifile functionality is adequate for the weblock component.
... using nsilocalfile for reading data an nsifile object returned from the directory service may also implement the nsilocalfile interface, which has a method that will return a file pointer that can be used in fread().
...And 4 more matches
nsIDBFolderInfo
an getbooleanproperty(in string propertyname, in boolean defaultvalue); void getcharacterset(out acstring charset, out boolean overriden); void getcharactersetoverride(out boolean charactersetoverride); obsolete since gecko 1.8 string getcharptrcharacterset(); string getcharptrproperty(in string propertyname); void getlocale(in nsstring result); native code only!
...ring propertyname, in boolean apropertyvalue); void setcharacterset(in string charset); void setcharactersetoverride(in boolean charactersetoverride); obsolete since gecko 1.8 void setcharptrproperty(in string apropertyname, in string apropertyvalue); void sethighwater(in nsmsgkey highwater, in boolean force); void setlocale(in nsstring locale); native code only!
... foldersize unsigned long highwater nsmsgkey imaphierarchyseparator wchar imaptotalpendingmessages long imapuidvalidity long imapunreadpendingmessages long knownartsset string locale astring mailboxname astring nummessages long numunreadmessages long sortorder nsmsgviewsortordervalue sorttype nsmsgviewsorttypevalue version unsigned long viewflags nsmsgviewflagstype...
...And 4 more matches
nsIDOMElement
inherits from: nsidomnode last changed in gecko 1.7 method overview domstring getattribute(in domstring name); nsidomattr getattributenode(in domstring name); nsidomattr getattributenodens(in domstring namespaceuri, in domstring localname); domstring getattributens(in domstring namespaceuri, in domstring localname); nsidomnodelist getelementsbytagname(in domstring name); nsidomnodelist getelementsbytagnamens(in domstring namespaceuri, in domstring localname); boolean hasattribute(in domstring name); boolean hasattributens(in domstring namespaceuri, in domstring localname); void removeattribute(in domstring name) nsidomattr removeattributenode(in n...
...sidomattr oldattr) void removeattributens(in domstring namespaceuri, in domstring localname) void setattribute(in domstring name, in domstring value) nsidomattr setattributenode(in nsidomattr newattr) nsidomattr setattributenodens(in nsidomattr newattr) void setattributens(in domstring namespaceuri, in domstring qualifiedname, in domstring value) attributes attribute type description tagname domstring the element tag name.
...nsidomattr getattributenodens( in domstring namespaceuri, in domstring localname ); parameters namespaceuri namespace uri localname attribute name return value a nsidomattr corresponding to the attribute.
...And 4 more matches
nsIMsgIncomingServer
solete since gecko 1.8 void displayofflinemsg(in nsimsgwindow awindow); boolean equals(in nsimsgincomingserver server); void forgetpassword(); void forgetsessionpassword(); astring generateprettynameformigration(); boolean getboolattribute(in string name); boolean getboolvalue(in string attr); acstring getcharattribute(in string name); acstring getcharvalue(in string attr); nsilocalfile getfilevalue(in string relpref, in string abspref); nsimsgfilterlist getfilterlist(in nsimsgwindow amsgwindow); long getintattribute(in string name); long getintvalue(in string attr); nsimsgfolder getmsgfolderfromuri(in nsimsgfolder afolderresource, in acstring auri); void getnewmessages(in nsimsgfolder afolder, in nsimsgwindow amsgwindow, in nsiurllistener aurllistener); acstrin...
...g oldname, in acstring newname); void performbiff(in nsimsgwindow amsgwindow); void performexpand(in nsimsgwindow amsgwindow); void removefiles(); void setboolattribute(in string name, in boolean value); void setboolvalue(in string attr, in boolean value); void setcharattribute(in string name, in acstring value); void setcharvalue(in string attr, in acstring value); void setdefaultlocalpath(in nsilocalfile adefaultlocalpath); void setfilevalue(in string relpref, in string abspref, in nsilocalfile avalue); void setfilterlist(in nsimsgfilterlist afilterlist); void setintattribute(in string name, in long value); void setintvalue(in string attr, in long value); void setunicharattribute(in string name, in astring value); void setunicharvalue(in string attr, in astring val...
...for instance, local mail is not removable, but an imported folder is.
...And 4 more matches
nsIMsgMessageService
dow amsgwindow, in nsimsgfolder amsgfolder, in string asearchuri); nsiuri streammessage(in string amessageuri, in nsisupports aconsumer, in nsimsgwindow amsgwindow, in nsiurllistener aurllistener, in boolean aconvertdata, in string aadditionalheader); nsiuri streamheaders(in string amessageuri, in nsistreamlistener aconsumer, in nsiurllistener aurllistener [optional] in boolean alocalonly); boolean ismsginmemcache(in nsiuri aurl, in nsimsgfolder afolder, out nsicacheentrydescriptor acacheentry); nsimsgdbhdr messageuritomsghdr(in string uri); methods copymessage() pass in the uri for the message you want to have copied.
...the consumer has to be a stream listener and in your listener's ondataavailable method, you can write out the stream data to a local file or concatenate it to a string.
... nsiuri streammessage(in string amessageuri, in nsistreamlistener aconsumer, in nsiurllistener aurllistener, in boolean alocalonly); parameters amessageuri uri of message to stream aconsumer nsistreamlistener generally, a stream listener listening to the message headers.
...And 4 more matches
nsIXSLTProcessor
to create an instance, use: var xsltprocessor = components.classes["@mozilla.org/document-transformer;1?type=xslt"] .createinstance(components.interfaces.nsixsltprocessor); method overview void clearparameters(); nsivariant getparameter(in domstring namespaceuri, in domstring localname); void importstylesheet(in nsidomnode style); void removeparameter(in domstring namespaceuri, in domstring localname); void reset(); void setparameter(in domstring namespaceuri, in domstring localname, in nsivariant value); nsidomdocument transformtodocument(in nsidomnode source); nsidomdocumentfragment transformtofragment(in nsidomnode source, in nsidomdocument output); method...
...nsivariant getparameter( in domstring namespaceuri, in domstring localname ); parameters namespaceuri the namespaceuri of the xslt parameter.
... localname the local name of the xslt parameter.
...And 4 more matches
Storage
of course, if your statement is local only to the function, you do not have to worry about calling reset since the object will be destroyed.
... return transaction.commit(); } collation (sorting) sqlite provides several collation methods (binary, nocase, and rtrim), but these are all very simple and have no support for various text encodings or the user's locale.
... gecko 1.9.2 added support for several new collation methods: locale case- and accent-insensitive collation.
...And 4 more matches
RTCPeerConnection.signalingState - Web APIs
the read-only signalingstate property on the rtcpeerconnection interface returns one of the string values specified by the rtcsignalingstate enum; these values describe the state of the signaling process on the local end of the connection while connecting or reconnecting to another peer.
...for example, if you receive an answer while the signalingstate isn't "have-local-offer", you know that something is wrong, since you should only receive answers after creating an offer but before an answer has been received and passed into rtcpeerconnection.setlocaldescription().
...this may mean that the rtcpeerconnection object is new, in which case both the localdescription and remotedescription are null; it may also mean that negotiation is complete and a connection has been established.
...And 4 more matches
A re-introduction to JavaScript (JS tutorial) - JavaScript
a.tolocalestring() returns a string with the tolocalestring() of each element separated by commas.
...the function body can contain as many statements as you like and can declare its own variables which are local to that function.
...here's a way of "hiding" some local variables — like block scope in c: var a = 1; var b = 2; (function() { var b = 3; a += b; })(); a; // 4 b; // 2 javascript allows you to call functions recursively.
...And 4 more matches
Intl.Collator() constructor - JavaScript
syntax new intl.collator([locales[, options]]) parameters locales optional.
...for the general form and interpretation of the locales argument, see the intl page.
... the following unicode extension keys are allowed: co variant collations for certain locales.
...And 4 more matches
Intl.DisplayNames - JavaScript
static methods intl.displaynames.supportedlocalesof() returns an array containing those of the provided locales that are supported without having to fall back to the runtime's default locale.
... instance methods intl.displaynames.prototype.of() this method receives a code and returns a string based on the locale and options provided when instantiating intl.displaynames.
... intl.displaynames.prototype.resolvedoptions() returns a new object with properties reflecting the locale and formatting options computed during initialization of the object.
...And 4 more matches
Intl.RelativeTimeFormat() constructor - JavaScript
syntax new intl.relativetimeformat([locales[, options]]) parameters locales optional.
...for the general form and interpretation of the locales argument, see the intl page.
...an object with some or all of the following properties: localematcher the locale matching algorithm to use.
...And 4 more matches
widget - Archive of obsolete content
this can be local content or remote content, an image or web content.
... contentscriptfile string,array a local file url or an array of local file urls of content scripts to load.
...this can point to local content loaded from your add-on's "data" directory or remote content, an image or web content.
...And 3 more matches
Creating Reusable Modules - Archive of obsolete content
var path = fp.file.path; // work with returned nsilocalfile...
...we can adapt it like this: var {cc, ci} = require("chrome"); // return the two-digit hexadecimal code for a byte function tohexstring(charcode) { return ("0" + charcode.tostring(16)).slice(-2); } function md5file(path) { var f = cc["@mozilla.org/file/local;1"] .createinstance(ci.nsilocalfile); f.initwithpath(path); var istream = cc["@mozilla.org/network/file-input-stream;1"] .createinstance(ci.nsifileinputstream); // open for reading istream.init(f, 0x01, 0444, 0); var ch = cc["@mozilla.org/security/hash;1"] .createinstance(ci.nsicryptohash); // we want to use the md5 algorithm ch.init(ch.md5); /...
...ogether the complete add-on adds a button to firefox: when the user clicks the button, we ask them to select a file, compute the hash, and log the hash to the console: var {cc, ci} = require("chrome"); // return the two-digit hexadecimal code for a byte function tohexstring(charcode) { return ("0" + charcode.tostring(16)).slice(-2); } function md5file(path) { var f = cc["@mozilla.org/file/local;1"] .createinstance(ci.nsilocalfile); f.initwithpath(path); var istream = cc["@mozilla.org/network/file-input-stream;1"] .createinstance(ci.nsifileinputstream); // open for reading istream.init(f, 0x01, 0444, 0); var ch = cc["@mozilla.org/security/hash;1"] .createinstance(ci.nsicryptohash); // we want to use the md5 algorithm ch.init(ch.md5); /...
...And 3 more matches
Creating custom Firefox extensions with the Mozilla build system - Archive of obsolete content
so now you need to create the normal content/, locale/ and skin/ directories in which to place your chrome files.
...for our simple extension example, this file might look something like this: myextension.jar: % content myextension %content/ % locale myextension en-us %locale/ % skin myextension classic/1.0 %skin/classic/ % overlay chrome://browser/content/browser.xul chrome://myextension/content/myextensionoverlay.xul content/myextensionoverlay.js (content/myextensionoverlay.js) content/myextensionoverlay.xul (content/myextensionoverlay.xul) locale/myextension.dtd (locale/myexten...
...sion.dtd) locale/myextension.properties (locale/myextension.properties) skin/classic/myextension.css (skin/classic/myextension.css) place this code in a file called jar.mn in the root directory of your extension, making sure that the paths in parentheses point to actual files (when interpreted relative to the root directory).
...And 3 more matches
Creating a Help Content Pack - Archive of obsolete content
for example, if your glossary, index, and table of contents rdf files are all located at chrome://myapp/locale/help/*, then you could put chrome://myapp/locale/help/ here and use only the actual file names without path when needed later.
... the location of each of the glossary, index, and table of contents data sources is stored in one rdf:description element contained within one rdf:li element, like so: <rdf:seq> <rdf:li> <rdf:description nc:panelid="glossary" nc:datasources="chrome://foo/locale/help/glossary.rdf"/> </rdf:li> <rdf:li> <rdf:description nc:panelid="toc" nc:datasources="chrome://foo/locale/help/glossary.rdf"/> </rdf:li> <rdf:li> <rdf:description nc:panelid="index" nc:datasources="chrome://foo/local...
... have the help viewer search through these additional data sources, define another rdf:li element like so: <rdf:li> <rdf:description nc:panelid="search" nc:datasources="" nc:emptysearchtext="[no matching items found.]" nc:emptysearchlink="chrome://foo/locale/bar.html"/> </rdf:li> nc:panelid should be set to search.
...And 3 more matches
A XUL Bestiary - Archive of obsolete content
in general, chrome refers to a xul interface and all of its supporting files; chrome means the xul content and structure, plus the css skin, plus whatever localization and platform-specific files are part of that xul interface.
... by contrast, the skin is just the css and referenced graphics for a xul file, the localization strings are just a dtd, and the content is just the xul.
...like a chrome, that chunk usually contains xul content, css and graphic skin information, localization strings, and maybe some platform-specific code.
...And 3 more matches
Property Files - Archive of obsolete content
the element has a number of functions which can be used to get strings from the property file and get other locale information.
...use a chrome url to read a file from the locale: <stringbundleset id="stringbundleset"> <stringbundle id="strings" src="chrome://myplugin/locale/strings.properties"/> </stringbundleset> like other non-displayed elements, you should declare all your stringbundles inside a stringbundleset element so that they are all kept together.
...var dir = "/usr/local/document"; var count = 10; var strbundle = document.getelementbyid("strings"); var result = strbundle.getformattedstring("resultmessage", [ dir, count ]); alert(result); this example will display following message in an alert box.
...And 3 more matches
NPP_NewStream - Archive of obsolete content
stream supports random access through calls to npn_requestread (for example, local files or http servers that support byte-range requests).
...the browser must copy data in the stream to the local cache to satisfy random access requests made through npn_requestread.
... np_asfileonly: saves stream data to a file in the local cache.
...And 3 more matches
Mobile accessibility - Learn web development
global and local menus talkback allows you to access global and local context menus, wherever you have navigated to on the device.
... access the local menu by quickly swiping up, and then right.
... for details on all the options available under the global and local context menus, see use global and local context menus.
...And 3 more matches
Advanced form styling - Learn web development
<input type="color"> date-related controls such as <input type="datetime-local"> <input type="range"> <input type="file"> <progress> and <meter> let's first talk about the appearance property, which is pretty useful for making all of the above more stylable.
... for example, let's take the following controls: <form> <p> <label for="search">search: </label> <input id="search" name="search" type="search"> </p> <p> <label for="text">text: </label> <input id="text" name="text" type="text"> </p> <p> <label for="date">date: </label> <input id="date" name="date" type="datetime-local"> </p> <p> <label for="radio">radio: </label> <input id="radio" name="radio" type="radio"> </p> <p> <label for="checkbox">checkbox: </label> <input id="checkbox" name="checkbox" type="checkbox"> </p> <p><input type="submit" value="submit"></p> <p><input type="button" value="button"></p> </form> applying the following css to them removes system-level styling.
...in short, these are drop-down boxes, complex control types like color and datetime-local, and feedback—oriented controls like <progress> and <meter>.
...And 3 more matches
JavaScript basics - Learn web development
function setusername() { let myname = prompt('please enter your name.'); localstorage.setitem('name', myname); myheading.textcontent = 'mozilla is cool, ' + myname; } the setusername() function contains a prompt() function, which displays a dialog box, similar to alert().
...next, the code calls on an api localstorage, which allows us to store data in the browser and retrieve it later.
... we use localstorage's setitem() function to create and store a data item called 'name', setting its value to the myname variable which contains the user's entry for the name.
...And 3 more matches
Index - Learn web development
20 how do you set up a local testing server?
...for example, this css selects paragraph text, setting the color to red: 38 dealing with files beginner, codingscripting, files, guide, html, l10n:priority, theory, website when you are working on a website locally on your computer, you should keep all the related files in a single folder that mirrors the published website's file structure on the server.
...coupled with a little css for styling, html makes it easy to display tables of information on the web such as your school lesson plan, the timetable at your local swimming pool, or statistics about your favorite dinosaurs or football team.
...And 3 more matches
L10n testing with xcode
setting up your l10n testing environment once you have your l10n testing environment set up in xcode, testing your firefox on ios localization is a breeze.
... select the client project in the left pane and choose editor > import localizations from the toolbar and select your localized xliff file.
... next, you need to configure the ios app simulator to run the app in your locale.
...And 3 more matches
DMD
also, add this line to build/mozconfig.common: moz_crashreporter_upload_full_symbols=1 launch on a local build, use mach run --dmd; use --mode to choose the mode.
...since you cannot mark files in /sdcard/ as executable, we will use /data/local/tmp for this purpose: adb push dmd_fennec /data/local/tmp adb shell cd /data/local/tmp chmod 755 dmd_fennec the final step is to make android use the above wrapper script while launching fennec, so that the environment variable is present when fennec starts up.
... assuming you have done a local build, the app identifier will be org.mozilla.fennec_$username ($username is your username on the host machine) and so we do this as shown below.
...And 3 more matches
PRThreadScope
syntax #include <prthread.h> typedef enum prthreadscope { pr_local_thread, pr_global_thread pr_global_bound_thread } prthreadscope; enumerators pr_local_thread a local thread, scheduled locally by nspr within the process.
... pr_global_bound_thread a global bound (kernel) thread, scheduled by the host os description an enumerator of type prthreadscope specifies how a thread is scheduled: either locally by nspr within the process (a local thread) or globally by the host (a global thread).
... local threads are scheduled by nspr within the process.
...And 3 more matches
NSS Certificate Download Specification
if the certificates contain a basicconstraints certificate extension that indicates they are ca certificates, and do not already exist in the local certificate database, they are added as untrusted cas.
...if the private key associated with the certificate does not exist in the user's local key database, then an error dialog is generated and the certificate is not imported.
... if a certificate chain is being imported then the first certificate in the chain must be the user certificate, and any subsequent certificates will be added as untrusted ca certificates to the local database.
...And 3 more matches
nsIDOMStorage2
the nsidomstorage2 interface represents the storage space used for local storage in the dom.
... items stored in local storage may only be accessed by the same origin that created the items in the first place.
... a dom window's local storage object can be retrieved from the window's localstorage attribute.
...And 3 more matches
nsIProtocolHandler
note: starting with firefox 3, one of uri_loadable_by_anyone, uri_dangerous_to_load, uri_is_ui_resource, or uri_is_local_file must be set on every protocol handler.
... uri_is_local_file 1<<9 uris for this protocol from other origins should only be allowed if those origins should have access to the local file system.
...protocols like file that point to local data should set this flag.
...And 3 more matches
nsIStringBundleService
intl/strres/nsistringbundle.idlscriptable provides the string bundle service, which provides a way to fetch localized strings from a property file.
...this is typically a locale url, e.g.
... chrome://global/locale/global.properties return value a string bundle corresponding to the properties file.
...And 3 more matches
nsIMsgCloudFileProvider
inherits from: nsisupports method overview void init(in string aaccountkey); void uploadfile(in nsilocalfile afile, in nsirequestobserver acallback); acstring urlforfile(in nsilocalfile afile); void cancelfileupload(in nsilocalfile afile); void refreshuserinfo(in boolean awithui, in nsirequestobserver acallback); void deletefile(in nsilocalfile afile, in nsirequestobserver acallback); void createnewaccount(in acstring aemailaddress, in acstring apassword, in acstring afirstname, in acstring alastname, in nsirequestobserver acallback); void createexistingaccount(in nsireq...
... void uploadfile(in nsilocalfile afile, in nsirequestobserver acallback); parameters afile the file to be uploaded.
... acstring urlforfile(in nsilocalfile afile); parameters afile the previously uploaded file to get the url for.
...And 3 more matches
Storage Inspector - Firefox Developer Tools
local storage — all local storage items created by the page or any iframes inside the page.
...for indexed db or local storage an origin is a combination of protocol + hostname.
... for example, "http://mozilla.org" and "https://mozilla.org" are two different origins so local storage items cannot be shared between them.
...And 3 more matches
Web Console remoting - Firefox Developer Tools
send http requests starting with firefox 25 you can send an http request using the console actor: { "to": "conn0.console9", "type": "sendhttprequest", "request": { "url": "http://localhost", "method": "get", "headers": [ { name: "header-name", value: "header value", }, // ...
... ], }, } the response packet is a network event actor grip: { "to": "conn0.console9", "eventactor": { "actor": "conn0.netevent14", "starteddatetime": "2013-08-26t19:50:03.699z", "url": "http://localhost", "method": "get" "isxhr": true, "private": false } } you can also use the webconsoleclient.sendhttprequest(request, onresponse) method.
... the pageerror packet is: { "from": "conn0.console9", "type": "pageerror", "pageerror": { "errormessage": "referenceerror: foo is not defined", "sourcename": "http://localhost/~mihai/mozilla/test.js", "linetext": "", "linenumber": 6, "columnnumber": 0, "category": "content javascript", "timestamp": 1347294508210, "error": false, "warning": false, "exception": true, "strict": false, "private": false, } } the packet is similar to nsiscripterror - for simplicity.
...And 3 more matches
RTCIceCandidatePairStats - Web APIs
firstrequesttimestamp optional a domhighrestimestamp value which specifies the time at which the first stun request was sent from the local peer to the remote peer for this candidate pair.
... lastpacketreceivedtimestamp optional a domhighrestimestamp value indicating the time at which the last packet was received by the local peer from the remote peer for this candidate pair.
... lastpacketsenttimestamp optional a domhighrestimestamp value indicating the time at which the last packet was sent from the local peer to the remote peer for this candidate pair.
...And 3 more matches
RTCPeerConnectionIceErrorEvent.address - Web APIs
the rtcpeerconnectioniceerrorevent property address is a string which indicates the local ip address being used to communicate with the stun or turn server during negotiations.
... syntax let address = rtcpeerconnectioniceerrorevent.address; value a domstring which specifies the local ip address of the network connection to the ice server with which negotiations were occurring when the error occurred.
... this address identifies the network interface on the local device which is being used to attempt to establish the connection to the remote peer.
...And 3 more matches
Using DTMF with WebRTC - Web APIs
this is because webrtc's dtmf support is primarily intended for use with legacy telephone services that rely on dtmf tones to perform tasks such as: teleconferencing systems menu systems voicemail systems entry of credit card or other payment information passcode entry note: while the dtmf is not sent to the remote peer as audio, browsers may choose to play the corresponding tone to the local user as part of their user experience, since users are typically used to hearing their phone play the tones audibly.
...disconnecting."); callerpc.getlocalstreams().foreach(function(stream) { stream.gettracks().foreach(function(track) { track.stop(); }); }); receiverpc.getlocalstreams().foreach(function(stream) { stream.gettracks().foreach(function(track) { track.stop(); }); }); audio.pause(); audio.srcobject = null; receiverpc.close(); callerpc.close(); } } the tonechange even...
... function handlecallernegotiationneeded() { log("negotiating..."); callerpc.createoffer(offeroptions) .then(function(offer) { log("setting caller's local description: " + offer.sdp); return callerpc.setlocaldescription(offer); }) .then(function() { log("setting receiver's remote description to the same as caller's local"); return receiverpc.setremotedescription(callerpc.localdescription) }) .then(function() { log("creating answer"); return receiverpc.createanswer(); }) .then(function(answer) { log("setting recei...
...And 3 more matches
Web Storage API - Web APIs
localstorage does the same thing, but persists even when the browser is closed and reopened.
... stores data with no expiration date, and gets cleared only through javascript, or clearing the browser cache / locally stored data.
... these mechanisms are available via the window.sessionstorage and window.localstorage properties (to be more precise, in supporting browsers the window object implements the windowlocalstorage and windowsessionstorage objects, which the localstorage and sessionstorage properties hang off) — invoking one of these will create an instance of the storage object, through which data items can be set, retrieved and removed.
...And 3 more matches
XRPermissionDescriptor.requiredFeatures - Web APIs
xrreferencespacetype description interface bounded-floor similar to the local type, except the user is not expected to move outside a predetermined boundary, given by the boundsgeometry in the returned object.
... xrboundedreferencespace local a tracking space whose native origin is located near the viewer's position at the time the session was created.
... for devices with six degrees of freedom (6dof) tracking, the local reference space tries to keep the origin stable relative to the environment.
...And 3 more matches
@font-face - CSS: Cascading Style Sheets
the @font-face css at-rule specifies a custom font with which to display text; the font can be loaded from either a remote server or a locally-installed font on the user's own computer.
... description if the local() function is provided, specifying a font name to look for on the user's computer, and the user agent finds a match, that local font is used.
...the ability to specify the name of a locally-installed font to look for and use makes it possible to customize the font beyond the basics while making it possible to do so without relying on an internet connection.
...And 3 more matches
Allowing cross-origin use of images and canvas - HTML: Hypertext Markup Language
storing an image from a foreign origin in this example, we wish to permit images from a foreign origin to be retrieved and saved to local storage.
... implementing the save feature now that the server has been configured to allow retrieval of the images cross-origin, we can write the code that allows the user to save them to local local storage, just as if they were being served from the same domain the code is running on.
...ing and saving the image the code that handles the newly-downloaded image is found in the imagereceived() method: function imagereceived() { let canvas = document.createelement("canvas"); let context = canvas.getcontext("2d"); canvas.width = downloadedimg.width; canvas.height = downloadedimg.height; context.drawimage(downloadedimg, 0, 0); imagebox.appendchild(canvas); try { localstorage.setitem("saved-image-example", canvas.todataurl("image/png")); } catch(err) { console.log("error: " + err); } } imagereceived() is called to handle the "load" event on the htmlimageelement that receives the downloaded image.
...And 3 more matches
Date and time formats used in HTML - HTML: Hypertext Markup Language
for <input>, the values of type that return a value which contains a string representing a date and/or time are: date datetime datetime-local month time week examples before getting into the intricacies of how date and time strings are written and parsed in html, here are some examples that should give you a good idea what the more commonly-used date and time string formats look like.
... examples of valid time strings time string time 00:00:30.75 12:00:30.75 am (30.75 seconds after midnight) 12:15 12:15 pm 13:44:25 1:44:25 pm (25 seconds after 1:44 pm) local date and time strings a valid datetime-local string consists of a date string and a time string concatenated together with either the letter "t" or a space character separating them.
... no information about the time zone is included in the string; the date and time is presumed to be in the user's local time zone.
...And 3 more matches
Closures - JavaScript
lexical scoping consider the following example code: function init() { var name = 'mozilla'; // name is a local variable created by init function displayname() { // displayname() is the inner function, a closure alert(name); // use variable declared in the parent function } displayname(); } init(); init() creates a local variable called name and a function called displayname().
...note that the displayname() function has no local variables of its own.
...in some programming languages, the local variables within a function exist for just the duration of that function's execution.
...And 3 more matches
Grammar and types - JavaScript
let declares a block-scoped, local variable, optionally initializing it to a value.
...this syntax can be used to declare both local and global variables, depending on the execution context.
...this syntax can be used to declare a block-scope local variable.
...And 3 more matches
Intl.Collator.prototype.resolvedOptions() - JavaScript
the intl.collator.prototype.resolvedoptions() method returns a new object with properties reflecting the locale and collation options computed during initialization of this collator object.
... syntax collator.resolvedoptions() return value a new object with properties reflecting the locale and collation options computed during the initialization of the given collator object.
... description the resulting object has the following properties: locale the bcp 47 language tag for the locale actually used.
...And 3 more matches
Intl.DateTimeFormat.prototype.resolvedOptions() - JavaScript
the intl.datetimeformat.prototype.resolvedoptions() method returns a new object with properties reflecting the locale and date and time formatting options computed during initialization of this datetimeformat object.
... syntax datetimeformat.resolvedoptions() return value a new object with properties reflecting the locale and date and time formatting options computed during the initialization of the given datetimeformat object.
... description the resulting object has the following properties: locale the bcp 47 language tag for the locale actually used.
...And 3 more matches
Intl.NumberFormat() constructor - JavaScript
syntax new intl.numberformat([locales[, options]]) parameters locales optional a string with a bcp 47 language tag, or an array of such strings.
... for the general form and interpretation of the locales argument, see the intl page.
...possible values are: "symbol" to use a localized currency symbol such as €, this is the default value, "narrowsymbol" to use a narrow format symbol ("$100" rather than "us$100"), "code" to use the iso currency code, "name" to use a localized currency name such as "dollar", currencysign in many locales, accounting format means to wrap the number with parentheses instead of appending a minus sign.
...And 3 more matches
Intl.PluralRules.prototype.resolvedOptions() - JavaScript
the intl.pluralrules.prototype.resolvedoptions() method returns a new object with properties reflecting the locale and plural formatting options computed during initialization of this pluralrules object.
... syntax pluralrule.resolvedoptions() return value a new object with properties reflecting the locale and plural formatting options computed during the initialization of the given pluralrules object.
... description the resulting object has the following properties: locale the bcp 47 language tag for the locale actually used.
...And 3 more matches
Intl.RelativeTimeFormat.prototype.resolvedOptions() - JavaScript
the intl.relativetimeformat.prototype.resolvedoptions() method returns a new object with properties reflecting the locale and relative time formatting options computed during initialization of this relativetimeformat object.
... syntax relativetimeformat.resolvedoptions() return value a new object with properties reflecting the locale and number formatting options computed during the initialization of the given relativetimeformat object.
... description the resulting object has the following properties: locale the bcp 47 language tag for the locale actually used.
...And 3 more matches
Intl.RelativeTimeFormat - JavaScript
static methods intl.relativetimeformat.supportedlocalesof() returns an array containing those of the provided locales that are supported without having to fall back to the runtime's default locale.
... instance methods intl.relativetimeformat.prototype.format() formats a value and a unit according to the locale and formatting options of the given intl.relativetimeformat object.
... intl.relativetimeformat.prototype.formattoparts() returns an array of objects representing the relative time format in parts that can be used for custom locale-aware formatting.
...And 3 more matches
Navigation and resource timings - Web Performance
if a persistent connection is used, or the information is stored in a cache or a local resource, the value will be the same as performancetiming.fetchstart.
...if a persistent connection is used, or the information is stored in a cache or a local resource, the value will be the same as performancetiming.fetchstart.
... responsestart when the browser received the first byte of the response, from the server from a cache, or from a local resource.
...And 3 more matches
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.
...for files loaded locally, it first looks in a cache of filename extension to media type mappings (stored in a mozilla profile file called mimetypes.rdf), and if it doesn't find a media type there, it asks the operating system.
... actually, in mozilla firefox 1.5, the media type for files embedded into html using the html <embed> and <object> tags is (unfortunately) obtained in the same way as it's obtained for local files instead of using the http headers as it should.
...And 3 more matches
Module structure of the SDK - Archive of obsolete content
local modules: each of the javascript files under your add-on's "lib" directory.
... local modules at a minimum, an sdk-based add-on consists of a single module named main.js, but you can factor your add-on's code into a collection of separate commonjs modules.
... to import a local module, specify a path relative to the importing module.
...And 2 more matches
preferences/service - Archive of obsolete content
example: var name = "extensions.checkcompatibility.nightly"; require("sdk/preferences/service").reset(name); getlocalized(name, defaultvalue) gets the localized value for an application preference name.
... returns string : localized preference value, returns a default value if no preference is set.
...so that prefs.get returns the properties file url whereas prefs.getlocalized returns the value defined in the properties file.
...And 2 more matches
Connecting to Remote Content - Archive of obsolete content
« previousnext » using xmlhttprequest xmlhttprequest is an api for transferring xml between a local script and a remote server via http.
... server is this: <?xml version="1.0"?> <data> <shops> <shop> <name>apple</name> <code>a001</code> </shop> <shop> <name>orange</name> </shop> </shops> <total>2</total> </data> when a valid xml response comes back from the remote server, the xml document object can be manipulated using different dom methods, to display the data in the ui or store it into a local datasource.
...if you need your generated xul to have js code in it, all of it should be added locally, never from the remote source.
...And 2 more matches
The Box Model - Archive of obsolete content
it is important to know how it works in order to make interfaces that are easy to localize, skin and use in different types of operating systems, screen sizes and resolutions.
...you always have to keep in mind that localized strings may be significantly longer in other languages, specially much longer than english strings.
... never cut text lines into separate locale strings in order to bypass wrapping difficulties.
...And 2 more matches
Index of archived content - Archive of obsolete content
chrome authority creating event targets creating reusable modules developing for firefox mobile display a popup getting started (jpm) getting started (cfx) list open tabs listen for page load listening for load and unload localization logging modifying web pages based on url modifying the page hosted by a tab open a web page troubleshooting unit testing using xpcom without chrome using third-party modules (jpm) bootstrapped extensions ...
... appendix e: dom building and insertion (html & xul) appendix f: monitoring dom changes connecting to remote content custom xul elements with xbl getting started with firefox extensions handling preferences intercepting page loads introduction javascript object management local storage mozilla documentation roadmap observer notifications setting up a development environment the box model the essentials of an extension useful mozilla community sites user notifications and alerts xpcom objects performan...
...andline components creating xulrunner apps with the mozilla build system creating a windows inno setup installer for xulrunner applications custom app bundles for mac os x debugging a xulrunner application deploying xulrunner dialogs in xulrunner getting started with xulrunner how to enable locale switching in a xulrunner application macfaq make your xulrunner app match the system locale opening a link in the default browser specifying startup chrome window using crash reporting in a xulrunner application using ldap xpcom with xulrunner using soap in xulrunner 1.9 what xulrunner provides ...
...And 2 more matches
Introduction - Archive of obsolete content
the datasources attribute should be the url of an xml file, which can be either the location of a web site or a file on the local file system, using its file or chrome url.
...only local files are supported, so a file url should be used.
...<vbox datasources="rdf:bookmarks http://www.xulplanet.com/ds/sample.rdf"> in addition, when using the rdf type for chrome xul (such as in extensions), the datasource rdf:local-store is always included in the composite.
...And 2 more matches
The Joy of XUL - Archive of obsolete content
these applications are easily customized with alternative text, graphics, and layout so they can be readily branded or localized for various markets.
... xul provides a clear separation among the client application definition and programmatic logic ("content" consisting of xul, xbl, and javascript), presentation ("skin" consisting of css and images), and language-specific text labels ("locale" consisting of dtds and string bundles in .properties files).
...further, the application can be localized for different languages and regions independently of its logic or presentation.
...And 2 more matches
stringbundle - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] an element which can be used to load localized resources from property files.
... the "src" attribute accepts only absolute chrome:// urls (see bugs 133698, 26291) attributes src properties applocale , src, stringbundle, strings methods getformattedstring, getstring examples (example needed) attributes src type: uri the uri of the property file that contains the localized strings.
...size, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties applocale obsolete since gecko 1.9.1 type: nsilocale returns the xpcom object which holds information about the user's locale.
...And 2 more matches
HTML table basics - Learn web development
LearnHTMLTablesBasics
a table allows you to quickly and easily look up values that indicate some kind of connection between different types of data, for example a person and their age, or a day of the week, or the timetable for a local swimming pool.
... first of all, make a local copy of blank-template.html and minimal-table.css in a new directory on your local machine.
... first, make a local copy of our dogs-table.html and minimal-table.css files in a new directory on your local machine.
...And 2 more matches
Android-specific test suites
android-test runs android-specific local unit tests.
... these tests are local — they run on your development machine and do not require an android device or android emulator.
... local unit tests are the fastest to develop and execute, but they can only test java code; there's no connection to the gecko rendering engine.
...And 2 more matches
Configuring Build Options
this is useful when working locally on javascript-powered components like the devtools.
... localization mk_add_options moz_co_locales=isocode tbd.
... ac_add_options --enable-ui-locale=isocode tbd.
...And 2 more matches
Optimizing Applications For NSPR
multiplatform do not call any blocking system call from a local thread.
... the only exception to this rule is the <tt>select()</tt> and <tt>poll()</tt> system calls on unix, both of which nspr has overridden to make sure they are aware of the nspr local threads.
... in the combined (mxn) model, which includes nt, irix (sprocs), and pthreads-user, the primordial thread is always a local thread.
...And 2 more matches
PRTimeParameters
the prtimeparameters structure represents the local time zone information in terms of the offset (in seconds) from gmt.
... the overall offset is broken into two components: tp_gmt_offset the offset of the local standard time from gmt.
... tp_dst_offset if daylight savings time (dst) is in effect, the dst adjustment from the local standard time.
...And 2 more matches
JSAPI reference
ents added in spidermonkey 17 js_setdestroycompartmentcallback added in spidermonkey 17 js_setcompartmentnamecallback added in spidermonkey 17 js_newcompartmentandglobalobject added in spidermonkey 1.8.1 obsolete since jsapi 16 js_entercrosscompartmentcall added in spidermonkey 1.8.1 obsolete since jsapi 18 js_leavecrosscompartmentcall added in spidermonkey 1.8.1 obsolete since jsapi 18 locale callbacks: struct jslocalecallbacks js_getlocalecallbacks js_setlocalecallbacks locale callback types: jslocaletouppercase jslocaletolowercase jslocalecompare jslocaletounicode scripts just running some javascript code is straightforward: class js::compileoptions added in spidermonkey 17 class js::owningcompileoptions added in spidermonkey 31 class js::readonlycompileoptions...
...ngroot obsolete since jsapi 31 js_addroot obsolete since javascript 1.8.5 js_addnamedroot obsolete since javascript 1.8.5 js_addnamedrootrt obsolete since javascript 1.8.5 js_removeroot obsolete since javascript 1.8.5 js_removerootrt obsolete since javascript 1.8.5 js_mapgcroots obsolete since jsapi 19 jsgcmaprootfun obsolete since jsapi 19 js_dumpnamedroots obsolete since jsapi 19 local root scopes were another way of protecting objects from the garbage collector.
... they have been removed in js 1.8.5, though js_enterlocalrootscope obsolete since javascript 1.8.5 js_leavelocalrootscope obsolete since javascript 1.8.5 js_leavelocalrootscopewithresult obsolete since javascript 1.8.5 js_forgetlocalroot obsolete since javascript 1.8.5 added in spidermonkey 1.8 if an object contains references to other gc things that are not stored in spidermonkey data structures ("slots"), it must implement the jstraceop hook to enable the garbage collector to traverse those references.
...And 2 more matches
Using XPCOM Utilities to Make Things Easier
this is a common pattern when you have a local nscomptr in a function and you must pass back a reference to it, as in the following: someclass::get(nsisupports** aresult) { if (!aresult) return ns_error_null_pointer; nscomptr<nsisupports> value; object->method(getter_addrefs(value)); *aresult = value.get(); ns_if_addref(*aresult); return ns_ok; } the first thing that this method does is check to see that the caller passed...
...for example, there are two interfaces for representing a file on a file system, the nsifile and nsilocalfile, and they are both implemented by an object.
... although we haven't formally introduced these two interfaces, the next code sample shows how simple it is to switch between these two interfaces: someclass::dosomething(nsifile* afile) { if (!afile) return ns_error_null_pointer; nsresult rv; nscomptr<nsilocalfile> localfile = do_queryinterface(afile, &rv); // ...
...And 2 more matches
nsIDOMStorageManager
9 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) implemented by @mozilla.org/dom/storagemanager;1 as a service: var domstoragemanager = components.classes["@mozilla.org/dom/storagemanager;1"] .getservice(components.interfaces.nsidomstoragemanager); method overview void clearofflineapps(); nsidomstorage getlocalstorageforprincipal(in nsiprincipal aprincipal, in domstring adocumenturi); long getusage(in astring aownerdomain); methods clearofflineapps() clears keys owned by offline applications.
...getlocalstorageforprincipal() returns the instance of the localstorage object for auri's origin.
... this is used to ensure that only one local storage area exists for a given origin.
...And 2 more matches
nsIDownloadManager
to get the service, use: var downloadmanager = components.classes["@mozilla.org/download-manager;1"] .getservice(components.interfaces.nsidownloadmanager); method overview nsidownload adddownload(in short adownloadtype, in nsiuri asource, in nsiuri atarget, in astring adisplayname, in nsimimeinfo amimeinfo, in prtime astarttime, in nsilocalfile atempfile, in nsicancelable acancelable, in boolean aisprivate); void addlistener(in nsidownloadprogresslistener alistener); void canceldownload(in unsigned long aid); void cleanup(); void endbatchupdate(); obsolete since gecko 1.9.1 void flush(); obsolete since gecko 1.8 nsidownload getdownload(in unsigned long aid); void onclos...
... defaultdownloadsdirectory nsilocalfile returns the platform default downloads directory.
...obsolete since gecko 1.8 userdownloadsdirectory nsilocalfile returns the user configured downloads directory.
...And 2 more matches
nsIFile
an nsifile can be retrieved by either instantiating an nsilocalfile using a platform specific path string or by using cross-platform locations retrieved from the directory service.
... to create an nsifile from a path you can use fileutils.jsm: var fileutils = cu.import("resource://gre/modules/fileutils.jsm").fileutils var nsifile = new fileutils.file( filename ) note: nsilocalfile was merged with this interface in gecko 14.
...if you need to know the size of the combined data and resource forks use nsilocalfilemac.getfilesizewithresfork().
...And 2 more matches
nsIMessenger
ageuri, in boolean savefirst, [optional] in boolean withoutwarning); void detachallattachments(in unsigned long count, [array, size_is(count)] in string contenttypearray, [array, size_is(count)] in string urlarray, [array, size_is(count)] in string displaynamearray, [array, size_is(count)] in string messageuriarray, in boolean savefirst, [optional] in boolean withoutwarning); nsilocalfile saveattachmenttofolder(in acstring contenttype, in acstring url, in acstring displayname, in acstring messageuri, in nsilocalfile adestfolder); nsimsgmessageservice messageservicefromuri(in acstring auri); nsimsgdbhdr msghdrfromuri(in acstring auri); acstring getmsguriatnavigatepos(in long apos); acstring getfolderuriatnavigatepos(in long apos); vo...
... nsilocalfile saveattachmenttofolder(in acstring , in acstring url, in acstring displayname, in acstring messageuri, in nsilocalfile adestfolder); parameters contenttype the content type of the attachment.
... adestfolder an nsilocalfile poiting to the folder where the attachment should be saved.
...And 2 more matches
Address book sync client design
// localrecordid - local unique id, for mobile devices this // is assigned by the mobile device.
... // // step 1: // when the user begins a sync, run through the local database and update the // sync mapping table.
... // // sync approach - server handles all conflict resolution: // // step 2: // using the sync mapping table and the local records database, generate the change // list to send to the server.
...And 2 more matches
File and Directory Entries API - Web APIs
the file and directory entries api simulates a local file system that web apps can navigate within and access files in.
...they're available on the window object and implemented in localfilesystem: requestfilesystem() and resolvelocalfilesystemurl().
...they're available on the worker object and implemented in localfilesystemsync: requestfilesystemsync() and resolvelocalfilesystemsyncurl().
...And 2 more matches
RTCPeerConnection.setRemoteDescription() - Web APIs
for example, if the type is rollback and the signaling state is one of stable, have-local-pranswer, or have-remote-pranswer, this exception is thrown, because you can't roll back a connection that's either fully established or is in the final stage of becoming connected.
... upon starting the new negotiation with the newly-established offer, the local peer is now the callee, even if it was previously the caller.
... this happens instead of throwing an exception, thereby reducing the number of potential errors which might occur, and simplifies the processing you need to do when you receive an offer, by eliminating the need to handle the offer/answer process differently depending on whether the local peer is the caller or callee.
...And 2 more matches
Storage - Web APIs
WebAPIStorage
the storage interface of the web storage api provides access to a particular domain's session or local storage.
... to manipulate, for instance, the session storage for a domain, a call to window.sessionstorage is made; whereas for local storage the call is made to window.localstorage.
... examples here we access a storage object by calling localstorage.
...And 2 more matches
Introduction to the Real-time Transport Protocol (RTP) - Web APIs
in the examples below, we'll refer to the peer which is turning "hold" mode on and off as the local peer and the user being placed on hold as the remote peer.
... activating hold mode local peer when the local user decides to enable hold mode, the enablehold() method below is called.
... the audiostream, containing the audio to play instead of the local peer's microphone audio, can come from anywhere.
...And 2 more matches
XRReferenceSpace - Web APIs
xrreferencespacetype description interface bounded-floor similar to the local type, except the user is not expected to move outside a predetermined boundary, given by the boundsgeometry in the returned object.
... xrboundedreferencespace local a tracking space whose native origin is located near the viewer's position at the time the session was created.
... for devices with six degrees of freedom (6dof) tracking, the local reference space tries to keep the origin stable relative to the environment.
...And 2 more matches
Accessibility and Spacial Patterns - Accessibility
spatial localization nasa conducted research on the perception of color, and found that luminance contrast mattered greatly as to how they were perceived.
... the two images below are from nasa research, specifically, from the article, "designing with blue" "spatial localization.
... for example, blue text on a gray background is easier to perceive if it is surrounded "locally" by black than by white.
...And 2 more matches
src - CSS: Cascading Style Sheets
WebCSS@font-facesrc
ttps://somewebsite.com/path/to/font.woff); /* absolute url */ src: url(path/to/font.woff); /* relative url */ src: url(path/to/font.woff) format("woff"); /* explicit format */ src: url('path/to/font.woff'); /* quoted url */ src: url(path/to/svgfont.svg#example); /* fragment identifying font */ /* <font-face-name> values */ src: local(font); /* unquoted name */ src: local(some font); /* name containing space */ src: local("font"); /* quoted name */ /* multiple items */ src: local(font), url(path/to/font.svg) format("svg"), url(path/to/font.woff) format("woff"), url(path/to/font.otf) format("opentype"); values <url> [ format( <string># ) ]?
... <font-face-name> specifies the name of a locally-installed font face using the local() function, which uniquely identifies a single font face within a larger family.
... description the value of this descriptor is a prioritized, comma-separated list of external references or locally-installed font face names.
...And 2 more matches
Intl.DateTimeFormat.prototype.formatToParts() - JavaScript
the intl.datetimeformat.prototype.formattoparts() method allows locale-aware formatting of strings produced by datetimeformat formatters.
...it returns an array of objects containing the locale-specific tokens from which it possible to build custom strings while preserving the locale-specific parts.
... examples datetimeformat outputs localized, opaque strings that cannot be manipulated directly: var date = date.utc(2012, 11, 17, 3, 0, 42); var formatter = new intl.datetimeformat('en-us', { weekday: 'long', year: 'numeric', month: 'numeric', day: 'numeric', hour: 'numeric', minute: 'numeric', second: 'numeric', fractionalseconddigits: 3, hour12: true, timezone: 'utc' }); formatter.format(date); // "monday, 12/...
...And 2 more matches
Intl.DisplayNames.prototype.resolvedOptions() - JavaScript
the intl.displaynames.prototype.resolvedoptions() method returns a new object with properties reflecting the locale and style formatting options computed during the construction of the current displaynames object.
... syntax displaynames.resolvedoptions() return value an object with properties reflecting the locale and formatting options computed during the construction of the given displaynames object.
... description the object returned by resolvedoptions() has the following properties: locale the bcp 47 language tag for the locale actually used.
...And 2 more matches
Intl​.List​Format​.prototype​.resolvedOptions() - JavaScript
the intl.listformat.prototype.resolvedoptions() method returns a new object with properties reflecting the locale and style formatting options computed during the construction of the current listformat object.
... syntax listformat.resolvedoptions() return value an object with properties reflecting the locale and formatting options computed during the construction of the given listformat object.
... description the object returned by resolvedoptions() has the following properties: locale the bcp 47 language tag for the locale actually used.
...And 2 more matches
Intl.NumberFormat.prototype.resolvedOptions() - JavaScript
the intl.numberformat.prototype.resolvedoptions() method returns a new object with properties reflecting the locale and number formatting options computed during initialization of this numberformat object.
... syntax numberformat.resolvedoptions() return value a new object with properties reflecting the locale and number formatting options computed during the initialization of the given numberformat object.
... description the resulting object has the following properties: locale the bcp 47 language tag for the locale actually used.
...And 2 more matches
Intl.PluralRules() constructor - JavaScript
syntax new intl.pluralrules([locales[, options]]) parameters locales optional.
...for the general form and interpretation of the locales argument, see the intl page.
...an object with some or all of the following properties: localematcher the locale matching algorithm to use.
...And 2 more matches
Intl.PluralRules - JavaScript
static methods intl.pluralrules.supportedlocalesof() returns an array containing those of the provided locales that are supported without having to fall back to the runtime's default locale.
... instance methods intl.pluralrules.prototype.resolvedoptions() returns a new object with properties reflecting the locale and collation options computed during initialization of the object.
... intl.pluralrules.prototype.select() returns a string indicating which plural rule to use for locale-aware formatting.
...And 2 more matches
Intl.RelativeTimeFormat.prototype.format() - JavaScript
the intl.relativetimeformat.prototype.format() method formats a value and unit according to the locale and formatting options of this relativetimeformat object.
... description the function returned by the format getter formats a value and a unit into a string according to the locale and formatting options of this intl.relativetimeformat object.
... // create a relative time formatter in your locale // with default values explicitly passed in.
...And 2 more matches
eval() - JavaScript
var expression = new string('2 + 2'); eval(expression.tostring()); // returns 4 if you use the eval function indirectly, by invoking it via a reference other than eval, as of ecmascript 5 it works in the global scope rather than the local scope.
... this means, for instance, that function declarations create global functions, and that the code being evaluated doesn't have access to local variables within the scope where it's being called.
... function test() { var x = 2, y = 4; console.log(eval('x + y')); // direct call, uses local scope, result is 6 var geval = eval; // equivalent to calling eval in the global scope console.log(geval('x + y')); // indirect call, uses global scope, throws referenceerror because `x` is undefined (0, eval)('x + y'); // another example of indirect call } never use eval()!
...And 2 more matches
simple-prefs - Archive of obsolete content
the values of the "label" attributes prefixed with "{name}_options.", where {name} is the name of the preference, are used as localization keys.
... the values of the "label" attributes prefixed with "{name}_options.", where {name} is the name of the preference, are used as localization keys.
... in "package.json": { "type": "control", "label": "click me!", "name": "sayhello", "title": "say hello" } in "main.js": var sp = require("sdk/simple-prefs"); sp.on("sayhello", function() { console.log("hello"); }); localization using the sdk's localization system, you can provide translated forms of the title and description attributes.
... see the localization tutorial for more details.
package.json - Archive of obsolete content
locales an object holding json objects referenced by a locale name that use the following keys: title, description and homepage.
... these json objects will be used to localizations for the add-on's meta data shown within the add-ons manager.
... see the documentation for how to localize the add-on's meta data.
... translators an array of strings listing the people who contributed to the localization of this add-on.
Running applications - Archive of obsolete content
using nsilocalfile.launch() this method is not implemented on all platforms, especially not on unix/linux!
... see nsilocalfile.launch() for details and make sure that all your target platforms support this method!
... for more information on nsifile/nsilocalfile, see file i/o.
... var file = components.classes["@mozilla.org/file/local;1"] .createinstance(components.interfaces.nsilocalfile); file.initwithpath("c:\\myapp.exe"); file.launch(); references nsiprocess nsilocalfile if you need to launch an executable bundled in your xpi, see code snippets:file i/o#getting your extension's folder.
Adding windows and dialogs - Archive of obsolete content
they have been thoroughly tested for os integration, accessbility and localization, so you save yourself a lot of work and favor them.
... getservice(ci.nsipromptservice); prompts.alert(window, "alert title", "hello!"); you should of course use localized strings instead of hard-coded ones.
... your dialogs shouldn't have fixed dimensions because of potential localization problems.
...you can also set persistence programatically using the document.persist function: document.persist("xulschoolhello-some-checkbox", "checked"); persistent data is stored in the user profile, in the file localstore.rdf.
Using Dependent Libraries In Extension Components - Archive of obsolete content
r.cpp extra_dso_ldopts += \ $(dist)/lib/$(lib_prefix)xpcomglue_s.$(lib_suffix) \ $(xpcom_frozen_ldopts) \ $(nspr_libs) \ $(null) include $(topsrcdir)/config/rules.mk defines += -dmoz_dll_prefix=\"$(dll_prefix)\" extensions/stub/bdsstubloader.cpp // copyright (c) 2005 benjamin smedberg <benjamin@smedbergs.us> #include "nscore.h" #include "nsmodule.h" #include "prlink.h" #include "nsilocalfile.h" #include "nsstringapi.h" #include "nscomptr.h" static char const *const kdependentlibraries[] = { // dependent1.dll on windows, libdependent1.so on linux moz_dll_prefix "dependent1" moz_dll_suffix, moz_dll_prefix "dependent2" moz_dll_suffix, nsnull // note: if the dependent libs themselves depend on other libs, the subdependencies // should be listed first.
... // assume that we're in <extensiondir>/components, and we want to find // <extensiondir>/libraries nscomptr<nsifile> libraries; rv = alocation->getparent(getter_addrefs(libraries)); if (ns_failed(rv)) return rv; nscomptr<nsilocalfile> library(do_queryinterface(libraries)); if (!library) return ns_error_unexpected; library->setnativeleafname(ns_literal_cstring("libraries")); library->appendnative(ns_literal_cstring("dummy")); // loop through and load dependent libraries for (char const *const *dependent = kdependentlibraries; *dependent; ++dependent) { library->setnativeleafname(nsdependen...
...2008 */ //include the stuff from mozilla glue that we need #include "nsilocalfile.h" #include "nsstringapi.h" #include "nscomptr.h" //include things from the mach-o libraries that we need for loading the libraries.
... // assume that we're in <extensiondir>/components, and we want to find // <extensiondir>/libraries nscomptr<nsifile> libraries; rv = alocation->getparent(getter_addrefs(libraries)); if (ns_failed(rv)) return rv; nscomptr<nsilocalfile> library(do_queryinterface(libraries)); if (!library) return ns_error_unexpected; library->setnativeleafname(ns_literal_cstring("libraries")); library->appendnative(ns_literal_cstring("dummy")); nscstring path; // loop through and load dependent libraries for (char const *const *dependent = kdependentlibraries; *dependent; ++dependent) { library->setnativeleafname(nsdepen...
Mozilla Application Framework in Detail - Archive of obsolete content
css is used to style these ui's and dtd's are used to localize the textual information - making your application extremely flexible and able to be utilized across the globe.
...xpinstall makes it easy to write both simple installation scripts and complex installations that check versions, log installation data to the local system, execute other installers, and update the appropriate registry settings.
...the xpinstall api makes the following functionality available as high-level javascript objects: an install trigger that initiates installations windows registry access mozilla registration interfaces for registering new mozilla software facilities for detecting and maintaining application versions high-level objects for manipulating local directories and files complete reference documentation, including useful example installations the following snippet from an xpinstall installation gives you some idea about how easy it is to write cross-platform installations that use the mozilla browser: // register chrome registerchrome(package | delayed_chrome, getfolder("chrome","xmlterm.jar"), "content/xmlterm/"); registerchrome(skin | d...
...elayed_chrome, getfolder("chrome","xmlterm.jar"), "skin/modern/xmlterm/"); registerchrome(locale | delayed_chrome, getfolder("chrome","xmlterm.jar"), "locale/xmlterm/"); if (getlasterror() == success) performinstall(); else { alert("error detected: "+getlasterror()); cancelinstall(); } other features a resource description framework (rdf) parser with support for creating rdf graphs programmatically or by parsing files, compositing multiple sources into a single rdf graph, querying and manipulating graphs, and populating xul widgets (trees, menus, etc.) with graph data; an xslt/xpath processor; scalable vector graphics (svg) rendering with support for a usable subset of the standard including all basic shapes, beziers, stroking and filling with opacity, and much of the dom; mathm...
Porting NSPR to Unix Platforms - Archive of obsolete content
this is called the local threads only version of classic nspr.
... you should attempt to do a local threads only port first.
... <tt>mozilla/nsprpub/pr/include/md/_netbsd.h</tt>: for local threads only version, the main challenge is to figure out how to define the three thread context switch macros.
...i usually print out every element in the <tt>jmp_buf</tt> and see which one is the closest to the address of a local variable (local variables are allocated on the stack).
Hacking wiki - Archive of obsolete content
to be able to hack the mdc wiki software, you'll need a local webserver install, which can run mediawiki.
...once you're done with the configuration script, copy the <tt>config/localsettings.php</tt> file it created to the parent directory and navigate to the location you installed mediawiki to.
...you can enable them by adding include("extensions/exampleext.php"); to the end of your <tt>localsettings.php</tt>.
... random tips you can set the file to log by putting something like this in your localsettings.php: $wgdebuglogfile = 'c:\\123'; you can then use wfdebug() function to write to the log.
Remotely debugging Firefox for Metro - Archive of obsolete content
set up firefox for metro go to about:config in firefox for metro, and set the following required preference: devtools.debugger.remote-enabled = true you may also want to set these optional preferences: devtools.debugger.force-local = false (if you want to connect from a different machine over the network) devtools.debugger.remote-host (to change the tcp hostname where firefox will listen for connections) devtools.debugger.remote-port (to change the tcp port number where firefox will listen for connections) devtools.debugger.prompt-connection = false (allow connections without displaying a confirmation prompt.
... this can be a security risk, especially if you also set the force-local preference to false.) set up firefox for desktop on the desktop, remote debugging is enabled by a setting in the toolbox.
...you'll see a page that looks like this: if you are running firefox for metro on the same computer with the default settings, use the default host (localhost) and port (6000), and press the "connect" button.
...the toolbox will open in its own window, attached to the firefox for metro tab that's currently hosting mozilla.org: the toolbox, and the tools it hosts (including the console, debugger, style editor, profiler, etc.), work in just the same way as they do when attached to local content.
The new nsString class implementation (1999) - Archive of obsolete content
nsstring use these locally in objects who span of control is known to live within your own process.
... nsautostring use these locally in cases where you don't want to incur heap allocation unless absolutely necessary.
... nscstring same as nsstring, but should be used with caution because of localization concerns.
...this assumption is nearly always wrong -- and will seriously hinder our ability to localize the source base.
Install script template - Archive of obsolete content
var plid = "@myplugin.com/myplugin,version=5.3"; var version = "5.3.0.0"; var mimetype = "application/x-my-plugin"; var suffix = "my"; var suffix_description = "my plugin files"; var company_name = "mypluginco"; var plugin_description = "my exemplary plugin mine all mine"; // registry constant paths // these will be used when the win32 registry keys are written var hkey_local_machine = "hkey_local_machine"; var hkey_current_user = "hkey_current_user"; var reg_moz_path = "software\\mozillaplugins"; // my own error code in case secondary installation fails var nosecondaryinstall = 1; // error return codes need some memory var err; // error return codes when we try and install to the current browser var errblock1; // error return codes when we try and do a secon...
...tion writeplidsolution() { //concatenate the secondary install path with the filename to make a fully qualified pathname var qualifiedsecondaryfolderdll = secondaryfolder + plugin_file; var qualifiedsecondaryfolderxpt = secondaryfolder + component_file; // write plid keys (mozilla.org/projects/plugins/first-install-problem.html) // write plid keys to hklm var hklm_status = registerplid(hkey_local_machine, reg_moz_path, plid, qualifiedsecondaryfolderdll, qualifiedsecondaryfolderxpt, plugin_description, company_name, software_name, version, mimetype, suffix, suffix_description); logcomment("moz first install installation: registerplid("+hkey_local_machine+") returned, status "+hklm_status); if (hklm_status == false) { // write plid keys (...
... * * @param rootkey must be one of these two string values hkey_local_machine or hkey_current_user * @param plidid plid for plugins * @param dllabsolutepath the fully qualified path to the dll * @param xptabsolutepath the fully qualified path to the xpt * @param plugindescription a string describing the plugin * @param vendor a string describing the vendor * @param productname the name of this software * @param pluginversion version...
...otkey, plidpath, plidid, dllabsolutepath, xptabsolutepath, plugindescription, vendor, productname, pluginversion, mimetype, suffix, suffixdescription) { var myregstatus = 0; winreg = getwinregistry(); if (winreg == null) { logcomment("moz registerplid: winreg == null"); return winregisnullerror; } // which root to start from hklm, hkcu if (rootkey == hkey_local_machine) { logcomment("moz registerplid: rootkey=="+hkey_local_machine); winreg.setrootkey(winreg.hkey_local_machine); } else if (rootkey == hkey_current_user) { logcomment("moz registerplid: rootkey=="+hkey_current_user); winreg.setrootkey(winreg.hkey_current_user); } else { logcomment("moz registerplid: invalid rootkey, "+rootkey); return invalidrootkeyerror; } if (!winreg...
addFile - Archive of obsolete content
method of install object syntax public int addfile ( string registryname, installversion version, string xpisourcepath, object localdirspec, string relativelocalpath, boolean forceupdate); public int addfile ( string registryname, string version, string xpisourcepath, object localdirspec, string relativelocalpath, boolean forceupdate); public int addfile ( string xpisourcepath); public int addfile ( string registryname, string xpisourcepath, object localdirspec, string relativelocalpath); public int addfile ( string registryname, string version, strin...
...g xpisourcepath, object localdirspec, string relativelocalpath); parameters the addfile method has the following parameters: registryname the pathname in the client version registry about the file.
... localdirspec an object representing a directory.
... relativelocalpath a pathname relative to the localdirspec parameter.
getFolder - Archive of obsolete content
method of install object syntax filespecobject getfolder ( string foldername); filespecobject getfolder ( string foldername, string subdirectory); filespecobject getfolder ( object localdirspec, string subdirectory); parameters the getfolder method has the following parameters: foldername a string representing one of netscape's standard directories.
... localdirspec a filespecobject representing a directory obtained by getcomponentfolder or getfolder.
... "mac apple menu" "mac control panel" "mac desktop" "mac documents" "mac extension" "mac fonts" "mac shutdown" "mac startup" "mac system" "mac trash" "mac preferences" "macosx default download" "macosx home" "macosx internet sites" "macosx local applications" "macosx local desktop" "macosx local documents" "macosx local frameworks" "macosx local internet plugin" "macosx local preferences" "macosx movie documents" "macosx music documents" "macosx picture documents" "macosx user applications" "macosx user desktop" "macos...
...x user documents" "macosx user frameworks" "macosx user internet plugin" "macosx user preferences" "unix lib" "unix local" "windows" "win appdata" "win common files" "win desktop" "win desktop common" "win program files" "win programs" "win programs common" "win startmenu" "win startmenu common" "win startup" "win startup common" "win system" the "file:///" form is only valid when the subdirectory parameter is used.
Using Recursive Templates - Archive of obsolete content
in this next example, an assign element is used to assign the local name of the node is to the variable ?type.
...the local-name function retrieves the tag of the element without the namespace prefix.
...<vbox datasources="people.xml" ref="*" querytype="xml"> <template> <query expr="*"> <assign var="?type" expr="local-name(.)"/> </query> <rule> <where subject="?type" rel="equals" value="group"/> <action> <groupbox uri="?"> <caption label="?name"/> </groupbox> </action> </rule> <rule> <action> <label uri="?" value="?name"/> </action> </rule> </template> </vbox> the first rule contains a where clause which matches only those results that have a type of group.
... as the type is bound to the local name of the result node, this will match only the first level of results from the xml data, that is, those with the group tag.
Install Scripts - Archive of obsolete content
it takes two arguments, the first is the type of chrome to register (content, skin or locale).
...because the find files dialog contains content, a skin file and a locale file, registerchrome() will need to be called three times.
... registerchrome(install.content | install.delayed_chrome, getfolder(finddir, "content")); registerchrome(install.skin | install.delayed_chrome, getfolder(finddir, "skin")); registerchrome(install.locale | install.delayed_chrome, getfolder(finddir, "locale")); the delayed_chrome flag is used to indicate that the chrome should be installed the next time mozilla is run.
...d files component is shown below: source initinstall("find files","/xulplanet/find files","0.5.0.0"); finddir = getfolder("chrome","findfile"); setpackagefolder(finddir); adddirectory("findfile"); registerchrome(install.content | install.delayed_chrome, getfolder(finddir, "content")); registerchrome(install.skin | install.delayed_chrome, getfolder(finddir, "skin")); registerchrome(install.locale | install.delayed_chrome, getfolder(finddir, "locale")); performinstall(); next, we'll look at some additional install functions.
Using multiple DTDs - Archive of obsolete content
normally you have a single dtd (document type definition) to localize a specific xul file.
... but there are situations where you want to use multiple dtds, for example to localize common widgets used in all your xul files, additionally to the ones specific to the file.
... single dtd to make strings in your xul file localizable, you normally add a dtd declaration at the beginning of the file like this: <!doctype window system "chrome://myextension/locale/mainwindow.dtd"> where "window" is the local name of the document (root) element.
... assuming you have an entity called somebutton.label defined in mainwindow.dtd, you can access the entity like this: <button id="somebutton" label="&somebutton.label"> multiple dtds if you want to use multiple dtds with your xul file, you can simply list all of the dtds inside your dtd declaration: <!doctype window [ <!entity % commondtd system "chrome://myextensions/locale/common.dtd"> %commondtd; <!entity % mainwindowdtd system "chrome://myextension/locale/mainwindow.dtd"> %mainwindowdtd; ]> you can now access the entities declared in the dtds as shown above.
XULRunner tips - Archive of obsolete content
ager-extensions"); pref("extensions.update.enabled", true); pref("extensions.update.interval", 86400); pref("extensions.dss.enabled", false); pref("extensions.dss.switchpending", false); pref("extensions.ignoremtimechanges", false); pref("extensions.logging.enabled", false); pref("general.skins.selectedskin", "classic/1.0"); // nb these point at amo pref("extensions.update.url", "chrome://mozapps/locale/extensions/extensions.properties"); pref("extensions.getmoreextensionsurl", "chrome://mozapps/locale/extensions/extensions.properties"); pref("extensions.getmorethemesurl", "chrome://mozapps/locale/extensions/extensions.properties"); if your application is based on gecko 2.0, you need to register a component through the new component registration because the extension manager uses fuel, namely...
...the package copy the following files: chrome/inspector.jar to the chrome directory of your xulrunner application components/inspector-cmdline.js to your components directory defaults/preferences/inspector.js to your preferences directory open your chrome.manifest file and add these lines: content inspector jar:inspector.jar!/content/inspector/ xpcnativewrappers=no locale inspector en-us jar:inspector.jar!/locale/inspector/ skin inspector modern/1.0 jar:inspector.jar!/skin/modern/inspector/ skin inspector classic/1.0 jar:inspector.jar!/skin/classic/inspector/ overlay chrome://inspector/content/popupoverlay.xul chrome://inspector/content/viewers/dom/popupoverlay.xul overlay chrome://inspector/content/commandoverl...
...some xulrunner components (in particular, the extension manager) depend on branding, in the sense that they expect to find certain strings in chrome://branding/locale/brand.dtd and chrome://branding/locale/brand.properties.
... in order to satisfy these dependencies, you can save firefox's brand.dtd/brand.properties to chrome/locale/branding folder, modify them appropriately, and register a locale provider for branding by adding the following line to your chrome manifest: locale branding en-us chrome/locale/branding/ the location you put the branding files in doesn't matter, as long as you register it appropriately in the manifest.
2006-10-06 - Archive of obsolete content
firefox 2 sign-off procedure localization team should begin intense qa as outlined here.
...test resumt will be found here another lightning localization update with some bad news difference has been located between sunbird_0_3_branch (for sunbird 0.3) and mozilla_1_8_branch.
... sunbird/lightning localization update you need to update your localization if you want your locale to ship with lightning 0.3 or sunbird 0.3.
... calendar localization update rc1 for sunbird 0.3 is out now and ready for testing.
Visual typescript game engine - Game development
i use html request only for loading local/staged html (like register, login etc.).
... */ private aspectratio: number = 1.333; /** * domain is simple url address, * recommendent to use for local propose lan ip * like : 192.168.0.xxx if you wanna run ant test app with server.
... -run services database server (locally and leave it alive to develop process): npm run dataserver looks like this : mongod --dbpath ./server/database/data fix: "failed: address already in use" : netstat -ano | findstr :27017 taskkill /pid typeyourpidhere /f also important "run visual studio code as administrator".
...lse; this.rtcserverport = 12034; this.rtc3serverport = 12034; this.connectorport = 1234; this.domain = "192.168.0.14"; this.masterserverkey = "multi-platformer-sever1.maximum"; this.protocol = "http"; this.issecure = false; this.appuseaccountssystem = true; this.appusevideochat = true; this.databasename = "masterdatabase"; this.databaseroot = "mongodb://localhost:27017"; - the running server is easy : npm run rtc with this cmd: npm run rtc we run server.js and connector.ts websocket.
Primitive - MDN Web Docs Glossary: Definitions of Web-related terms
it correctly finds our variable instantiated with our first statement after finding it, the expression is evaluated, foo is replaced by 5 and the javascript engine passes that value to the functions as an argument before executing the statements inside the functions' bodies, javascript takes a copy of the originally passed argument (which is a primitive) and creates a local copy.
... these copies, existing only inside the functions' scopes, are accessible via the identifiers we specified in the functions' definitions (num for addtwo, foo for addtwo_v2) then, the functions' statements are executed: in the first function, a local num variable had been created.
... in the second function, a local foo variable had been created.
...the local foo hides the external foo.
Flexbox - Learn web development
to get started, you should make a local copy of the first starter file — flexbox0.html from our github repo — load it in a modern browser (like firefox or chrome), and have a look at the code in your code editor.
...have a look at our flexbox-wrap0.html example, and try viewing it live (take a local copy of this file now if you want to follow along with this example): here we see that the children are indeed breaking out of their container.
...fire up your local copy of flexbox0.html, or take a copy of flexbox1.html as a new starting point (see it live).
... first, take a local copy of this example.
Practical positioning examples - Learn web development
to start with, we'd like you to make a local copy of the starting html file — info-box-start.html.
... save this somewhere sensible on your local computer, and open it up in your text editor.
... as a starting point, you can use your completed example from the first section of the article, or make a local copy of info-box.html from our github repo.
... as a starting point, make a local copy of hidden-info-panel-start.html from our github repo.
Sending form data - Learn web development
note: this example won't work when you load it into a browser locally — browsers cannnot interpret php code, so when the form is submitted the browser will just offer to download the php file for you.
...good options for local php testing are mamp (mac and windows) and ampps (mac, windows, linux).
...python works a bit differently to php — to run this code locally you'll need to install python/pip, then install flask using pip3 install flask.
... at this point you should be able to run the example using python3 python-example.py, then navigating to localhost:5000 in your browser.
Choosing the right approach - Learn web development
single delayed operation repeating operation multiple sequential operations multiple simultaneous operations no yes no (unless it is the same one) no code example the following function creates a new date() object, extracts a time string out of it using tolocaletimestring(), and then displays it in the ui.
... we then run it once per second using setinterval(), creating the effect of a digital clock that updates once per second (see this live, and also see the source): function displaytime() { let date = new date(); let time = date.tolocaletimestring(); document.getelementbyid('demo').textcontent = time; } const createclock = setinterval(displaytime, 1000); pitfalls the frame rate isn't optimized for the system the animation is running on, and can be somewhat inefficient.
...for example: remotedb.alldocs({ include_docs: true, attachments: true }).then(function (result) { let docs = result.rows; docs.foreach(function(element) { localdb.put(element.doc).then(function(response) { alert("pulled doc with id " + element.doc._id + " and added to local db."); }).catch(function (err) { if (err.name == 'conflict') { localdb.get(element.doc._id).then(function (resp) { localdb.remove(resp._id, resp._rev).then(function (resp) { // et cetera...
... it is better to use the chaining power of promises to go with a flatter, easier to parse structure: remotedb.alldocs(...).then(function (resultofalldocs) { return localdb.put(...); }).then(function (resultofput) { return localdb.get(...); }).then(function (resultofget) { return localdb.put(...); }).catch(function (err) { console.log(err); }); or even: remotedb.alldocs(...) .then(resultofalldocs => { return localdb.put(...); }) .then(resultofput => { return localdb.get(...); }) .then(resultofget => { return localdb.put(...); }) .catch(err => console.log(err)); that covers a lot of the basics.
Aprender y obtener ayuda - Learn web development
i want to learn enough to build a website for my local amateur tennis club.
...again, this is easier if you are doing a college course on web development, but perhaps you could convince a friend to learn along with you, or find a local meetup or skill-sharing group?
...if you run out of problems to solve, look up some tests online, do some more courses, or ask your friends and family (or local school or church) if there is anything they'd like you to build for them.
...meetup.com is a good place to find local physical meetups, and you could also try your local press/what's on sites.
Deployment and next steps - Learn web development
plugins: [ svelte({ // enable run-time checks when not in production dev: !production, // we'll extract any component css out into // a separate file - better for performance css: css => { css.write('public/build/bundle.css'); } }), later on in the same file you'll also see how rollup minimizes our scripts in production mode and launches a local server in development mode: // in dev mode, call `npm run start` once // the bundle has been generated !production && serve(), // watch the `public` directory and refresh the // browser on changes when not in production !production && livereload('public'), // if we're building for production (npm run build // instead of npm run dev), minify production && ter...
...in our case we will tell git to exclude files in the node_modules directory by creating a .gitignore file in the root folder of your local project, with the following content: node_modules/ now let's go back to gitlab.
... with these instructions we initialize a local git repository, then set our remote origin (where we will push our code to) as our repo on gitlab.
... next we commit all the files to the local git repo, and then push those to the remote origin on gitlab.
Understanding client-side JavaScript frameworks - Learn web development
we'll discover a little bit of detail about its background and use cases, set up a basic react toolchain on our local computer, and create and play with a simple starter app, learning a bit about how react works in the process.
...getting started with ember in our first ember article we will look at how ember works and what it's useful for, install the ember toolchain locally, create a sample app, and then do some initial setup to get it ready for development.
...in this article, we'll look at a little bit of vue background, learn how to install it and create a new project, study the high-level structure of the whole project and an individual component, see how to run the project locally, and get it prepared to start building our example.
...then we will learn how to setup our development environment, create a sample app, understand the structure of the project, and see how to run it locally and build it for production.
Debugging on Mac OS X
rather than disabling sip (which has security implications), it is recommended to debug with try builds or local builds.
...to workaround this problem, remove the quarantine extended attribute from the downloaded nightly: $ xattr -r -d com.apple.quarantine /path/to/nightly.app local builds local builds of mozilla-central do not enable hardened runtime and hence do not have debugging restrictions.
... as a result, some functionality will be permitted on local builds, but blocked on production builds which have hardened runtime enabled.
... bug 1522409 was filed to automate codesigning local builds to enable hardened runtime by default and eliminate this discrepancy.
Makefile - variables
local_includes allow use of moz_objdir in .mozconfig with older gnu gcc on beos.
... default=$(dist)/bin xpi_name if set final_target=$(dist)/xpi-stage/$(xpi_name) dist_subdir if set final_target will be $(dist)/bin/$(dist_subdir) [ metro build ] l10n.mk and localization variable description en_us_binary_url server url from which wget will ftp binaries.
... l10nbasedir moz_chrome_multilocale a list of locale names to process moz_chrome_file_format both, file, jar, omni, symlink packager_no_libs hack to allow one makefile to include another without pulling in libs:: target definitions.
... stagedist local staging directory for localization and packaging.
Productization guide
the web services that make up the productization of mozilla software are often specific to a local market.
... for example, a search provider can deliver a very good quality of search results — but only in a specific country or language, and we have to take this into account when considering default search engines for a locale.
... hence there is a need to customize the set of default web services on a per-locale basis in order to ensure a good user experience across all locales.
...this guide will walk you through the steps to successfully productizing your localization.
Index
the goal is to eventually find a certificate b (or c or ...) that has an appropriate trust assigned (e.g., because it can be found in the ckbi module and the user hasn't made any overriding trust decisions, or it can be found in a nss database file managed by the user or by the local environment).
...{ %temp%/setup.cab } } } } win95::x86 { equivalentplatform {winnt::x86} } sunos:5.5.1:sparc { modulename { "example unix module" } modulefile { unix/fort.so } defaultmechanismflags{0x0001} cipherenableflags{0x0001} files { unix/fort.so { relativepath{%root%/lib/fort.so} absolutepath{/usr/local/netscape/lib/fort.so} filepermissions{555} } xplat/instr.html { relativepath{%root%/docs/inst.html} absolutepath{/usr/local/netscape/docs/inst.html} filepermissions{555} } } } irix:6.2:mips { equivalentplatform { sunos:5.5.1:sparc } } } script grammar the script is basic java, allo...
...this script installs files from the jar archive in the local system after smartupdate has validated the digital signature.
...possible flags: "testlocalinfofirst" and "requirefreshinfo".
Rhino Debugger
viewing variables the lower-left (dockable) pane in the debugger main window contains a tab-pane with two tabs, labeled "this" and "locals".
... each pane contains a tree-table which displays the properties of the current object and currently visible local variables, respectively.
... locals the local variables of the current function are displayed in the locals table.
...the locals table is updated each time control returns to the debugger or when you change the stack location in the context: window watch window you may enter arbitrary javascript expressions in the watch: table located in the lower-right (dockable) pane in the debugger main window.
JS::Rooted
this article covers features introduced in spidermonkey 17 local variable of type t whose value is always rooted.
... bool operator==(const t &other) const description js::rooted<t> declares a local variable of type t whose value is always rooted.
... this is typically used for local variables, or for non-rooted values being passed to a function that requires a handle, e.g.
... js::rooted<t> should be used whenever a local variable's value may be held live across a call which can trigger a gc.
SpiderMonkey 1.8.5
the approach eliminates the need for the js_enterlocalrootscope api, and in many cases the need to explicitly root gc things or use the "root as you go" approach popular with earlier spidermonkey releases.
... jsautorequest jsautosuspendrequest jsautocheckrequest jsautoentercompartment js::anchor<> js::call obsolete apis js_clearnewbornroots js_enterlocalrootscope js_leavelocalrootscope js_leavelocalrootscopewithresult js_forgetlocalroot js_newgrowablestring deleted apis js_addnamedroot – use js_add*root js_addnamedrootrt – use js_add*root js_addroot – use js_add*root js_clearnewbornroots – no longer needed js_clearoperationcallback js_clearregexproots js_decompilescript js_destroyscript js_enterlocalrootscope js_executescr...
...iptpart js_forgetlocalroot js_getfunctionname js_getoperationlimit js_getscriptobject js_getstringbytes js_getstringchars js_isassigning js_leavelocalrootscope js_leavelocalrootscopewithresult js_newdouble js_newdoublevalue js_newscriptobject js_newstring js_poparguments js_pusharguments js_pushargumentsva js_removeroot js_removerootrt js_sealobject js_setbranchcallback js_setcallreturnvalue2 js_setcheckobjectaccesscallback js_setobjectprincipalsfinder js_setoperationlimit js_setprincipalstranscoder api changes operation callback js_setoperationcallback was introduced in js 1.8.0, replacing the branch callback, in anticipation of the addition of the tracing jit (tracemonkey).
...a conservative stack-scanning collector was also added for spidermonkey 1.8.5, making the *localrootscope apis obsolete; they are now nops.
nsIAccessibleText
getselectionbounds() void getselectionbounds( in long selectionnum, out long startoffset, out long endoffset ); parameters selectionnum startoffset endoffset gettext() string methods may need to return multibyte-encoded strings, since some locales can not be encoded using 16-bit chars.
...astring gettext( in long startoffset, in long endoffset ); parameters startoffset endoffset return value gettextafteroffset() string methods may need to return multibyte-encoded strings, since some locales can't be encoded using 16-bit chars.
...astring gettextafteroffset( in long offset, in nsaccessibletextboundary boundarytype, out long startoffset, out long endoffset ); parameters offset boundarytype startoffset endoffset return value gettextatoffset() string methods may need to return multibyte-encoded strings, since some locales can't be encoded using 16-bit chars.
... return value exceptions thrown missing exception gettextbeforeoffset() string methods may need to return multibyte-encoded strings, since some locales can't be encoded using 16-bit chars.
nsIComponentManager
66 introduced gecko 0.7 inherits from: nsisupports last changed in gecko 8.0 (firefox 8.0 / thunderbird 8.0 / seamonkey 2.5) method overview void addbootstrappedmanifestlocation(in nsilocalfile alocation); void createinstance(in nscidref aclass, in nsisupports adelegate, in nsiidref aiid, [iid_is(aiid),retval] out nsqiresult result); void createinstancebycontractid(in string acontractid, in nsisupports adelegate, in nsiidref aiid, [iid_is(aiid),retval] out nsqiresult result); void getclassobject(in nscidref aclass, in nsiidref aiid, [iid_is(aiid),retval] out nsqiresult result); ...
... void getclassobjectbycontractid(in string acontractid, in nsiidref aiid, [iid_is(aiid),retval] out nsqiresult result); void removebootstrappedmanifestlocation(in nsilocalfile alocation); methods addbootstrappedmanifestlocation() loads a "bootstrapped" chrome.manifest file from the specified directory or xpi file.
... void addbootstrappedmanifestlocation( in interface nsilocalfile alocation ); parameters alocation the directory or xpi from which to load the chrome.manifest.
... void removebootstrappedmanifestlocation( in interface nsilocalfile alocation ); parameters examples using addbootstrappedmanifestlocation in a bootstrapped extension for firefox 8 and 9: alocation the directory or xpi to stop reading the chrome.manifest from.
getFile
ns_mac_internet_search_dir "isrch" ns_osx_home_dir ns_os_home_dir ns_mac_home_dir ns_os_home_dir ns_mac_default_download_dir "dfltdwnld" ns_mac_user_lib_dir "ulibdir" // only available under os x ns_osx_default_download_dir "dfltdwnld" ns_osx_user_desktop_dir "usrdsk" ns_osx_local_desktop_dir "locdsk" ns_osx_user_applications_dir "usrapp" ns_osx_local_applications_dir "locapp" ns_osx_user_documents_dir "usrdocs" ns_osx_local_documents_dir "locdocs" ns_osx_user_internet_plugin_dir "usrintrntplgn" ns_osx_local_internet_plugin_dir "loclintrntplgn" ns_osx_user...
..._frameworks_dir "usrfrmwrks" ns_osx_local_frameworks_dir "locfrmwrks" ns_osx_user_preferences_dir "usrprfs" ns_osx_local_preferences_dir "locprfs" ns_osx_picture_documents_dir "pct" ns_osx_movie_documents_dir "mov" ns_osx_music_documents_dir "music" ns_osx_internet_sites_dir "intrntsts" available on windows only these locations are supported only on microsoft windows builds of gecko.
...s_win_nethood_dir "neth" ns_win_fonts_dir "fnts" ns_win_templates_dir "tmpls" ns_win_common_startmenu_dir "cmstrt" ns_win_common_programs_dir "cmprgs" ns_win_common_startup_dir "cmstrt" ns_win_common_desktop_directory "cmdeskp" ns_win_appdata_dir "appdata" ns_win_local_appdata_dir "localappdata" ns_win_printhood "prnthd" ns_win_cookies_dir "cookd" available on unix only these locations are supported only on unix builds of firefox os.
... c constant string value notes ns_unix_local_dir "locl" ns_unix_lib_dir "libd" ns_unix_home_dir ns_os_home_dir the following locations are provided only on os/2 builds of gecko.
nsIFilePicker
displaydirectory nsilocalfile the directory that the file picker dialog should initially display.
... file nsilocalfile the currently selected file or directory.
... var path = fp.file.path; // work with returned nsilocalfile...
... var files = fp.files; var paths = []; while (files.hasmoreelements()) { var arg = files.getnext().queryinterface(components.interfaces.nsilocalfile).path; paths.push(arg); } ...
nsIINIParserFactory
method overview nsiiniparser createiniparser(in nsilocalfile ainifile); methods createiniparser() creates an ini parser, returning the nsiiniparser object that you can use to parse it.
... nsiiniparser createiniparser( in nsilocalfile ainifile ); parameters ainifile the ini file to parse.
...example obtaining a parser object to obtain a parser for an ini file, you can use code that looks like this: to get an nsiiniparser instance for an ini file, you may use the following code: // create an nsilocalfile var cl = "@mozilla.org/file/local;1"; var interf = components.interfaces.nsilocalfile; var file = components.classes[cl].createinstance(interf); // init the file with the path to your ini file var path = "c:\\temp\\example.ini"; file.initwithpath(path); // create the nsiiniparserfactory var cl = "@mozilla.org/xpcom/ini-parser-factory;1"; var interf = components.interfaces.nsiiniparserfactory; var inifact = components.manager.getclassobjectbycontractid(cl,interf); // get the iniparser for the ini file var in...
...iparser = inifact.createiniparser(file); see also nsiiniparser nsilocalfile ...
nsIMsgDatabase
last changed in gecko 1.9 (firefox 3) inherits from: nsidbchangeannouncer method overview void open(in nsilocalfile afoldername, in boolean acreate, in boolean aleaveinvaliddb); void forcefolderdbclosed(in nsimsgfolder afolder); void close(in boolean aforcecommit); void commit(in nsmsgdbcommit committype); void forceclosed(); void clearcachedhdrs; void resethdrcachesize(in unsigned long size); nsimsgdbhdr getmsghdrforkey(in nsmsgkey key); nsimsgdbhdr getmsghdrformessageid(in string messageid); boolean containskey(in nsmsgkey key); nsimsgdbhdr createnewhdr(in nsmsgkey key...
... void open(in nsilocalfile afoldername, in boolean acreate, in boolean aleaveinvaliddb); parameters afoldername the name of the folder to create.
... void applyretentionsettings(in nsimsgretentionsettings amsgretentionsettings, in boolean adeleteviafolder); hasnew() boolean hasnew(); clearnewlist() void clearnewlist(in boolean notify); addtonewlist() void addtonewlist(in nsmsgkey key); startbatch() batching - can be used to cache file stream for local mail, and perhaps to use the mdb batching mechanism as well.
... void startbatch(); endbatch() void endbatch(); getofflineopforkey() offline operations - we could move these into an offline operation interface but it would have to be in nsmaildatabase, since local folders can be move destinations.
nsIMsgFolder
atatooutputstreamforappend(in nsiinputstream aistream, in long alength, in nsioutputstream outputstream); void copydatadone(); void setjunkscoreformessages(in nsisupportsarray amessages, in acstring ajunkscore); void applyretentionsettings(); boolean fetchmsgpreviewtext([array, size_is (anumkeys)] in nsmsgkey akeystofetch, in unsigned long anumkeys, in boolean alocalonly, in nsiurllistener aurllistener); void addkeywordstomessages(in nsisupportsarray amessages, in acstring akeywords); void removekeywordsfrommessages(in nsisupportsarray amessages, in acstring akeywords); autf8string getmsgtextfromstream(in nsimsgdbhdr amsghdr, in nsiinputstream astream, in long abytestoread, in long amaxoutputlen, in boolean acompressquotes); ...
... filepath nsilocalfile local path of this folder.
...for local folders, it creates the berkeley mailbox if missing.
... boolean fetchmsgpreviewtext([array, size_is (anumkeys)] in nsmsgkey akeystofetch, in unsigned long anumkeys, in boolean alocalonly, in nsiurllistener aurllistener); addkeywordstomessages() used to set/clear tags - we could have a single method to setkeywords which would figure out the diffs, but these methods might be more convenient.
nsIPlacesImportExportService
implemented by: @mozilla.org/import-export-service;1 as a service: var placesimportexportservice = components.classes["@mozilla.org/import-export-service;1"] .getservice(components.interfaces.nsiplacesimportexportservice); method overview void backupbookmarksfile(); void exporthtmltofile(in nsilocalfile afile); void importhtmlfromfile(in nsilocalfile afile, in boolean aisinitialimport); obsolete since gecko 14.0 void importhtmlfromfiletofolder(in nsilocalfile afile, in print64 afolder, in boolean aisinitialimport); obsolete since gecko 14.0 void importhtmlfromuri(in nsiuri auri, in boolean aisinitialimport); obsolete since gecko 14.0 methods backupbookmark...
... void exporthtmltofile( in nsilocalfile afile ); parameters afile an nsilocalfile indicating where to save the new bookmarks.html file.
... void importhtmlfromfile( in nsilocalfile afile, in boolean aisinitialimport ); parameters afile the html file to import into places.
... void importhtmlfromfiletofolder( in nsilocalfile afile, in print64 afolder, in boolean aisinitialimport ); parameters afile the file to import.
Address Book examples
my value = card.getproperty("random1"); note: local (mork) address books are currently the only built-in type of address book that supports saving of non-built-in properties.
... for local (mork) address books: window.opendialog( "chrome://messenger/content/addressbook/abaddressbooknamedialog.xul", "", "chrome,modal=yes,resizable=no,centerscreen", null); for ldap address books: window.opendialog("chrome://messenger/content/addressbook/pref-directory-add.xul", "", "chrome,modal=yes,resizable=no,centerscreen", null); ...
...for a user @bar.com, entering foo would become foo@bar.com "addrbook" - use to autocomplete from a local address book, e.g.
... a mork based local store or a os x address book ldap - use for searching in ldap address books.
Using IndexedDB - Web APIs
locale-aware sorting mozilla has implemented the ability to perform locale-aware sorting of indexeddb data in firefox 43+.
... this new functionality enables developers to specify a locale when creating an index using idbobjectstore.createindex() (check out its parameters.) in such cases, when a cursor is then used to iterate through the dataset, and you want to specify locale-aware sorting, you can use a specialized idblocaleawarekeyrange.
... idbindex has also had new properties added to it to specify if it has a locale specified, and what it is: locale (returns the locale if any, or null if none is specified) and isautolocale (returns true if the index was created with an auto locale, meaning that the platform's default locale is used, false otherwise.) note: this feature is currently hidden behind a flag — to enable it and experiment, go to about:config and enable dom.indexeddb.experimental.
...); iframe.attr('src', obj_url); window.url.revokeobjecturl(obj_url); } else { iframe.load(function() { $(this).contents().find('body').html("no view available"); }); } }); } /** * @param {string} biblioid * @param {string} title * @param {number} year * @param {string} url the url of the image to download and store in the local * indexeddb database.
Node - Web APIs
WebAPINode
obsolete properties node.localname read only returns a domstring representing the local part of the qualified name of an element.
... note: in firefox 3.5 and earlier, the property upper-cases the local name for html elements (but not xhtml elements).
... obsolete removed the following properties: attributes, namespaceuri, prefix, and localname.
... added the following properties: namespaceuri, prefix, and localname.
PerformanceTiming - Web APIs
if a persistent connection is used, or the information is stored in a cache or a local resource, the value will be the same as performancetiming.fetchstart.
...if a persistent connection is used, or the information is stored in a cache or a local resource, the value will be the same as performancetiming.fetchstart.
... performancetiming.responsestart read only when the browser received the first byte of the response, from the server from a cache, or from a local resource.
... performancetiming.responseend read only when the browser received the last byte of the response, or when the connection is closed if this happened first, from the server, the cache, or from a local resource.
RTCIceCandidateStats.networkType - Web APIs
the rtcicecandidatestats dictionary's networktype property specifies the type of network used by a local candidate to communicate with a remote peer.
... note: the networktype property is only included in rtcicecandidatestats objects for local candidates (that is, candidates generated locally and included in an sdp offer or answer that has been sent to the remote peer).
... note: keep in mind that the specified value only reflects the initial connection between the local peer and the next hop along the network toward reaching the remote peer.
... window.setinterval(function() { mypeerconnection.getstats(null).then(stats => { let statsoutput = ""; stats.foreach(report => { if ((stats.type === "local-candidate" || stats.type === "remote.candidate") && stats.networktype === "cellular") { statsoutput += `<h2>report: ${report.type}</h3>\n<strong>id:</strong> ${report.id}<br>\n` + `<strong>timestamp:</strong> ${report.timestamp}<br>\n`; // now the statistics for this report; we intentially drop the ones we // sorted to the top above object.
RTCIceTransport.state - Web APIs
its value will be one of the following: "new" the rtcicetransport is currently gathering local candidates, or is waiting for the remote device to begin to transmit the remote candidates, or both.
... "checking" at least one remote candidate has been received, and the rtcicetransport has begun examining pairings of remote and local candidates in order to attempt to identify viable pairs that could be used to establish a connection.
... keep in mind that gathering of local candidates may still be underway, and, similarly, the remote device also may still be gathering candidates of its own.
... "completed" the transport has finished gathering local candidates and has received a notification from the remote peer that no more candidates will be sent.
RTCIceTransportState - Web APIs
values "new" the rtcicetransport is currently gathering local candidates, or is waiting for the remote device to begin to transmit the remote candidates, or both.
... "checking" at least one remote candidate has been received, and the rtcicetransport has begun examining pairings of remote and local candidates in order to attempt to identify viable pairs that could be used to establish a connection.
... keep in mind that gathering of local candidates may still be underway, and, similarly, the remote device also may still be gathering candidates of its own.
... "completed" the transport has finished gathering local candidates and has received a notification from the remote peer that no more candidates will be sent.
RTCPeerConnection.addTrack() - Web APIs
optional one or more local mediastream objects to which the track should be added.
...any tracks that are added to the same stream on the local end of the connection will be on the same stream on the remote end.
...once that succeeds, it uses mediadevices.getusermedia() to obtain access to the local webcam and microphone.
... the final step is to begin sending the local video across the peer connection to the caller.
Using Service Workers - Web APIs
in order to facilitate local development, localhost is considered a secure origin by browsers as well.
...this doesn’t have much of a distinct use the first time your service worker is installed/activated, but it means more when the service worker is updated (see the updating your service worker section later on.) note: localstorage works in a similar way to service worker cache, but it is synchronous, so not allowed in service workers.
... note: you may serve your app from http://localhost (e.g.
... using me@localhost:/my/app$ python -m simplehttpserver) for local development.
WebRTC API - Web APIs
interfaces rtcpeerconnection represents a webrtc connection between the local computer and a remote peer.
... icecandidate an rtcpeerconnectioniceevent which is sent whenever the local device has identified a new ice candidate which needs to be added to the local peer by calling setlocaldescription().
... negotiationneeded informs the rtcpeerconnection that it needs to perform session negotiation by calling createoffer() followed by setlocaldescription().
...this happens as a result of a call to either setlocaldescription() or setremotedescription().
Inputs and input sources - Web APIs
the grip space's native origin, located around the center of the player's fist, is (0, 0, 0) within the input source's local coordinate system, while the xrspace specified by gripspace can be used at any time to convert coordinates or vectors from the input source's space into world coordinates (or vice-versa).
...se) { return; } let targetraytransform = targetraypose.transform; let targetobject = findtargetobject(targetraytransform); if (targetobject) { if (avatar.heldobject[hand]) { dropobject(hand); } pickupobject(targetobject, hand); } }); the squeezestart event is handled by getting those pose and transform as usual, and getting the input source's handedness into the local constant hand.
...with either the this starts by fetching the target ray's space into the local constant targetrayspace.
... the target ray's transform is obtained from the pose's transform property and stored in the local targetraytransform.
Starting up and shutting down a WebXR session - Web APIs
your document needs to either have been loaded from the local drive (such as by using an url such as http://localhost/...), or using https when loading the page.
...ou can specify that as a required feature in order to ensure that the session you get can use unbounded spaces: async function createimmersivesession(xr) { try { session = await xr.requestsession("immersive-vr", { requiredfeatures: [ "unbounded" ] }); return session; } catch(error) { throw error; } } on the other hand, if you need aninline session and would prefer a local reference space, you can do this: async function createinlinesession(xr) { try { session = await xr.requestsession("inline", { optionalfeatures: [ "local" ] }); return session; } catch(error) { throw error; } } this createinlinesession() function will try to create an inline session that's compatible with the local reference space.
... when you're ready to create your reference space, you can try for a local space, and if that fails, fall back to a viewer reference space, which all devices are required to support.
...you might just as easily specify local or viewer, depending on your needs.
Window: storage event - Web APIs
the storage event of the window interface fires when a storage area (localstorage) has been modified in the context of another document.
... bubbles no cancelable no interface storageevent event handler property onstorage examples log the samplelist item to the console when the storage event fires: window.addeventlistener('storage', () => { // when local storage changes, dump the list to // the console.
... console.log(json.parse(window.localstorage.getitem('samplelist'))); }); the same action can be achieved using the onstorage event handler property: window.onstorage = () => { // when local storage changes, dump the list to // the console.
... console.log(json.parse(window.localstorage.getitem('samplelist'))); }; specifications specification status html living standardthe definition of 'storage' in that specification.
XRPermissionDescriptor.optionalFeatures - Web APIs
xrreferencespacetype description interface bounded-floor similar to the local type, except the user is not expected to move outside a predetermined boundary, given by the boundsgeometry in the returned object.
... xrboundedreferencespace local a tracking space whose native origin is located near the viewer's position at the time the session was created.
... for devices with six degrees of freedom (6dof) tracking, the local reference space tries to keep the origin stable relative to the environment.
... xrreferencespace local-floor similar to the local type, except the starting position is placed in a safe location for the viewer to stand, where the value of the y axis is 0 at floor level.
XRPermissionStatus.granted - Web APIs
xrreferencespacetype description interface bounded-floor similar to the local type, except the user is not expected to move outside a predetermined boundary, given by the boundsgeometry in the returned object.
... xrboundedreferencespace local a tracking space whose native origin is located near the viewer's position at the time the session was created.
... for devices with six degrees of freedom (6dof) tracking, the local reference space tries to keep the origin stable relative to the environment.
... xrreferencespace local-floor similar to the local type, except the starting position is placed in a safe location for the viewer to stand, where the value of the y axis is 0 at floor level.
XRReferenceSpaceType - Web APIs
xrreferencespacetype description interface bounded-floor similar to the local type, except the user is not expected to move outside a predetermined boundary, given by the boundsgeometry in the returned object.
... xrboundedreferencespace local a tracking space whose native origin is located near the viewer's position at the time the session was created.
... for devices with six degrees of freedom (6dof) tracking, the local reference space tries to keep the origin stable relative to the environment.
... xrreferencespace local-floor similar to the local type, except the starting position is placed in a safe location for the viewer to stand, where the value of the y axis is 0 at floor level.
XRSession.requestReferenceSpace() - Web APIs
xrreferencespacetype description interface bounded-floor similar to the local type, except the user is not expected to move outside a predetermined boundary, given by the boundsgeometry in the returned object.
... xrboundedreferencespace local a tracking space whose native origin is located near the viewer's position at the time the session was created.
... for devices with six degrees of freedom (6dof) tracking, the local reference space tries to keep the origin stable relative to the environment.
... xrreferencespace local-floor similar to the local type, except the starting position is placed in a safe location for the viewer to stand, where the value of the y axis is 0 at floor level.
Web Accessibility: Understanding Colors and Luminance - Accessibility
there's (at least) two kinds of adaptation that take place: local adaptation, and adaptation to an ambient environment.
... local adaptation takes place right on the "page" a reader is looking at.
... this is called local adaptation.
... the implication is that web developers who seek to improve legibility of text against a background can take advantage of the principles of local adaptation.
background-attachment - CSS: Cascading Style Sheets
syntax /* keyword values */ background-attachment: scroll; background-attachment: fixed; background-attachment: local; /* global values */ background-attachment: inherit; background-attachment: initial; background-attachment: unset; the background-attachment property is specified as one of the keyword values from the list below.
...(this is not compatible with background-clip: text.) local the background is fixed relative to the element's contents.
...it also applies to ::first-letter and ::first-line.inheritednocomputed valueas specifiedanimation typediscrete formal syntax <attachment>#where <attachment> = scroll | fixed | local examples simple example html <p> there were doors all round the hall, but they were all locked; and when alice had been all the way down one side and up the other, trying every door, she walked sadly down the middle, wondering how she was ever to get out again.
... candidate recommendation the shorthand property has been extended to support multiple backgrounds and the local value.
The HTML autocomplete attribute - HTML: Hypertext Markup Language
in countries with two administrative levels, this would typically be the city, town, village, or other locality in which the address is located.
... "tel-local" the phone number without the country or area code.
...for the phone number "555-6502", use "tel-local-prefix" for "555" and "tel-local-suffix" for "6502".
... address-line2: the locality — "upper-wapping" in this case.
<input type="month"> - HTML: Hypertext Markup Language
WebHTMLElementinputmonth
the format of the month string used by this input type is described in format of a valid local month string in date and time formats used in html.
... you can set a default value for the input control by including a month and year inside the value attribute, like so: <label for="bday-month">what month were you born in?</label> <input id="bday-month" type="month" name="bday-month" value="2017-06"> one thing to note is that the displayed date format differs from the actual value; most user agents display the month and year in a locale-appropriate form, based on the set locale of the user's operating system, whereas the date value is always formatted yyyy-mm.
... using month inputs date-related inputs (including month) sound convenient at first glance; they promise an easy ui for choosing dates, and they normalize the data format sent to the server, regardless of the user's locale.
... the <select> for choosing the month is hardcoded with the names of the months, as they don't change (leaving localization out of things).
<input type="time"> - HTML: Hypertext Markup Language
WebHTMLElementinputtime
appearance chrome and opera in chrome/opera the time control is simple, with slots to enter hours and minutes in 12 or 24-hour format depending on operating system locale, and up and down arrows to increment and decrement the currently selected component.
...it also uses a 12- or 24-hour format for inputting times, based on system locale.
...it, like chrome, uses a 12- or 24-hour format for inputting times, based on system locale: 12-hour 24-hour value a domstring representing a time, or empty.
... you can also get and set the date value in javascript using the htmlinputelement.value property, for example: var timecontrol = document.queryselector('input[type="time"]'); timecontrol.value = '15:30'; time value format the value of the time input is always in 24-hour format that includes leading zeros: hh:mm, regardless of the input format, which is likely to be selected based on the user's locale (or by the user agent).
HTML documentation index - HTML: Hypertext Markup Language
WebHTMLIndex
6 date and time formats used in html date, element, format, html, iso 8601, input, reference, string, time, week, datetime, datetime-local, del, ins, month, month-year, week-year certain html elements use date and/or time values.
... 33 translate experimental, global attributes, html, reference the translate global attribute is an enumerated attribute that is used to specify whether an element's translateable attribute values and its text node children should be translated when the page is localized, or whether to leave them unchanged.
... 50 html attribute: step attribute, attributes, constrain validation, step valid for the numeric input types, including the date, month, week, time, datetime-local, number and range types, the step attribute is a number that specifies the granularity that the value must adhere to or the keyword any.
... 124 <input type="datetime-local"> date, date and time, element, form input, html, html forms, input, input element, input type, reference, time, datetime-local <input> elements of type datetime-local create input controls that let the user easily enter both a date and a time, including the year, month, and day as well as the time in hours and minutes.
Microformats - HTML: Hypertext Markup Language
rty is defined in html using the class property any element can carry example h-card <p class="h-card"> <img class="u-photo" src="http://example.org/photo.png" alt="" /> <a class="p-name u-url" href="http://example.org">joe bloggs</a> <a class="u-email" href="mailto:joebloggs@example.com">joebloggs@example.com</a>, <span class="p-street-address">17 austerstræti</span> <span class="p-locality">reykjavík</span> <span class="p-country-name">iceland</span> </p> property description p-name the full/formatted name of the person or organization.
... u-email email address u-photo a photo of the person or organization u-url home page or other url representing the person or organization u-uid universally unique identifier, preferably canonical url p-street-address street number + name p-locality city/town/village p-country-name country name nested h-card example <div class="h-card"> <a class="p-name u-url" href="http://blog.lizardwrangler.com/" >mitchell baker</a> (<a class="p-org h-card" href="http://mozilla.org/" >mozilla foundation</a>) </div> parsed json: { "items": [{ "type": ["h-card"], "properties": { "name": ["mitchell baker"], "url": ["http://blog.lizardwrangler.com/"], "org": [{ "value": "mozilla fo...
...ime class="dt-start" datetime="2019-06-29t09:00:00-07:00">june 29, 2019 at 9:00am (-0700)</time><br>through <time class="dt-end" datetime="2019-06-30t18:00:00-07:00">june 30, 2019 at 6:00pm (-0700)</time><br> <div class="p-location h-card"> <div> <span class="p-name">mozilla</span> </div> <div> <span class="p-street-address">1120 nw couch st</span>, <span class="p-locality">portland</span>, <span class="p-region">oregon</span>, <span class="p-country">us</span> </div> <data class="p-latitude" value="45.52345"></data> <data class="p-longitude" value="-122.682677"></data> </div> <div class="e-content">come join us </div> <div> <span class="p-author h-card"><a class="u-url p-name" href="https://aaronparecki.com">aar...
...blished": [ "2019-05-25t18:00:00-07:00" ], "content": [ { "html": "come join us", "value": "come join us", "lang": "en" } ], "location": [ { "type": [ "h-card" ], "properties": { "name": [ "mozilla" ], p-street-address: [ "1120 nw couch st" ] "locality": [ "portland" ], "region": [ "oregon" ], "country": [ "us" ], "latitude": [ "45.52345" ], "longitude": [ "-122.682677" ] }, "lang": "en", "value": "mozilla" } ] }, "lang": "en" } ], ...
Clear-Site-Data - HTTP
it allows web developers to have more control over the data stored locally by a browser for their origins.
... "cache" indicates that the server wishes to remove locally cached data (i.e.
...this includes storage mechanisms such as: localstorage (executes localstorage.clear), sessionstorage (executes sessionstorage.clear), indexeddb (for each database execute idbfactory.deletedatabase), service worker registrations (for each service worker registration, execute serviceworkerregistration.unregister), appcache, websql databases, filesystem api data, plugin data (flash via npp_clearsitedata).
... examples sign out of web site if a user signs out of your website or service, you might want to remove locally stored data.
HTTP Index - HTTP
WebHTTPIndex
this often occurs if the url specifies a local file, using a file:/// url.
... 52 accept-language accept-language, content negotiation, http, http header, reference, request header the accept-language request http header advertises which languages the client is able to understand, and which locale variant is preferred.
...it allows web developers to have more control over the data stored locally by a browser for their origins.
...a proxy can be on the user's local computer, or anywhere between the user's computer and a destination server on the internet.
Date.prototype.getTimezoneOffset() - JavaScript
the gettimezoneoffset() method returns the time zone difference, in minutes, from current locale (host system settings) to utc.
... description the time-zone offset is the difference, in minutes, from local time to utc.
... note that this means that the offset is positive if the local timezone is behind utc, and negative if it is ahead.
... current locale utc-8 utc utc+3 return value 480 0 -180 the time zone offset returned is the one that applies for the date that it's called on.
Intl.Collator - JavaScript
static methods intl.collator.supportedlocalesof() returns an array containing those of the provided locales that are supported without having to fall back to the runtime's default locale.
... intl.collator.prototype.resolvedoptions() returns a new object with properties reflecting the locale and collation options computed during initialization of the object.
... using locales the results provided by collator.prototype.compare() vary between languages.
... in order to get the sort order of the language used in the user interface of your application, make sure to specify that language (and possibly some fallback languages) using the locales argument: // in german, ä sorts with a console.log(new intl.collator('de').compare('ä', 'z')); // → a negative value // in swedish, ä sorts after z console.log(new intl.collator('sv').compare('ä', 'z')); // → a positive value using options the results provided by collator.prototype.compare() can be customized using the options argument: // in german, ä has a as the base letter console.log(new intl.collator('de', { sensitivity: 'base' }).compare('ä', 'a')); // → 0 // in swedish, ä and a are separate base letters console.log(new intl.collator('sv', { sensitivity: 'base' }).compare('ä', 'a'))...
Intl.DisplayNames() constructor - JavaScript
syntax new intl.displaynames([locales[, options]]) parameters locales optional a string with a bcp 47 language tag, or an array of such strings.
... for the general form and interpretation of the locales argument, see the intl page.
... options optional an object with some or all of the following properties: localematcher the locale matching algorithm to use.
... "code" "none" examples basic usage in basic use without specifying a locale, a formatted string in the default locale and with default options is returned.
Intl​.List​Format​.prototype​.formatToParts() - JavaScript
the intl.listformat.prototype.formattoparts() method returns an array of objects representing the different components that can be used to format a list of values in a locale-aware fashion.
... syntax intl.listformat.prototype.formattoparts(list) parameters list an array of values to be formatted according to a locale.
... description whereas intl.listformat.prototype.format() returns a string being the formated version of the list (according to the given locale and style options), formattoparts() returns an array of the different components of the formated string.
... the locale and style options used for formatting are given when constructing the intl.listformat instance.
Intl.NumberFormat.prototype.formatToParts() - JavaScript
the intl.numberformat.prototype.formattoparts() method allows locale-aware formatting of strings produced by numberformat formatters.
...it returns an array of objects containing the locale-specific tokens from which it possible to build custom strings while preserving the locale-specific parts.
... examples comparing format and formattoparts numberformat outputs localized, opaque strings that cannot be manipulated directly: var number = 3500; var formatter = new intl.numberformat('de-de', { style: 'currency', currency: 'eur' }); formatter.format(number); // "3.500,00 €" however, in many user interfaces there is a desire to customize the formatting of this string.
... the formattoparts method enables locale-aware formatting of strings produced by numberformat formatters by providing you the string in parts: formatter.formattoparts(number); // return value: [ { type: "integer", value: "3" }, { type: "group", value: "." }, { type: "integer", value: "500" }, { type: "decimal", value: "," }, { type: "fraction", value: "00" }, { type: "literal", value: " " }, { type: "currency", value: "€" } ] now the information is available separately and it can be formatted and concatenated again in a customized way.
String - JavaScript
in javascript, you just use the less-than and greater-than operators: let a = 'a' let b = 'b' if (a < b) { // true console.log(a + ' is less than ' + b) } else if (a > b) { console.log(a + ' is greater than ' + b) } else { console.log(a + ' and ' + b + ' are equal.') } a similar result can be achieved using the localecompare() method inherited by string instances.
... string.prototype.localecompare(comparestring [, locales [, options]]) returns a number indicating whether the reference string comparestring comes before, after, or is equivalent to the given string in sort order.
... string.prototype.tolocalelowercase( [locale, ...locales]) the characters within a string are converted to lowercase while respecting the current locale.
... string.prototype.tolocaleuppercase( [locale, ...locales]) the characters within a string are converted to uppercase while respecting the current locale.
SVG documentation index - SVG: Scalable Vector Graphics
WebSVGIndex
127 local deprecated, svg, svg attribute the local attribute specifies the unique id for a locally stored color profile as specified by international color consortium.
... 166 pointsatz filters, svg, svg attribute the pointsatz attribute represents the y location in the coordinate system established by attribute primitiveunits on the <filter> element of the point at which the light source is pointing, assuming that, in the initial local coordinate system, the positive z-axis comes out towards the person viewing the content and assuming that one unit along the z-axis equals one unit in x and y.
... 337 <font-face-name> deprecated, element, needsexample, reference, svg, svg font the <font-face-name> element points to a locally installed copy of this font, identified by its name.
...it serves as container for <font-face-name>, pointing to locally installed copies of this font, and <font-face-uri>, utilizing remotely defined fonts.
XUL Migration Guide - Archive of obsolete content
my-addon/ chrome/ content/ locale/ skin/ chrome.manifest data/ lib/ package.json there are limitations on what you can do in this manifest file: for example, you can't register overlays, resource: uris, or components.
... however, you can register a chrome: uri, with a skin and locale, and this means you can include xul windows in an sdk-based add-on.
...in that directory you can keep your "content", "locale", and "skin" subdirectories: this allows you to refer to objects in these directories from "chrome.manifest" using a relative path, like "chrome/content".
page-worker - Archive of obsolete content
contentscriptfile string,array a local file url or an array of local file urls of content scripts to load.
...this can point to local content loaded from your add-on's "data" directory or remote content.
... contentscriptfile a local file url or an array of local file urls of content scripts to load.
stylesheet/style - Archive of obsolete content
stylesheet file url(s) are verified to be local to an add-on, while css rules are verified to be a string or array of strings.
... parameters options : object required options: name type uri string,array a string, or an array of strings, that represents local uri to stylesheet.
... uri an array of strings that contains the stylesheet local uri(s) specified in the constructor's option; null if no uri option was given to the constructor.
ui/sidebar - Archive of obsolete content
unlike modules such as panel, the content must be local, typically loaded from the add-on's data directory via a url constructed using self.data.url(): var sidebar = require("sdk/ui/sidebar").sidebar({ id: 'my-sidebar', title: 'my sidebar', url: require("sdk/self").data.url("sidebar.html") }); from firefox 34, you can use "./sidebar.html" as an alias for self.data.url("sidebar.html").
...this must be a local url (typically, loaded from the "data" folder using self.data.url()).
...this must be a local url (typically, loaded from the "data" folder using self.data.url()).
cfx - Archive of obsolete content
you define configurations in a file called local.json which should live in the root directory of your sdk.
... suppose your the following local.json is as follows: { "configs": { "ff40": ["-b", "/usr/bin/firefox-4.0"] } } you can run: cfx test --use-config=ff40 and it would be equivalent to: cfx test -a firefox -b /usr/bin/firefox-4.0 this method of defining configuration options can be used for all of the run, build, and test tools.
... if "default" is defined in the local.json cfx will use that configuration unless otherwise specified.
Getting started (cfx) - Archive of obsolete content
then when you invoke cfx run or cfx xpi, you pass the "-o" option: cfx run -o this instructs cfx to use the local copies of the sdk modules, not the ones in firefox.
...for example: while true ; do cfx xpi ; wget --post-file=codesy.xpi http://localhost:8888/ ; sleep 5 ; done note that the logging level defined for the console is different when you use this method, compared to the logging level used when an add-on is run using cfx run.
... another example using grunt and grunt-shell: module.exports = function(grunt) { 'use strict'; require('matchdep').filterdev('grunt-!(cli)').foreach(grunt.loadnpmtasks); grunt.initconfig({ shell: { xpi: { command: [ 'cd pluginpath', 'cfx xpi', 'wget --post-file=pluginname.xpi http://localhost:8888/ || echo>/dev/null' ].join('&&') } }, watch: { xpi: { files: ['pluginpath/**'], tasks: ['shell:xpi'] } } }); grunt.loadnpmtasks('grunt-contrib-watch'); grunt.loadnpmtasks('grunt-shell'); grunt.registertask('default', ['watch']); }; ...
Chapter 3: Introduction to XUL—How to build a more intuitive UI - Archive of obsolete content
note: these values are stored in localstore.rdf, inside the user profile.
...please be aware that ordinary dtd files on the web or in a local directory will not be opened.
... <?xml version="1.0" encoding="utf-8"?> <?xml-stylesheet href="chrome://global/skin/"?> <!doctype window system "chrome://testapp/locale/testapp.dtd"> <window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <button label="&button.1.label;"/> <button label="&button.2.label;"/> </window> listing 26: reading in external entities <!entity button.1.label "firefox"> <!entity button.2.label "thunderbird"> listing 27: testapp.dtd substituting css for attribute declarations the gecko rendering engine includes a number of css properties with -moz- prepended to them; these are custom properties for xul that have been implemented prior to being a w3c recommendation.
Appendix B: Install and Uninstall Scripts - Archive of obsolete content
uninstall scripts there are two common cases for needing these: cleaning up local data and presenting an uninstall feedback form.
... regarding local data, it is debatable if it is good practice to remove it or not.
...on the other hand, local data that is no longer needed takes unnecessary disk space and can contain private information that users forget is there.
Appendix D: Loading Scripts - Archive of obsolete content
ndbox, // the javascript version "1.8", // the apparent script filename: "zz-9://plural/zed/alpha", // the apparent script starting line number: 42); the following code will execute a simple script loaded from a local file in the same directory as the current script.
...// the following may be used instead at the top-level: // // let context = this if (components.utils.getglobalforobject) // gecko 2.x var context = components.utils.getglobalforobject({}); else // gecko 1.x context = {}.__parent__; loadscript("script.js", context); the sub-script loader the mozijssubscriptloader can be used to load local scripts from the chrome:, resource:, and file: protocols into any javascript object.
... let context = {}; services.scriptloader.loadsubscript("chrome://my-package/content/foo-script.js", context, "utf-8" /* the script's encoding */); the following code will execute a simple script loaded from a local file in the same directory as the current script.
Useful Mozilla Community Sites - Archive of obsolete content
babelzilla babelzilla is a worldwide community of localizers.
...you'll also receive feedback that you wouldn't notice by testing only in one language, which can reveal other bugs in your locale handling.
... there's a significant portion of users that use a localized version of firefox, so you shouldn't neglect them.
Security best practices in extensions - Archive of obsolete content
files loaded using the file protocol can access files on the user's disk and other local devices.
...these web pages can come from a server, or come from local html files bundled with the extension.
...the usefulness of it and power of how it works is best illustrated by the popular greasemonkey extension, which works on the premise of scripts being downloaded and stored locally, to be injected into the web content context via the sandbox.
Signing an XPI - Archive of obsolete content
extract the contents of the archive file to a local folder.
...extract the contents of the archive file to a local folder.
... /dev/fsb/build.bat /dev/fsb/install.rdf /dev/fsb/chrome.manifest /dev/fsb/chrome/ /dev/fsb/chrome/content/ /dev/fsb/chrome/locale/ /dev/fsb/chrome/skin/ here it is with the code-signing steps included: @echo off set x=%cd% echo building %x%.xpi ...
Search Extension Tutorial (Draft) - Archive of obsolete content
the following file, for instance, would change the default keyword search engine, assuming that an engine with the name example engine is installed, as described below: // this is a localizable preference, so it must contain a url which // points at a properties file containing the preference name as a // property.
...function setpref(name, value, localized) { // if this is a localized preference, transform the value into an // appropriate data: url.
... if (localized) value = "data:text/plain," + encodeuricomponent(name + "=" + value.replace(/ /g, "\\u0020")); // save the original and new values.
Install.js - Archive of obsolete content
it assumes the following structure of your xpi file: sampleext.xpi chrome\ sampleext.jar content\ sampleext\ locale\ (optional) en-us\ sampleext\ ...
...nstall.js // xpiinstaller // by pike (heavily inspired by code from henrik gemal and stephen clavering) var xpiinstaller = { // --- editable items begin --- extfullname: 'sample extension', // the name displayed to the user (don't include the version) extshortname: 'sampleext', // the leafname of the jar file (without the .jar part) extversion: '1.0', extauthor: 'insert-your-name-here', extlocalenames: null, // e.g.
...install.profile_chrome : install.delayed_chrome; // register content install.registerchrome(install.content | installtype, jarpath, 'content/' + this.extshortname + '/'); // register locales for (var locale in this.extlocalenames) { var regpath = 'locale/' + this.extlocalenames[locale] + '/' + this.extshortname + '/'; install.registerchrome(install.locale | installtype, jarpath, regpath); } // register skins for (var skin in this.extskinnames) { var regpath = 'skin/' + this.extskinnames[skin] + '/' + this.extshortname + '/'; install.registerchrome(install...
MMgc - Archive of obsolete content
write barriers are not needed for stack-based local variables, regardless of whether the object pointed to is gcobject, gcfinalizedobject, rcobject or rcfinalizedobject.
...such objects are essentially the same as stack-based local variables.
...these implementations are calling mpallocaligned, which can allocate 4096-byte aligned memory.
Migrate apps from Internet Explorer to Mozilla - Archive of obsolete content
void setparameter(string namespaceuri, string localname, variant value) sets a parameter in the imported xslt stylesheet.
... variant getparameter(string namespaceuri, string localname) gets the value of a parameter in the imported xslt stylesheet.
... void removeparameter(string namespaceuri, string localname) removes all set parameters from the imported xslt stylesheet and makes them default to the xslt-defined defaults.
New Skin Notes - Archive of obsolete content
--nickolay do you know if there's a localsettings variable to have the edit-section links off by default?
...thanks again --mmondor future fixes in l10n versions there all heading links are wrong - main link and documentation leads to english devmo, and devnews and webwatch should be hidden or localized too.
...devnews and webwatch are not currently being localised so shall remain as they are, with link to english wiki.
Running Tamarin acceptance tests - Archive of obsolete content
the tamarin acceptance tests can be used to verify your installation and or local changes that you have made to the source.
... testsuite setup example commands: copy avmshell to /data/local/tamarin.
... the shell can be named variously in the build but on the phone the executable must be 'avmshell' $ adb shell 'mkdir /data/local/tamarin' $ adb push avmshell /data/local/tamarin/avmshell $ adb shell 'chmod 777 /data/local/tamarin/avmshell' copy android_runner.sh, if it doesn't already exist on the phone in /data/local/tamarin $ adb push tamarin-redux/platform/android/android_runner.sh /data/local/tamarin/android_runner.sh $ adb shell 'chmod 777 /data/loca/android_runner.sh' test it out with a simple .abc or no args for usage (should return exitcode=0) $ tamarin-redux/platform/android/android_shell.py hello.abc hello exitcode=0 test it out by retrieving the version information of the shell on the android device $ $avm -dversion shell 1.4 debug build 6299:455bca954565 features avmsystem_32bit;...
Tamarin mercurial commit hook - Archive of obsolete content
installing the commit hook the easiest way to implement the hook is to sync to the tip of tamarin-redux then add the following to your tamarin-redux/.hg/hgrc file (or to ~/.hgrc to implement for all local repos): [hooks] pretxncommit.commit = python:/path/to/tamarin-redux/utils/hooks/tamarin-commit-hook.py:master_hook once added, all commits will run the commit hook.
... hook use on every commit to your local repository, the hook will only check for violations in any new / changed code.
... this allows you to reuse the commit message after fixing the issue by using the -l (--logfile) option: hg commit -l /reporoot/.hg/commit.save notes at the moment this is a local-only hook and is not enforced on the server.
Creating XPI Installer Modules - Archive of obsolete content
in the package you create in this tutorial, for example, all of the resources are located under the content/ subdirectory, but they could just as easily have been archived directly at the top--along with skin and locale resources, if you wanted.
...when your package includes its own theme, localization packs, or other components it's convenient (but not necessary to create a subdirectory structure that reflects the role of the different parts.
...for a package such as this one with its own content but no special localization or custom skin, the contents.rdf file describes package in terms of its relation to the "root" package of mozilla.
addDirectory - Archive of obsolete content
method of install object syntax public int adddirectory ( string xpisourcepath); public int adddirectory ( string registryname, string xpisourcepath, object localdirspec, string relativelocalpath); public int adddirectory ( string registryname, string version, string xpisourcepath, object localdirspec, string relativelocalpath); public int adddirectory ( string registryname, string version, string xpisourcepath, object localdirspec, string relativelocalpath, boolean forceupdate); public int adddirectory ( string registryname, installversion version, string xpisourcepath, object localdirspec, string relativelocalpath, boolean forceupdate); parameters ...
... localdirspec an object representing a directory.
... subdir the name of a directory to append to localdirspec, using '/' as the path separator regardless of the platform.if subdir is missing, null, or "", the filenames are appended directly to the folder name specified by localdirspec.
patch - Archive of obsolete content
method of install object syntax int patch ( string registryname, string xpisourcepath, object localdirspec, string relativelocalpath); int patch ( string registryname, installversion version, string xpisourcepath, object localdirspec, string relativelocalpath); int patch ( string registryname, string version, string xpisourcepath, object localdirspec, string relativelocalpath); parameters the patch method has the following parameters: registryname the pathname in the client version registry for the component that is to be patched.this parameter can be an absolute pathname, such as /royalairways/royalsw/executable or a relative pathname, such as executable.
... localdirspec an object representing the directory in which the subcomponent that is to be patched resides.
... relativelocalpath a pathname relative to the localdirspec parameter that identifies the subcomponent that is to be patched.
registerChrome - Archive of obsolete content
skin is used to register skins, locale is used to register language packs.
... package, a third possibility is the equivalent of skin and/or locale, and ensures that everything in the xpi is registered.
...for example, "locale/mylocale/aim," points to the locale/mylocale/aim subdirectory of the same xpi file in which the installation script is located.
Introduction - Archive of obsolete content
also, text displayed with xul is easily localizable, which means that it can be translated into other languages with little effort.
...however, these types of applications do not have security restrictions placed on them, so they may access local files and read and write preferences, for example.
... xul files are usually split into four files, one each for the layout and elements, for style declarations, for entity declarations (used for localization) and for scripts.
timepicker - Archive of obsolete content
this value is determined from the user's locale.
...this value is determined from the user's locale.
...this value is determined from the user's locale.
Application Update - Archive of obsolete content
getting started you will need the following utility scripts from http://lxr.mozilla.org/mozilla/sourc...ate-packaging/ (or local source of xulrunner) common.sh make_full_update.sh you will need mar / mar.exe to build a complete update patch.
...use what you need, %product%,%version%,%build_id%,%channel% for example pref("app.update.url", "https://yourserver.net/update/3/%product%/%version%/%build_id%/%build_target%/%locale%/%channel%/%os_version%/%distribution%/%distribution_version%/update.xml"); // url user can browse to manually if for some reason all update installation // attempts fail.
... at the scheduled interval the application checks the update server for update.xml, search for the correct one using the software name, versions, build id's, channels, and other information like locales.
Windows and menus in XULRunner - Archive of obsolete content
here is an example: <?xml version="1.0"?> <?xml-stylesheet href="chrome://basicapp/skin/main.css" type="text/css"?> <!doctype window system "chrome://basicapp/locale/main.dtd"> <window id="main" title="&title;" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <script src="main.js"/> ...
...the dtd is used to create entity references so strings for titles and labels are not stored directly in the xul file; this makes updating the text -- and localization of the application -- much easier.
... building on the simple window code, here is what xul menus and toolbars look like: <?xml version="1.0"?> <?xml-stylesheet href="chrome://basicapp/skin/main.css" type="text/css"?> <!doctype window system "chrome://basicapp/locale/main.dtd"> <window id="main" title="&title;" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <script src="main.js"/> <toolbox> <menubar id="menubar"> <menu id="file-menu" label="&file;"> <menupopup id="file-popup"> <menuitem label="&file.new;" oncommand="dofilenew();"/> <menuitem label="&file.open;" oncommand="dofileopen()...
2006-11-24 - Archive of obsolete content
summary: mozilla.dev.l10n - november 24, 2006 announcements thunderbird 2 release schedule for localizations beta 1 freeze for thunderbird 2 is scheduled on december 4th (en-us only).
... approval queue for fx 2.0.0.1 closing closing the approval queue for firefox 2.0.0.1 discussions quality of localized builds and process requirements quality of localized builds and process requirements the translate toolkit mdnto po: its current state and how to use it discussion on clarifications on translate toolkit to avoid confusion.
...live titles there seems to be a few locales that use "summary" or a translation thereof instead of "live titles" to name the ui part of microsummaries.
NPP_StreamAsFile - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary provides a local file name for the data from a stream.
... fname pointer to full path to a local file.
... description when the stream is complete, the browser calls npp_streamasfile to provide the instance with a full path name for a local file for the stream.
SAX - Archive of obsolete content
an example implementation of the most commonly used content handler: function print(s) { dump(s + "\n"); } xmlreader.contenthandler = { // nsisaxcontenthandler startdocument: function() { print("startdocument"); }, enddocument: function() { print("enddocument"); }, startelement: function(uri, localname, qname, /*nsisaxattributes*/ attributes) { var attrs = []; for(var i=0; i<attributes.length; i++) { attrs.push(attributes.getqname(i) + "='" + attributes.getvalue(i) + "'"); } print("startelement: namespace='" + uri + "', localname='" + localname + "', qname='" + qname + "', attributes={" + attrs.join(",") + "}"); }, endelement:...
... function(uri, localname, qname) { print("endelement: namespace='" + uri + "', localname='" + localname + "', qname='" + qname + "'"); }, characters: function(value) { print("characters: " + value); }, processinginstruction: function(target, data) { print("processinginstruction: target='" + target + "', data='" + data + "'"); }, ignorablewhitespace: function(whitespace) { // don't care }, startprefixmapping: function(prefix, uri) { // don't care }, endprefixmapping: function(prefix) { // don't care }, // nsisupports queryinterface: function(iid) { if(!iid.equals(components.interfaces.nsisupports) && !iid.equals(components.interfaces.nsisaxcontenthandler)) throw components.results.ns_error_no_interface; ...
...below is an example of parsing from a string: xmlreader.parsefromstring("<f:a xmlns:f='g' d='1'><bbq/></f:a>", "text/xml"); this call results in the following output (assuming the content handler from the example above is used): startdocument startelement: namespace='g', localname='a', qname='f:a', attributes={d='1'} startelement: namespace='', localname='bbq', qname='bbq', attributes={} endelement: namespace='', localname='bbq', qname='bbq' endelement: namespace='g', localname='a', qname='f:a' enddocument ...
Namespaces - Archive of obsolete content
the localname property returns the name of the element, without any namespace prefix.
...var info = a.name(); info.localname; // returns 'p'.
...namespace differs in its tostring method, and in that it has a prefix property instead of a localname property.
Building up a basic demo with the PlayCanvas engine - Game development
scaling we can also scale a given object — there's a function for that called setlocalscale.
... add the following, again into the callback: cylinder.setlocalscale(1, math.abs(math.sin(timer)), 1); here we are using math.sin to scale the cylinder in a cycle, bigger and smaller again.
... conclusion here's the final code listing, along with a viewable live example: you can also see it on github and fork the repository if you want to play with it yourself locally.
Visual JS GE - Game development
some apps might need to have local storage, for instance, editor.js.
...rrect paths to the node app and project instance, as indicated below: module.exports = { version : "0.5", path_of_node_app : "d:/path_to_server_instance_folder/server/" , // edit here path_of_www : "d:/xamp/htdocs/project_instance/", // path_to_www edit here editor_port : "1013", reg_path : "users/", account_port : 3666 , destroy_session_after_x_mseconds : 20000, }; local node.js application tools (uses in developer mode only) the following section provides information about the tools involved in visual-js game engine.
...this is a node.js app for local use.
LTR (Left To Right) - MDN Web Docs Glossary: Definitions of Web-related terms
ltr (left to right) is a locale property indicating that text is written from left to right.
... for example, the en-us locale (for us english) specifies left-to-right.
... technical reference localization and internationalization ...
WAI-ARIA basics - Learn web development
to get it to run, you will need to upload it to a web server, for example using github, or a local web server like python's simplehttpserver.
... at this point, take a copy of our form-validation.html and validation.js files, and save them in a local directory.
...make a local copy of fake-div-buttons.html, and add role="button" to each button <div>, for example: <div data-message="this is from the first button" tabindex="0" role="button">click me!</div> now when you try this using a screenreader, you'll have buttons be reported using phrases like "click me!, button" — much better.
How do you upload your files to a web server? - Learn web development
here and there: local and remote view once connected, your screen should look something like this (we've connected to an example of our own to give you an idea): let's examine what you're seeing: on the center left pane, you see your local files.
... rsync rsync is a local-to-remote file synchronizing tool, which is generally available on most unix-based systems (like macos and linux), but windows versions exist too.
... source is the path to the local file or directory that you want to copy files over from.
Creating hyperlinks - Learn web development
active learning: creating your own example link create an html document using your local code editor and our getting started template.
...when working locally with a web site, you'll have one directory that contains the entire site.
... you'll need to make local copies of the following four pages, all in the same directory.
Getting started with HTML - Learn web development
active learning: adding some features to an html document if you want to experiment with writing some html on your local computer, you can: copy the html page example listed above.
...initially the page looks like this: in this exercise, you can edit the code locally on your computer, as described previously, or you can edit it in the sample window below (the editable sample window represents just the contents of the <body> element, in this case).
...earn bonus points if you manage to link to a different image (either locally on your computer, or somewhere else on the web).
HTML text fundamentals - Learn web development
you should save a copy of this file on your local machine, as you'll need it for the exercises later on.
...you can choose to either save a local copy of our text-start.html starting file and do the work there, or do it in the editable example below.
... doing it locally will probably be better, as then you'll get to save the work you are doing, whereas if you fill it in to the editable example, it will be lost the next time you open the page.
HTML table advanced features and accessibility - Learn web development
open up your language teacher's school timetable from the end of html table basics, or make a local copy of our timetable-fixed.html file.
... first of all, make a local copy of spending-record.html and minimal-table.css in a new folder.
... active learning: playing with scope and headers for this final exercise, we'd like you to first make local copies of items-sold.html and minimal-table.css, in a new directory.
Drawing graphics - Learn web development
first make a local copy of our 0_canvas_start.html file, and open it in your text editor.
... first of all, take a copy of your newly coded canvas template (or make a local copy of 1_canvas_template.html if you didn't follow the above steps).
... to start with, make a local copy of index.html in a new folder, then save a copy of metal003.png in the same folder.
Introduction to web APIs - Learn web development
note: depending on how strict the browser is, such security mechanisms might even stop the example from working locally, i.e.
... if you load the local example file in your browser instead of running it from a web server.
... at the time of writing, our web audio api example wouldn't work locally on google chrome — we had to upload it to github before it would work.
Manipulating documents - Learn web development
using methods available on this object you can do things like return the window's size (see window.innerwidth and window.innerheight), manipulate the document loaded into that window, store data specific to that document on the client-side (for example using a local database or other storage mechanism), attach an event handler to the current window, and more.
... take a local copy of the dom-example.html page and the image that goes along with it.
... to start with, make a local copy of our window-resize-example.html and bgtile.png demo files.
Getting started with Ember - Learn web development
previous overview: client-side javascript frameworks next in our first ember article we will look at how ember works and what it's useful for, install the ember toolchain locally, create a sample app, and then do some initial setup to get it ready for development.
... starting the development server you may start the app in development mode by typing the following command in your terminal, while inside the todomvc directory: ember server this should give you an output similar to the following: build successful (190ms) – serving on http://localhost:4200/ slowest nodes (totaltime >= 5%) | total (avg) -----------------------------------------+----------- broccolimergetrees (17) | 35ms (2 ms) package /assets/vendor.js (1) | 13ms concat: vendor styles/assets/vend...
... (1) | 12ms the development server launches at http://localhost:4200, which you can visit in your browser to check out what your work looks like so far.
Introduction to automated testing - Learn web development
you can then step up a gear, using an api to access functionality programmatically, which means that such apps can be combined with task runners, such as your own local selenium environments and others, to create automated tests.
... if you are on firefox or chrome, you'll be prompted to install a browser extension in a dialog titled "enable local testing" — click the install button to proceed.
... in the next article, we'll look at setting up our own local automation system using selenium, and how to combine that with services such as sauce labs, browserstack and testingbot.
Handling common JavaScript problems - Learn web development
make a local copy of our broken-ajax.html example (see the source code also).
...for example, localforage is a library for client-side data storage, which provides a simple syntax for storing and retrieving data.
... to get started, make a local copy of our fetch-polyfill.html example and our nice image of some flowers in a new directory.
Command line crash course - Learn web development
before we dive into installing prettier, there's a question to answer — "where should we install to?" with npm we have the choice of installing tools globally — so we can access them anywhere — or locally to the current project directory.
... uses less disk space related to the previous point, it makes project code harder to replicate (if you install your tools locally, they can be set up as dependencies and installed with npm install).
...we'll look more at local installs and why they're good in the next article.
Limitations of frame scripts
security restrictions on file access processes that host remote content are isolated from the local system through a content security sandbox.
... one of the functions of the sandbox is to restrict access to the local file system by processes that host remote content.
...therefore frame scripts should not attempt to access the local file system directly, as these calls will fail.
Storage access policy: Block cookies from trackers
dom storage: localstorage: window.localstorage: read and write attempts throw a securityerror exception.
... prior to firefox 70: window.localstorage is null.
...this means that providers using cookies which are scoped to their third-party domain, or local storage and other site data stored under their origin, will no longer have access to those identifiers across other websites.
CustomizableUI.jsm
array getwidgetsinarea(aareaid); string getareatype(aareaid); domelement getcustomizetargetforarea(aareaid, awindow); void reset(); void undoreset(); void removeextratoolbar(); object getplacementofwidget(awidgetid); bool iswidgetremovable(awidgetnodeorwidgetid); bool canwidgetmovetoarea(awidgetid); void getlocalizedproperty(awidget, aprop, aformatargs, adef); void hidepanelfornode(anode); bool isspecialwidget(awidgetid); void addpanelcloselisteners(apanel); void removepanelcloselisteners(apanel); void onwidgetdrag(awidgetid, aarea); void notifystartcustomizing(awindow); void notifyendcustomizing(awindow); void dispatchtoolboxevent(ae...
... getlocalizedproperty() get a localized property off a (widget) object.
... parameters awidget the object whose property we should use to fetch a localizable string aprop the property on the object to use for the fetching aformatargs (optional) any extra arguments to use for a formatted string adef (optional) the default to return if we don't find the string in the stringbundle return value the localized string, or adef if the string isn't in the bundle.
Webapps.jsm
rs: function(aoldmanifest, anewmanifest, aapp) checkforupdate: function(adata, amm) doinstall: function doinstall(adata, amm) doinstallpackage: function doinstallpackage(adata, amm) pushcontentaction: function(windowid) popcontentaction: function(windowid) actioncancelled: function(windowid) denyinstall: function(adata) _setupapp: function(adata, aid) _cloneapp: function(adata, anewapp, alocalemanifest, amanifest, aid, alocalid) _writemanifestfile: function(aid, aispackage, ajsonmanifest) _nextlocalid: function() _appidformanifesturl: function(auri) makeappid: function() _saveapps: function() _readmanifests: function(adata) _ensuresufficientstorage: function(anewapp) _checkdownloadsize: function(afreebytes, anewapp) _getrequestchannel: function(afullpackagepath, aislocalfilein...
...stall, aoldapp,) _senddownloadprogressevent: function(anewapp, aprogress) _getpackage: function(arequestchannel, aid, aoldapp, anewapp) _computefilehash: function(afilepath) _sendappliedevent: function(aapp) _openandreadpackage: function(azipfile, aoldapp, anewapp, aislocalfileinstall,) _openpackage: function(azipfile, aapp, aislocalfileinstall) _opensignedpackage: function(ainstallorigin, amanifesturl, azipfile, acertdb) _readpackage: function(aoldapp, anewapp, aislocalfileinstall, aisupdate,) _checksignature: function(aapp, aissigned, aislocalfileinstall) _saveetag: function(aisupdate, aoldapp, arequestchannel, ahash, amanifest) _checkorigin: function(aissigned, aoldapp, amanifest, aisupdate) _getids: function(aissigned, azipreader, aconverter, anewapp, aoldapp,) _checkforstoreid...
... function(adata, amm) getall: function(acallback) isreceipt: function(data) addreceipt: function(adata, amm) removereceipt: function(adata, amm) replacereceipt: function(adata, amm) setenabled: function(adata) getmanifestfor: function(amanifesturl, aentrypoint) getappbymanifesturl: function(amanifesturl) getfullappbymanifesturl: function(amanifesturl, aentrypoint, alang) getmanifestcspbylocalid: function(alocalid) getdefaultcspbylocalid: function(alocalid) getapplocalidbystoreid: function(astoreid) getappbylocalid: function(alocalid) getmanifesturlbylocalid: function(alocalid) getapplocalidbymanifesturl: function(amanifesturl) getcoreappsbasepath: function() getwebappsbasepath: function() _islaunchable: function(aapp) _notifycategoryandobservers: function(subject, topic, data...
Profiling with the Firefox Profiler
profiling local windows builds if you built firefox for windows locally and you would like to use the local symbols with the profiler, you will need to run an additional tool; see profiling with the firefox profiler and local symbols on windows.
... for local builds of fennec, you should build with optimization and strip_flags="--strip-debug" but not with --enable-profiling.
... access cleopatra from your web browser by loading the page localhost:8000, and upload run.symb.cleo to render the profile with most of the symbol information.
AsyncTestUtils extended framework
does not have a head_*.js file that has the two following lines, add them at the top of your test file (before the lines shown above): load("../../mailnews/resources/maildirservice.js"); load("../../mailnews/resources/mailtestutils.js"); at the bottom of the test file, add the following: var tests =[ // list your tests here ]; function run_test() { configure_message_injection({mode: "local"}); async_run_tests(tests); } asynchronous testing basics why do we need it?
... configuring message injection local injection let inboxfolder = configure_message_injection({mode: "local"}); set up message injection to happen locally.
... messageinjection.js: all the logic for injecting messages into folders via local / imap and then doing further folder-level manipulations.
Leak And Bloat Tests
user_pref("mail.account.account1.server", "server1"); user_pref("mail.account.account2.identities", "id1"); user_pref("mail.account.account2.server", "server2"); user_pref("mail.accountmanager.accounts", "account1,account2"); user_pref("mail.accountmanager.defaultaccount", "account2"); user_pref("mail.accountmanager.localfoldersserver", "server1"); user_pref("mail.identity.id1.fullname", "tinderbox"); user_pref("mail.identity.id1.smtpserver", "smtp1"); user_pref("mail.identity.id1.useremail", "tinderbox@invalid.com"); user_pref("mail.identity.id1.valid", true); user_pref("mail.root.none-rel", "[profd]mail"); user_pref("mail.root.pop3-rel", "[profd]mail"); user_pref("mail.server.server1.directory-rel", "[profd]mail...
.../local folders"); user_pref("mail.server.server1.hostname", "local folders"); user_pref("mail.server.server1.name", "local folders"); user_pref("mail.server.server1.type", "none"); user_pref("mail.server.server1.username", "nobody"); user_pref("mail.server.server2.check_new_mail", false); user_pref("mail.server.server2.directory-rel", "[profd]mail/tinderbox"); user_pref("mail.server.server2.download_on_biff", true); user_pref("mail.server.server2.hostname", "tinderbox"); user_pref("mail.server.server2.login_at_startup", false); user_pref("mail.server.server2.name", "tinderbox@invalid.com"); user_pref("mail.server.server2.type", "pop3"); user_pref("mail.server.server2.username", "tinderbox"); user_pref("mail.smtp.defaultserver", "smtp1"); user_pref("mail.smtpserver.smtp1.hostname", "tinderbox");...
...isabled user_pref("ldap_2.servers.osx.position", 0); user_pref("ldap_2.servers.oe.position", 0); preferences in generated profile, but not set: user_pref("mail.root.none", "/home/moztest/.thunderbird/t7i1txfw.minimum/mail"); user_pref("mail.root.pop3", "/home/moztest/.thunderbird/t7i1txfw.minimum/mail"); user_pref("mail.server.server1.directory", "/home/moztest/.thunderbird/t7i1txfw.minimum/mail/local folders"); user_pref("mail.server.server2.directory", "/home/moztest/.thunderbird/t7i1txfw.minimum/mail/tinderbox"); user_pref("mail.attachment.store.version", 1); user_pref("mail.folder.views.version", 1); user_pref("mail.spam.version", 1); user_pref("mailnews.quotingprefs.version", 1); user_pref("mailnews.ui.threadpane.version", 6); changes to leak and bloat tests date and time (pst) desc...
Building NSS
run the standard suite by: host=localhost domsuf=localdomain use_64=1 nss/tests/all.sh unit test configuration nss tests are configured using environment variables.
...replace localhost and localdomain with the hostname and domain suffix for your host.
... if you don't have a domain suffix you can add an entry to /etc/hosts (on windows, c:\windows\system32\drivers\etc\hosts) as follows: 127.0.0.1 localhost.localdomain validate this opening a command shell and typing: ping localhost.localdomain.
NSS sources building testing
create a new directory on your computer that you will use as your local work area, and run the following commands.
... hg clone https://hg.mozilla.org/projects/nspr hg clone https://hg.mozilla.org/projects/nss after the above commands complete, you should have two local directories, named nspr and nss, next to each other.
...on many computers the variables host=localhost domsuf=localdomain works.
Python binding for NSS
also, any "global" values which are set in python-nss are actually thread-local.
... review all ref counting, numerous ref counting fixes implement cyclic garbage collection support by adding object traversal and clear methods identify static variables, move to thread local storage remove python-nss specific httplib.py, no longer needed python-nss now compatible with standard library rewrite httplib_example.py to use standard library and illustrate ssl, non-ssl, connection class, http class usage the following classes were added: authkeyid basicconstraints crldistributionpoint crldistributionpts certificateextension...
... certificateextension.value generalname.type_enum generalname.type_name generalname.type_string secitem.der_to_hex() secitem.get_oid_sequence() secitem.to_hex() signedcrl.delete_permanently() ava.oid ava.oid_tag ava.value ava.value_str dn.cert_uid dn.common_name dn.country_name dn.dc_name dn.email_address dn.locality_name dn.org_name dn.org_unit_name dn.state_name dn.add_rdn() dn.has_key() rdn.has_key() the following module functions were removed: note: use nss.nss.oid_tag() instead nss.nss.sec_oid_tag_from_name() nss.nss.sec_oid_tag_name() nss.nss.sec_oid_tag_str() the following files were added: doc/examples/cert_dump.p...
GC Rooting Guide
gc things on the stack js::rooted<t> all gc thing pointers stored on the stack (i.e., local variables and parameters to functions) must use the js::rooted<t> class.
...eference to the template class (gecko uses the template versions): template class typedef js::rooted<js::value> js::rootedvalue js::rooted<jsobject*> js::rootedobject js::rooted<jsstring*> js::rootedstring js::rooted<jsscript*> js::rootedscript js::rooted<jsid> js::rootedid for example, instead of this: jsobject* localobj = js_getobjectofsomesort(cx); you would write this: js::rootedobject localobj(cx, js_getobjectofsomesort(cx)); spidermonkey makes it easy to remember to use js::rooted<t> types instead of a raw pointer because all of the api methods that may gc take a js::handle<t>, as described below, and js::rooted<t> autoconverts to js::handle<t> but a bare pointer does not.
... summary use js::rooted<t> typedefs for local variables on the stack.
Invariants
background: the fastest instructions for nameexpressions are fat opcodes that combine a load with additional operations, as in jsop_inclocal or jsop_getlocalprop.
... failing that, jsop_{get,call,set}local and jsop_{get,call,set}arg are the fastest, followed by jsop_{get,call}upvar, jsop_{get,call}dslot, jsop_{get,call,set}gvar, and lastly jsop_{,call,set}name.
...some nameexpressions might refer to a variable or global; or might at runtime turn out to reference another object property, due to with, or a variable that isn't in the source code at all but was injected into a local scope by eval.
SpiderMonkey Internals
these messages can be localized at compile time by replacing the .msg file; or, with a little modification to the source, at run time.
...these interfaces are named in a way that makes local vs.
...to make matters worse, java (and therefore javascript) uses "local" time numbers (offsets from the epoch) in its date class.
JS_ClearNewbornRoots
these newborn roots help native code protect newly-created gc-things from gc invocations activated before those things can be rooted using local or global roots.
...see js_enterlocalrootscope for a better way to manage newborns in cases where native hooks (functions, getters, setters, etc.) create many gc-things, potentially without connecting them to predefined local roots such as *rval or argv[i] in an active jsnative function.
... using js_enterlocalrootscope disables updating of the context's per-gc-thing-type newborn roots, until control flow unwinds and leaves the outermost nesting local root scope.
SpiderMonkey 1.8.7
the approach eliminates the need for the js_enterlocalrootscope api, and in many cases the need to explicitly root gc things or use the "root as you go" approach popular with earlier spidermonkey releases.
... jsautorequest jsautosuspendrequest jsautocheckrequest jsautoentercompartment js::anchor<> js::call obsolete apis js_clearnewbornroots js_enterlocalrootscope js_leavelocalrootscope js_leavelocalrootscopewithresult js_forgetlocalroot js_newgrowablestring deleted apis js_getscopechain use js_getglobalforscopechain api changes operation callback js_setoperationcallback was introduced in js 1.8.0, replacing the branch callback, in anticipation of the addition of the tracing jit (tracemonkey).
... a conservative stack-scanning collector was also added for spidermonkey 1.8.5, making the *localrootscope apis obsolete; they are now nops.
Places Developer Guide
importing: importhtmlfromfile (nsilocalfile afile, boolean aisinitialimport) - this imports all the bookmarks in the specified file into the current bookmarks collection.
...exporting: exporthtmltofile (nsilocalfile afile) - this exports all bookmarks in the toolbar, menu and unfiled bookmarks folders into the specified file.
...var ci = components.interfaces; var cc = components.classes; var cu = components.utils; // import placesutils cu.import("resource://gre/modules/placesutils.jsm"); cu.import("resource://gre/modules/services.jsm"); // create the backup file var jsonfile = services.dirsvc.get("profd", ci.nsilocalfile); jsonfile.append("bookmarks.json"); jsonfile.create(ci.nsilocalfile.normal_file_type, 0600); // export bookmarks in json format to file placesutils.backupbookmarkstofile(jsonfile); // restore bookmarks from the json file // note: this *overwrites* all pre-existing bookmarks placesutils.restorebookmarksfromjsonfile(jsonfile); history the toolkit history service is nsinavhistoryservice: var...
Components.utils.evalInWindow
example suppose a page script defines a variable: // page-script.js var somelocalvariable = { name: "selection1", node: document.documentelement }; an add-on script or other privileged script can access the variable using evalinwindow(): // add-on-script.js var result = components.utils.evalinwindow("somelocalvariable", contentwindow); console.log(result); // {"name":"selection1","node":{}} the add-on code can modify the variable as well, of course: // add-on-script.js c...
...omponents.utils.evalinwindow("somelocalvariable.newprop = 42", contentwindow); // page-script.js console.log(window.somelocalvariable.newprop); // 42 but note that the add-on script must trust that the page script has not redefined the setter on somelocalvariable: unlike xraywrappers, evalinwindow() does not provide x-ray vision.
... if the returned object contains a function, calls to evalinwindow() will throw an error: // page-script.js function bar() { } var somelocalvariablecontainingafunction = {name: "selection1", foo : bar}; // add-on-script.js components.utils.evalinwindow("somelocalvariablecontainingafunction", contentwindow); // error, function can't be cloned ...
nsIAccessible
layout oriented methods nsiaccessible.getchildatpoint() to get child accessible from point nsiaccessible.getaccessibletoleft(), nsiaccessible.getaccessibletoright(), nsiaccessible.getaccessibleabove() or nsiaccessible.getaccessiblebelow() to get left, right, top or below placed accessible methods getkeybindings provides array of localized string of global keyboard accelerator for the given action index supported by accessible.
... keyboardshortcut provides localized string of accesskey name, such as alt+d.
... defaultkeybinding provides localized string of global keyboard accelerator for default action, such as ctrl+o for open file.
nsIAuthPrompt
for example, ldap://localhost/dc=test.
...for example, ldap://localhost/dc=test.
...for example, ldap://localhost/dc=test.
nsICachingChannel
combining this flag with load_bypass_local_cache will cause all loads to fail.
... load_bypass_local_cache 1 << 28 this load flag causes the local cache to be skipped when fetching a request.
... load_bypass_local_cache_if_busy 1 << 29 this load flag causes the local cache to be skipped if the request would otherwise block waiting to access the cache.
nsIDOMFontFace
attribute type description cssfamilyname domstring a family name that could be used in css font-family (not necessarily the actual name that was used, due to aliases, generics, localized names, and so on).
... localname domstring null if not a src:local(...) rule.
... uri domstring null if not a downloaded font, that is local.
nsIDOMWindowUtils
void removesheet(in nsiuri sheeturi, in unsigned long type); void resumetimeouts(); void sendcompositionevent(in astring atype); obsolete since gecko 9 void sendcompositionevent(in astring atype, in astring adata, in astring alocale); obsolete since gecko 38.0 void sendcontentcommandevent(in astring atype, [optional] in nsitransferable atransferable); void getclassname(in object aobj); boolean sendkeyevent(in astring atype, in long akeycode, in long acharcode, in long amodifiers, [optional] in boolean apreventdefault); obsolete since gecko 15.0 boolean sendkeyevent(in astring atype, in...
... void sendcompositionevent( in astring atype, in astring adata, in astring alocale ); obsolete since gecko 38 parameters atype the event type: "compositionstart" or "compositionend" obsolete since gecko 36.
... alocale the locale value of dispatching composition event.
nsIFileProtocolHandler
a local file will be created if the url string begins with file://.
...if the nsifile is a local file, then the result will be a file:// url string.
...readurlfile() takes a local file and tries to interpret it as an internet shortcut (for example .url files on windows).
nsIFrameMessageManager
content/base/public/nsimessagemanager.idlscriptable provides methods for managing message listeners on local frames.
... this provides a way for local frames to receive messages from remote frames.
... method overview void addmessagelistener(in astring amessage, in nsiframemessagelistener alistener, [optional] in boolean listenwhenclosed); void removemessagelistener(in astring amessage, in nsiframemessagelistener alistener); void sendasyncmessage(in astring amessage, in astring json); methods addmessagelistener() adds a message listener to the local frame.
nsIHttpServer
(not supported) * @param function callback optional callback */ listen: function(port, opt, callback) { if (arguments.length == 2 && "function" == typeof opt) { callback = opt; } if (callback) { this.registerprefixhandler("/", callback); } let host = "localhost"; if (typeof port === "string" && port.indexof(':') != -1){ [host, port] = port.split(':'); port = parseint(port); server.identity.add('http', host, port); } server.wrappedjsobject._start(port, host); return true; }, registerfile: function(path, filepath) { var file = c...
...omponents.classes['@mozilla.org/file/local;1'] .createinstance(components.interfaces.nsilocalfile); file.initwithpath(filepath); return server.registerfile(path, file); }, registerdirectory : function(path, directorypath) { var file = components.classes['@mozilla.org/file/local;1'] .createinstance(components.interfaces.nsilocalfile); file.initwithpath(directorypath); return server.registerdirectory(path, file); }, registerpathhandler: function(path, handlercallback) { server.registerpathhandler(path, function (request, response) { var req = createhttprequest(request); var resp = new httpresponse(...
... * * @param callback * an asynchronous callback used to notify the user when this server is * stopped and all pending requests have been fully served * @throws ns_error_null_pointer * if callback is null * @throws ns_error_unexpected * if this server is not running */ void stop(in nsihttpserverstoppedcallback callback); /** * associates the local file represented by the string file with all requests * which match request.
nsIMsgAccountManagerExtension
a panel consists of a xul file with a page element as root element and the property file containing the localized name.
...an account manager extension with a "name" attribute of "devmo" and the "chromepackagename" attribute set to "extension@example.org" means, that the account manager expects to find a xul file in "chrome://extension@example.org/content/am-devmo.xul" and a property file in "chrome://extension@example.org/locale/am-devmo.properties" containing a property named "prefpanel-devmo".
...it has to be unique and defines the file name of the property file and the xul page as well as the name of the localized string contained in the property file.
nsIMsgFilterCustomAction
this should be localized.
... * @param actionfolder folder in the filter list * @param filtertype filter type (manual, offlinemail, etc.) * * @return errormessage a localized message to display if invalid * set to null if the actionvalue is valid */ autf8string validateactionvalue(in autf8string actionvalue, in nsimsgfolder actionfolder, in nsmsgfiltertypetype filtertype); /* allow duplicate actions in the same filter list?
...otherwise, be careful * that the action does correct notifications to maintain counts, and correct * manipulations of both imap and local non-database storage of message * metadata.
nsIServerSocket
therefore, this method cannot be used to determine the ip address of the local system.
... aloopbackonly if true, the server socket will only respond to connections on the local loopback interface.
... native code only!initwithaddress this method initializes a server socket and binds it to a particular local address (and hence a particular local network interface).
nsIToolkitProfile
method overview nsiprofilelock lock(out nsiprofileunlocker aunlocker); void remove(in boolean removefiles); attributes attribute type description localdir nsilocalfile the location of the profile local directory, which may be the same as the root directory.
... see nsiprofilelock.localdirectory().
... rootdir nsilocalfile the location of the profile directory.
nsIToolkitProfileService
method overview nsitoolkitprofile createprofile(in nsilocalfile arootdir, in autf8string aname); void flush(); nsitoolkitprofile getprofilebyname(in autf8string aname); nsiprofilelock lockprofilepath(in nsilocalfile adirectory, in nsilocalfile atempdirectory); attributes attribute type description profilecount unsigned long the number of user profiles currently in existence.
...nsitoolkitprofile createprofile( in nsilocalfile arootdir, in autf8string aname ); parameters arootdir the profile directory.
...nsiprofilelock lockprofilepath( in nsilocalfile adirectory, in nsilocalfile atempdirectory ); parameters adirectory the directory to lock as a profile directory.
The Valgrind Test Job
running the valgrind test job locally valgrind works best on linux.
... ac_add_options --enable-valgrind ac_add_options --disable-jemalloc running to run the valgrind test job locally, run the following command.
... when running locally, you may see errors that do not occur on the test machines.
MailNews Protocols
those protocols all have the following, defined in the corresponding protocol subdirectory of mailnews (i.e., mailnews/imap, mailnews/local (for pop3), mailnews/news): an incoming server class, which implements nsimsgincomingserver and inherits from mailnews/base/util/nsmsgincomingserver, i.e.., nspop3incomingserver, nsimapincomingserver, nsnntpincomingserver.
...nsimapmailfolder, nsnewsfolder, nslocalmailfolder (for pop3) a service class, which generally sits between the folder object or the server object, and the protocol object.
...the message search code also has protocol-specific code to handle searching on the server, or local mailbox.
Activity Manager examples
nents.interfaces.nsiactivityprocess; const nsiae = components.interfaces.nsiactivityevent; const nsiam = components.interfaces.nsiactivitymanager; let gactivitymanager = components.classes["@mozilla.org/activity-manager;1"].getservice(nsiam); let process = components.classes["@mozilla.org/activity-process;1"].createinstance(nsiap); // assuming folder is an instance of nsimsgfolder interface // localization is omitted, initiator is not provided process.init("processing folder: " + folder.prettiestname, null); // note that we don't define a custom icon, default process icon // will be used process.contexttype = "account"; // group this activity by account process.contextobj = folder.server; // account in question gactivitymanager.addactivity(process); // step 2: showing som...
...e progress let percent = 50; process.setprogress(percent, "junk processing 25 of 50 messages", 25, 50); // step 3: removing the process and adding an event using process' attributes process.state = components.interfaces.nsiactivityprocess.state_completed; gactivitymanager.removeactivity(process.id); let event = components.classes["@mozilla.org/activity-event;1"].createinstance(nsiae); // localization is omitted, initiator is omitted event.init(folder.prettiestname + " is processed", null, "no junk found", process.starttime, // start time date.now()); // completion time event.contexttype = process.contexttype; // optional event.contextobj = process.contextobj; // optional gactivitymanager.addactivity(event); showing a user-defined act...
...} sendercontextdisplayhelper.prototype = { getcontextdisplaytext: function(contexttype, contextobj) { // in this particular example we know that contexttype is "sender" // since we also pass the contexttype along with the contextobject // in some cases, one helper can be registered for a group of context types // we know that the context object is the author of the message // localization is omitted return "messages coming from " + contextobj.surname + ", " + contextobj.firstname; } } // step 2: register the helper for this context type gactivitymanager.registercontextdisplayhelper("sender", new sendercontextdisplayhelper()); // step 3: create the process ...
Access StringBundle from Overlay
stringbundles are handy for localizing your project by removing all of your strings into a separate, easy to access text file.
...the most efficient way to append these strings is by attaching them to an existing stringbundleset as such: <stringbundleset id="stringbundleset"> <stringbundle src="chrome://your_extension/locale/overlay.properties" id="your-extension-strings" /> </stringbundleset> now that your stringbundle is attached you can access it from javascript as follows: var str = document.getelementbyid("your-extension-strings"); //get the stringbundle object itself str.getstring("propertyname"); //get a string (and do something with it) alternative way let stringbundleservice = cc["@mozilla.org/intl/stringbundle;1"].getservice(ci.nsistringbundleservice); let bundle = strin...
...gbundleservice.createbundle("chrome://your_extension/locale/overlay.properties"); let str = bundle.getstringfromname("propertyname"); see nsistringbundleservice ...
Using the Multiple Accounts API
incoming servers preference: mail.server.server.type : string id of the server type: pop3, nntp, imap, or local preference: mail.server.server.hostname - hostname of the server preference: mail.server.server.username - user login name preference: mail.server.server.password - user login password preference: mail.server.server.check_new_mail - boolean, should we check for new mail on a regular basis?
...- boolean, should we download new messags on biff (true) or just alert user that there is new mail (false) preference: mail.server.server.directory - local platform-specific path to store messages and folder indexes preference: mail.server.server.name - user-visible name of server the following are specific to imap: preference: mail.server.server.admin_url - administration url for server preference: mail.server.server.using_subscription - boolean, should we use subscriptions?
... preference: mail.server.server.delete_mail_left_on_server - boolean, when we delete a message locally, should we delete that message on the server?
Add to iPhoto
var elemname = node.localname.touppercase(); if (elemname == "img") { return node; } // nope, return null return null; } this starts by getting the node the popup was opened from.
... downloading the image the downloadimage() method handles actually downloading the image to a temporary file; it then returns the local pathname of the downloaded file to the caller.
...then we call createunique() to create a unique file by that name (or a derivative thereof if the name is already in use), and download the contents of the image file to that local file.
URLs - Plugins
the data to post can be contained either in a local temporary file or a new memory buffer.
... the buf parameter identifies a local temporary file or data buffer that contains the data to post.
...this example uploads a file from the root of the local file system to an ftp server and displays the response in a frame named response: char* mydata = "file:///c\/mydirectory/myfilename"; uint32 mylength = strlen(mydata) + 1; err = npn_posturl(instance, "ftp://fred@ftp.example.com/pub/", "response", mylength, mydata, true); sending mail a plug-in can send an email message using npn_posturl or npn_posturlnotify.
Attr.namespaceURI - Web APIs
WebAPIAttrnamespaceURI
syntax namespace = attribute.namespaceuri example in this snippet, an attribute is being examined for its localname and its namespaceuri.
... if the namespaceuri returns the xul namespace and the localname returns "browser", then the node is understood to be a xul <browser/>.
... if (attribute.localname == "value" && attribute.namespaceuri == "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul") { // this is a xul value } notes this is not a computed value that is the result of a namespace lookup based on an examination of the namespace declarations in scope.
Attr - Web APIs
WebAPIAttr
localname read only a domstring representing the local part of the qualified name of the attribute.
... note: dom level 3 defined namespaceuri, localname and prefix on the node interface.
... obsolete moved namespaceuri, prefix and localname from node to this api and removed ownerelement, schematypeinfo and isid.
Document.getElementsByTagNameNS() - Web APIs
name is either the local name of elements to look for or the special value *, which matches all elements (see element.localname).
...v1 element</button><br /> <button onclick="div2paraelems();"> show all p elements in div2 element</button> </body> </html> potential workaround for other browsers which do not support if the desired browser did not support xpath, another approach (such as traversing the dom through all its children, identifying all @xmlns instances, etc.) would be necessary to find all tags with the desired local name and namespace, but xpath is much faster.
... (to accommodate explorer, one could call an xpath wrapper instead of the xpath in the function below (as explorer supports xpath with a different api), such as this wrapper class.) function getelementsbytagnamenswrapper (ns, elname, doc, context) { if (!doc) { doc = document; } if (!context) { context = doc; } var result = doc.evaluate('//*[local-name()="'+elname+'" and namespace-uri() = "'+ns+'"]', context, null, xpathresult.ordered_node_snapshot_type, null); var a = []; for(var i = 0; i < result.snapshotlength; i++) { a[i] = result.snapshotitem(i); } return a; } specifications specification status comment domthe definition of 'document.getelementsbytagnamens' in that specification.
Document.lastModified - Web APIs
let olastmodif = new date(document.lastmodified); transforming lastmodified into milliseconds this example transforms lastmodified into the number of milliseconds since january 1, 1970, 00:00:00, local time.
...)), nlastmodif = date.parse(document.lastmodified); if (isnan(nlastvisit) || nlastmodif > nlastvisit) { document.cookie = "last_modif=" + date.now() + "; expires=fri, 31 dec 9999 23:59:59 gmt; path=" + location.pathname; if (isfinite(nlastvisit)) { alert("this page has been changed!"); } } note: webkit returns the time string in utc; gecko and internet explorer return a time in the local timezone.
... (see: bug 4363 – document.lastmodified returns date in utc time, but should return it in local time) if you want to know whether an external page has changed, please read this paragraph about the xmlhttprequest() api.
Element.namespaceURI - Web APIs
syntax namespace = element.namespaceuri example in this snippet, an element is being examined for its localname and its namespaceuri.
... if the namespaceuri returns the xul namespace and the localname returns "browser", then the node is understood to be a xul <browser/>.
... if (element.localname == "browser" && element.namespaceuri == "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul") { // this is a xul browser } notes this is not a computed value that is the result of a namespace lookup based on an examination of the namespace declarations in scope.
IDBIndex - Web APIs
WebAPIIDBIndex
properties idbindex.isautolocale read only returns a boolean indicating whether the index had a locale value of auto specified upon its creation (see createindex()'s optionalparameters.) idbindex.locale read only returns the locale of the index (for example en-us, or pl) if it had a locale value specified upon its creation (see createindex()'s optionalparameters.) idbindex.name the name of this index.
...refix: webkitchrome android full support 25firefox android full support 22opera android full support 14safari ios full support 8samsung internet android full support 1.5isautolocale experimentalnon-standardchrome no support noedge no support nofirefox full support 43ie no support noopera no support nosafari no support ...
...ndor prefix: webkitchrome android full support 25firefox android full support 22opera android full support 14safari ios full support 8samsung internet android full support 1.5locale experimentalnon-standardchrome no support noedge no support nofirefox full support 43ie no support noopera no support nosafari no support ...
IDBObjectStore.createIndex() - Web APIs
locale currently firefox-only (43+), this allows you to specify a locale for the index.
... any sorting operations performed on the data via key ranges will then obey sorting rules of that locale (see locale-aware sorting.) you can specify its value in one of three ways: string: a string containing a specific locale code, e.g.
... auto: the platform default locale will be used (may be changed by user agent settings.) null or undefined: if no locale is specified, normal javascript sorting will be used — not locale-aware.
Browser storage limits and eviction criteria - Web APIs
there are a number of web technologies that store data of one kind or another on the client-side (i.e., on your local disk).
...this article describes how browsers determine what local content to purge and when in order to free up needed local storage space.
...local storage data and cookies are still stored, but they are ephemeral — the data is deleted when you close the last private browsing window.
IndexedDB API - Web APIs
if you'd prefer a simple api, try libraries such as localforage, dexie.js, zangodb, pouchdb, idb, idb-keyval, jsstore and lovefield that make indexeddb more programmer-friendly.
...on your local disk).
... idblocaleawarekeyrange defines a key range that can be used to retrieve data from a database in a certain range, sorted according to the rules of the locale specified for a certain index (see createindex()'s optionalparameters.).
KeyboardEvent - Web APIs
keyboardevent.locale read only returns a domstring representing a locale string indicating the locale the keyboard is configured for.
... this may be the empty string if the browser or device doesn't know the keyboard's locale.
... note: this does not describe the locale of the data being entered.
NamedNodeMap - Web APIs
namednodemap.getnameditemns() returns a attr identified by a namespace and related local name.
... namednodemap.setnameditemns() replaces, or adds, the attr identified in the map by the given namespace and related local name.
... namednodemap.removenameditemns() removes the attr identified by the given namespace and related local name.
Node.namespaceURI - Web APIs
WebAPINodenamespaceURI
syntax namespace = node.namespaceuri example in this snippet, a node is being examined for its node.localname and its namespaceuri.
... if the namespaceuri returns the xul namespace and the localname returns "browser", then the node is understood to be a xul <browser/>.
... if (node.localname == "browser" && node.namespaceuri == "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul") { // this is a xul browser } notes this is not a computed value that is the result of a namespace lookup based on an examination of the namespace declarations in scope.
RTCIceTransport: selectedcandidatepairchange event - Web APIs
the pair of candidates is in turn described by an rtcicecandidatepair object which contains one rtcicecandidate representing the local end of the connection, and another representing the remote end of the connection.
... let icetransport = pc.getsenders[0].transport.icetransport; let localprotoelem = document.getelementbyid("local-protocol"); let remoteprotoelem = document.getelementbyid("remote-protocol"); icetransport.addeventlistener("selectedcandidatepairchange", ev => { let pair = icetransport.getselectedcandidatepair(); localprotoelem.innertext = pair.local.protocol.touppercase(); remoteprotoelem.innertext = pair.remote.protocol.touppercase(); }, false) this can also ...
... let icetransport = pc.getsenders[0].transport.icetransport; let localprotoelem = document.getelementbyid("local-protocol"); let remoteprotoelem = document.getelementbyid("remote-protocol"); icetransport.onselectedcandidatepairchange = ev => { let pair = icetransport.getselectedcandidatepair(); localprotoelem.innertext = pair.local.protocol.touppercase(); remoteprotoelem.innertext = pair.remote.protocol.touppercase(); } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'selectedcandidatepairchange' in that specification.
RTCIceTransport - Web APIs
getlocalcandidates() returns an array of rtcicecandidate objects, each describing one of the ice candidates that have been gathered so far for the local device.
... getlocalparameters() returns a rtciceparameters object describing the ice parameters established by a call to the rtcpeerconnection.setlocaldescription() method.
... getremotecandidates() returns an array of rtcicecandidate objects, one for each of the remote device's ice candidates that have been received by the local end of the rtcpeerconnection and delivered to ice by calling addicecandidate().
RTCPeerConnection() - Web APIs
the rtcpeerconnection() constructor returns a newly-created rtcpeerconnection, which represents a connection between the local device and a remote peer.
...you may find in some cases that connections can be established more quickly by allowing the ice agent to start fetching ice candidates before you start trying to connect, so that they're already available for inspection when rtcpeerconnection.setlocaldescription() is called.
...if this isn't specified, the connection attempt will be made with no stun or turn server available, which limits the connection to local peers.
RTCPeerConnection.getStreamById() - Web APIs
the rtcpeerconnection.getstreambyid() method returns the mediastream with the given id that is associated with local or remote end of the connection.
... this property has been replaced with the rtcpeerconnection.getlocalstreams and rtcpeerconnection.getremotestreams properties.
... // from: https://bugs.chromium.org/p/chromium/issues/detail?id=698163&desc=5#c10 rtcpeerconnection.prototype.getstreambyid = function(id) { try { var localstreams = this.getlocalstreams(); var remotestreams = this.getremotestreams(); var i; for (i = 0; i < localstreams.length; i++) { if (localstreams[i].id == id) return localstreams[i]; } for (i = 0; i < remotestreams.length; i++) { if (remotestreams[i].id == id) return remotestreams[i]; } } catch(e) {} return null; } ...
RTCPeerConnection.onnegotiationneeded - Web APIs
example this example, derived from the example in signaling and video calling, establishes a handler for negotiationneeded events to handle creating an offer, configuring the local end of the connection, and sending the offer to the remote peer.
... pc.onnegotiationneeded = function() { pc.createoffer().then(function(offer) { return pc.setlocaldescription(offer); }) .then(function() { // send the offer to the remote peer through the signaling server }); }) .catch(reporterror); } first, it creates the offer by calling createoffer().
... when that succeeds, the offer is passed into setlocaldescription() to set the local description for the connection.
RTCPeerConnection.onsignalingstatechange - Web APIs
the function receives as input the event object of type event; this event is sent when the peer connection's signalingstate changes, which may happen either because of a call to setlocaldescription() or to setremotedescription().
...ndler for the signalingstatechange event using addeventlistener(): myrtcpeerconnection.addeventlistener("signalingstatechange", mysignalingstatechangehandler); or, using an anonymous (inline) handler: myrtcpeerconnection.addeventlistener("signalingstatechange", event => { /* handle the event here */ }); example this snippet shows a handler for signalingstatechange that looks for the "have-local-pranswer" signaling state—indicating that a remote offer has been received and a local description of type "pranswer" has been applied in response.
... pc.onsignalingstatechange = function(event) { if (pc.signalingstate === "have-local-pranswer") { // setlocaldescription() has been called with an answer } }; specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection.onsignalingstatechange' in that specification.
RTCRemoteOutboundRtpStreamStats.remoteTimestamp - Web APIs
this differs from timestamp, which indicates the time at which the statistics were generated or received locally.
...this is different from the value timestamp, which gives the time at which the statistics were generated or received by the local peer.
...keep in mind that this means the clock may not be synchronized with the local clock, and that both the current time and the pace at which the clock runs may differ to some extent.
RTCRemoteOutboundRtpStreamStats - Web APIs
localid a domstring which is used to find the local rtcinboundrtpstreamstats object which shares the same synchronization source (ssrc).
...this is different from the timestamp found in the base rtcstats dictionary; it represents the time at which the object's statistics were received or generated by the local endpoint.
...be aware that the remote clock may not be synchronized with the local clock (either in current time or speed at which time elapses).
RTCSessionDescription() - Web APIs
this constructor has been deprecated because rtcpeerconnection.setlocaldescription() and other methods which take sdp as input now directly accept an object conforming to the rtcsessiondescriptioninit dictionary, so you don't have to instantiate an rtcsessiondescription yourself.
... this is no longer necessary, however; rtcpeerconnection.setlocaldescription() and other methods which take sdp as input now directly accept an object conforming to the rtcsessiondescriptioninit dictionary, so you don't have to instantiate an rtcsessiondescription yourself.
... navigator.getusermedia({video: true}, function(stream) { pc.onaddstream({stream: stream}); // adding a local stream won't trigger the onaddstream callback pc.addstream(stream); pc.createoffer(function(offer) { pc.setlocaldescription(new rtcsessiondescription(offer), function() { // send the offer to a server to be forwarded to the friend you're calling.
RTCStats - Web APIs
WebAPIRTCStats
rtcstats is the foundation of all webrtc statistics objects rtcrtpstreamstats adds to rtcstats information that applies to all rtp endpoints (that is, both local and remote endpoints, and regardless of whether the endpoint is a sender or a receiver) rtcreceivedrtpstreamstats further adds statistics measured at the receiving end of an rtp stream, regardless of whether it's local or remote.
... rtcinboundrtpstreamstats contains statistics that can only be measured on a receiver at the local end of the rtp connection.
... rtcoutboundrtpstreamstats contains statistics about the local sending endpoint of an rtp stream.
RTCStatsReport - Web APIs
since this only provides statistics related to inbound data, without considering the local peer's state, any values that require knowledge of both, such as round-trip time, is not included.
... local-candidate an rtcicecandidatestats object giving statistics about an ice local candidate; these candidates are found in the output from rtcicetransport.getlocalcandidates().
... outbound-rtp the report is an rtcoutboundrtpstreamstats object providing statistics based on the local peer's outgoing data being sent to its peers.
RTCStatsType - Web APIs
since this only provides statistics related to inbound data, without considering the local peer's state, any values that require knowledge of both, such as round-trip time, is not included.
... local-candidate an rtcicecandidatestats object giving statistics about an ice local candidate; these candidates are found in the output from rtcicetransport.getlocalcandidates().
... outbound-rtp the report is an rtcoutboundrtpstreamstats object providing statistics based on the local peer's outgoing data being sent to its peers.
Storage.removeItem() - Web APIs
the storage interface of the web storage api provides access to a particular domain's session or local storage.
... example the following function creates three data items inside local storage, then removes the image data item.
... function populatestorage() { localstorage.setitem('bgcolor', 'red'); localstorage.setitem('font', 'helvetica'); localstorage.setitem('image', 'mycat.png'); localstorage.removeitem('image'); } we can do the same for the session storage.
Writing WebSocket servers - Web APIs
browsers generally require a secure connection for websockets, although they may offer an exception for local devices.
...extensions are optional and generalized (like compression); subprotocols are mandatory and localized (like ones for chat and for mmorpg games).
...the recipient will eventually be able to get the same data as your local copy, but it is sent differently.
Window - Web APIs
WebAPIWindow
window.localstorage read only returns a reference to the local storage object used to store data that may only be accessed by the origin that created it.
... windoweventhandlers.onstorage called when there is a change in session storage or local storage.
... storage fired when a storage area (localstorage or sessionstorage) has been modified in the context of another document.
Using XMLHttpRequest - Web APIs
*/, "yourpage.html"); oreq.onload = getheadertime; oreq.send(); do something when last modified date changes let's create two functions: function getheadertime () { var nlastvisit = parsefloat(window.localstorage.getitem('lm_' + this.filepath)); var nlastmodif = date.parse(this.getresponseheader("last-modified")); if (isnan(nlastvisit) || nlastmodif > nlastvisit) { window.localstorage.setitem('lm_' + this.filepath, date.now()); isfinite(nlastvisit) && this.callback(nlastmodif, nlastvisit); } } function ifhaschanged(surl, fcallback) { var oreq = new xmlhttprequest(); oreq.open("h...
...*/ ifhaschanged("yourpage.html", function (nmodif, nvisit) { console.log("the page '" + this.filepath + "' has been changed on " + (new date(nmodif)).tolocalestring() + "!"); }); if you want to know if the current page has changed, please read the article about document.lastmodified.
...for example: http://foo.com/bar.html -> http://foo.com/bar.html?12345 http://foo.com/bar.html?foobar=baz -> http://foo.com/bar.html?foobar=baz&12345 as the local cache is indexed by url, this causes every request to be unique, thereby bypassing the cache.
XRSessionInit - Web APIs
default features immersive sessions all immersive (both immersive-vr and immersive-ar) sessions support both the viewer and local reference spaces.
... because immersive sessions are required to support the local reference space, any request to open an immersive xrsession is required to obtain explicit or implicit user consent.
...by session type, those are: reference space type user consent rquirement feature policy requirement bounded-floor always required xr-spatial-tracking local always required for inline sessions xr-spatial-tracking local-floor always required xr-spatial-tracking unbounded always required xr-spatial-tracking viewer always required — ...
XSLTProcessor - Web APIs
the resultant object depends on the output method of the stylesheet: output method result type html htmldocument xml xmldocument text xmldocument with a single root element <transformiix:result> with the text as a child [throws] void xsltprocessor.setparameter(string namespaceuri, string localname, any value) sets a parameter in the xslt stylesheet that was imported.
... [throws] any xsltprocessor.getparameter(string namespaceuri, string localname) gets the value of a parameter from the xslt stylesheet.
... [throws] void xsltprocessor.removeparameter(string namespaceuri, string localname) removes the parameter if it was previously set.
z-index - CSS: Cascading Style Sheets
WebCSSz-index
whether the box establishes a local stacking context.
... values auto the box does not establish a new local stacking context.
...the box also establishes a local stacking context in which its stack level is 0.
Index - Developer guides
WebGuideIndex
28 guide to web apis api, guide, landing, web the web includes a wide array of apis that can be used from javascript to build increasingly more powerful and capable applications, running either on the web, locally, or through technology such as node.js, on a server.
... 31 localizations and character encodings character encodings, html, localization, needsmarkupwork browsers process text as unicode internally.
... 40 the unicode bidirectional text algorithm algorithm, bidi, guide, internationalization, introduction, localization, text, unicode, direction, i18n, l10n, ltr, rtl the unicode® bidirectional algorithm (also known as the bidi algorithm) is part of the unicode text standard that describes how the user agent should order characters while rendering unicode text.
<input type="date"> - HTML: Hypertext Markup Language
WebHTMLElementinputdate
the time and datetime-local input types support time and date+time input.
... you can set a default value for the input with a date inside the value attribute, like so: <input type="date" value="2017-06-01"> the displayed date format will differ from the actual value — the displayed date is formatted based on the locale of the user's browser, but the parsed value is always formatted yyyy-mm-dd.
... using date inputs date inputs sound convenient — they provide an easy interface for choosing dates, and they normalize the data format sent to the server regardless of the user's locale.
Using HTTP cookies - HTTP
WebHTTPCookies
modern apis for client storage are the web storage api (localstorage and sessionstorage) and indexeddb.
... there may be other regulations governing the use of cookies in your locality.
...the window.sessionstorage and window.localstorage properties correspond to session and permanent cookies in duration, but have larger storage limits than cookies, and are never sent to a server.
Accept-Language - HTTP
the accept-language request http header advertises which languages the client is able to understand, and which locale variant is preferred.
...the content of the accept-language is often out of the control of the user (like when traveling and using an internet cafe in a different country); the user may also want to visit a page in another language than the locale of their user interface.
... syntax accept-language: <language> accept-language: * // multiple types, weighted with the quality value syntax: accept-language: fr-ch, fr;q=0.9, en;q=0.8, de;q=0.7, *;q=0.5 directives <language> a language tag (which is sometimes referred to as a "locale identifier").
JavaScript modules - JavaScript
note: if you want to download the examples and run them locally, you'll need to run them through a local web server.
... other differences between modules and standard scripts you need to pay attention to local testing — if you try to load the html file locally (i.e.
... if you try to load the html file locally (i.e.
Inheritance and the prototype chain - JavaScript
{ constructor: ƒ dosomething(), __proto__: { constructor: ƒ object(), hasownproperty: ƒ hasownproperty(), isprototypeof: ƒ isprototypeof(), propertyisenumerable: ƒ propertyisenumerable(), tolocalestring: ƒ tolocalestring(), tostring: ƒ tostring(), valueof: ƒ valueof() } } we can add properties to the prototype of dosomething(), as shown below.
... function dosomething(){} dosomething.prototype.foo = "bar"; console.log( dosomething.prototype ); this results in: { foo: "bar", constructor: ƒ dosomething(), __proto__: { constructor: ƒ object(), hasownproperty: ƒ hasownproperty(), isprototypeof: ƒ isprototypeof(), propertyisenumerable: ƒ propertyisenumerable(), tolocalestring: ƒ tolocalestring(), tostring: ƒ tostring(), valueof: ƒ valueof() } } we can now use the new operator to create an instance of dosomething() based on this prototype.
...instancing ); this results in an output similar to the following: { prop: "some value", __proto__: { foo: "bar", constructor: ƒ dosomething(), __proto__: { constructor: ƒ object(), hasownproperty: ƒ hasownproperty(), isprototypeof: ƒ isprototypeof(), propertyisenumerable: ƒ propertyisenumerable(), tolocalestring: ƒ tolocalestring(), tostring: ƒ tostring(), valueof: ƒ valueof() } } } as seen above, the __proto__ of dosomeinstancing is dosomething.prototype.
Warning: String.x is deprecated; use String.prototype.x instead - JavaScript
warning: string.endswith is deprecated; use string.prototype.endswith instead warning: string.includes is deprecated; use string.prototype.includes instead warning: string.indexof is deprecated; use string.prototype.indexof instead warning: string.lastindexof is deprecated; use string.prototype.lastindexof instead warning: string.localecompare is deprecated; use string.prototype.localecompare instead warning: string.match is deprecated; use string.prototype.match instead warning: string.normalize is deprecated; use string.prototype.normalize instead warning: string.replace is deprecated; use string.prototype.replace instead warning: string.search is ...
...rning: string.split is deprecated; use string.prototype.split instead warning: string.startswith is deprecated; use string.prototype.startswith instead warning: string.substr is deprecated; use string.prototype.substr instead warning: string.substring is deprecated; use string.prototype.substring instead warning: string.tolocalelowercase is deprecated; use string.prototype.tolocalelowercase instead warning: string.tolocaleuppercase is deprecated; use string.prototype.tolocaleuppercase instead warning: string.tolowercase is deprecated; use string.prototype.tolowercase instead warning: string.touppercase is deprecated; use string.prototype.touppercase instead warning: string.trim is de...
...he // getownpropertynames() method is non-shimable: // object.getownpropertynames(string).filter(function(methodname) { // return typeof string[methodname] === 'function'; // }); methods = [ 'contains', 'substring', 'tolowercase', 'touppercase', 'charat', 'charcodeat', 'indexof', 'lastindexof', 'startswith', 'endswith', 'trim', 'trimleft', 'trimright', 'tolocalelowercase', 'normalize', 'tolocaleuppercase', 'localecompare', 'match', 'search', 'slice', 'replace', 'split', 'substr', 'concat', 'localecompare' ], methodcount = methods.length, assignstringgeneric = function(methodname) { var method = string.prototype[methodname]; string[methodname] = function(arg1) { return method.apply(arg1, array.prototype.slice.c...
Function - JavaScript
when running them, they will only be able to access their own local variables and global ones, not the ones from the scope in which the function constructor was created.
... var x = 10; function createfunction1() { var x = 20; return new function('return x;'); // this |x| refers global |x| } function createfunction2() { var x = 20; function f() { return x; // this |x| refers local |x| above } return f; } var f1 = createfunction1(); console.log(f1()); // 10 var f2 = createfunction2(); console.log(f2()); // 20 while this code works in web browsers, f1() will produce a referenceerror in node.js, as x will not be found.
... this is because the top-level scope in node is not the global scope, and x will be local to the module.
Intl.ListFormat() constructor - JavaScript
syntax new intl.listformat([locales[, options]]) parameters locales optional.
...for the general form and interpretation of the locales argument, see the intl page.
...an object with some or all of the following properties: localematcher the locale matching algorithm to use.
let - JavaScript
the let statement declares a block-scoped local variable, optionally initializing it to a value.
... description let allows you to declare variables that are limited to the scope of a block statement, or expression on which it is used, unlike the var keyword, which defines a variable globally, or locally to an entire function regardless of block scope.
...ng.prototype.showpublic = function() { return this.someproperty; }; thing.prototype.showprivate = function() { return privatescope.get(this).hidden; }; } console.log(typeof privatescope); // "undefined" var thing = new thing(); console.log(thing); // thing {someproperty: "foo"} thing.showpublic(); // "foo" thing.showprivate(); // 1 the same privacy pattern with closures over local variables can be created with var, but those need a function scope (typically an iife in the module pattern) instead of just a block scope like in the example above.
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.
... initialization of several variables var x = 0; function f() { var x = y = 1; // declares x locally; declares y globally.
...console.log(x, z); // 3 5 console.log(typeof y); // "undefined", as y is local to function a specifications specification ecmascript (ecma-262)the definition of 'variable statement' in that specification.
Digital audio concepts - Web media technologies
factors such as the ability to sense the change in frequency of a sound, the overall range of human hearing versus the frequencies of the audio signal, audio localization, and so forth all can be considered by a codec.
... intensity stereo coding intensity stereo coding reduces the encoded audio bit rate by taking advantage of the way humans determine the location of sounds in space; this is called sound localization.
...eventually, the wavelength approaches then exceeds the distance between the ears, and it becomes difficult or impossible to unambiguously localize the sound.
Web video codec guide - Web media technologies
some lossless codecs do exist, but they are typically used for archival and storage for local playback rather than for use on a network.
...block motion compensation handles localized changes, looking for smaller sections of the image that can be encoded using motion compensation.
...this bit rate is obviously not realistic for network transmission and would likely only be used locally.
Introduction to using XPath in JavaScript - XPath
while one can adapt the approach in the above section to test for namespaced elements regardless of the prefix chosen (using local-name() in combination with namespace-uri() instead of name()), a more challenging situation occurs, however, if one wishes to grab an element with a particular namespaced attribute in a predicate (given the absence of implementation-independent variables in xpath 1.0).
... for example, one might try (incorrectly) to grab an element with a namespaced attribute as follows: var xpathlink = someelements[local-name(@*)="href" and namespace-uri(@*)='http://www.w3.org/1999/xlink']; this could inadvertently grab some elements if one of its attributes existed that had a local name of "href", but it was a different attribute which had the targeted (xlink) namespace (instead of @href).
... in order to accurately grab elements with the xlink @href attribute (without also being confined to predefined prefixes in a namespace resolver), one could obtain them as follows: var xpathels = 'someelements[@*[local-name() = "href" and namespace-uri() = "http://www.w3.org/1999/xlink"]]'; // grabs elements with any single attribute that has both the local name 'href' and the xlink namespace var thislevel = xml.evaluate(xpathels, xml, null, xpathresult.any_type, null); var thisitemel = thislevel.iteratenext(); xpathresult defined constants result type defined constant value description any_type 0 a result set containing whatever type naturally results from the evaluation of the expression.
Compiling a New C/C++ Module to WebAssembly - WebAssembly
take a copy of the following simple c example, and save it in a file called hello.c in a new directory on your local drive: #include <stdio.h> int main(int argc, char ** argv) { printf("hello world\n"); } now, using the terminal window you used to enter the emscripten compiler environment, navigate to the same directory as your hello.c file, and run the following command: emcc hello.c -s wasm=1 -o hello.html the options we’ve passed in with the command are as follows: -s wasm=1 — specifi...
...it is enabled by default in firefox 52+ and chrome 57+/latest opera (you can also run wasm code in firefox 47+ by enabling the javascript.options.wasm flag in about:config, or chrome (51+) and opera (38+) by going to chrome://flags and enabling the experimental webassembly flag.) note: if you try to open generated html file (hello.html) directly from your local hard drive (e.g.
...you need to run your html file through an http server (http://) — see how do you set up a local testing server?
Using the WebAssembly JavaScript API - WebAssembly
grab our simple.wasm file and save a copy in a new directory on your local machine.
... make a local copy of memory.wasm in the same directory as before.
... make a local copy of table.wasm in a new directory.
Interacting with page scripts - Archive of obsolete content
the "main.js" opens the local file "page.html" and attaches a content script to it: // main.js var tabs = require("sdk/tabs"); var self = require("sdk/self"); tabs.open({ url: self.data.url("page.html"), onready: attachscript }); function attachscript(tab) { tab.attach({ contentscriptfile: self.data.url("content-script.js") }); } the content script defines an object and assigns it to unsafewindow twice: the ...
...the "main.js" opens the local file "page.html" and attaches a content script to it: // main.js var tabs = require("sdk/tabs"); var self = require("sdk/self"); tabs.open({ url: self.data.url("page.html"), onready: attachscript }); function attachscript(tab) { tab.attach({ contentscriptfile: self.data.url("content-script.js") }); } the content script defines a function greetme() and exports it to the page scrip...
context-menu - Archive of obsolete content
contentscriptfile string,array if the item is contained in the top-level context menu, this is the local file url of the content script or an array of such urls that the item can use to interact with the page.
... contentscriptfile string,array if the menu is contained in the top-level context menu, this is the local file url of the content script or an array of such urls that the menu can use to interact with the page.
panel - Archive of obsolete content
this can point to local content loaded from your add-on's "data" directory or remote content.
... contentscriptfile a local file url or an array of local file urls of content scripts to load.
loader/sandbox - Archive of obsolete content
load scripts this module provides a limited api for loading scripts from local urls.
...it must be a local chrome:, resource:, file: or data: url.
net/xhr - Archive of obsolete content
it also has unfettered access to any local area networks, vpns, and the internet.
... if access to local area networks isn't prevented, malicious code could access sensitive data.
Low-Level APIs - Archive of obsolete content
fs/path provides access to the local filesystem with the nodejs path module api.
... io/file provides access to the local filesystem.
jpmignore - Archive of obsolete content
for example: .* * !/data/** !/lib/** !/locale/** !/node_modules/** !/package.json !/icon.png !/icon64.png !/copying !/bootstrap.js !/install.rdf this would include all editor backup files and similar in the whitelisted subdirectories, to avoid that you can append another blacklist after the whitelist.
... this one would work for xemacs: .* * !/data/** !/lib/** !/locale/** !/node_modules/** !/package.json !/icon.png !/icon64.png !/copying !/bootstrap.js !/install.rdf *~ \#* ...
Downloading Files - Archive of obsolete content
downloading files to download a file, create an instance of nsiwebbrowserpersist and call its nsiwebbrowserpersist.saveuri() method, passing it a url to download and an nsifile instance representing the local file name/path.
... var bstream = components.classes["@mozilla.org/binaryinputstream;1"] .createinstance(components.interfaces.nsibinaryinputstream); bstream.setinputstream(stream); var size = 0; var file_data = ""; while(size = bstream.available()) { file_data += bstream.readbytes(size); } return file_data; } see also nsidownloadprogresslistener saving an arbitrary url to a local file customizing the download progress bar appearance ...
LookupPrefix - Archive of obsolete content
lement.namespaceuri === namespaceuri && originalelement.prefix && originalelement.lookupnamespaceuri(originalelement.prefix) === namespaceuri) { return originalelement.prefix; } if (originalelement.attributes && originalelement.attributes.length) { for (var i=0; i < originalelement.attributes.length; i++) { var att = originalelement.attributes[i]; xmlnspattern.lastindex = 0; var localname = att.localname || att.name.substr(att.name.indexof(':')+1); // latter test for ie which doesn't support localname if (localname.indexof(':') !== -1) { // for firefox when in html mode localname = localname.substr(att.name.indexof(':')+1); } if ( xmlnspattern.test(att.name) && att.value === namespaceuri && lookupnamespaceuri(originalelement, localname) === namespaceur...
...i ) { return localname; } } } if (originalelement.parentnode) { // entityreferences may have to be skipped to get to it return _lookupnamespaceprefix(namespaceuri, originalelement.parentnode); } return null; } ...
Miscellaneous - Archive of obsolete content
these properties can be accessed from javascript in the following manner: var common = { _bundle: components.classes["@mozilla.org/intl/stringbundle;1"] .getservice(components.interfaces.nsistringbundleservice) .createbundle("chrome://myext/locale/myext.properties"), getlocalizedmessage: function(msg) { return this._bundle.getstringfromname(msg); } }; alert(common.getlocalizedmessage("invalid.url")) another similar alternative (using both getstringfromname and formatstringfromname), is: var fcbundle = components.classes["@mozilla.org/intl/stringbundle;1"] .getservice(components.interf...
...aces.nsistringbundleservice) .createbundle("chrome://myext/locale/myext.properties"); function getstr(msg, args){ //get localised message if (args){ args = array.prototype.slice.call(arguments, 1); return fcbundle.formatstringfromname(msg,args,args.length); } else { return fcbundle.getstringfromname(msg); } } /* usage */ alert(getstr("invalid.url", "http://bad/url/", "3")); //for message with parameters alert(getstr("invalid.url")); //for message without parameters getting postdata of a webpage first, you need to get the browser you want, and its historysession.
getAttributeNS - Archive of obsolete content
ns === 'http://www.w3.org/xml/1998/namespace') { // this is assumed so don't try to get an xmlns for the 'xml' prefix return thisitem.getattribute('xml:'+nsatt); // prefix must be 'xml' per the specs } var attrs2, result; var attrs = thisitem.attributes; var prefixatt = new regexp('^(.*):'+nsatt.replace(/\./g, '\\.')+'$'); // e.g., xlink:href // find any prefixes with the local-name being searched (escape period since only character (besides colon) allowed in an xml name which needs escaping) for (var j = 0; j < attrs.length; j++) { // thisitem's atts // e.g., abc:href, xlink:href while (((result = prefixatt.exec(attrs[j].nodename)) !== null) && thisitem.nodename !== '#document' && thisitem.nodename !== '#document-fragment') { ...
... var xmlnsprefix = new regexp('^xmlns:'+result[1]+'$'); // e.g., xmnls:xl, xmlns:xlink // check higher up for xmlns:prefix // check the current node and if necessary, check for the next matching local name up in the hierarchy (until reaching the document root) while (thisitem.nodename !== '#document' && thisitem.nodename !== '#document-fragment') { attrs2 = thisitem.attributes; for (var i = 0; i < attrs2.length; i++) { // search for any prefixed xmlns declaration on thisitem which match prefixes found above with desired local name if (attrs2[i].nodename.match(xmlnsprefix) && attrs2[i].nodevalue === ns ) { // e.g., 'xmlns:xlink' and 'http://www.w3.org/1999/xlink' return attrs...
Handling Preferences - Archive of obsolete content
if you need to refer to the term "preference" in any of your locale files, you must change the string depending on the operating system.
...in the past we have used this directory to store xslt files for xml transformations and local storage template files (more on this later).
Setting Up a Development Environment - Archive of obsolete content
adding: install.rdf (deflated 50%) adding: chrome.manifest (deflated 50%) adding: content/browseroverlay.js (deflated 42%) adding: content/browseroverlay.xul (deflated 69%) adding: skin/browseroverlay.css (stored 0%) adding: locale/browseroverlay.dtd (deflated 52%) adding: locale/browseroverlay.properties (stored 0%) creating xpi file.
...for instance, you may want to test your extension in firefox 3.5 and firefox 3.6, or test it in a localized version of firefox.
Add-ons - Archive of obsolete content
so there may be still some reference to the xuldev website (we want to host source code on mdc, not on xuldev), and to japanese things (like some specific locales, which have been translated to french since non-latin characters are not well supported).
...well, xul overlays and windows, jsm files, chrome & resource mappings with localization, default preferences, but no xpcom components of your own.
JXON - Archive of obsolete content
in order to avoid conflicts, the representation of nodes and attributes names is case insensitive (always rendered in lower case), so objects' local property names set using javascript must always have some kind of capitalization (that is, at least one capital letter somewhere in their names), as you can see below.
... qualifiednamestr optional is a domstring containing the qualified name, that is an optional prefix and colon plus the local root element name, of the document to be created.
Conclusion - Archive of obsolete content
to test it, try installing the extension on a fresh copy of mozilla by loading the file in your mozilla browser (this works whether you load it from the web or from your local hard drive via a file:/// url).
... mozilla has a fourth ui layer--localized text--that wasn't discussed in the tutorial because there is no text to localize.
Menu - Archive of obsolete content
ArchiveMozillaJetpackUIMenu
if many features' menus are local to one area, the user need not hunt and peck through many menus trying to find a particular item of a feature.
... 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.
Makefile.mozextension.2 - Archive of obsolete content
either remove (clean it), or choose individual targets to build."; exit 1; } @echo $(mkdir) $(project) $(mkdir) $(project)/content $(project)/locale $(project)/locale/en-us $(project)/components/ $(project)/defaults/ $(project)/defaults/preferences/ $(project)/locale/de-de $(project)/skin make_xpi: $(mkdir) $(project)/chrome && \ cd $(project) && \ $(zipprog) -r chrome/$(project).jar content locale skin && \ $(zipprog) -r $(project).xpi chrome.manifest install.rdf components defaults chrome && cd ..
...real_install: $(cp) chrome/$(project).jar ~/.mozilla/default/32p27fdr.slt/chrome/ #################################### ###### define chrome_manifest content $(project) content/ overlay chrome://browser/content/browser.xul chrome://$(project)/content/overlay.xul locale $(project) en-us locale/ skin $(project) classic/1.0 skin/ style chrome://global/content/customizetoolbar.xul chrome://$(project)/skin/overlay.css endef export chrome_manifest chrome.manifest: @echo generating $(project)/chrome.manifest @echo "$$chrome_manifest" > $(project)/chrome.manifest ###### #firefox {ec8030f7-c20a-464f-9b0e-13a3a9e97384} #thunderbird {3550f703-e582-4d05-9a08-453d0...
Modularization techniques - Archive of obsolete content
in parameters and local pointers interfaces that are passed in to a function and local copies of that interface pointer are assumed to be in the lifetime of the calling function, and do not need to have addref() called.
... nsresult tweekfoo(ifoo *afoo1, ifoo *afoo2) { ifoo local = afoo; if (afoo->bar() == ns_ok) { local = afoo2; } return local->boff(); } in-out parameters in-out parameters are used as both in parameters and out parameters.
Mozilla Application Framework - Archive of obsolete content
framework xul a comprehensive, cross-platform ui toolkit with an easy-to-learn xml language for defining ui structure, a schema for localization, and support for both native and cross-platform (using css) look and feel to make writing uis quick and painless.
... tools venkman a javascript debugger with support for breakpoints, conditional breakpoints, local variable inspection, watch variables, single step, stop on error, profile data collection, report generation, code reformatting (pretty printing), and more.
Plug-n-Hack Phase1 - Archive of obsolete content
for example: var manifest = {"detail":{"url":"http://localhost:8080/manifest"}}; var evt = new customevent('configuresectool', manifest); it is suggested that browsers wishing to support pnh restrict handling of customevents such that they’re ignored where the event happens outside of user initiated actions.
... an example manifest (for owasp zap) is: { "toolname":"owasp zap", "protocolversion":"0.2", "features":{ "proxy":{ "pac":"http://localhost:8080/proxy.pac", "cacert":"http://localhost:8080/other/core/other/rootcert/" }, "commands":{ "prefix":"zap", "manifest":"http://localhost:8080/other/mitm/other/service/" } } } the top level manifest includes optional links to a proxy pac and a root ca certificate.
RDF Datasource How-To - Archive of obsolete content
the file system datasource and local mail datasource are good examples of datasources that have been implemented this way.
...this is a space-separated list that may include internal xpcom datasource "identifiers" (as described above) and uris for local or remote rdf/xml documents.
Reading textual data - Archive of obsolete content
you can fallback to the default character encoding stored in preferences (intl.charset.default, a localized pref value) when reading from a file, the question is harder to answer.
... for the limited use case of reading lines from a local file, the following code using nsiscriptableunicodeconverter works.
File object - Archive of obsolete content
summary non-standard server-side object this object lets you work files and directories on the local filesystem, and create os pipelines.
... file.tourl() returns a file:// url describing the file relative to the local file system.
Supporting private browsing mode - Archive of obsolete content
when private browsing mode is enabled, temporary, databases are created to be used for cookies and local storage; these databases are thrown away when private browsing mode is turned off, and the regular databases are re-activated.
... the temporary cookie and local storage databases start out empty.
Abc Assembler Tests - Archive of obsolete content
* * ***** end license block ***** */ function main() { getlocal0 pushscope findproperty start pushstring "instructions that start with the letter l" callpropvoid start 1 newfunction .function_id(runtest) getlocal0 call 0 findproperty end callpropvoid end 0 returnvoid } function runtest() { // test null <= null == true findproperty compare_stricteq pushstring "null lessequals null" // testname pushtrue /...
... lessequals // actual callpropvoid compare_stricteq 3 // use .try / .catch to catch typeerror // convert_o null .try { pushnull convert_o pop findproperty fail pushstring "convert_o null" pushstring "exception should have been thrown: typeerror: error #1009: cannot access a property or method of a null object reference." getlocal1 callpropvoid fail 3 jump finished_convert_o_null } .catch { getlocal0 pushscope setlocal2 // save typeerror findproperty compare_typeerror pushstring "convert_o null" // test name pushstring "typeerror: error #1009" // expected getlocal2 // actual callpropvoid compare_typeerror 3 } finished_conve...
Tamarin Build System Documentation - Archive of obsolete content
if buildbot is busy the queue is displayed http://tamarin-builds.mozilla.org/build_trigger/requestbuild.cfm the submitter of a sandbox build may remove a build request by clicking on the cancel button tamarin-redux builds are higher priority than sandbox builds, they cannot be removed but the most checkin including all new checkins are built how can i run buildbot scripts locally?
... the list of smoke tests are located in the tamarin-repository, test/run-smokes.txt, assume the start directory is test format is cd testdir; command to run test above the test should be a # comment describing why the test in the smokes, when test failed, possibly a bugzilla bug the tests can be run by following the above instructions for running buildbot scripts locally and executing the all/run-smoke-tests.sh as a rule any test failure should be immediately added to the top of the smoke test list so the list is prioritized how to exclude tests from acceptance or mark them as known failures?
URIs and URLs - Archive of obsolete content
overview handling network and locally retrievable resources is a central part of necko.
...gateways, proxies, caches, and name resolution services might be used to access some resources, independent of the protocol of their origin, and the resolution of some url may require the use of more than one protocol (e.g., both dns and http are typically used to access an "http" url's resource when it can't be found in a local cache).
Using addresses of stack variables with NSPR threads on win16 - Archive of obsolete content
what is a hardship is that addresses of dynamic variables, those allocated on the call stack, in a function's local frame, are not valid across thread boundaries.
...->counter > 0) pr_waitcondvar(shared->cv, pr_interval_no_timeout); return; } /* forkedthread */ printn main(printn argc, char **argv) { prthread *thread; shareddata shared; shared.ml = pr_newlock(); shared.cv = pr_newcondvar(shared.ml); shared.counter = 10; thread = pr_createthread( pr_user_thread, forkedthread, &shared, pr_priority_normal, pr_local_thread, pr_joinable_thread, 0); do { pr_sleep(pr_secondstointerval(1)); pr_lock(shared.ml); if (0 == shared.counter) break; pr_notifycondvar(shared.cv); pr_unlock(shared.ml); } while (pr_true); rv = pr_jointhread(thread); return (pr_success == rv) ?
XML in Mozilla - Archive of obsolete content
this feature is used mainly to localize mozilla to different languages (the ui strings are stored in external dtd files).
...we treat xhtml documents differently depending on the mime type (or file suffix if files are loaded from local discs).
Using XPInstall to Install Plugins - Archive of obsolete content
netscape communicator 4.x uses the notion of smartupdate to install software, particularly plugins and java applets to be run locally.
...we will use the term current browser to refer to the browser that initiates the xpinstall download by visiting a site which requires a plugin that the current browser can not find locally.
diskSpaceAvailable - Archive of obsolete content
diskspaceavailable returns the amount of disk space available in bytes on the local disk.
...description use this function to make sure there is adequate space on the local disk for extracting and installing your files (see example below).
execute - Archive of obsolete content
execute queues the executing of a local file.
... method of file object syntax int execute ( filespecobject executablefile, [string aparameters] ); parameters the execute method has the following parameters: executablefile a filespecobject representing the local file already on disk to be executed.
loadResources - Archive of obsolete content
description the format of the properties file expected by loadresources is the same as that of the chrome locale .properties files.
... this method is used to internationalize installation scripts by allowing the installer to retrieve localized string values from a separate file.
Learn XPI Installer Scripting by Example - Archive of obsolete content
this input is defined in line 22, where getfolder() is used to assign a value to the communicatorfolder variable representing the "program" folder on the local system: var communicatorfolder = getfolder("program"); spaceavailable = filegetdiskspaceavailable(dirpath); spacerequired, the other expected input to the verifydiskspace function, is given as 17311 kilobytes on line 19.
...when you install new chrome, for example, like the browser.xpi install does, you need to alert the chrome registry to these changes, so that skins, user preferences, packaging lists, and localization bundles will all track the new software.
crop - Archive of obsolete content
ArchiveMozillaXULAttributecrop
start the text will be cropped on its left side in left-to-right text locales, and the right side in right-to-left locales.
... end the text will be cropped on its right side in left-to-right text locales, and the right side in right-to-left locales.
resizer.dir - Archive of obsolete content
bottomstart resized down and toward the start of the line (toward the left for left-to-right locales, toward the right for right-to-left locales).
... bottomend resized down and toward the end of the line (toward the right for left-to-right locales, toward the left for right-to-left locales).
International characters in XUL JavaScript - Archive of obsolete content
earlier versions always interpreted js files loaded from xul as iso-8859-1 (latin-1), in both local and remote cases.
...however, you can use unicode escapes – the earlier example rewritten using them would be: var text = "ein sch\u00f6nes beispiel eines mehrsprachigen textes: \u65e5\u672c\u8a9e"; an alternative might be to use property files via nsistringbundle or the xul <stringbundle> element; this would allow for localization of the xul.
Namespaces - Archive of obsolete content
any element type or attribute name in an xml namespace can be uniquely identified by its xml namespace and its "local name".
...for example, <xul:textbox/> uses a namespace named "xul" and a local name "textbox".
Positioning - Archive of obsolete content
however, the submenu will appear to the left instead for right to left locales.
... for popups attached using the popup or context attributes, the default position to appear is with the upper left corner (or upper right corner in right to left locales) at the position where the mouse was clicked.
Property - Archive of obsolete content
« xul reference accessible accessibletype accesskey align allnotifications allowevents alwaysopenpopup amindicator applocale autocheck autofill autofillaftermatch boxobject browsers builder builderview buttons canadvance cangoback cangoforward canrewind checked checkstate child children classname clickselectsall clientheight clientwidth collapsed color columns command commandmanager completedefaultindex container contentdocument contentprincipal contenttitle contentview contentvieweredit contentviewerfile contentwindow contextmenu control controller controllers crop current currentindex currentitem currentnotification currentpage currentpane currentset currenturi customt...
... element properties dom:element.attributes dom:element.baseuri dom:element.childelementcount dom:element.childnodes dom:element.children dom:element.clientheight dom:element.clientleft dom:element.clienttop dom:element.clientwidth dom:element.clonenode dom:element.firstchild dom:element.firstelementchild dom:element.lastchild dom:element.lastelementchild dom:element.localname dom:element.namespaceuri dom:element.nextelementsibling dom:element.nextsibling dom:element.nodename dom:element.nodetype dom:element.nodevalue dom:element.ownerdocument dom:element.parentnode dom:element.prefix dom:element.previouselementsibling dom:element.previoussibling dom:element.scrollheight dom:element.scrollleft dom:element.scrolltop dom:element.scrollwi...
SeaMonkey - making custom toolbar (SM ver. 1.x) - Archive of obsolete content
s:chrome="http://www.mozilla.org/rdf/chrome#"> <rdf:seq rdf:about="urn:mozilla:package:root"> <rdf:li rdf:resource="urn:mozilla:package:custombutton"/> </rdf:seq> <rdf:description rdf:about="urn:mozilla:package:custombutton" chrome:displayname="custom button" chrome:description="my custom toolbar button" chrome:author="my name" chrome:name="custombutton" chrome:localeversion="1.8" chrome:skinversion="1.5" chrome:extension="true"/> <rdf:seq about="urn:mozilla:overlays"> <!-- browser --> <rdf:li> <rdf:seq about="chrome://navigator/content/navigator.xul"> <rdf:li>chrome://custombutton/content/button.xul</rdf:li> </rdf:seq> </rdf:li> <!-- address book --> <rdf:li> <rdf:seq about="chrome://messenger/conten...
... xmlns:chrome="http://www.mozilla.org/rdf/chrome#"> <rdf:seq rdf:about="urn:mozilla:package:root"> <rdf:li rdf:resource="urn:mozilla:package:myapp"/> </rdf:seq> <rdf:description rdf:about="urn:mozilla:package:myapp" chrome:displayname="myapp" chrome:description="my first xul app" chrome:author="yours truly" chrome:name="myapp" chrome:localeversion="1.8" chrome:skinversion="1.5" chrome:extension="true"/> </rdf:rdf> replace the fields in bold with your xul file name and change the displayname, description, and author attributes as suits you.
Creating a Skin - Archive of obsolete content
if you change the color of something in a local skin file (such as findfile.css), the dialog may look odd if the user changes their global skin.
... our find files example with this skin: source view stylesheet see also mozilla css extensions css reference the next section discusses how to make a xul application localizable.
Creating an Installer - Archive of obsolete content
you can use this object in local or remote content, meaning that it is suitable for a download from a web site.
... our find files example for the find files dialog, we'll create a structure in the archive much like the following: install.js findfile content contents.rdf findfile.xul findfile.js skin contents.rdf findfile.css locale contents.rdf findfile.dtd a directory has been added for each part of the package, the content, the skin and the locale.
RDF Datasources - Archive of obsolete content
for example, you might use file:///windows or files:///usr/local.
...the file can be either a local file or a remote file.
Skinning XUL Files by Hand - Archive of obsolete content
by the way, in contrast to the term skin, "chrome" refers to the skin and the content and whatever localization and platform-specific files are necessary for a particular part of the application or window.
...to work with this xul file, save it locally and rename itsample1.xul.
Using Visual Studio as your XUL IDE - Archive of obsolete content
5.1 localization using dtd you will get validation errors in visual studio, if you are localizing your xul files.
... that has to do with the way mozilla implemented localization: < !doctype window system "chrome://loomo/locale/main.dtd"> visual studio doesn't recognize the chrome uri prefix, what will give you an error at the previous line ("the uri prefix is not recognized").
XUL Questions and Answers - Archive of obsolete content
is localizing remote xul possible?
...rogress, arequest, auri) { // do whatever you want to do return 0; } // for definitions of the remaining functions see xulplanet.com listobj.onprogresschange = function() { return 0 }; listobj.onstatuschange = function() { return 0 }; listobj.onsecuritychange = function() { return 0 }; listobj.onlinkiconavailable = function() { return 0 }; /* i use the progress listener to trap the end of a local html "template" file loading, and run xslt transormations.
button - Archive of obsolete content
start the text will be cropped on its left side in left-to-right text locales, and the right side in right-to-left locales.
... end the text will be cropped on its right side in left-to-right text locales, and the right side in right-to-left locales.
caption - Archive of obsolete content
start the text will be cropped on its left side in left-to-right text locales, and the right side in right-to-left locales.
... end the text will be cropped on its right side in left-to-right text locales, and the right side in right-to-left locales.
checkbox - Archive of obsolete content
start the text will be cropped on its left side in left-to-right text locales, and the right side in right-to-left locales.
... end the text will be cropped on its right side in left-to-right text locales, and the right side in right-to-left locales.
description - Archive of obsolete content
start the text will be cropped on its left side in left-to-right text locales, and the right side in right-to-left locales.
... end the text will be cropped on its right side in left-to-right text locales, and the right side in right-to-left locales.
dialogheader - Archive of obsolete content
start the text will be cropped on its left side in left-to-right text locales, and the right side in right-to-left locales.
... end the text will be cropped on its right side in left-to-right text locales, and the right side in right-to-left locales.
label - Archive of obsolete content
ArchiveMozillaXULlabel
start the text will be cropped on its left side in left-to-right text locales, and the right side in right-to-left locales.
... end the text will be cropped on its right side in left-to-right text locales, and the right side in right-to-left locales.
listcell - Archive of obsolete content
start the text will be cropped on its left side in left-to-right text locales, and the right side in right-to-left locales.
... end the text will be cropped on its right side in left-to-right text locales, and the right side in right-to-left locales.
listitem - Archive of obsolete content
start the text will be cropped on its left side in left-to-right text locales, and the right side in right-to-left locales.
... end the text will be cropped on its right side in left-to-right text locales, and the right side in right-to-left locales.
menu - Archive of obsolete content
ArchiveMozillaXULmenu
start the text will be cropped on its left side in left-to-right text locales, and the right side in right-to-left locales.
... end the text will be cropped on its right side in left-to-right text locales, and the right side in right-to-left locales.
menuitem - Archive of obsolete content
start the text will be cropped on its left side in left-to-right text locales, and the right side in right-to-left locales.
... end the text will be cropped on its right side in left-to-right text locales, and the right side in right-to-left locales.
menulist - Archive of obsolete content
start the text will be cropped on its left side in left-to-right text locales, and the right side in right-to-left locales.
... end the text will be cropped on its right side in left-to-right text locales, and the right side in right-to-left locales.
menuseparator - Archive of obsolete content
start the text will be cropped on its left side in left-to-right text locales, and the right side in right-to-left locales.
... end the text will be cropped on its right side in left-to-right text locales, and the right side in right-to-left locales.
radio - Archive of obsolete content
ArchiveMozillaXULradio
start the text will be cropped on its left side in left-to-right text locales, and the right side in right-to-left locales.
... end the text will be cropped on its right side in left-to-right text locales, and the right side in right-to-left locales.
resizer - Archive of obsolete content
bottomstart resized down and toward the start of the line (toward the left for left-to-right locales, toward the right for right-to-left locales).
... bottomend resized down and toward the end of the line (toward the right for left-to-right locales, toward the left for right-to-left locales).
<statusbarpanel> - Archive of obsolete content
start the text will be cropped on its left side in left-to-right text locales, and the right side in right-to-left locales.
... end the text will be cropped on its right side in left-to-right text locales, and the right side in right-to-left locales.
tab - Archive of obsolete content
ArchiveMozillaXULtab
start the text will be cropped on its left side in left-to-right text locales, and the right side in right-to-left locales.
... end the text will be cropped on its right side in left-to-right text locales, and the right side in right-to-left locales.
toolbarbutton - Archive of obsolete content
start the text will be cropped on its left side in left-to-right text locales, and the right side in right-to-left locales.
... end the text will be cropped on its right side in left-to-right text locales, and the right side in right-to-left locales.
tooltip - Archive of obsolete content
start the text will be cropped on its left side in left-to-right text locales, and the right side in right-to-left locales.
... end the text will be cropped on its right side in left-to-right text locales, and the right side in right-to-left locales.
treecol - Archive of obsolete content
start the text will be cropped on its left side in left-to-right text locales, and the right side in right-to-left locales.
... end the text will be cropped on its right side in left-to-right text locales, and the right side in right-to-left locales.
Creating XULRunner Apps with the Mozilla Build System - Archive of obsolete content
in the case of mccoy, a separate manifest is used for content/, skin/ and locale/.
... note that the locale manifest uses a variable to specify the name of the locale which has to be defined in the makefile (and you need to say #filter substitution in the manifest for the variable to be expanded).
Using LDAP XPCOM with XULRunner - Archive of obsolete content
ldapstubloader.cpp extra_dso_ldopts += \ $(dist)/lib/$(lib_prefix)xpcomglue_s.$(lib_suffix) \ $(xpcom_frozen_ldopts) \ $(nspr_libs) \ $(null) include $(topsrcdir)/config/rules.mk defines += -dmoz_dll_prefix=\"$(dll_prefix)\" ldapstubloader.cpp: // copyright (c) 2005 benjamin smedberg <benjamin@smedbergs.us> #include "nscore.h" #include "nsmodule.h" #include "prlink.h" #include "nsilocalfile.h" #include "nsstringapi.h" #include "nscomptr.h" static char const *const kdependentlibraries[] = { #ifdef ns_win32 moz_dll_prefix "nsldap32v50" moz_dll_suffix, moz_dll_prefix "nsldappr32v50" moz_dll_suffix, #endif //ns_win32 #ifdef ns_unix moz_dll_prefix "ldap50" moz_dll_suffix, moz_dll_prefix "prldap50" moz_dll_suffix, #endif //ns_unix nsnull }; // component.dll on windows, lib...
...component.dll on linux static char krealcomponent[] = moz_dll_prefix "mozldap" moz_dll_suffix; nsresult nsgetmodule(nsicomponentmanager* acompmgr, nsifile* alocation, nsimodule* *aresult) { nsresult rv; nscomptr<nsifile> libraries; rv = alocation->getparent(getter_addrefs(libraries)); if (ns_failed(rv)) return rv; nscomptr<nsilocalfile> library(do_queryinterface(libraries)); if (!library) return ns_error_unexpected; library->setnativeleafname(ns_literal_cstring("libraries")); library->appendnative(ns_literal_cstring("dummy")); // loop through and load dependent libraries for (char const *const *dependent = kdependentlibraries; *dependent; ++dependent) { library->setnativeleafname(nsdependentcstring(*dependent)); prli...
Archived Mozilla and build documentation - Archive of obsolete content
gre hacking wiki to be able to hack the mdc wiki software, you'll need a local webserver install, which can run mediawiki.
... uris and urls handling network and locally retrievable resources is a central part of necko.
2006-10-20 - Archive of obsolete content
he also points out that when he performs a local build any of those platforms (gentoo, suse and fedora) he doesn't encounter any problems on the same machine.
...he can be contacted via: email: preed@mozilla.com irc: preed on irc.mozilla.org phone: 650.903.0800 x256 uploading language packs to amo on october 17th benjamin smedberg brought the following to the attention of the localizers and the build team: that he is planning to upload the firefox 2 language packages currently located at http://releases.mozilla.org/pub/mozi...rc3/win32/xpi/ to addons.mozilla.org in the next few days.
2006-11-10 - Archive of obsolete content
summary: mozilla.dev.l10n - november 10, 2006 announcements seamonkey 1.0.5 in belarusian belarusian [be-by] localization for seamonkey 1.0.5 is available now.
... trunk / 1_8 for kurdish firefox the firefox translations of the kurdish are only in trunk translating the firefox privacy policy the final and approved en-us version of privacy policy is available here and ready for localization team to translate.
2006-11-17 - Archive of obsolete content
how to start a localization how to start a localization po format usage discussion on how to make l10n easier due to expansion to 100 locales.
... quick builds for localisers (full or partial) discussion on moz-l10n-builder, which automates many of the functions required in localization process.
2006-11-3 - Archive of obsolete content
discussions last check-ins on sun-calendar-event-dialog.* files last check-ins on sun-calendar-event-dialog.* files from 50 to 100 locales how to get from the 50 locales and releasing 40 to a hundred.
... localization of amo and some other pages of mozilla.com suggestion on localizing popular add-ons as well as web pages at mozilla.com.
2006-12-01 - Archive of obsolete content
discussions convert ooo .dic to .xpi convert ooo .dic to .xpi mozillatranslator and sourceforge.net about the best way to organize things creating a <locale>.jar file from the cvs structure discussion on how to package a <locale>.jar from the cvs structure without having to download the entire mozilla source.
... from 50 to 100 locales discussion continues on finding a better tool for localization.
NPN_PostURL - Archive of obsolete content
buf path to local temporary file or data buffer that contains the data to post.
...the data to post can be contained either in a local temporary file or a new memory buffer.
NPN_PostURLNotify - Archive of obsolete content
buf path to local temporary file or data buffer that contains the data to post.
...values: true: post the local file whose path is specified in buf, then delete the file.
What is RSS - Archive of obsolete content
they can make local copies of it.
... they can share that local copy.
Scratchpad - Archive of obsolete content
the featured video tutorial shows a case of using scratchpad with a page run by a local web server.
... it is also possible to use scratchpad over pages opened from a local file system, if permission policies allow that.
E4X for templating - Archive of obsolete content
/ useful for placing user input within inline javascript; may be combined with escape function above as well if (typeof s === 'string') { return s.replace(/"/g, '&quot;').replace(/'/g, '&apos;'); } if (typeof s === 'xml') { return s.tostring().replace(/"/g, '&quot;').replace(/'/g, '&apos;'); } return string(s).replace(/"/g, '&quot;').replace(/'/g, '&apos;'); } localization e4x works nicely with a simple utility for localizing strings of a properties file: // localization function $s(msg, args){ //get localized message var strs = cc['@mozilla.org/intl/stringbundle;1'].getservice(ci.nsistringbundleservice).
... createbundle('chrome://myeext/locale/myext.properties'); if (args){ args = array.prototype.slice.call(arguments, 1); return strs.formatstringfromname(msg,args,args.length); } return strs.getstringfromname(msg); } for example, <toolbarbutton label={$s('mytoolbar.label')}/> conditionals function _if (cond, h, _else) { if (cond && cond != undefined) { // we need undefined condition for e4x return h(cond); } else if (_else) { return _else(cond); } return ''; // empty string allows conditions in attribute as well as element content } for example: {_if(elems.length(), function () <description>{elems[0]}</description>, function _else () <label>no data</label> )} note that the simple xmll...
Archived JavaScript Reference - Archive of obsolete content
this operation leaves oldbuffer in a detached state.date.prototype.tolocaleformat()the non-standard tolocaleformat() method converts a date to a string using the specified formatting.
...see also the newer version of date.prototype.tolocaledatestring().ecmascript 2016 to es.next support in mozillaexpression closuresexpression closures are a shorthand function syntax for writing simple functions.for each...inthe for each...in statement iterates a specified variable over all values of object's properties.
Back to the Server: Server-Side JavaScript On The Rise - Archive of obsolete content
listing 1 - querying a mysql database from rhino // import the java sql packages importpackage( java.sql ); // load the mysql driver java.lang.class.forname( "com.mysql.jdbc.driver" ); // create connection to the database var conn = drivermanager.getconnection( "jdbc:mysql://localhost/rhino", "urhino", "prhino" ); // create a statement handle var stmt = conn.createstatement(); // get a resultset var rs = stmt.executequery( "select * from employee" ); // get the metadata from the resultset var meta = rs.getmetadata(); // loop over the records, dump out column names and values while( rs.next() ) { for( var i = 1; i <= meta.getcolumncount(); i++ ) { print( meta.getcolu...
...the appropriate database driver for mysql is loaded and the connection string to a database named rhino on my local machine is configured using the user account urhino with the password of prhino.
Reference - Archive of obsolete content
unfortunately there is not an [easy] method to download content/packages of content off of devmo for 'local' browsing/viewing/printing, yet.
...thanks for your thoughts --callek 15:05, 13 january 2006 (pst) notification when reorganization is finished leandro (localiser for the portuguese wiki) would like to be emailed when the js reference reorganization has been finished.
Mozilla XForms Specials - Archive of obsolete content
forms loaded from that url should be local files, and thus trusted, but it is not always the case.
... so there is not automatic "whitelisting" of local files.
RDF in Mozilla FAQ - Archive of obsolete content
a built-in datasource is a locally-installed component that implements nsirdfdatasource.
...it is either: an abbreviated contractid for a locally installed component.
Archive of obsolete content
localizing an extension this article expands upon the previous samples on extension writing by adding localization support to our stock watcher extension.
... performing a few simple steps makes your extension much easier to localize into various languages without having to edit the xul or javascript files themselves.
Common causes of memory leaks in extensions - Extensions
for example: var windows = []; function injavascriptcodemodule(window) { // forgetting or failing to pop the window again windows.push(window); } both of these cases can happen if you forget to declare local variables with var or let, which means they end up belonging to the global scope.
...another solution would be to use the setinterval()/settimeout() instances content windows provide, but there is a big drawback with this idea: if the user disables javascript globally or locally (such as by using an add-on like noscript), then using the content window functions won't work.
Game promotion - Game development
attending events, both local and global, gives you the ability to meet your fans face to face, as well as other members of the development community.
...sending out weekly newsletters and organizing online competitions or local meetups will show others that you're passionate about what you do and that they can rely on you.
Server - MDN Web Docs Glossary: Definitions of Web-related terms
services are provided generally over local area networks or wide area networks such as the internet.
... for example: an internet-connected web server is sending a html file to your browser software so that you can read this page local area network server for file, name, mail, print, and fax minicomputers, mainframes, and super computers at data centers learn more general knowledge introduction to servers server (computing) on wikipedia ...
RTL (Right to Left) - MDN Web Docs Glossary: Definitions of Web-related terms
rtl (right to left) is a locale property indicating that text is written from right to left.
... for example, the he locale (for hebrew) specifies right-to-left.
Backgrounds and borders - Learn web development
local: this value was added later on (it is only supported in internet explorer 9+, whereas the others are supported in ie4+) because the scroll value is rather confusing and doesn't really do what you want in many cases.
... the local value fixes the background to the element it is set on, so when you scroll the element, the background scrolls with it.
Creating fancy letterheaded paper - Learn web development
starting point to get this assessment started, you should: make local copies of the html and css — save them as index.html and style.css in a new directory.
... save local copies of the top, bottom and logo images in the same directory as your code files.
Legacy layout methods - Learn web development
start out by making a local copy of our sample simple-grid.html file, which contains the following markup in its body.
... updating our grid to get started in this section, make a new copy of your previous example page, or make a local copy of our simple-grid-finished.html code to use as a starting point.
Getting started with CSS - Learn web development
you can continue to work in styles.css locally, or you can use our interactive editor below to continue with this tutorial.
...if i want all paragraphs and all list items to be green my rule looks like this: p, li { color: green; } try this out in the interactive editor below (edit the code boxes), or in your local css document.
How can we design for all types of users? - Learn web development
we suggest a local checker because it comes packaged with an on-screen color picker to find out a color value.
...there are various tools to help you, either online or local: installed software.
How much does it cost to do something on the Web? - Learn web development
however, people often choose dedicated (s)ftp clients to display local or remote directories side-by-side and store server passwords.
...this cost varies depending on: local obligations: some country top-level domain names are more costly, as different countries set different prices.
What is a Domain Name? - Learn web development
for example: local tlds such as .us, .fr, or .se can require the service to be provided in a given language or hosted in a certain country — they are supposed to indicate a resource in a particular language or country.
... your browser asks your computer if it already recognizes the ip address identified by this domain name (using a local dns cache).
Common questions - Learn web development
how do you set up a local testing server?
... this article explains how to set up a simple local testing server on your machine, and the basics of how to use it.
Client-side form validation - Learn web development
validationmessage: returns a localized message describing the validation constraints that the control doesn't satisfy (if any).
... they depend on the browser locale, which means that you can have a page in one language but an error message displayed in another language, as seen in the following firefox screenshot.
The HTML5 input types - Learn web development
datetime-local <input type="datetime-local"> creates a widget to display and pick a date with time with no specific time zone information.
... <input type="datetime-local" name="datetime" id="datetime"> month <input type="month"> creates a widget to display and pick a month with a year.
Styling web forms - Learn web development
these include: <input type="color"> date-related controls such as <input type="datetime-local"> <input type="range"> <input type="file"> elements involved in creating dropdown widgets, including <select>, <option>, <optgroup> and <datalist>.
... if you want to follow along with this example, make a local copy of our postcard-start.html file, and follow the below instructions.
Dealing with files - Learn web development
when you're building a website, you need to assemble these files into a sensible structure on your local computer, make sure they can talk to one another, and get all your content looking right before you eventually upload them to a server.
... when you are working on a website locally on your computer, you should keep all the related files in a single folder that mirrors the published website's file structure on the server.
Installing basic software - Learn web development
installing a local web server some examples will need to be run by a web server to work successfully.
... you can find out how to do this in how do you set up a local testing server?
Introducing asynchronous JavaScript - Learn web development
to see this in action, try taking a local copy of our example, and changing the fourth console.log() call to the following: console.log ('all done!
... note: for security reasons, you can't fetch() files from your local filesystem (or run other such operations locally); to run the above example locally you'll have to run the example through a local webserver.
Cooperative asynchronous JavaScript: Timeouts and intervals - Learn web development
the following function creates a new date() object, extracts a time string out of it using tolocaletimestring(), and then displays it in the ui.
... it then runs the function once per second using setinterval(), creating the effect of a digital clock that updates once per second (see this live, and also see the source): function displaytime() { let date = new date(); let time = date.tolocaletimestring(); document.getelementbyid('demo').textcontent = time; } const createclock = setinterval(displaytime, 1000); just like settimeout(), setinterval() returns an identifying value you can use later when you need to clear the interval.
Introduction to events - Learn web development
first, make a local copy of random-color-eventhandlerproperty.html, and open it in your browser.
... we can, therefore, fix our current problem by changing the second handler function in the previous code block to this: video.onclick = function(e) { e.stoppropagation(); video.play(); }; you can try making a local copy of the show-video-box.html source code and fixing it yourself, or looking at the fixed result in show-video-box-fixed.html (also see the source code here).
What is JavaScript? - Learn web development
internal javascript first of all, make a local copy of our example file apply-javascript.html.
...did you save your local copy of the starting code as a .html file?
What went wrong? Troubleshooting JavaScript - Learn web development
go to github and make yourself a local copy of number-game-errors.html (see it running live here).
... to get started, open the local copy inside your favorite text editor, and your browser.
Ember Interactivity: Footer functionality, conditional rendering - Learn web development
try restarting the dev server and going to localhost:4200 again, and you'll now see that we have a fully-operational battlestation “todos left” counter and clear button: if you're asking yourself why we're not just doing the toggle on the component, since the function is entirely self-contained and not at all needing anything from the service, then you are 100% right to ask that question!
... however, because *eventually*, we'll want to persist or sync all changes to the todos list to local storage (see the final version of the app), it makes sense to have all persistent-state-changing operations be in the same place.
Ember app structure and componentization - Learn web development
--}} {{outlet}} <welcomepage /> is a component provided by an ember addon that renders the default welcome page we saw in the previous article, when we first navigated to our server at localhost:4200.
...tton type="button" class="clear-completed"> clear completed </button> </footer> finally, the contents of application.hbs should be updated so that they call the appropriate components, like so: <section class="todoapp"> <h1>todos</h1> <header /> <todolist /> <footer /> </section> with these changes made, run npm start in your terminal again, then head over to http://localhost:4200 to ensure that the todo app still looks as it did before the refactor.
Dynamic behavior in Svelte: working with variables and props - Learn web development
this would allow us to save them to a web service or local storage and later retrieve them for update.
... now try going back to localhost:5000, pressing ctrl + shift + k to open your browser console and typing something into the input field.
Implementing feature detection - Learn web development
start by making local copies of our css-feature-detect.html, flex-layout.css, float-layout.css, and basic-styling.css files.
... first of all, make a local copy of the modernizr-js.html example file.
Deploying our app - Learn web development
command is a bit of a sledgehammer approach — it will add all local changes you’ve worked on in one go.
... this remote location needs to be added to our local git repository before we can push it up there, otherwise it won't be able to find it.
omni.ja (formerly omni.jar)
/chrome/ user interface files for the application /chrome/localized.manifest manifest of localized content; referenced by the main chrome manifest file.
... /chrome/nonlocalized.manifest manifest of non-localized content; referenced by the main chrome manifest file.
Accessible Toolkit Checklist
the "of" will be parsed out by the assistive technology, so don't localize it.
...the "l" and "of" will be parsed out by the assistive technology, so don't localize it.
Debugging Chrome
i copied the d3d9.dll into both c:\users\jrmuizel\appdata\local\google\chrome sxs\application\22.0.1186.0 and c:\users\jrmuizel\appdata\local\google\chrome sxs\application\.
...i did trace_file=foo.txt and it created the trace file in "c:\users\jrmuizel\appdata\local\google\chrome sxs\application\22.0.1183.0\foo.txt".
The Firefox codebase: CSS Guidelines
using variables use the variable according to its naming do this: xul|tab:hover { background-color: var(--in-content-box-background-hover); } not this: #certificateerrordebuginformation { background-color: var(--in-content-box-background-hover); } localization text direction for margins, padding and borders, use inline-start/inline-end rather than left/right.
... the rtl-aware equivalents of border-{top/bottom}-{left/right}-radius are border-{start/end}-{start/end}-radius when there is no special rtl-aware property available, use the pseudo :-moz-locale-dir(ltr|rtl) (for xul files) or :dir(ltr|rtl) (for html files).
Reviewer Checklist
follow local style for the surrounding code, even if that local style isn't formally documented.
... when making ui changes, be aware of the fact that strings will be different lengths in different locales.
Runtime Directories
default application installation and user profile directories firefox os application directory user profile directory temporary directory windows vista/7 c:\program files\mozilla firefox\ c:\users\<username>\appdata\roaming\mozilla\firefox\ (or %appdata%\mozilla\firefox\) c:\users\<username>\appdata\local\mozilla\firefox\ (or %localappdata%\mozilla\firefox) and c:\users\<username>\appdata\local\virtualstore\program files\mozilla firefox\ windows 2000/xp c:\program files\mozilla firefox\ c:\documents and settings\<username>\application data\mozilla\firefox\ (or %appdata%\mozilla\firefox\) c:\documents and settings\<username>\local settings\application data\mozilla\firefox\ os x /applications/firefox.app ...
... ~/.mozilla/firefox/xxxxxxxx.default/ n/d thunderbird os application directory user profile directory temporary directory windows vista/7 c:\program files\mozilla thunderbird\ c:\users\<username>\appdata\roaming\thunderbird\ (or %appdata%\thunderbird\) c:\users\<username>\appdata\local\thunderbird\ (or %localappdata%\thunderbird\) and c:\users\<username>\appdata\local\virtualstore\program files\mozilla thunderbird\ windows 2000/xp c:\program files\mozilla thunderbird\ c:\documents and settings\<username>\application data\thunderbird\ (or %appdata%\thunderbird\) c:\documents and settings\<username>\local settings\application data\thunderbird\ ...
Gecko SDK
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).
... once that's done, you should perform the following command: ln -s /opt/local/lib/libintl.8.dylib /opt/local/lib/libintl.3.dylib this should fix the problem.
Gecko Keypress Event
problem 2 the access keys for the menu items are specified with the localized characters on some localized builds.
... these localized access keys work fine with the keyboard layout of the locale.
AddonType
name string the localized name for the type.
... built-in values: value category 2000 locale 4000 extension 5000 theme 6000 plugin viewtype integer the type of ui to use to display this type of add-on in the ui.
Downloads.jsm
fetch() downloads data from a remote network location to a local file.
... examples downloading to a local file this example downloads an html file without showing progress, handling errors programmatically.
JavaScript OS.Constants
winlocalappdatadir the path to the user's local application data directory.
... maclocalapplicationsdir the path to the local applications directory.
OS.File for the main thread
let sessionstore = os.path.join(os.constants.path.profiledir, "sessionstore.js"); // under linux, this is generally "$home/.firefox/profiles/$profilename/sessionstore.js" // under macos, this is generally "$home/library/application support/firefox/$profilename/sessionstore.js" // under windows, this is generally "%appdata%\local\temp\%profilename%"\sessionstore.js // etc.
...y(data); let pos = 0; while (pos < view.bytelength) { pos += yield outfile.write(view.subarray(pos, chunksize)); } outfile.close(); }).then( null, function onfailure(reason) { outfile.close(); throw reason; } ); } example: save canvas to disk this exmaple uses image to load an image from a path (note: if your path is a file on disk you must use local file; this is accomplished with os.path.tofileuri, which accepts a string).
Using JavaScript code modules
ory is a sibling to chrome.manifest and install.rdf), you could create an alias to that directory via the instruction: resource foo modules/ (don't forget the trailing slash!) you could then import the module into your javascript code via the statement: components.utils.import("resource://foo/bar.js"); programmatically adding aliases custom aliases to paths that can be represented as an nsilocalfile can be programmatically added as well.
... for example: // import services.jsm unless in a scope where it's already been imported components.utils.import("resource://gre/modules/services.jsm"); var resprot = services.io.getprotocolhandler("resource") .queryinterface(components.interfaces.nsiresprotocolhandler); var aliasfile = components.classes["@mozilla.org/file/local;1"] .createinstance(components.interfaces.nsilocalfile); aliasfile.initwithpath("/some/absolute/path"); var aliasuri = services.io.newfileuri(aliasfile); resprot.setsubstitution("myalias", aliasuri); // assuming the code modules are in the alias folder itself notes custom modules and xpcom components note that prior to gecko 2.0 javascript xpcom components are loaded before chrome registration.
gettext
the string definition in the messages.po file will look like this: #: file.php:3 #, php-format msgid "%d user likes this." msgid_plural "%d users like this." msgstr[0] "" msgstr[1] "" depending on the localizer's target language and its rules for creating plural forms, there might be another field for translation, e.g.
...for instance, "log in" as a button label might be translated by a localizer as the imperative, but for a dialog title, the localizer may choose to use a different form, like gerund (much like "logging in").
PRExplodedTime
in addition, prexplodedtime includes a prtimeparameters structure representing the local time zone information, so that the time point is non-ambiguously specified.
... tm_params: a prtimeparameters structure representing the local time zone information.
PR_SetConcurrency
virtual processors are actuallyglobal threads, each of which is designed to support an arbitrary number oflocal threads.
...however, it may also prove advantageous on uniprocessor systems to reduce the impact of having a locally scheduled thread calling incidental blocking functions.
NSS 3.33 release notes
port_zallocaligned - allocate aligned memory.
... port_zallocalignedoffset - allocate aligned memory for structs.
NSS API Guidelines
this class is local only to this object file.
... next we examine global data, including function local static structures.
NSS Sample Code Sample1
the primary host generates an rsa keypair that will be used // store keys locally.
...the primary host wraps the newly generated key using the // rsa key and stores the wrapped key data in a local file.
nss tech note2
for example, 1024[805ef10]: c_findobjectsinit 1024[805ef10]: hsession = 0x1000001 1024[805ef10]: ptemplate = 0xbffff410 1024[805ef10]: ulcount = 3 1024[805ef10]: cka_label = localhost.nyc.rr.com [20] 1024[805ef10]: cka_token = ck_true [1] 1024[805ef10]: cka_class = cko_certificate [4] 1024[805ef10]: rv = 0x0 1024[805ef10]: c_findobjects 1024[805ef10]: hsession = 0x1000001 1024[805ef10]: phobject = 0x806d810 1024[805ef10]: ulmaxobjectcount = 16 1024[805ef10]: pulobjectcount = 0xbffff38c 1024[805ef10]: *pulobjectcount = 0x1 1024[805ef10]: phobject[0] = ...
...te = 0xbffff2d0 1024[805ef10]: ulcount = 2 1024[805ef10]: cka_token = 0 [1] 1024[805ef10]: cka_label = 0 [20] 1024[805ef10]: rv = 0x0 1024[805ef10]: c_getattributevalue 1024[805ef10]: hsession = 0x1000001 1024[805ef10]: hobject = 0xf6457d04 1024[805ef10]: ptemplate = 0xbffff2d0 1024[805ef10]: ulcount = 2 1024[805ef10]: cka_token = ck_true [1] 1024[805ef10]: cka_label = localhost.nyc.rr.com [20] 1024[805ef10]: rv = 0x0 4.
nss tech note4
#include "cert.h" get the handle of the cert associated with an ssl connection certcertificate* cert = ssl_peercertificate(prfiledesc *fd); if ssl client, this will get you the server's cert handle; if ssl server, this will get you the client's cert handle if client auth is enabled certcertificate* cert = ssl_localcertificate(prfiledesc *fd); if ssl client, this will get you the client cert's handle, if client auth happened if ssl server, this will get you the server's cert handle don't forget to clean up the cert handle when you're done with it void cert_destroycertificate(certcertificate *cert); some info is readily available ...
...cateemailaddress(certcertificate *cert); cert->keyusage (unsigned int) to break the issuer and subject names into components pass &(cert->issuer) or &(cert->subject) to the following functions char *cert_getcommonname(certname *name); char *cert_getcertemailaddress(certname *name); char *cert_getcountryname(certname *name); char *cert_getlocalityname(certname *name); char *cert_getstatename(certname *name); char *cert_getorgname(certname *name); char *cert_getorgunitname(certname *name); char *cert_getdomaincomponentname(certname *name); char *cert_getcertuid(certname *name); example code to illustrate access to the info is given below.
PKCS11 module installation
using the firefox preferences to install pkcs #11 modules save the pkcs #11 module to a permanent location on your local computer open the firefox preferences dialog.
... choose "browse..." to find the location of the pkcs #11 module on your local computer, and choose "ok" when done.
NSS environment variables
3.7 nss_sdb_use_cache string ("no","yes","auto") controls whether nss uses a local cache of sql database contents.
... 3.12 sqlite_force_proxy_locking boolean (1 to enable) 1 means force always use proxy, 0 means never use proxy, null means use proxy for non-local files only.
NSS functions
nd later ssl_getmaxservercachelocks mxr 3.4 and later ssl_getsessionid mxr 3.2 and later ssl_getstatistics mxr 3.2 and later ssl_handshakecallback mxr 3.2 and later ssl_importfd mxr 3.2 and later ssl_inheritmpserversidcache mxr 3.2 and later ssl_invalidatesession mxr 3.2 and later ssl_localcertificate mxr 3.4 and later ssl_optionget mxr 3.2 and later ssl_optiongetdefault mxr 3.2 and later ssl_optionset mxr 3.2 and later ssl_optionsetdefault mxr 3.2 and later ssl_peercertificate mxr 3.2 and later ssl_preencryptedfiletostream mxr 3.2 and later ssl_preencryptedstreamtofile mxr ...
...edsoftfailurepolicy mxr 3.12 and later cert_getcommonname mxr 3.2 and later cert_getcountryname mxr 3.2 and later cert_getdbcontentversion mxr 3.2 and later cert_getdefaultcertdb mxr 3.2 and later cert_getdomaincomponentname mxr 3.2 and later cert_getfirstemailaddress mxr 3.7 and later cert_getlocalityname mxr 3.2 and later cert_getnextemailaddress mxr 3.7 and later cert_getnextgeneralname mxr 3.10 and later cert_getnextnameconstraint mxr 3.10 and later cert_getocspresponsestatus mxr 3.6 and later cert_getocspstatusforcertid mxr 3.6 and later cert_getoidstring mxr 3.9 and later cert_getor...
Rhino optimization
local common sub-expressions are collapsed (currently this only happens for property lookup, but in the future more expressions may be optimized).
... all local variables and parameters are allocated to java vm registers.
Hacking Tips
to run these benchmarks localy, you can clone arewefastyet sources and look inside the benchmarks directory to run individual benchmarks with your js shell.
...one is to create a localhost server and serving the files there.
Tracing JIT
this is a local register allocator, meaning that it does not allocate registers across basic blocks.
...this set was determined during recording, and the imported values are stored locally within the native stack during execution.
JSAPI User Guide
the native function uses js_convertarguments to convert the arguments to c++ types and store them in local variables.
... if a function creates new objects, strings, or numbers, it can use js_enterlocalrootscope and js_leavelocalrootscope to keep those values alive for the duration of the function.
JS::Add*Root
(for example, it must not be an uninitialized local variable.
...note that this means that if the root is meant to live past the end of a function, the address of a local (stack-based) variable may not be used for vp/rp.
JS_Add*Root
(for example, it must not be an uninitialized local variable.
...note that this means that if the root is meant to live past the end of a function, the address of a local (stack-based) variable may not be used for rp.
JS_ClearDateCaches
this article covers features introduced in spidermonkey 17 clear the cache of calculated local time from each date object.
... description js_cleardatecaches clears the cache of calculated local time from each date object.
JS_ValueToObject
(implementation note: the object's jsobjectops.defaultvalue method is called with hint=jstype_object.) the resulting object is subject to garbage collection unless the variable *objp is protected by a local root scope, an object property, or the js_addroot function.
... note that a local root scope is not sufficient to protect the resulting object in some cases involving the valueof method!
Shell global objects
stackdump(showargs, showlocals, showthisprops) tries to print a lot of information about the current stack.
...takes an optional options object, which may contain any or all of the boolean properties options.args - show arguments to each function options.locals - show local variables in each frame options.thisprops - show the properties of the this object of each frame bytesize(value) return the size in bytes occupied by value, or undefined if value is not allocated in memory.
Web Replay
at least on mac, pthreads locks/cvars seem to use a mix of process-local and kernel state, and sometimes don't work correctly after rewinding the process.
... graphics rendering is entirely local to the content process.
Mozilla Projects
compare-locales compare-locales is a python script that helps localizers to check their work without running firefox or another application.
... l20n l20n lets localizers reach higher levels of free linguistic expression by sharpening the divide between localization and application logic.
Using RAII classes in Mozilla
static analysis static analysis passes are run on our testing infrastructure using our clang plugin, you can also run them locally marking a raii class for the static analysis is very simple, and performing this marking causes the static analysis to produce a build-time error whenever a raii class is allocated as a temporary, on the heap, or in static storage.
... assertions runtime assertions offer two benefits - firstly, they run on windows, which the static analysis currently does not, and secondly they will run locally, even if the developer did not choose to run static analysis locally.
Building the WebLock UI
other front end resources in some ui packages, localization resources are also defined.
...in addition to dtds, the localization parts of a user interface may also include string bundles in which strings that are used in the interface javascript can be similarly replaced.
Finishing the Component
when the component starts up, it populates a list of urls read in from a file stored next to the gecko binary on the local system.
...but it only should do this comparison for remote urls, because we don't want to block the application from loading local content that it requires, like files it gets via the resource:// protocol.
Components.lastResult
in cases where components.lastresult is used, it is best to get it right away after the target call is made and save it in a local variable to test its value rather than doing multiple tests against components.lastresult.
... example in the following example, the local variable i contains the actual result returned by bar() (assuming that bar() is called via xpconnect), and components.lastresult contains the success code returned by bar().
Components.utils.exportFunction
t in the target scope: // addon-script.js var salutation = "hello "; function greetme(user) { return salutation + user; } contentwindow.foo = components.utils.exportfunction(greetme, contentwindow); either way, code running in the content window's scope can now call the function: // page-script.js var greeting = foo("alice"); console.log(greeting); // "hello alice" export to an existing local object instead of attaching the function to the target's global window object, the caller can attach it to any other object in the target context.
... suppose the content window defines a local variable bar: // page-script.js var bar = {}; now the add-on script can attach the function to bar: // addon-script.js components.utils.exportfunction(greetme, contentwindow.bar, {defineas: "greetme"}); // page-script.js var value = bar.greetme("bob"); console.log(value); // "hello bob" ...
Folders
there are currently three folder classes - nslocalmailfolder, nsimapmailfolder, and nsnewsfolder.
...rss feeds are implemented by nslocalmailfolder.
IAccessibleImage
method overview [propget] hresult description([out] bstr description ); [propget] hresult imageposition([in] enum ia2coordinatetype coordinatetype, [out] long x, [out] long y ); [propget] hresult imagesize([out] long height, [out] long width ); methods description() returns the localized description of the image.
... [propget] hresult description( [out] bstr description ); parameters description the localized description of the image.
IAccessibleRelation
1.0 66 introduced gecko 1.9 inherits from: iunknown last changed in gecko 1.9 (firefox 3) method overview [propget] hresult localizedrelationtype([out] bstr localizedrelationtype ); [propget] hresult ntargets([out] long ntargets ); [propget] hresult relationtype([out] bstr relationtype ); [propget] hresult target([in] long targetindex, [out] iunknown target ); [propget] hresult targets([in] long maxtargets, [out, size_is(maxtargets), length_is( ntargets)] iunknown targets, [out] long ntargets ); methods localizedrelationtype() returns a localized version of the relation type.
... [propget] hresult localizedrelationtype( [out] bstr localizedrelationtype ); parameters localizedrelationtype return value s_ok.
mozIJSSubScriptLoader
it must be a local chrome:, resource: or file: url (see bug 307686 and bug 418356).
...it must be a local chrome:, resource: or file: url.
GetKeyBindings
« nsiaccessible page summary this method provides array of localized string of global keyboard accelerator for the given action index supported by accessible.
...return values returns array of localized string of global keyboard accelerator.
nsIBrowserHistory
an empty value for this parameter means local files and anything else without a hostname.
... you can also pass in the localized "(local files)" title given to you by a history query to remove all history information for local files.
nsICRLInfo
lastupdatelocale astring lastupdate formatted as a human readable string formatted according to the environment locale.
... nextupdatelocale astring nextupdate formatted as a human readable string formatted according to the environment locale.
nsIChromeRegistry
dtd for a "locale" package.
... dtd for a "locale" package.
nsIDOMStorageWindow
localstorage nsidomstorage local storage for the current browsing context.
... data stored in local storage may only be accessed from the same origin that inserted the data into storage in the first place.
nsIDOMWindow
localstorage nsidomstorage local storage for the current browsing context.
... data stored in local storage may only be accessed from the same origin that inserted the data into storage in the first place.
getFiles
return values the elements of the returned nsisimpleenumerator instance must support nsifile and may support nsilocalfile.
... see also nsifile, nsilocalfile, nsisimpleenumerator ...
nsIHttpChannelInternal
localaddress autf8string the local ip address to which the channel is bound, in the same format produced by pr_netaddrtostring().
... localport print32 the local port number to which the channel is bound.
nsIMsgFilterList
on readonly attribute short nsimsgfilterlist::version arbitraryheaders readonly attribute acstring nsimsgfilterlist::arbitraryheaders shoulddownloadallheaders readonly attribute boolean nsimsgfilterlist::shoulddownloadallheaders filtercount readonly attribute unsigned long nsimsgfilterlist::filtercount loggingenabled attribute boolean nsimsgfilterlist::loggingenabled defaultfile attribute nsilocalfile nsimsgfilterlist::defaultfile logstream attribute nsioutputstream nsimsgfilterlist::logstream logurl readonly attribute acstring nsimsgfilterlist::logurl methods getfilterat() nsimsgfilter nsimsgfilterlist::getfilterat (in unsigned long filterindex ) getfilternamed() nsimsgfilter nsimsgfilterlist::getfilternamed (in astring filtername) setfilterat() nsimsgfilter nsimsgfilterlist::setfi...
...ltfile ( ) applyfilterstohdr() void nsimsgfilterlist::applyfilterstohdr ( in nsmsgfiltertypetype filtertype, in nsimsgdbhdr msghdr, in nsimsgfolder folder, in nsimsgdatabase db, in string headers, in unsigned long headersize, in nsimsgfilterhitnotify listener, in nsimsgwindow msgwindow, in nsilocalfile amessagefile ) writeinattr() void nsimsgfilterlist::writeintattr ( in nsmsgfilterfileattribvalue attrib, in long value, in nsioutputstream stream ) writestrattr() void nsimsgfilterlist::writestrattr ( in nsmsgfilterfileattribvalue attrib, in string value, in nsioutputstream ...
Component; nsIPrefBranch
interfaces currently supported are: nsilocalfile nsisupportsstring (unichar) (removed as of gecko 58 in favor of getstringpref) nsipreflocalizedstring (localized unichar) nsifilespec (deprecated - to be removed eventually) avalue the xpcom object into which to the complex preference value should be retrieved.
...interfaces currently supported are: nsilocalfile nsisupportsstring (unichar) (removed as of gecko 58 in favor of setstringpref) nsipreflocalizedstring (localized unichar) nsifilespec (deprecated - to be removed eventually) avalue the xpcom object from which to set the complex preference value.
nsIPrivateBrowsingService
in addition, temporary, databases are created to be used for cookies and local storage; these databases are thrown away when private browsing mode is turned off, and the regular databases are re-activated.
... the temporary cookie and local storage databases start out empty.
nsIProfileLock
inherits from: nsisupports last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) method overview void unlock(); attributes attribute type description directory nsilocalfile the main profile directory.
... localdirectory nsilocalfile a directory corresponding to the main profile directory, which exists for the purpose of storing data on the local filesystem, including cache files or other data files that may not represent critical user data.
nsIScriptableIO
the afilename parameter is treated as being local to this directory.
... example: writing to a file var json = "{ name: 'bob', age: 37}"; var file = io.getfile("profile", null); file.append("myobject.json"); if (!file.exists()) file.create(ci.nsifile.normal_file_type, 0600); var stream = io.newoutputstream(file, "text write create truncate"); stream.writestring(json); stream.close(); example: reading from a file var file = io.getfile("profile", null); file.append("localstore.json"); if (file.exists()) { var stream = io.newinputstream(file, "text"); var json = stream.readline(); stream.close(); } see also nsifile, nsiinputstream, nsioutputstream ...
nsIWinAppHelper
method overview void fixreg(); obsolete since gecko 1.9 void postupdate(in nsilocalfile logfile); obsolete since gecko 1.9.2 attributes attribute type description usercanelevate boolean read only.
...void postupdate( in nsilocalfile logfile ); parameters logfile the file to use for the uninstallation log.
nsIXPConnect
nsistackframe createstackframelocation(in pruint32 alanguage, in string afilename, in string afunctionname, in print32 alinenumber, in nsistackframe acaller); void debugdump(in short depth); void debugdumpevalinjsstackframe(in pruint32 aframenumber, in string asourcetext); void debugdumpjsstack(in prbool showargs, in prbool showlocals, in prbool showthisprops); void debugdumpobject(in nsisupports acomobj, in short depth); [noscript,notxpcom] prbool definedomquickstubs(in jscontextptr cx, in jsobjectptr proto, in pruint32 flags, in pruint32 interfacecount, [array, size_is(interfacecount)] in nsiidptr interfacearray); jsval evalinsandboxobject(in astring source, in jscontextptr cx, in nsixpconnectjso...
...thrown missing exception missing description debugdumpevalinjsstackframe() void debugdumpevalinjsstackframe( in pruint32 aframenumber, in string asourcetext ); parameters aframenumber missing description asourcetext missing description exceptions thrown missing exception missing description debugdumpjsstack() void debugdumpjsstack( in prbool showargs, in prbool showlocals, in prbool showthisprops ); parameters showargs missing description showlocals missing description showthisprops missing description exceptions thrown missing exception missing description debugdumpobject() void debugdumpobject( in nsisupports acomobj, in short depth ); parameters acomobj missing description depth missing description exceptions thrown missin...
nsIZipReader
example demonstrating this function: list contents of xpi and read file contents extract() extracts a zip entry into a local file specified by outfile.
... outfile the local file destination used to extract the zip entry.
nsMsgSearchScope
search/ public/ nsmsgsearchcore.idl [scriptable, uuid(6e893e59-af98-4f62-a326-0f00f32147cd)] interface nsmsgsearchscope { const nsmsgsearchscopevalue offlinemail = 0; const nsmsgsearchscopevalue offlinemailfilter = 1; const nsmsgsearchscopevalue onlinemail = 2; const nsmsgsearchscopevalue onlinemailfilter = 3; /// offline news, base table, no body or junk const nsmsgsearchscopevalue localnews = 4; const nsmsgsearchscopevalue news = 5; const nsmsgsearchscopevalue newsex = 6; const nsmsgsearchscopevalue ldap = 7; const nsmsgsearchscopevalue localab = 8; const nsmsgsearchscopevalue allsearchablegroups = 9; const nsmsgsearchscopevalue newsfilter = 10; const nsmsgsearchscopevalue localaband = 11; const nsmsgsearchscopevalue ldapand = 12; // imap and news, searched usi...
...ng local headers const nsmsgsearchscopevalue onlinemanual = 13; /// local news + junk const nsmsgsearchscopevalue localnewsjunk = 14; /// local news + body const nsmsgsearchscopevalue localnewsbody = 15; /// local news + junk + body const nsmsgsearchscopevalue localnewsjunkbody = 16; }; ...
XPCOM Interface Reference
nalnsihttpheadervisitornsihttpservernsihttpupgradelistenernsiidnservicensiiframeboxobjectnsiiniparsernsiiniparserfactorynsiiniparserwriternsiioservicensiidleservicensiinprocesscontentframemessagemanagernsiinputstreamnsiinputstreamcallbacknsiinstalllocationnsiinterfacerequestornsijscidnsijsidnsijsiidnsijsonnsijetpacknsijetpackservicensijumplistbuildernsijumplistitemnsilivemarkservicensiloadgroupnsilocalfilensilocalfilemacnsilocalensilocaleservicensilogininfonsiloginmanagernsiloginmanagercryptonsiloginmanageriemigrationhelpernsiloginmanagerprompternsiloginmanagerstoragensiloginmetainfonsimimeinputstreamnsimacdocksupportnsimarkupdocumentviewernsimemorynsimemorymultireporternsimemorymultireportercallbacknsimemoryreporternsimemoryreportermanagernsimenuboxobjectnsimessagebroadcasternsimessagelistener...
...vhistoryresulttreeviewernsinavhistoryresultviewobservernsinavhistoryresultviewernsinavhistoryservicensinavhistoryvisitresultnodensinetworklinkservicensiobservernsiobserverservicensioutputstreamnsioutputstreamcallbacknsiparentalcontrolsservicensiparserutilsnsipasswordnsipasswordmanagernsipermissionnsipermissionmanagernsipipensiplacesimportexportservicensiplacesviewnsipluginhostnsiprefbranch2nsipreflocalizedstringnsiprefservicensiprincipalnsiprinterenumeratornsiprintingpromptnsiprivatebrowsingservicensiprocessnsiprocess2nsiprocessscriptloadernsiprofilensiprofilelocknsiprofileunlockernsiprogramminglanguagensiprogresseventsinknsipromptnsipromptservicensipropertiesnsipropertynsipropertybagnsipropertybag2nsipropertyelementnsiprotocolhandlernsiprotocolproxycallbacknsiprotocolproxyfilternsiprotocolprox...
XPCOM Interface Reference by grouping
nsicommandline nsicommandlinehandler nsicommandlinerunner component nsicomponentmanager preferences nsicontentprefobserver nsicontentprefservice nsicomponentregistrar internationalization nsibidikeyboard nsilocale io filesystem nsidirectoryenumerator nsidirectoryiterator nsidirectoryservice nsidirectoryserviceprovider nsidirectoryserviceprovider2 nsidirindex nsidirindexlistener nsidirindexparser nsifile nsilocalfile s...
...eventsink nsihttpchannel nsihttpchannelinternal nsihttpheadervisitor nsiidnservice nsiprotocolhandler nsiprotocolproxycallback nsiprotocolproxyfilter nsiprotocolproxyservice nsiproxyinfo preferences nsiiniparser nsiiniparserfactory nsiprefbranch nsiprefbranch2 nsipreflocalizedstring nsiprefservice nsistringbundle nsistringbundleservice security cookies nsicookie nsicookie2 nsicookieacceptdialog nsicookieconsent nsicookiemanager nsicookiemanager2 nsicookiepermission nsicookiepromptservice ...
XPCOM reference
there are currently three folder classes - nslocalmailfolder, nsimapmailfolder, and nsnewsfolder.
...rss feeds are implemented by nslocalmailfolder.ns ensure successmacrons ensure truemacrons_abort_if_falsethis was removed in bug 1127201ns_addrefmacrons_assertionmacrons_ensure_arg_pointermacrons_errorthrows a assertion (ns_assertion) with the text "error: (error text)", so writes this text to console (stderr) and to debug logs (nspr logging).
Index
42 mailbox mailnews the mailbox protocol is used to read messages from a local folder berkeley mailbox.
...this may seem like a lot of infrastructure just to read messages from a flat file, but it allows us to do it asynchronously, and to have reading local messages fit into the same kind of mechanisms that reading nntp and imap messages do - running urls, getting onstart/stoprunningurl notifications when the url starts/stops, etc.
MailNews fakeserver
the outline of a test looks like this: var daemon = setupdaemon(); // check with your local fakeserver docs var handlers = [ /* some set of handlers */ ]; for (var handler in handlers) { // this sets up the fake server var server = new nsmailserver(new handler(daemon)); // port to use.
... server.start(port); // set up a nsimsgincomingserver locally localserver.someactionrequiringconnection(); server.performtest(); // nothing will be executed until the connection is closed // localserver.closecachedconnections() is generally a good way to do so server.resettest(); // set up second test server.performtest(); transaction = server.playtransaction(); // finished with tests server.stop(); } currently, fakeserver provides no means to keep a persistent connection past a test, requiring connections to be closed, possibly forcibly.
MailNews Filters
for each new header, we evaluate the filter criteria and apply the actions synchronously, including moving a message to an other local folder, and advance to the next header.
...the search is executed locally, not on the server, so that criteria like "in address book" still work.
Mail composition back end
const struct nsmsgattachedfile *preloaded_attachments, - attachments that are already locally stored on disk (note: both attachments and preloaded_attachments cannot be specified on a single call void *relatedpart /* nsmsgsendpart */, - a related part for multipart related operations nsimsgsendlistener **alistenerarray) = 0; - an array of listeners for the send operation.
...note: this can be any valid uri so one can send local disk files by specifying a file:// uri.
Mailbox
the mailbox protocol is used to read messages from a local folder berkeley mailbox.
...this may seem like a lot of infrastructure just to read messages from a flat file, but it allows us to do it asynchronously, and to have reading local messages fit into the same kind of mechanisms that reading nntp and imap messages do - running urls, getting onstart/stoprunningurl notifications when the url starts/stops, etc.
Building a Thunderbird extension 2: extension file layout
rstext.xpi: //created in step 8 /install.rdf //created in step 3 /chrome.manifest //created in step 4 /chrome/ /content/ /content/myhelloworld.xul //created in step 5 /content/overlay.js //created in step 6 /chrome/locale/* //building an extension# localization /chrome/skin/ /defaults/preferences/ //building an extension# defaults files the following tutorial pages will explain how to write each of these files (except locale/ and defaults/) and package them into an xpi (zippy) file.
... you can find information about the locale/ and defaults/ folders in the more general "building an extension" documentation.
Using the Mozilla symbol server
the only workaround is to build an unoptimized local build.
...in the examples below, a local cache directory is used to avoid repeatedly fetching the pdb from the server.
ctypes.open
they must be accessed through a local file path (file://) or a jar path (jar:).
...tent/mysubfolder/mycfunctionsforunix.so then it is converted to a file uri like this: components.utils.import("resource://gre/modules/services.jsm"); var cr = components.classes['@mozilla.org/chrome/chrome-registry;1'].getservice(components.interfaces.nsichromeregistry); var chromeuri_mylib = services.io.newuri('chrome://youraddon/content/mysubfolder/mycfunctionsforunix.so', 'utf-8', null); var localfile_mylib = cr.convertchromeurl(chromeuri_mylib); var jarpath_mylib = localfile_mylib.spec; // "jar:file:///c:/users/vayeate/appdata/roaming/mozilla/firefox/profiles/aecgxse.unnamed%20profile%201/extensions/youraddon@jetpack.xpi!/mysubfolder/mycfunctionsforunix.so" var filepath_mylib = localfilemylib.path; // "file:///c:/users/vayeate/appdata/roaming/mozilla/firefox/profiles/aecgxse.unnamed%20pro...
Examine, modify, and watch variables - Firefox Developer Tools
examine variables when the code has stopped at a breakpoint, you can examine its state in the variables pane of the debugger: variables are grouped by scope: in function scope you'll see the built-in arguments and this variables as well as local variables defined by the function like user and greeting.
... similarly, in global scope you'll see global variables you've defined, like greetme, as well as built-in globals like localstorage and console.
UI Tour - Firefox Developer Tools
download file opens a file dialog so you can save the file locally.
...when the debugger's paused, you'll be able to expand this section to see all objects that are in scope at this point in the program: objects are organized by scope: the most local appears first, and the global scope (window, in the case of page scripts) appears last.
Debugger.Environment - Firefox Developer Tools
ecmascript environments form a tree, in which each local environment is parented by its enclosing environment (in ecmascript terms, its ‘outer’ environment).
...for example, functions whose locals are never aliased may present optimized-out environments.
Index - Firefox Developer Tools
105 storage inspector cookies, dev tools, firefox, guide, indexeddb, local storage, session storage, storage, tools the storage inspector enables you to inspect various types of storage that a web page can use.
... 110 local storage / session storage dev tools, firefox, guide, local storage, session storage, storage, storage inspector, tools, l10n:priority when an origin corresponding to local storage or session storage is selected within the storage inspector, the names and values of all the items corresponding to local storage or session storage will be listed in a table.
Style Editor - Firefox Developer Tools
you can save any changes you've made to the style sheet to your local computer by clicking the save button in the bottom-right corner of each sheet's entry in the list.
...once you're satisfied with your changes, you can save a copy locally by clicking the save button on the sheet's entry in the style sheet pane.
about:debugging - Firefox Developer Tools
other information about the extension is displayed: location the location of the extension's source code on your local system.
...however, you can also debug push notifications locally, without needing the server.
AudioContext - Web APIs
audiocontext.createmediastreamsource() creates a mediastreamaudiosourcenode associated with a mediastream representing an audio stream which may come from the local computer microphone or other sources.
... audiocontext.createmediastreamdestination() creates a mediastreamaudiodestinationnode associated with a mediastream representing an audio stream which may be stored in a local file or sent to another computer.
CanvasRenderingContext2D.textAlign - Web APIs
"start" the text is aligned at the normal start of the line (left-aligned for left-to-right locales, right-aligned for right-to-left locales).
... "end" the text is aligned at the normal end of the line (right-aligned for left-to-right locales, left-aligned for right-to-left locales).
CompositionEvent.initCompositionEvent() - Web APIs
syntax compositioneventinstance.initcompositionevent(typearg, canbubblearg, cancelablearg, viewarg, dataarg, localearg) parameters typearg a domstring representing the type of composition event; this will be one of compositionstart, compositionupdate, or compositionend.
... localearg a domstring representing the value of the locale attribute.
DirectoryReaderSync - Web APIs
you can also use the filesystem: url to look up the entry with resolvelocalfilesystemurl().
... window.resolvelocalfilesystemurl = window.resolvelocalfilesystemurl || window.webkitresolvelocalfilesystemurl; // create web workers var worker = new worker('worker.js'); worker.onmessage = function(e) { var urls = e.data.entries; urls.foreach(function(url, i) { window.resolvelocalfilesystemurl(url, function(fileentry) { // print out file's name.
Element.getElementsByTagNameNS() - Web APIs
syntax elements = element.getelementsbytagnamens(namespaceuri, localname) elements is a live htmlcollection of found elements in the order they appear in the tree.
... localname is either the local name of elements to look for or the special value "*", which matches all elements (see element.localname and attr.localname).
Element.hasAttributeNS() - Web APIs
syntax result = element.hasattributens(namespace,localname) result is the boolean value true or false.
... localname is the name of the attribute.
Element.setAttributeNS() - Web APIs
name is a string identifying the attribute by its qualified name; that is, a namespace prefix followed by a colon followed by a local name.
..."namespace:localname".
Element - Web APIs
WebAPIElement
element.localname read only a domstring representing the local part of the qualified name of the element.
... note: dom level 3 defined namespaceuri, localname and prefix on the node interface.
Using files from web applications - Web APIs
using the file api, which was added to the dom in html5, it's now possible for web content to ask the user to select local files and then read the contents of those files.
... using object urls the dom url.createobjecturl() and url.revokeobjecturl() methods let you create simple url strings that can be used to reference any data that can be referred to using a dom file object, including local files on the user's computer.
File and Directory Entries API support in Firefox - Web APIs
you can't use the localfilesystem.requestfilesystem() method to get access to a specified local file system.
... the localfilesystem.resolvelocalfilesystemurl() method isn't implemented.
HTMLFontElement.face - Web APIs
if no font listed is installed on the local system, the browser typically defaults to the proportional or fixed-width font for that system.
... the format of the string must follow one of the following html microsyntax: microsyntax description examples list of one or more valid font family names a list of font names, that have to be present on the local system courier,verdana syntax facestring = fontobj.face; fontobj.face = facestring; examples // assumes there is <font id="f"> element in the html var f = document.getelementbyid("f"); f.face = "arial"; specifications the <font> tag is not supported in html5 and as a result neither is <font>.face .
HTMLImageElement - Web APIs
htmlimageelement.usemap a domstring reflecting the usemap html attribute, containing the page-local url of the <map> element describing the image map to use.
... the page-local url is a pound (hash) symbol (#) followed by the id of the <map> element, such as #my-map-element.
HTMLInputElement - Web APIs
validationmessage read only string: returns a localized message that describes the validation constraints that the control does not satisfy (if any).
...possible values are: forward if selection was performed in the start-to-end direction of the current locale backward for the opposite direction none if the direction is unknown size unsigned long: returns / sets the element's size attribute, containing visual size of the control.
HTMLTextAreaElement - Web APIs
this is "forward" if selection was performed in the start-to-end direction of the current locale, or "backward" for the opposite direction.
... validationmessage read only string: returns a localized message that describes the validation constraints that the control does not satisfy (if any).
HTMLTimeElement.dateTime - Web APIs
tring must follow one of the following html microsyntaxes: microsyntax description examples valid month string yyyy-mm 2011-11, 2013-05 valid date string yyyy-mm-dd 1887-12-01 valid yearless date string mm-dd 11-12 valid time string hh:mm hh:mm:ss hh:mm:ss.mmm 23:59 12:15:47 12:15:52.998 valid local date and time string yyyy-mm-dd hh:mm yyyy-mm-dd hh:mm:ss yyyy-mm-dd hh:mm:ss.mmm yyyy-mm-ddthh:mm yyyy-mm-ddthh:mm:ss yyyy-mm-ddthh:mm:ss.mmm 2013-12-25 11:12 1972-07-25 13:43:07 1941-03-15 07:06:23.678 2013-12-25t11:12 1972-07-25t13:43:07 1941-03-15t07:06:23.678 valid time-zone offset string z +hhmm +hh:mm -hhmm -hh:mm ...
... z +0200 +04:30 -0300 -08:00 valid global date and time string any combination of a valid local date and time string followed by a valid time-zone offset string 2013-12-25 11:12+0200 1972-07-25 13:43:07+04:30 1941-03-15 07:06:23.678z 2013-12-25t11:12-08:00 valid week string yyyy-www 2013-w46 four or more ascii digits yyyy 2013, 0001 valid duration string pddthhmmss pddthhmms.xs pddthhmms.xxs pddthhmms.xxxs pthhmmss pthhmms.xs pthhmms.xxs pthhmms.xxxs ww dd hh mm ss p12dt7h12m13s p12dt7h12m13.3s p12dt7h12m13.45s p12dt7h12m13.455s pt7h12m13s pt7h12m13.2s pt7h12m13.56s pt7h12m13.999s 7d 5h 24m 13s syntax datetimestring = timeelt.datetime; t...
Recommended Drag Types - Web APIs
for instance: var dt = event.datatransfer; dt.setdata("text/html", "hello there, <strong>stranger</strong>"); dt.setdata("text/plain", "hello there, stranger"); dragging files a local file is dragged using the application/x-moz-file type with a data value that is an nsifile object.
...st-filename', nameprimitive, datasize); var name = nameprimitive.value.queryinterface(components.interfaces.nsisupportsstring).data; console.log("target filename is = " + name); var dirprimitive = {}; atransferable.gettransferdata('application/x-moz-file-promise-dir', dirprimitive, datasize); var dir = dirprimitive.value.queryinterface(components.interfaces.nsilocalfile); console.log("target folder is = " + dir.path); var file = cc['@mozilla.org/file/local;1'].createinstance(components.interfaces.nsilocalfile); file.initwithpath(dir.path); file.appendrelativepath(name); console.log("output final path is =" + file.path); // now you can write or copy the file yourself… } } } see also html drag and drop...
installChrome - Web APIs
installchrome installs new skin or locale packages in netscape 6 and mozilla.
... method of installtrigger object syntax int installchrome( type, url, name ) parameters the installchrome method has the following parameters: type type can be installtrigger.skin or installtrigger.locale.
InstallTrigger - Web APIs
install installs one or more xpi files on the local machine.
... installchrome installs new skin or locale packages in netscape 6 and mozilla.
Timing element visibility with the Intersection Observer API - Web APIs
we start by fetching the time at which the ad's previous visibility status check time (adbox.dataset.lastviewstarted) into a local variable named laststarted.
...then the local variables for each of the elements that comprise an ad: the ad box itself, the title, the body, and the timer box, are all set to the corresponding elements in the existing ad.
Keyboard API - Web APIs
the key value takes into account the keyboard's locale (for example, 'en-us'), layout (for example, 'qwerty'), and modifier-key state (shift, control, etc.).
... “writing system keys” are defined in the writing system keys section of the ui events keyboardevent code values spec as the physical keys that change meaning based on the current locale and keyboard layout.
MediaStreamTrack.remote - Web APIs
the mediastreamtrack.remote read-only property allows javascript to know whether a webrtc mediastreamtrack is from a remote source or a local one.
... it returns a boolean with a value of true if the track is sourced remotely (that is, sourced by an rtcpeerconnection), or false if it is sourced locally.
Media Capture and Streams API (Media Stream) - Web APIs
a mediastream object generated by getusermedia() is called local, and has as its source input one of the user's cameras or microphones.
... a non-local mediastream may be representing to a media element, like <video> or <audio>, a stream originating over the network, and obtained via the webrtc rtcpeerconnection api, or a stream created using the web audio api mediastreamaudiosourcenode.
MouseEvent - Web APIs
mouseevent.clientx read only the x coordinate of the mouse pointer in local (dom content) coordinates.
... mouseevent.clienty read only the y coordinate of the mouse pointer in local (dom content) coordinates.
Navigator - Web APIs
WebAPINavigator
navigator.getusermedia() after having prompted the user for permission, returns the audio or video stream associated to a camera or microphone on the local computer.
... non-standard navigator.mozislocallyavailable() lets code check to see if the document at a given uri is available without using the network.
PaymentAddress.toJSON() - Web APIs
requires the comma-delineated list in dom.payments.request.supportedregions to contain one or more of the supported 2-character iso locales, currently us and ca.disabled from version 62: this feature is behind the dom.payments.request.enabled preference (needs to be set to true).
...requires the comma-delineated list in dom.payments.request.supportedregions to contain one or more of the supported 2-character iso locales, currently us and ca.disabled from version 62: this feature is behind the dom.payments.request.enabled preference (needs to be set to true).
PaymentAddress - Web APIs
paymentaddress.dependentlocality read only a domstring giving the dependent locality or sublocality within a city, for example, a neighborhood, borough, district, or uk dependent locality.
...this identifies the language in which the address is given, and is intended to aid in localization of the display of the address.
PaymentCurrencyAmount.value - Web APIs
important note: the number given in this string is always specified using the period (".") as the decimal point, rather than the comma (","), even if the user's locale normally uses the comma.
... for uniformity and consistency, the value is always given using the period (".") as the decimal character, regardless of the user's locale.
PerformanceNavigationTiming - Web APIs
performancenavigationtiming.requeststart read only a domhighrestimestamp representing the time immediately before the user agent starts requesting the resource from the server, or from relevant application caches or from local resources.
... performancenavigationtiming.responsestart read only a domhighrestimestamp representing the time immediately after the user agent's http parser receives the first byte of the response from relevant application caches, or from local resources or from the server.
RTCConfiguration - Web APIs
you may find in some cases that connections can be established more quickly by allowing the ice agent to start fetching ice candidates before you start trying to connect, so that they're already available for inspection when rtcpeerconnection.setlocaldescription() is called.
...if this isn't specified, the connection attempt will be made with no stun or turn server available, which limits the connection to local peers.
RTCIceCandidatePair - Web APIs
properties local an rtcicecandidate describing the configuration of the local end of the connection.
... var icetransport = pc.getsenders()[0].transport.icetransport; var localproto = document.getelementbyid("local-protocol"); var remoteproto = document.getelementbyid("remote-protocol"); icetransport.onselectedcandidatepairchange = function(event) { var pair = icetransport.getselectedcandidatepair(); localprotocol.innertext = pair.local.protocol.touppercase(); remoteprotocol.innertext = pair.remote.protocol.touppercase(); } specifications specification status comment webrtc 1.0: rea...
RTCIceCandidateStats.deleted - Web APIs
dthe exact meaning varies depending on the type of candidate: local candidate a value of true means the candidate has been deleted as described by rfc 5245: 8.3.
... window.setinterval(function() { mypeerconnection.getstats(null).then(stats => { let statsoutput = ""; stats.foreach(report => { if ((stats.type === "local-candidate" || stats.type === "remote.candidate") && !stats.deleted) { statsoutput += `<h2>report: ${report.type}</h3>\n<strong>id:</strong> ${report.id}<br>\n` + `<strong>timestamp:</strong> ${report.timestamp}<br>\n`; // now the statistics for this report; we intentially drop the ones we // sorted to the top above object.keys(report).forea...
RTCIceCandidateStats.priority - Web APIs
the priority of a candidate is calculated using the following variables as inputs: the preferability of the candidate type (local, server reflexive, peer reflexive, or relayed) the preferability of the candidate's specific ip address (for multihomed agents) the candidate's component id (1 for rtp, 2 for rtcp) the candidate's priority is computed using the formula (ptype is the priority of the candidate's type and plocal is the priority of the ip address): priority = 224×ptype + 28×plocal + (256 - componentid)priority...
...\quad =\quad { 2 }^{ 24 }\times { p }_{ type }\quad +\quad { 2 }^{ 8 }\times { p }_{ local }\quad +\quad (256\quad -\quad componentid) this is equivalent to mapping the priorities of teh candidate type, the local ip, and the component id into various bit ranges within the 32-bit priority value.
RTCIceCandidateStats.relayProtocol - Web APIs
the rtcicecandidatestats dictionary's relayprotocol property specifies the protocol being used by a local ice candidate to communicate with the turn server.
... note: this property is only present on rtcicecandidatestats objects that represent local candidates.
RTCIceTransport.getSelectedCandidatePair() - Web APIs
local describes the configuration of the local end of the connection, while remote describes the remote peer's configuration.
... var icetransport = pc.getsenders()[0].transport.icetransport; var localproto = document.getelementbyid("local-protocol"); var remoteproto = document.getelementbyid("remote-protocol"); icetransport.onselectedcandidatepairchange = function(event) { var pair = icetransport.getselectedcandidatepair(); localprotocol.innertext = pair.local.protocol.touppercase(); remoteprotocol.innertext = pair.remote.protocol.touppercase(); } specifications specificatio...
RTCIceTransport.onselectedcandidatepairchange - Web APIs
the event handler can determine the current state by calling the transport's getselectedcandidatepair() method, which returns a rtcicecandidatepair whose rtcicecandidatepair.local and rtcicecandidatepair.global properties specify rtcicecandidate objects describing the local and remote candidates that are currently being used.
... var icetransport = pc.getsenders()[0].transport.icetransport; var localproto = document.getelementbyid("local-protocol"); var remoteproto = document.getelementbyid("remote-protocol"); icetransport.onselectedcandidatepairchange = function(event) { var pair = icetransport.getselectedcandidatepair(); localprotocol.innertext = pair.local.protocol.touppercase(); remoteprotocol.innertext = pair.remote.protocol.touppercase(); } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicetransport.onselectedcandidatepairc...
RTCInboundRtpStreamStats.packetsFailedDecryption - Web APIs
the packetsfaileddecryption property of the rtcinboundrtpstreamstats dictionary indicates the total number of rtp packets which failed to be decrypted successfully after being received by the local end of the connection during this session.
... syntax var packetsfaileddecryption = rtcinboundrtpstreamstats.packetsfaileddecryption; value an integer value which indicates how many packets the local end of the rtp connection could not be successfully decrypted.
RTCOfferOptions.iceRestart - Web APIs
pc.oniceconnectionstatechange = function(evt) { if (pc.iceconnectionstate === "failed") { if (pc.restartice) { pc.restartice(); } else { pc.createoffer({ icerestart: true }) .then(pc.setlocaldescription) .then(sendoffertoserver); } } } if the state changes to failed, this handler starts by looking to see if the rtcpeerconnection includes the restartice() method; if it does, we call that to request an ice restart.
... otherwise, we call back to the older technique: we manually create a new offer with icerestart set to true, then that offer is set as the new local description for the connection.
RTCPeerConnection.canTrickleIceCandidates - Web APIs
note: this property's value is determined once the local peer has called rtcpeerconnection.setremotedescription(); the provided description is used by the ice agent to determine whether or not the remote peer supports trickled ice candidates.
...pc.setremotedescription(remoteoffer) .then(_ => pc.createanswer()) .then(answer => pc.setlocaldescription(answer)) .then(_ => if (pc.cantrickleicecandidates) { return pc.localdescription; } return new promise(r => { pc.addeventlistener('icegatheringstatechange', e => { if (e.target.icegatheringstate === 'complete') { r(pc.localdescription); } }); }); }) .then(answer => sendanswertopeer(answer)) // signaling message .catch(e => handleerror(e)); pc.addeventlistener('icecandidate', e => { if (pc.cantrickleicecandidates) { sendcandidatetopeer(e.candidate)...
RTCPeerConnection.createAnswer() - Web APIs
the contents of the object being passed to the sendtoserver() function, along with everything else in the promise fulfillment handler, depend entirely on your design pc.createanswer().then(function(answer) { return pc.setlocaldescription(answer); }) .then(function() { // send the answer to the remote peer through the signaling server.
...in our promise handler, the returned answer is set as the description of the local end of the connection by calling setlocaldescription().
RTCPeerConnection.currentRemoteDescription - Web APIs
unlike rtcpeerconnection.remotedescription, this value represents the actual current state of the local end of the connection; remotedescription may specify a description which the connection is currently in the process of switching over to.
... var pc = new rtcpeerconnection(); … var sd = pc.currentremotedescription; if (sd) { alert("local session: type='" + sd.type + "'; sdp description='" + sd.sdp + "'"); } else { alert("no local session yet."); } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection.currentremotedescription' in that specification.
RTCPeerConnection: datachannel event - Web APIs
note: this event is not dispatched when the local end of the connection creates the channel.
... pc.addeventlistener("datachannel", ev => { receivechannel = ev.channel; receivechannel.onmessage = myhandlemessage; receivechannel.onopen = myhandleopen; receivechannel.onclose = myhandleclose; }, false); receivechannel is set to the value of the event's channel property, which specifies the rtcdatachannel object representing the data channel linking the remote peer to the local one.
RTCPeerConnection.iceConnectionState - Web APIs
"checking" the ice agent has been given one or more remote candidates and is checking pairs of local and remote candidates against one another to try to find a compatible match, but has not yet found a pair which will allow the peer connection to be made.
... "connected" a usable pairing of local and remote candidates has been found for all components of the connection, and the connection has been established.
RTCPeerConnection: negotiationneeded event - Web APIs
pc.addeventlistener("negotiationneeded", ev => { pc.createoffer() .then(offer => return pc.setlocaldescription(offer)) .then(() => sendsignalingmessage({ type: "video-offer", sdp: pc.localdescription })) .catch(err => { /* handle error */ ); }, false); after creating the offer, the local end is configured by calling rtcpeerconnection.setlocaldescription(); then a signaling message is created and sent to the remote peer through the signaling server, to share that offer with...
... you can also set an event handler for the negotiationneeded event by assigning the event handler function to the rtcpeerconnection.onnegotiationneeded property: pc.onnegotiationneeded = ev => { pc.createoffer() .then(offer => return pc.setlocaldescription(offer)) .then(() => sendsignalingmessage({ type: "video-offer", sdp: pc.localdescription })) .catch(err => { /* handle error */ ); }; for a more detailed example, see starting negotiation in signaling and video calling.
RTCPeerConnection.removeTrack() - Web APIs
the rtcpeerconnection.removetrack() method tells the local end of the connection to stop sending media from the specified track, without actually removing the corresponding rtcrtpsender from the list of senders as reported by rtcpeerconnection.getsenders().
...a negotiationneeded event is sent to the rtcpeerconnection to let the local end know this negotiation must occur.
RTCPeerConnection.setConfiguration() - Web APIs
var restartconfig = { iceservers: [{ urls: "turn:asia.myturnserver.net", username: "allie@oopcode.com", credential: "topsecretpassword" }] }; mypeerconnection.setconfiguration(restartconfig); mypeerconnection.createoffer({"icerestart": true}).then(function(offer) { return mypeerconnection.setlocaldescription(offer); }) .then(function() { // send the offer to the other peer using the signaling server }) .catch(reporterror); first, a new rtcconfiguration is created, restartconfig, specifying the new ice server and its credentials.
...from there, we handle the process as usual, by setting the local description to the returned offer and then sending that offer to the other peer.
RTCRemoteOutboundRtpStreamStats.reportsSent - Web APIs
the rtcremoteoutboundrtpstreamstats dictionary's reportssent property provides the number of sender reports (srs) the remote peer has transmitted to the local peer.
... syntax let reportcount = rtcremoteoutboundrtpstreamstats.reportssent; value an integer value which indicates the total number of rtcp sender reports so far sent by the remote peer to the local peer.
RTCRtpTransceiver - Web APIs
this association is established, when possible, whenever either a local or remote description is applied.
... this field is null if neither a local or remote description has been applied, or if its associated m-line is rejected by either a remote offer or any answer.
SVGAnimationElement - Web APIs
beginevent fired when the element local timeline begins to play.
... repeatevent fired when the element's local timeline repeats.
SVGGeometryElement.isPointInFill() - Web APIs
the point argument is interpreted as a point in the local coordiante system of the element.
... syntax boolean someelement.ispointinfill(dompointinit point); parameters point a dompointinit interpreted as a point in the local coordiante system of the element.
SVGGeometryElement.isPointInStroke() - Web APIs
the point argument is interpreted as a point in the local coordiante system of the element.
... syntax boolean someelement.ispointinstroke(dompointinit point); parameters point a dompointinit interpreted as a point in the local coordinate system of the element.
Storage.clear() - Web APIs
WebAPIStorageclear
examples the following function creates three data entries in local storage, and then deletes them by using clear().
... function populatestorage() { localstorage.setitem('bgcolor', 'red'); localstorage.setitem('font', 'helvetica'); localstorage.setitem('image', 'migato.png'); localstorage.clear(); } note: for a real world example, see our web storage demo.
Storage.getItem() - Web APIs
WebAPIStoragegetItem
example the following function retrieves three data items from local storage, then uses them to set custom styles on a page.
... function setstyles() { var currentcolor = localstorage.getitem('bgcolor'); var currentfont = localstorage.getitem('font'); var currentimage = localstorage.getitem('image'); document.getelementbyid('bgcolor').value = currentcolor; document.getelementbyid('font').value = currentfont; document.getelementbyid('image').value = currentimage; htmlelem.style.backgroundcolor = '#' + currentcolor; pelem.style.fontfamily = currentfont; imgelem.setattribute('src', currentimage); } note: to see this used within a real world example, see our web storage demo.
Storage.setItem() - Web APIs
WebAPIStoragesetItem
example the following function creates three data items inside local storage.
... function populatestorage() { localstorage.setitem('bgcolor', 'red'); localstorage.setitem('font', 'helvetica'); localstorage.setitem('image', 'mycat.png'); } note: to see this used within a real world example, see our web storage demo.
WebRTC Statistics API - Web APIs
this way, we look only at the video-related statistics for the local rtcrtpreceiver responsible for receiving the streamed media.
... rtcinboundrtpstreamstats rtcreceivedrtpstreamstats rtcrtpstreamstats rtcstats local-candidate statistics about a local ice candidate associated with the connection's rtcicetransports.
Writing WebSocket client applications - Web APIs
this should use the url scheme wss://, although some software may allow you to use the insecure ws:// for local connections.
...d types of data packets the client might receive, such as: login handshake message text user list updates the code that interprets these incoming messages might look like this: examplesocket.onmessage = function(event) { var f = document.getelementbyid("chatbox").contentdocument; var text = ""; var msg = json.parse(event.data); var time = new date(msg.date); var timestr = time.tolocaletimestring(); switch(msg.type) { case "id": clientid = msg.id; setusername(); break; case "username": text = "<b>user <em>" + msg.name + "</em> signed in at " + timestr + "</b><br>"; break; case "message": text = "(" + timestr + ") <b>" + msg.name + "</b>: " + msg.text + "<br>"; break; case "rejectusername": text = "<b>your userna...
Movement, orientation, and motion: A WebXR example - Web APIs
malmatrix'), usampler: gl.getuniformlocation(shaderprogram, 'usampler') }, }; buffers = initbuffers(gl); texture = loadtexture(gl, 'https://cdn.glitch.com/a9381af1-18a9-495e-ad01-afddfd15d000%2ffirefox-logo-solid.png?v=1575659351244'); xrsession.updaterenderstate({ baselayer: new xrwebgllayer(xrsession, gl) }); if (session_type == "immersive-vr") { refspacetype = "local"; } else { refspacetype = "viewer"; } mat4.fromtranslation(cubematrix, viewerstartposition); vec3.copy(cubeorientation, viewerstartorientation); xrsession.requestreferencespace(refspacetype) .then((refspace) => { xrreferencespace = refspace.getoffsetreferencespace( new xrrigidtransform(viewerstartposition, cubeorientation)); animationframerequestid = xrsession...
...immersive sessions use the local reference space, while inline sessions use the viewer reference space.
Spaces and reference spaces: Spatial tracking in WebXR - Web APIs
note: this article presumes that you are familiar with the concepts introduced in geometry and reference spaces in webxr: that is, the basics of 3d coordinate systems, as well as webxr spaces, reference spaces, and how reference spaces are used to create local coordinate systems for individual objects or movable components within a scene.
... representing a position using a reference space as covered in defining spatial relationships with reference spaces in geometry and reference spaces in webxr, reference spaces establish a local coordinate system which is offset from another coordinate system that is itself defined by some other space.
WorkerGlobalScope.location - Web APIs
example if you called the following in a document served at localhost:8000 console.log(location); inside a worker (which would basically be the equivalent of self.console.log(self.location);, as these are being called on the worker scope, which can be referenced with workerglobalscope.self), you will get a workerlocation object written to the console — something like the following: workerlocation {hash: "", search: "", pathname: "/worker.js", port: "8000", hostname: "localhost"…} ...
...hash: "" host: "localhost:8000" hostname: "localhost" href: "http://localhost:8000/worker.js" origin: "http://localhost:8000" pathname: "/worker.js" port: "8000" protocol: "http:" search: "" __proto__: workerlocation you could use this location object to return more information about the document's location, as you might do with a normal location object.
XRPermissionDescriptor - Web APIs
examples the example below demonstrates performing the permission request for an application that requires the local-floor reference space in an immersive-vr environment.
... let xrpermissiondesc = { name: "xr", mode: "immersive-vr", requiredfeatures: [ "local-floor" ] }; if (navigator.permissions) { navigator.permissions.query(xrpermissiondesc).then(({state}) => { switch(state) { case "granted": setupxr(); break; case "prompt": promptandsetupxr(); break; default: /* do nothing otherwise */ break; } .catch(err) { console.log(err); } } else { setupxr(); } specification...
XRRigidTransform.position - Web APIs
ted(xrsession) { xrsession.addeventlistener("end", onsessionended); gl = initgraphics(xrsession); let gllayer = new xrwebgllayer(xrsession, gl); xrsession.updaterenderstate({ baselayer: gllayer }); if (immersivesession) { xrsession.requestreferencespace("bounded-floor").then((refspace) => { refspacecreated(refspace); }).catch(() => { session.requestreferencespace("local-floor").then(refspacecreated); }); } else { session.requestreferencespace("viewer").then(refspacecreated); } } function refspacecreated(refspace) { if (immersivesession) { xrreferencespace = refspace; } else { xrreferencespace = refspace.getoffsetreferencespace( new xrrigidtransform({y: -1.5}); ); } xrsession.requestanimationframe(onframe); } after setting...
...if that fails (probably because bounded-floor isn't supported), we try requesting a local-floor reference space.
Web APIs
WebAPI
t htmltimeelement htmltitleelement htmltrackelement htmlulistelement htmlunknownelement htmlvideoelement hashchangeevent headers history hkdfparams hmacimportparams hmackeygenparams i idbcursor idbcursorsync idbcursorwithvalue idbdatabase idbdatabaseexception idbdatabasesync idbenvironment idbenvironmentsync idbfactory idbfactorysync idbindex idbindexsync idbkeyrange idblocaleawarekeyrange idbmutablefile idbobjectstore idbobjectstoresync idbopendbrequest idbrequest idbtransaction idbtransactionsync idbversionchangeevent idbversionchangerequest iirfilternode idledeadline imagebitmap imagebitmaprenderingcontext imagecapture imagedata index inputdevicecapabilities inputevent installevent installtrigger intersectionobserver intersectionobserverentry inte...
...rventionreportbody k keyboard keyboardevent keyboardlayoutmap keyframeeffect keyframeeffectoptions l largestcontentfulpaint layoutshift layoutshiftattribution linearaccelerationsensor linkstyle localfilesystem localfilesystemsync localmediastream location lock lockmanager lockedfile m midiaccess midiconnectionevent midiinput midiinputmap midimessageevent midioutputmap mscandidatewindowhide mscandidatewindowshow mscandidatewindowupdate msgestureevent msgraphicstrust msmanipulationevent msrangecollection mssitemodeevent magnetometer mathmlelement mediacapabilities mediacapabilitiesinfo mediaconfiguration mediadecodingconfiguration mediadeviceinfo mediadevices mediaelementaudiosourcenode mediaencodingconfiguration mediaerror mediaimage mediakeymessageevent mediak...
-webkit-mask-attachment - CSS: Cascading Style Sheets
/* keyword values */ -webkit-mask-attachment: scroll; -webkit-mask-attachment: fixed; -webkit-mask-attachment: local; /* multiple values */ -webkit-mask-attachment: scroll, local; -webkit-mask-attachment: fixed, local, scroll; /* global values */ -webkit-mask-attachment: inherit; -webkit-mask-attachment: initial; -webkit-mask-attachment: unset; syntax values scroll if scroll is specified, the mask image scrolls within the viewport along with the block that contains the mask image.
... formal definition initial valuescrollapplies toall elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax <attachment>#where <attachment> = scroll | fixed | local examples fixing a mask image to the viewport body { -webkit-mask-image: url('images/mask.png'); -webkit-mask-attachment: fixed; } specifications not part of any standard.
:host() - CSS: Cascading Style Sheets
WebCSS:host()
to change preferences in firefox, visit about:config.ie no support noopera full support 41safari full support 10notes full support 10notes notes certain css selectors do not work (:host > .local-child) and styling slotted content (::slotted) is buggy.webview android full support 54chrome android full support 54firefox android full support 63 full support 63 no support 61 — 63disabled...
...to change preferences in firefox, visit about:config.opera android full support 41safari ios full support 10notes full support 10notes notes certain css selectors do not work (:host > .local-child) and styling slotted content (::slotted) is buggy.samsung internet android full support 6.0legend full support full support no support no supportsee implementation notes.see implementation notes.user must explicitly enable this feature.user must ...
font-stretch - CSS: Cascading Style Sheets
ag 2.0 formal definition related at-rule@font-faceinitial valuenormalcomputed valueas specified formal syntax <font-stretch-absolute>{1,2}where <font-stretch-absolute> = normal | ultra-condensed | extra-condensed | condensed | semi-condensed | semi-expanded | expanded | extra-expanded | ultra-expanded | <percentage> examples setting a percentage range for font-stretch the following find a local open sans font or import it, and allow using the font for normal, semi-condensed and semi-expanded states.
... @font-face { font-family: "open sans"; src: local("open sans") format("woff2"), url("/fonts/opensans-regular-webfont.woff") format("woff"); font-stretch: 87.5% 112.5%; } specifications specification status comment css fonts module level 4the definition of 'font-stretch' in that specification.
font-weight - CSS: Cascading Style Sheets
itial valuenormalcomputed valueas specified formal syntax <font-weight-absolute>{1,2}where <font-weight-absolute> = normal | bold | <number <a href="/docs/css/value_definition_syntax#brackets" title="brackets: enclose several entities, combinators, and multipliers to transform them as a single component">[1,1000]> examples setting normal font weight in a @font-face rule the following finds a local open sans font or import it, and allows using the font for normal font weights.
... @font-face { font-family: "open sans"; src: local("open sans") format("woff2"), url("/fonts/opensans-regular-webfont.woff") format("woff"); font-weight: 400; } specifications specification status comment css fonts module level 4the definition of 'font-weight' in that specification.
unicode-range - CSS: Cascading Style Sheets
for example, a site with many localizations could provide separate font resources for english, greek and japanese.
... html <div>me & you = us</div> css @font-face { font-family: 'ampersand'; src: local('times new roman'); unicode-range: u+26; } div { font-size: 4em; font-family: ampersand, helvetica, sans-serif; } result specifications specification status comment css fonts module level 3the definition of 'unicode-range' in that specification.
Pseudo-classes - CSS: Cascading Style Sheets
rd pseudo-classes :active :any-link :blank :checked :current :default :defined :dir() :disabled :drop :empty :enabled :first :first-child :first-of-type :fullscreen :future :focus :focus-visible :focus-within :has() :host :host() :host-context() :hover :indeterminate :in-range :invalid :is() :lang() :last-child :last-of-type :left :link :local-link :not() :nth-child() :nth-col() :nth-last-child() :nth-last-col() :nth-last-of-type() :nth-of-type() :only-child :only-of-type :optional :out-of-range :past :placeholder-shown :read-only :read-write :required :right :root :scope :state() :target :target-within :user-invalid :valid :visited :where() specifications specification status...
... selectors level 4 working draft defined :any-link, :blank, :local-link, :scope, :drop, :current, :past, :future, :placeholder-shown, :user-invalid, :nth-col(), :nth-last-col(), :is() and :where().
Constraint validation - Developer guides
rangeunderflow constraint violation date, month, week a valid date datetime, datetime-local, time a valid date and time max range, number a valid number the value must be less than or equal to the value rangeoverflow constraint violation date, month, week a valid date datetime, datetime-local, time a valid date and time required text, search, url, tel, email, password, date, datetime, datetime-local, month, week, time, number, ...
... stepmismatch constraint violation month an integer number of months week an integer number of weeks datetime, datetime-local, time an integer number of seconds range, number an integer minlength text, search, url, tel, email, password; also on the <textarea> element an integer length the number of characters (code points) must not be less than the value of the attribute, if non-empty.
HTML5 - Developer guides
WebGuideHTMLHTML5
offline and storage: allowing webpages to store data on the client-side locally and operate offline more efficiently.
... using files from web applications support for the new html5 file api has been added to gecko, making it possible for web applications to access local files selected by the user.
Developer guides
localizations and character encodings browsers process text as unicode internally.
...this guide covers the algorithm in general and how it applies to content you create—especially when you build properly localized and internationalized content.
HTML attribute: max - HTML: Hypertext Markup Language
WebHTMLAttributesmax
valid for the numeric input types, including the date, month, week, time, datetime-local, number and range types, and both the <progress> and <meter> elements, the max attribute is a number that specifies the most positive value a form control to be considered valid.
...syntax syntax for max values by input type input type syntax example date yyyy-mm-dd <input type="date" max="2019-12-25" step="1"> month yyyy-mm <input type="month" max="2019-12" step="12"> week yyyy-w## <input type="week" max="2019-w23" step=""> time hh:mm <input type="time" max="17:00" step="900"> datetime-local yyyy-mm-ddthh:mm <input type="datetime-local" min="2019-12-25t23:59"> number <number> <input type="number" min="0" step="5" max="100"> range <number> <input type="range" min="60" step="5" max="100"> note: when the data entered by the user doesn't adhere to the maximum value set, the value is considered invalid in contraint validation and will match the ...
HTML attribute: min - HTML: Hypertext Markup Language
WebHTMLAttributesmin
valid for the numeric input types, including the date, month, week, time, datetime-local, number and range types, and the <meter> element, the min attribute is a number that specifies the most negative value a form control to be considered valid.
...5.2"> syntax for min values by input type input type example example date yyyy-mm-dd <input type="date" min="2019-12-25" step="1"> month yyyy-mm <input type="month" min="2019-12" step="12"> week yyyy-w## <input type="week" min="2019-w23" step=""> time hh:mm <input type="time" min="09:00" step="900"> datetime-local yyyy-mm-ddthh:mm <input type="datetime-local" min="2019-12-25t19:30"> number <number> <input type="number" min="0" step="5" max="100"> range <number> <input type="range" min="60" step="5" max="100"> note: when the data entered by the user doesn't adhere to the min value set, the value is considered invalid in contraint validation and will match the :inv...
HTML attribute: step - HTML: Hypertext Markup Language
WebHTMLAttributesstep
valid for the numeric input types, including the date, month, week, time, datetime-local, number and range types, the step attribute is a number that specifies the granularity that the value must adhere to or the keyword any.
... default values for step input type value example date 1 (day) <input type="date" min="2019-12-25" step="1"> month 1 (month) <input type="month" min="2019-12" step="12"> week 1 (week) <input type="week" min="2019-w23" step="2"> time 60 (seconds) <input type="time" min="09:00" step="900"> datetime-local 1 (day) <input type="datetime-local" min="019-12-25t19:30" step="7"> number 1 <input type="number" min="0" step="0.1" max="10"> range 1 <input type="range" min="0" step="2" max="10"> if any is not explicity set, valid values for the number, date/time input types, and range input types are equal to the basis for stepping - the min value and incre...
<input type="tel"> - HTML: Hypertext Markup Language
WebHTMLElementinputtel
this particular pattern is obviously only useful for certain locales — in a real application you'd probably have to vary the pattern used depending on the locale of the user.
...,"first part of number"); inputelems[2].placeholder = "second part"; inputelems[2].pattern = "[0-9]{4}"; inputelems[2].setattribute("aria-label","second part of number"); } else if(selectelem.value === "uk") { inputelems[2].parentnode.style.display = "none"; inputelems[0].placeholder = "area code"; inputelems[0].pattern = "[0-9]{3,6}"; inputelems[1].placeholder = "local number"; inputelems[1].pattern = "[0-9]{4,8}"; inputelems[1].setattribute("aria-label","local number"); } else if(selectelem.value === "germany") { inputelems[2].parentnode.style.display = "inline"; inputelems[0].placeholder = "area code"; inputelems[0].pattern = "[0-9]{3,5}"; inputelems[1].placeholder = "first part"; inputelems[1].pattern = "[0-9]{2,4}"; input...
<keygen> - HTML: Hypertext Markup Language
WebHTMLElementkeygen
the private key is encrypted and stored in the local key database.
... here is an example form submission as it would be delivered to a cgi program by the http server: commonname=john+doe&email=doe@foo.com&org=foobar+computing+corp.& orgunit=bureau+of+bureaucracy&locality=anytown&state=california&country=us& key=mihfmhewxdanbgkqhkig9w0baqefaanladbiakeanx0tiljromuue%2bptwbre6xfv%0awtkqbsshxk5zhcuwcwyvcniq9b82qhjdoacdd34rqfcaind46fxkqunb0mvkzqid%0aaqabfhfnb3ppbgxhsxnneuzyawvuzdanbgkqhkig9w0baqqfaanbaakv2eex2n%2fs%0ar%2f7ijnrowlszsmttiqteb%2badwhgj9u1xruroilq%2fo2cuqxifzcnzkyakwp4dubqw%0ai0%2f%2frgbvmco%3d specifications specification status co...
<tt>: The Teletype Text element (obsolete) - HTML: Hypertext Markup Language
WebHTMLElementtt
<p>enter the following at the telnet command prompt: <code>set localecho</code><br /> the telnet client should display: <tt>local echo is on</tt></p> result overriding the default font you can override the browser's default font—if the browser permits you to do so, which it isn't required to do—using css: css tt { font-family: "lucida console", "menlo", "monaco", "courier", monospace; } html <p>enter the following at the telnet comm...
...and prompt: <code>set localecho</code><br /> the telnet client should display: <tt>local echo is on</tt></p> result usage notes the <tt> element is, by default, rendered using the browser's default non-proportional font.
inputmode - HTML: Hypertext Markup Language
text (default value) standard input keyboard for the user's current locale.
... decimal fractional numeric input keyboard containing the digits and decimal separator for the user's locale (typically .
translate - HTML: Hypertext Markup Language
the translate global attribute is an enumerated attribute that is used to specify whether an element's translateable attribute values and its text node children should be translated when the page is localized, or whether to leave them unchanged.
... it can have the following values: empty string or "yes", which indicates that the element should be translated when the page is localized.
Microdata - HTML: Hypertext Markup Language
commonly used vocabularies: creative works: creativework, book, movie, musicrecording, recipe, tvseries embedded non-text objects: audioobject, imageobject, videoobject event health and medical types: notes on the health and medical types under medicalentity organization person place, localbusiness, restaurant product, offer, aggregateoffer review, aggregaterating action thing intangible major search engine operators like google, microsoft, and yahoo!
... localization in some cases, search engines covering specific regions may provide locally-specific extensions of microdata.
Using the application cache - HTML: Hypertext Markup Language
speed cached resources are local, and therefore load faster.
... in firefox, the offline cache data is stored separately from the firefox profile—next to the regular disk cache: windows vista/7: c:\users\<username>\appdata\local\mozilla\firefox\profiles\<salt>.<profile name>\offlinecache mac/linux: /users/<username>/library/caches/firefox/profiles/<salt>.<profile name>/offlinecache in firefox the current status of the offline cache can be inspected on the about:cache page (under the "offline cache device" heading).
Reason: CORS request not HTTP - HTTP
this often occurs if the url specifies a local file, using a file:/// url.
... local file security in firefox 68 when a user opened a page using a file:/// uri in firefox 67 and earlier, the origin of the page was defined as the directory from which the page was opened.
HTTP conditional requests - HTTP
while a client is locally modifying its new copy of the resource, a second client can fetch the same resource and do the same on its copy.
...the concept is to allow all clients to get copies of the resource, then let them modify it locally, controlling concurrency by successfully allowing the first client submitting an update.
Index - HTTP
WebHTTPHeadersIndex
5 accept-language content negotiation, http, http header, reference, request header the accept-language request http header advertises which languages the client is able to understand, and which locale variant is preferred.
...it allows web developers to have more control over the data stored locally by a browser for their origins.
JavaScript data types and data structures - JavaScript
it may be necessary to use such techniques in very constrained environments, like when trying to cope with the limitations of local storage, or in extreme cases (such as when each bit over the network counts).
... strings are the common denominator of a lot of apis (input fields, local storage values, xmlhttprequest responses when using responsetext, etc.) and it can be tempting to only work with strings.
Concurrency model and the event loop - JavaScript
function foo(b) { let a = 10 return a + b + 11 } function bar(x) { let y = 3 return foo(x * y) } console.log(bar(7)) //returns 42 when calling bar, a first frame is created containing bar's arguments and local variables.
... when bar calls foo, a second frame is created and pushed on top of the first one containing foo's arguments and local variables.
Array.prototype.sort() - JavaScript
strings with accented characters (e, é, è, a, ä, etc.), strings from languages other than english, use string.localecompare.
... var items = ['réservé', 'premier', 'communiqué', 'café', 'adieu', 'éclair']; items.sort(function (a, b) { return a.localecompare(b); }); // items is ['adieu', 'café', 'communiqué', 'éclair', 'premier', 'réservé'] sorting with map the comparefunction can be invoked multiple times per element within the array.
Array - JavaScript
array.prototype.tolocalestring() returns a localized string representing the array and its elements.
... overrides the object.prototype.tolocalestring() method.
BigInt - JavaScript
instance methods bigint.prototype.tolocalestring() returns a string with a language-sensitive representation of this number.
... overrides the object.prototype.tolocalestring() method.
BigInt64Array - JavaScript
bigint64array.prototype.tolocalestring() returns a localized string representing the array and its elements.
... see also array.prototype.tolocalestring().
BigUint64Array - JavaScript
biguint64array.prototype.tolocalestring() returns a localized string representing the array and its elements.
... see also array.prototype.tolocalestring().
Date.UTC() - JavaScript
the utc() method differs from the date constructor in two ways: date.utc() uses universal time instead of the local time.
... examples using date.utc() the following statement creates a date object with the arguments treated as utc instead of local: let utcdate = new date(date.utc(2018, 11, 1, 0, 0, 0)); specifications specification ecmascript (ecma-262)the definition of 'date.utc' in that specification.
Date.prototype.getDate() - JavaScript
the getdate() method returns the day of the month for the specified date according to local time.
... syntax dateobj.getdate() return value an integer number, between 1 and 31, representing the day of the month for the given date according to local time.
Date.prototype.getDay() - JavaScript
the getday() method returns the day of the week for the specified date according to local time, where 0 represents sunday.
... syntax dateobj.getday() return value an integer number, between 0 and 6, corresponding to the day of the week for the given date, according to local time: 0 for sunday, 1 for monday, 2 for tuesday, and so on.
Date.prototype.getFullYear() - JavaScript
the getfullyear() method returns the year of the specified date according to local time.
... syntax dateobj.getfullyear() return value a number corresponding to the year of the given date, according to local time.
Date.prototype.getHours() - JavaScript
the gethours() method returns the hour for the specified date, according to local time.
... syntax dateobj.gethours() return value an integer number, between 0 and 23, representing the hour for the given date according to local time.
Date.prototype.getMilliseconds() - JavaScript
the getmilliseconds() method returns the milliseconds in the specified date according to local time.
... syntax dateobj.getmilliseconds() return value a number, between 0 and 999, representing the milliseconds for the given date according to local time.
Date.prototype.getMinutes() - JavaScript
the getminutes() method returns the minutes in the specified date according to local time.
... syntax dateobj.getminutes() return value an integer number, between 0 and 59, representing the minutes in the given date according to local time.
Date.prototype.getMonth() - JavaScript
the getmonth() method returns the month in the specified date according to local time, as a zero-based value (where zero indicates the first month of the year).
... syntax dateobj.getmonth() return value an integer number, between 0 and 11, representing the month in the given date according to local time.
Date.prototype.getSeconds() - JavaScript
the getseconds() method returns the seconds in the specified date according to local time.
... syntax dateobj.getseconds() return value an integer number, between 0 and 59, representing the seconds in the given date according to local time.
Date.prototype.getYear() - JavaScript
the getyear() method returns the year in the specified date according to local time.
... syntax dateobj.getyear() return value a number representing the year of the given date, according to local time, minus 1900.
Float32Array - JavaScript
float32array.prototype.tolocalestring() returns a localized string representing the array and its elements.
... see also array.prototype.tolocalestring().
Float64Array - JavaScript
float64array.prototype.tolocalestring() returns a localized string representing the array and its elements.
... see also array.prototype.tolocalestring().
Int16Array - JavaScript
int16array.prototype.tolocalestring() returns a localized string representing the array and its elements.
... see also array.prototype.tolocalestring().
Int32Array - JavaScript
int32array.prototype.tolocalestring() returns a localized string representing the array and its elements.
... see also array.prototype.tolocalestring().
Int8Array - JavaScript
int8array.prototype.tolocalestring() returns a localized string representing the array and its elements.
... see also array.prototype.tolocalestring().
Intl.DateTimeFormat.prototype.format() - JavaScript
the intl.datetimeformat.prototype.format() method formats a date according to the locale and formatting options of this intl.datetimeformat object.
... description the format getter formats a date into a string according to the locale and formatting options of this intl.datetimeformat object.
Intl.DateTimeFormat.prototype.formatRange() - JavaScript
the intl.datetimeformat.prototype.formatrange() formats a date range in the most concise way based on the locale and options provided when instantiating intl.datetimeformat object.
... syntax intl.datetimeformat.prototype.formatrange(startdate, enddate) examples basic formatrange usage this method receives two dates and formats the date range in the most concise way based on the locale and options provided when instantiating intl.datetimeformat.
Intl.DateTimeFormat.prototype.formatRangeToParts() - JavaScript
the intl.datetimeformat.prototype.formatrangetoparts() method allows locale-specific tokens representing each part of the formatted date range produced by datetimeformat formatters.
... syntax intl.datetimeformat.prototype.formatrangetoparts(startdate, enddate) examples basic formatrangetoparts usage this method receives two dates and returns an array of objects containing the locale-specific tokens representing each part of the formatted date range.
Intl.DisplayNames.prototype.of() - JavaScript
the of() method receives a code and returns a string based on the locale and options provided when instantiating intl.displaynames.
... if the type is "language", code should be a languagecode ["-" scriptcode] ["-" regioncode ] *("-" variant ) subsequence of the unicode_language_id grammar in uts 35's unicode language and locale identifiers grammar.
Intl.ListFormat - JavaScript
static methods intl.listformat.supportedlocalesof() returns an array containing those of the provided locales that are supported without having to fall back to the runtime's default locale.
... intl.listformat.prototype.formattoparts() returns an array of objects representing the different components that can be used to format a list of values in a locale-aware fashion.
Intl.NumberFormat.prototype.format() - JavaScript
the intl.numberformat.prototype.format() method formats a number according to the locale and formatting options of this numberformat object.
... description the format getter function formats a number into a string according to the locale and formatting options of this numberformat object.
Intl.PluralRules.select() - JavaScript
the intl.pluralrules.prototype.select method returns a string indicating which plural rule to use for locale-aware formatting.
... description this function selects a pluralization category according to the locale and formatting options of a pluralrules object.
JSON.stringify() - JavaScript
var a = json.stringify({ foo: "bar", baz: "quux" }) //'{"foo":"bar","baz":"quux"}' var b = json.stringify({ baz: "quux", foo: "bar" }) //'{"baz":"quux","foo":"bar"}' console.log(a !== b) // true // some memoization functions use json.stringify to serialize arguments, // which may cause a cache miss when encountering the same object like above example of using json.stringify() with localstorage in a case where you want to store an object created by your user and allowing it to be restored even after the browser has been closed, the following example is a model for the applicability of json.stringify(): // creating an example of json var session = { 'screens': [], 'state': true }; session.screens.push({ 'name': 'screena', 'width': 450, 'height': 250 }); session.screens.push(...
...width': 650, 'height': 350 }); session.screens.push({ 'name': 'screenc', 'width': 750, 'height': 120 }); session.screens.push({ 'name': 'screend', 'width': 250, 'height': 60 }); session.screens.push({ 'name': 'screene', 'width': 390, 'height': 120 }); session.screens.push({ 'name': 'screenf', 'width': 1240, 'height': 650 }); // converting the json string with json.stringify() // then saving with localstorage in the name of session localstorage.setitem('session', json.stringify(session)); // example of how to transform the string generated through // json.stringify() and saved in localstorage in json object again var restoredsession = json.parse(localstorage.getitem('session')); // now restoredsession variable contains the object that was saved // in localstorage console.log(restoredsession);...
Number - JavaScript
number.prototype.tolocalestring([locales [, options]]) returns a string with a language sensitive representation of this number.
... overrides the object.prototype.tolocalestring() method.
TypedArray - JavaScript
typedarray.prototype.tolocalestring() returns a localized string representing the array and its elements.
... see also array.prototype.tolocalestring().
Uint16Array - JavaScript
uint16array.prototype.tolocalestring() returns a localized string representing the array and its elements.
... see also array.prototype.tolocalestring().
Uint32Array - JavaScript
uint32array.prototype.tolocalestring() returns a localized string representing the array and its elements.
... see also array.prototype.tolocalestring().
Uint8Array - JavaScript
uint8array.prototype.tolocalestring() returns a localized string representing the array and its elements.
... see also array.prototype.tolocalestring().
Uint8ClampedArray - JavaScript
uint8clampedarray.prototype.tolocalestring() returns a localized string representing the array and its elements.
... see also array.prototype.tolocalestring().
Destructuring assignment - JavaScript
const o = {p: 42, q: true}; const {p: foo, q: bar} = o; console.log(foo); // 42 console.log(bar); // true here, for example, const {p: foo} = o takes from the object o the property named p and assigns it to a local variable named foo.
... nested object and array destructuring const metadata = { title: 'scratchpad', translations: [ { locale: 'de', localization_tags: [], last_edit: '2014-04-14t08:43:37', url: '/de/docs/tools/scratchpad', title: 'javascript-umgebung' } ], url: '/docs/tools/scratchpad' }; let { title: englishtitle, // rename translations: [ { title: localetitle, // rename }, ], } = metadata; console.log(englishtitle); // "scratchpad" console.log(localetitle); // ...
Function expression - JavaScript
the name is only local to the function body.
...this name is then local only to the function body (scope).
for - JavaScript
variables declared with var are not local to the loop, i.e.
...variables declared with let are local to the statement.
Strict mode - JavaScript
this means that, in general, in a function containing a call to eval every name not referring to an argument or local variable must be mapped to a particular definition at runtime (because that eval might have introduced a new variable that would hide the outer variable).
... in strict mode eval creates variables only for the code being evaluated, so eval can't affect whether a name refers to an outer variable or some local variable: var x = 17; var evalx = eval("'use strict'; var x = 42; x;"); console.assert(x === 17); console.assert(evalx === 42); if the function eval is invoked by an expression of the form eval(...) in strict mode code, the code will be evaluated as strict mode code.
Web media technologies
media capture and streams api a reference for the api which makes it possible to stream, record, and manipulate media both locally and across a network.
... this includes using local cameras and microphones to capture video, audio, and still images.
Performance fundamentals - Web Performance
on the same note, notice that locally-cached, static resources can be loaded much faster than dynamic data fetched over high-latency, low-bandwidth mobile networks.
...local caching/offline apps can be achieved via service workers.
name - SVG: Scalable Vector Graphics
WebSVGAttributename
value <name> default value none animatable yes <name> this value specifies the name of a local font.
... unlike the syntax allowed between the parentheses of the local(…) clause in an @font-face rule src descriptor, the font name specified in this attribute is not surrounded in single or double quotes.
Content type - SVG: Scalable Vector Graphics
for example, to fill a rectangle with a linear gradient, you first define a <lineargradient> element and give it an id, as in: <lineargradient xml:id="mygradient">...</lineargradient> you then reference the linear gradient as the value of the fill attribute for the rectangle, as in the following example: <rect fill="url(#mygradient)"/> svg supports two types of iri references: local iri references, where the iri reference does not contain an <absoluteiri> or <relativeiri> and thus only contains a fragment identifier (i.e., #<elementid> or #xpointer(id<elementid>)).
... non-local iri references, where the iri reference does contain an <absoluteiri> or <relativeiri>.
SVG: Scalable Vector Graphics
WebSVG
compared to classic bitmapped image formats such as jpeg or png, svg-format vector images can be rendered at any size without loss of quality and can be easily localized by updating the text within them, without the need of a graphical editor to do so.
... with proper libraries, svg files can even be localized on-the-fly.
Secure contexts - Web security
locally-delivered resources such as those with http://127.0.0.1 urls, http://localhost urls (under certain conditions), and file:// urls are also considered to have been delivered securely.
... resources that are not local, to be considered secure, must meet the following criteria: must be served over https:// or wss:// urls the security properties of the network channel used to deliver the resource must not be considered deprecated feature detection pages can use feature detection to check whether they are in a secure context or not by using the issecurecontext boolean, which is exposed on the global scope.
<xsl:variable> - XSLT: Extensible Stylesheet Language Transformations
WebXSLTElementvariable
xslt/xpath reference: xslt elements, exslt functions, xpath functions, xpath axes the <xsl:variable> element declares a global or local variable in a stylesheet and gives it a value.
...if it occurs within a template, the variable is local in scope, accessible only within the template in which it appears.
Index - XSLT: Extensible Stylesheet Language Transformations
WebXSLTIndex
when used inside an <xsl:template> element, the parameter is local to that template.
... 52 <xsl:variable> element, reference, xslt, variable the <xsl:variable> element declares a global or local variable in a stylesheet and gives it a value.
2015 MDN Fellowship Program - Archive of obsolete content
this page is a historical archive, originally hosted at /fellowship, and was localized.
Cross-domain Content Scripts - Archive of obsolete content
cross-domain iframes the following "main.js" creates a page-worker which loads a local html file called "page.html", attaches a content script called "page.js" to the page, waits for messages from the script, and logs the payload.
Loading Content Scripts - Archive of obsolete content
the contentscriptfile option enables you to pass in the local file url from which the content script will be loaded.
Two Types of Scripts - Archive of obsolete content
✔ ✔ globals defined by the html5 specification, such as window, document, and localstorage.
self - Archive of obsolete content
while not generally of use to add-on code directly, it can be used by internal api code to index local storage and other resources that are associated with a particular add-on.
tabs - Archive of obsolete content
example var tabs = require("sdk/tabs"); tabs.on('ready', function(tab) { var worker = tab.attach({ contentscript: 'document.body.style.border = "5px solid red";' }); }); parameters options : object optional options: name type contentscriptfile string,array the local file urls of content scripts to load.
High-Level APIs - Archive of obsolete content
l10n localize strings appearing in the add-on's javascript code.
content/loader - Archive of obsolete content
; hiddenframes.add(hiddenframes.hiddenframe({ onready: function onready() { let frame = self._frame = this.element; self._emit('propertychange', { contenturl: self.contenturl }); } })); }, _onchange: function _onchange(e) { if ('contenturl' in e) this._frame.setattribute('src', this._contenturl); } }); loader properties contentscriptfile the local file urls of content scripts to load.
content/symbiont - Archive of obsolete content
symbiont symbiont is composed from the worker trait, therefore instances of symbiont and their descendants expose all the public properties exposed by worker along with additional public properties that are listed below: properties contentscriptfile the local file urls of content scripts to load.
content/worker - Archive of obsolete content
optional options: name type contentscriptfile string,array the local file urls of content scripts to load.
fs/path - Archive of obsolete content
experimental provides access to the local filesystem with the nodejs path module api.
io/file - Archive of obsolete content
experimental provides access to the local filesystem.
test/httpd - Archive of obsolete content
the server listens at http://localhost:port/ and serves files from the specified directory.
util/match-pattern - Archive of obsolete content
to match local files, use file://*, and to match files loaded from your add-on's data directory, use resource://.
cfx to jpm - Archive of obsolete content
requiring local modules suppose your add-on is structured into separate modules: my-addon lib main.js utils.js when you want to use the "utils" module in "main.js", you should use a path relative to "main.js", and prefix the path with "./" to indicate that it's a relative path: var utils = require("./utils"); however, with cfx you are also allowed to omit the "./": var...
Chrome Authority - Archive of obsolete content
var xhr = require("x"+"hr"); var modname = "xpcom"; var xpcom = require(modname); var one = require("one"); var two = require("two"); the intention is that developers use require() statements for two purposes: to declare (to security reviewers) what sorts of powers the module wants to use, and to control how those powers are mapped into the module's local namespace.
Getting Started (jpm) - Archive of obsolete content
note that firefox by default requires add-ons, even locally developed ones, to be signed.
Tutorials - Archive of obsolete content
localization writing localizable code.
Add-on SDK - Archive of obsolete content
development techniques learn about common development techniques, such as unit testing, logging, creating reusable modules, localization, and mobile development.
Canvas code snippets - Archive of obsolete content
> { image.onload = accept; image.onerror = reject; }).then(accept => { canvas.width = this.width; canvas.height = this.height; ctxt.clearrect(0, 0, this.width, this.height); ctxt.drawimage(this, 0, 0); accept(canvas.todataurl()); }); } usage: loadimagefile('myimage.jpg').then(string64 => { alert(string64); }); if you want to get instead the base64 content of a local file using the file <input> element, you must use the filereader object.
IsDefaultNamespace - Archive of obsolete content
node.isdefaultnamespace(namespaceuri); } switch (node.nodetype) { case 1: // element_node if (!node.prefix) { return (node.namespaceuri === namespaceuri); } if (node.attributes.length) { for (var i=0; i < node.attributes.length; i++) { var att = node.attributes[i]; if (att.localname === 'xmlns') { return att.value === namespaceuri; } } } if (node.parentnode) { // entityreferences may have to be skipped to get to it return isdefaultnamespace(node.parentnode, namespaceuri); } else { return false; // unknown; } ...
JS XPCOM - Archive of obsolete content
for example, var nsfile = components.constructor("@mozilla.org/file/local;1", "nsifile", "initwithpath"); var file = new nsfile(filepath); they can also be created and initialized manually: var file = components.classes["@mozilla.org/file/local;1"] .createinstance(components.interfaces.nsifile); file.initwithpath(filepath); this creates a new instance of the object with contract id @mozilla.org/file/local;1 and allows you to call methods from...
xml:base support in old browsers - Archive of obsolete content
// var ns = 'http://www.w3.org/xml/1998/namespace'; var att, protocolpos; var xmlbase = ''; var abs = false; // avoid loop if node is not present if (!thisitem || !thisitem.nodename) { return xmlbase; } // check present element and higher up for xml:base // now check for the next matching local name up in the hierarchy (until the document root) while (thisitem.nodename !== '#document' && thisitem.nodename !== '#document-fragment') { att = thisitem.getattribute('xml:base'); // xml: namespaces must use 'xml' prefix if (att) { protocolpos = att.indexof('//'); var protocolmatch = att.match(scheme); if (protocolmatch) { // if has protocol, can stop if (abs) { var skip...
Deploying a Plugin as an Extension - Archive of obsolete content
normally, this plugin is installed in a local directory, and a registry item is used to let firefox know about the plugin.
Enhanced Extension Installation - Archive of obsolete content
the types at the time of writing include: 2 - extension 4 - theme 8 - locale for backward compatibility the extension system will continue to assume an item is an extension by default, and a theme if the item has a <em:internalname> property, but extension and theme authors should be good citizens and upgrade their install manifests to include the type.
Extension Packaging - Archive of obsolete content
users can download xpi files from a website, or from a local file, and install by opening it, or dragging it into the extension manager window.
Extension Versioning, Update and Compatibility - Archive of obsolete content
the information page retrieved must currently be totally valid xhtml, including being delivered with the mime type application/xhtml+xml (important: see problems section) you may include %app_locale% in your updateinfourl if you want to have locale information included in the url -- this allows you to customize the text based on the user's locale.
Extension Etiquette - Archive of obsolete content
internationalization locales always use locale dtds and property files, even if providing your extension in one language.
Inline options - Archive of obsolete content
here is an example of an options.xul file: <?xml version="1.0"?> <!doctype mydialog system "chrome://myaddon/locale/mydialog.dtd"> <vbox xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <setting type="bool" pref="extensions.myaddon.bool" title="boolean" desc="stored as a boolean preference" /> </vbox> note that it's limited to <setting> tags.
Interaction between privileged and non-privileged pages - Archive of obsolete content
m unexpected source"; return new xml(event.target.getattribute("eventdatafrompage")); } security notes never invoke the web page's javascript functions from your extension - doing this increases the chance of creating a security hole, where a malicious web page can trick the browser to run its code with extended privileges (just like your extension) with, for example, the ability to delete local files.
Chapter 1: Introduction to Extensions - Archive of obsolete content
because firefox and its extensions are designed to support multiple languages, excellent extensions come from all over the world, and can be quickly localized by anyone interested.
Adding Events and Commands - Archive of obsolete content
there's a reason for the division between remote content and local chrome, so make sure you respect it.
Adding sidebars - Archive of obsolete content
treerow> <treecell label="peter" /> <treecell label="hey, what's up?" /> </treerow> </treeitem> <treeitem> <treerow> <treecell label="john"/> <treecell label="good evening, how are you doing?" /> </treerow> </treeitem> </treechildren> </tree> the text in the rows of the tree is hardcoded because we wouldn't generally use text from locale files.
Appendix C: Avoiding using eval in Add-ons - Archive of obsolete content
// this will encapsulate local variables such as _original and // not pollute the global namespace.
Getting Started with Firefox Extensions - Archive of obsolete content
you should see the following directory structure: xulschoolhello1 chrome.manifest install.rdf content browseroverlay.xul browseroverlay.js skin browseroverlay.css locale en-us browseroverlay.dtd browseroverlay.properties that's lots of files for something so simple!
Introduction - Archive of obsolete content
xulrunner xulrunner includes the gecko rendering engine, the necko networking library, and several other components that provide os-independent file management, accessibility, and localization, among others.
JavaScript Object Management - Archive of obsolete content
common cases include interacting with a local database or a remote api.
XUL School Tutorial - Archive of obsolete content
xtension setting up a development environment javascript object management basic functionality adding menus and submenus adding toolbars and toolbar buttons adding events and commands adding windows and dialogs adding sidebars user notifications and alerts intermediate functionality intercepting page loads connecting to remote content handling preferences local storage advanced topics the box model xpcom objects observer notifications custom xul elements with xbl mozilla documentation roadmap useful mozilla community sites appendices appendix a: add-on performance appendix b: install and uninstall scripts appendix c: avoiding using eval in add-ons appendix d: loading scripts appendix e: dom building and html inser...
Setting up an extension development environment - Archive of obsolete content
on ubuntu (and many other linux distributions): /usr/bin/firefox -no-remote -p dev on other distributions of linux/unix: /usr/local/bin/firefox -no-remote -p dev on macos mavericks (10.9) and newer: /applications/firefox.app/contents/macos/firefox-bin -no-remote -p dev & on windows: start -> run "%programfiles%\mozilla firefox\firefox.exe" -no-remote -p dev on windows 64 bit: start -> run "%programfiles(x86)%\mozilla firefox\firefox.exe" -no-remote -p dev to start thunderbird or seamonkey instead of firefox, substit...
Firefox addons developer guide - Archive of obsolete content
so there may be still some reference to the xuldev website (we want to host source code on mdc, not on xuldev), and to japanese things (like some specific locales, which have been translated to french since non-latin characters are not well supported).
Using the Stylesheet Service - Archive of obsolete content
ts.interfaces.nsistylesheetservice); var ios = components.classes["@mozilla.org/network/io-service;1"] .getservice(components.interfaces.nsiioservice); var uri = ios.newuri("chrome://myext/content/myext.css", null, null); sss.loadandregistersheet(uri, sss.user_sheet); note: loadandregistersheet will load the stylesheet synchronously, so you should only call this method using local uris.
Adding preferences to an extension - Archive of obsolete content
once we have the symbol in the local variable symbol, we use that to construct the url and the string to display in the status bar panel.
Creating reusable content with CSS and XBL - Archive of obsolete content
note: xbl cannot be loaded over http, so this technique is only useful for local content accessed using the file:/// scheme, or from add-on code.
XUL user interfaces - Archive of obsolete content
tebox.focus(); } function showstatus(adate) { if (adate == null) { status.removeattribute("warning") status.setattribute("label", "") } else if (adate === false || isnan(adate.gettime())) { status.setattribute("warning", "true") status.setattribute("label", "date is not valid") } else { status.removeattribute("warning") status.setattribute("label", adate.tolocaledatestring()) } } to see the result exactly as intended, use the default theme in your browser.
CSS3 - Archive of obsolete content
the background-attachment local value.
Getting the page URL in NPAPI plugin - Archive of obsolete content
npidentifier identifier = npn_getstringidentifier( "location" ); // declare a local variant value.
List of Mozilla-Based Applications - Archive of obsolete content
tool built on xulrunner mongodb database project uses spidermonkey moyura email client part of the khmeros linux distro mozcards, jolistopwatch, jolitimer simple apps for maemo uses xulrunner moznet .net control embeddable gecko for .net applications wraps xulrunner for use in .net applications my internet browser localized browser uses gecko myna application server javascript application server for java uses mozilla rhino nextcms (fr) cms nightingale music player community run effort to continue songbird support for linux olpc web browser browser oneteam jabber client opendocument viewer viewer opengate's t...
Same-origin policy for file: URIs - Archive of obsolete content
in other words, any html file on your local disk can read any other file on your local disk.
Using content preferences - Archive of obsolete content
this permits code running within chrome (in other words: extensions and the browser itself, not web sites) to locally save preferences on a per-site basis.
Misc top level - Archive of obsolete content
in other words, any html file on your local disk can read any other file on your local disk.
Locked config settings - Archive of obsolete content
if you have trouble getting the moz-byteshift.pl script to work locally, there is also an online version available.
Building TransforMiiX standalone - Archive of obsolete content
this will pull the necessary subtree with mozilla/client.mk mozilla/build/unix/modules.mk mozilla/build mozilla/config mozilla/expat mozilla/extensions/transformiix mozilla/include mozilla/allmakefiles.sh mozilla/client.mk mozilla/aclocal.m4 mozilla/configure mozilla/configure.in mozilla/makefile.in plus nspr and xpcom from the cvs repository.
Compiling The npruntime Sample Plugin in Visual Studio - Archive of obsolete content
when loaded from local disk on windows.
Finding the file to modify - Archive of obsolete content
mention the localization layer (note: these layers are not completely mutually exclusive.
Dehydra Object Reference - Archive of obsolete content
.isdecl boolean flag the variable is being declared (local variables only).
Download Manager preferences - Archive of obsolete content
preference description browser.download.dir a local folder the user may have selected for downloaded files to be saved.
Drag and Drop JavaScript Wrapper - Archive of obsolete content
text/unicode text data text/html html data text/x-moz-url a url application/x-moz-file a local file see here for an overview of more data flavours.
Embedding Mozilla in a Java Application using JavaXPCOM - Archive of obsolete content
the mozilla class provides several methods to facilitate this, such as getservicemanager, getcomponentmanager, and newlocalfile.
Building Firefox with Rust code - Archive of obsolete content
if you need to locally patch a third-party crate, you'll need to add a [replace] section to the referencing cargo.toml to declare that the vendored source shouldn't match the upstream release.
Layout System Overview - Archive of obsolete content
the css formatting requirements present two distinct layout models: 1) the in-flow model, where the geometry of an element is influenced by the geometry of the elements that precede it, and 2) the positioned model, where the geometry of an element is not influenced by the geometry of the elements that precede it, or in any case, is influenced more locally.
Force RTL - Archive of obsolete content
(this is a temporary placeholder/stub for the force rtl page) download force rtl making sure your theme works with rtl locales ehsan's force rtl page ...
GRE Registration - Archive of obsolete content
windows on windows, gre registration information is kept in the win32 registry under the hkey_local_machine/software/mozilla.org/gre and hkey_current_user/software/mozilla.org/gre keys.
Helper Apps (and a bit of Save As) - Archive of obsolete content
mac: use the launchwithdoc() method on nsilocalfilemac.
JavaScript crypto - Archive of obsolete content
the new cert issuing process user fills out enrollment form user action initiates script script calls key generation method (generatecrmfrequest) signing and encryption keys are generated encryption private key is wrapped with public key of key recovery authority (kra) (passed in in the form of a certificate as part of the script, and checked against a pre-installed certificate copy in the local certificate database) the public keys, wrapped encryption private key, and text string from the script (possibly containing naming or enrollment info) are signed by the user signed blob is returned to the script script submits signed blob and any other necessary info to the ca/ra ca/ra verifies signature on signed blob ca/ra validates identity of user ca/ra sends wrapped encryption private ...
Metro browser chrome tests - Archive of obsolete content
for information on setting your local build as the default, visit the windows 8 integration wiki page.
Monitoring downloads - Archive of obsolete content
l); cell = document.createelement('listcell'); cell.setattribute("label", (statement.getint64(1) / 1024).tofixed(1) + "kb"); // size cell.setattribute("style", "text-align:right"); row.appendchild(cell); var thedate = new date(statement.getint64(2) / 1000); // start time cell = document.createelement('listcell'); var datestr = thedate.tolocalestring(); cell.setattribute("label", datestr); row.appendchild(cell); thedate = new date(statement.getint64(3)); // end time cell = document.createelement('listcell'); datestr = thedate.tolocalestring(); cell.setattribute("label", datestr); row.appendchild(cell); var speed = statement.getdouble(4) / 1024.0; cell = documen...
How to Write and Land Nanojit Patches - Archive of obsolete content
propagate all recent nanojit-central changes to your local tm/tr repo.
New Security Model for Web Services - Archive of obsolete content
this is currently permitted for locally-saved scripts and signed scripts.
Bundles - Archive of obsolete content
after the .webapp file is executed the first time, these files will be unzipped and "cached" to a local directory structure.
Prism - Archive of obsolete content
bundles can be installed locally, or directly from a website using the prism for firefox extension.
Table Layout Regression Tests - Archive of obsolete content
a testcase should only contain local files.
Actionscript Acceptance Tests - Archive of obsolete content
the underscore is necessary otherwise the buildbot system will delete the .abc before starting up a testrun (not an issue when running locally, but makes it easy to differentiate between binary-only abc files and generated abcs.
Cmdline tests - Archive of obsolete content
two use cases for the cmdline testsuite: use case 1: test the interactive cmdline debugger test contents: start avmshell -d test.abc, set breakpoint on a line, show local variable value, quit from cmdutils import * def run(): r=runtestlib() r.run_test( 'debugger locals', '%s -d testdata/debug.abc'%r.avmrd, input='break 53\ncontinue\nnext\ninfo locals\nnext\ninfo locals\nquit\n', expectedout=['local1 = undefined','local2 = 10','local2 = 15'] ) use case 2: test -memstats returns memory logs to stdout test contents: start avmshell...
Running Tamarin performance tests - Archive of obsolete content
for example you may download or build the latest checked in avmshell to compare against a local change.
Tamarin Acceptance Testing - Archive of obsolete content
successfully build release and debug versions of the shell with the debugger enabled [info] successfully run the following test suites: acceptance test suite [info] self tests [info] submit a sandbox build request to test against platforms that you may not have locally [info] available tamarin acceptance test suites actionscript acceptance tests: actionscript acceptance tests running tamarin acceptance tests abc assembler tests cmdline tests performance tests actionscript performance tests running tamarin performance tests built-in self tests see instructions in doc/selftest.html in the ...
Tamarin build documentation - Archive of obsolete content
tryserver etiquette the sandbox is not a good substitute for running the regression tests locally to catch obvious problems.
Venkman Internals - Archive of obsolete content
venkman-msg.js localization code, reads venkman.properties from a subdirectory of "locale" and injects variables.
Using Breakpoints in Venkman - Archive of obsolete content
stopped there, venkman displays the value of the newsign variable as "1" in the local variables view.
When To Use ifdefs - Archive of obsolete content
the only time when they might be a problem is in cross-platform extension code and locales: since this code is downloaded on multiple platforms, platform-specific ifdefs are generally out of the question.
Elements - Archive of obsolete content
note: all properties of the binding are "imported" as local variables in a constructor's scope.
Example Sticky Notes - Archive of obsolete content
you add a binding file using -moz-binding style rule and you address a particular binding by its id: -moz-binding: url(notes.xml#default) this id is local within the binding file (not visible in the target document dom tree).
Install Wizards (aka: Stub Installers) - Archive of obsolete content
it then proceeds to extract the xpinstall engine and feed it the downloaded software packages to install.) the stub installer code includes: the logic to display the install wizard widgets and dialogs the code that reads in the configuration file (config.ini) and dynamically installs from the net or from local xpi modules found next to the installer binary the code that processes user selections the code that calls the xpinstall engine through xpistub the libxpnet code that is statically linked in the stub installers are written in code native to the platform using native widget toolkits including the windows api for windows, the mac toolbox for the mac, and gtk for the unix version.
File.macAlias - Archive of obsolete content
file.macalias in this example, a mac alias is created for software (applecd audio player) that is installed locally.
InstallTrigger.startSoftwareUpdate - Archive of obsolete content
installtrigger.startsoftwareupdate this is a very simple example of the installtrigger object's principal method, startsoftwareupdate, which takes a string representing the path to the xpi and installs that xpi on the local machine.
windowsGetShortName - Archive of obsolete content
method of file object syntax string windowsgetshortname( object localdirspec ) parameters the windowsregisterserver method has the following parameter: localdirspec a filespecobject representing a directory obtained by getcomponentfolder or getfolder.
windowsRegisterServer - Archive of obsolete content
method of file object syntax int windowsregisterserver( object localdirspec ) parameters the windowsregisterserver method has the following parameters: localdirspec a filespecobject representing a directory obtained by getcomponentfolder or getfolder.
File Object - Archive of obsolete content
file use the file object to manipulate local files and directories during the installation process.
confirm - Archive of obsolete content
defaults to "confirm" (or the localized equivalent).
setPackageFolder - Archive of obsolete content
when the package folder is set, it is used as the default for forms of addfile and other methods that have an optional localdirspec parameter.
Methods - Archive of obsolete content
loadresources returns an object whose properties are localized strings loaded from the specified property file.
Properties - Archive of obsolete content
properties archive full local path of the archive after it is downloaded to the platform specific temp folder.
Return Codes - Archive of obsolete content
download_error -228 problem with download script_error -229 error in the script already_exists -230 file already exists locally is_file -231 expected target directoy and got file source_does_not_exist -232 source file/dir not found source_is_directory -233 expected source file and got directory source_is_file -234 expected source directory and got file insufficient_disk_space -235 n...
enumKeys - Archive of obsolete content
var winreg = getwinregistry(); winreg.setrootkey(winreg.hkey_local_machine); var index = 0; var basekey = "software\\mozilla"; while ( (mozillaversion = winreg.enumkeys(basekey,index)) != null ) { logcomment("mozillaversion = " + mozillaversion); subkey = basekey + "\\" + mozillaversion + "\\extensions"; pluginsdir = winreg.getvaluestring ( subkey, "plugins" ); if ( pluginsdir ) logcomment("pluginsdir = " + pluginsdir); else logcomment("no plu...
enumValueNames - Archive of obsolete content
var winreg = getwinregistry(); winreg.setrootkey(winreg.hkey_local_machine); v1 = winreg.enumvaluenames("software\\mozilla\\", 0); logcomment("the first subkey value of the mozilla key: " + v1) ...
isKeyWritable - Archive of obsolete content
example winreg = getwinregistry(); if ( winreg != null ) { winreg.setrootkey ( winreg.hkey_local_machine ); if(winreg.iskeywritable("software")) { //iskeywritable returned true } else { //iskeywritable returned false } ...
keyExists - Archive of obsolete content
example winreg = getwinregistry(); if ( winreg != null ) { winreg.setrootkey( winreg.hkey_local_machine); if(winreg.keyexists("software\\mozilla")) { //keyexists returned true } else { //keyexists returned false } } ...
setRootKey - Archive of obsolete content
the values you can use are: hkey_classes_root hkey_current_user hkey_local_machine hkey_users example to use the hkey_users section, use these statements: winreg = getwinregistry(); winreg.setrootkey(winreg.hkey_users); ...
valueExists - Archive of obsolete content
example winreg = getwinregistry(); if ( winreg != null ) { winreg.setrootkey( winreg.hkey_local_machine); if(winreg.valueexists("software\\mozilla", "value name")) { //valueexists returned true } else { //valueexists returned false } } ...
autocompletesearch - Archive of obsolete content
file (linux only) the local file system is searched.
firstdayofweek - Archive of obsolete content
the default value is determined by the locale, so only use this attribute if you want to override it.
preference.type - Archive of obsolete content
int an integer string a string unichar a unicode string wstring a localized string.
statedatasource - Archive of obsolete content
if you do not specify this attribute, state information will be stored in the local store (rdf:local-store).
stringbundle.src - Archive of obsolete content
« xul reference home src type: uri the uri of the property file that contains the localized strings.
getFormattedString - Archive of obsolete content
if you need to handle substitutions involving plurals, take a look at localization and plurals.
insertItemAt - Archive of obsolete content
tem or appends, then selects the newly created item --> <script language="javascript"> function insertitemtolist(){ var mylistbox = document.getelementbyid('mylistbox'); // create a date to get some labels and values var somedate = new date(); if(mylistbox.selectedindex == -1){ // no item was selected in list so append to the end mylistbox.appenditem( somedate.tolocaletimestring(), somedate.gettime() ); var newindex = mylistbox.getrowcount() -1 }else{ // item was selected so insert at the selected item var newindex = mylistbox.selectedindex; mylistbox.insertitemat(newindex, somedate.tolocaletimestring(), somedate.gettime()); } // select the newly created item mylistbox.selectedindex = newindex; } </script> <b...
ContextMenus - Archive of obsolete content
function checkcontextmenu(event) { if (event.target.localname == "textbox") event.preventdefault(); } function init() { var container = document.getelementbyid("container"); container.addeventlistener("contextmenu", checkcontextmenu, true); } the 'checkcontextmenu' function checks to see if the textbox was the target of the context menu and, if so, cancels the event using the preventdefault method.
Extensions - Archive of obsolete content
function init() { var contextmenu = document.getelementbyid("contentareacontextmenu"); if (contextmenu) contextmenu.addeventlistener("popupshowing", thumbnailsshowhideitems, false); } function thumbnailsshowhideitems(event) { var show = document.getelementbyid("thumbnail-show"); show.hidden = (document.popupnode.localname != "img"); } the init function should be called within the handler for the load event so that the popupshowing event handler is hooked up before it would be opened by the user.
PopupEvents - Archive of obsolete content
<panel id="time-panel" onpopupshowing="this.lastchild.value = (new date()).tolocaleformat('%t')"> <label value="time:"/> <label id="time"/> </panel> <toolbarbutton label="show time" popup="time-panel"/> you can prevent a menu or popup from appearing by calling the preventdefault method of the event from within a popupshowing listener.
amIndicator - Archive of obsolete content
this value is determined from the user's locale.
is24HourClock - Archive of obsolete content
this value is determined from the user's locale.
pmIndicator - Archive of obsolete content
this value is determined from the user's locale.
Sorting and filtering a custom tree view - Archive of obsolete content
for the sake of simplicity, strings are not localized and the data loaded is hard coded.
Sorting Results - Archive of obsolete content
this also has the advantage that the dates will be displayed according to the user's current locale (meaning that the date is formatted so as to be suitable for the user's language).
Template Builder Interface - Archive of obsolete content
in a chrome context, the datasource 'rdf:local-store' is always included even if you don't specify it.
XML Templates - Archive of obsolete content
the datasources attribute should be set to the url of an xml document, either a local file or a remote web site.
textbox (Toolkit autocomplete) - Archive of obsolete content
file (linux only) the local file system is searched.
Textbox (XPFE autocomplete) - Archive of obsolete content
file (linux only) the local file system is searched.
Code Samples - Archive of obsolete content
const path = "c:\\windows\\charmap.exe" var file = components .classes["@mozilla.org/file/local;1"] .createinstance(components.interfaces.nsilocalfile) file.initwithpath(path) file.launch() open a web page if your button is in firefox or seamonkey, use code like this to open a web page.
Adding Event Handlers to XBL-defined Elements - Archive of obsolete content
the following alternate syntax can be used when the code in a handler is more complex: <binding id="binding-name"> <handlers> <handler event="event-name"> -- handler code goes here -- </handler> </handlers> </binding> handlers example the following example adds some key handlers to create a very primitive local clipboard: example 1 : source <binding id="clipbox"> <content> <xul:textbox/> </content> <implementation> <field name="clipboard"/> </implementation> <handlers> <handler event="keypress" key="x" modifiers="control" action="this.clipboard=document.getanonymousnodes(this)[0].value; document.getanonymousnodes(this)[0].value='';"/> <handler event="keypress" key="c" mod...
Creating a Window - Archive of obsolete content
note: the local xul document can be opened in the browser as mentioned above only if |dom.allow_xul_xbl_for_file| preference in "about:config" has been set to |true| .
Cross Package Overlays - Archive of obsolete content
mozilla allows you to add a list of overlays to the contents.rdf file that you use to list chrome packages, skins and locales.
Features of a Window - Archive of obsolete content
you should also consider that a user might be using a different theme or locale.
Open and Save Dialogs - Archive of obsolete content
the directory should be an nsilocalfile object.
Persistent Data - Archive of obsolete content
the information is collected and stored in a rdf file (localstore.rdf) in the same directory as other user preferences.
Trees - Archive of obsolete content
ArchiveMozillaXULTutorialTrees
<tree flex="1"> <treecols> <treecol id="name" label="filename" flex="1"/> <treecol id="location" label="location" flex="2"/> <treecol id="size" label="size" flex="1"/> </treecols> <treechildren> <treeitem> <treerow> <treecell label="mozilla"/> <treecell label="/usr/local"/> <treecell label="2520 bytes"/> </treerow> </treeitem> </treechildren> </tree> <splitter collapse="before" resizeafter="grow"/> we've added a tree with three columns for the filename, the location and the file size.
XUL Tutorial - Archive of obsolete content
observers document object model document object model modifying a xul interface manipulating lists box objects xpcom interfaces xpcom examples trees trees more tree features tree selection custom tree views tree view details tree box objects rdf and templates introduction to rdf templates trees and templates rdf datasources advanced rules persistent data skins and locales adding style sheets styling a tree modifying the default skin creating a skin skinning xul files by hand localization property files bindings introduction to xbl anonymous content xbl attribute inheritance adding properties adding methods adding event handlers xbl inheritance creating reusable content using css and xbl xbl example specialized window types features of ...
Using nsIXULAppInfo - Archive of obsolete content
} see nsiversioncomparator for details example 2: dealing with nightlies var appinfo = components.classes["@mozilla.org/xre/app-info;1"] .getservice(components.interfaces.nsixulappinfo); if(appinfo.appbuildid >= "2005093006") { // running on a build after 2005093006 } you shouldn't rely on build ids for releases, as build id might be different for custom build or a localized version of an application.
XUL accessibility tool - Archive of obsolete content
once the tool window has loaded, select either a local file, web url, or currently open window from the file menu to generate a xul report for that document.
XUL and RDF - Archive of obsolete content
the second section describes the xul/rdf architecture itself and outlines enhancements to the xul language in order to allow the markup language to reference local data and to indicate how and when it would like to be annotatable with local data.
datepicker - Archive of obsolete content
the default value is determined by the locale, so only use this attribute if you want to override it.
preference - Archive of obsolete content
int an integer string a string unichar a unicode string wstring a localized string.
tree - Archive of obsolete content
ArchiveMozillaXULtree
if you do not specify this attribute, state information will be stored in the local store (rdf:local-store).
Building XULRunner with Python - Archive of obsolete content
ulrunner mk_add_options moz_co_project=xulrunner ac_add_options --enable-application=xulrunner ac_add_options --enable-extensions=python,default ac_add_options --disable-javaxpcom ac_add_options --disable-activex ac_add_options --disable-activex-scripting ac_add_options --disable-tests ac_add_options --enable-optimize to check out all the required source code and build it the first time with no local client.mk file, execute cd /c/projects cvs -d :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot co mozilla/client.mk cd mozilla make -f client.mk for subsequent updates from cvs followed by a build, use cd /c/projects/mozilla make -f client.mk which will also checkout client.mk itself for build only, without checkouts, use make -f client.mk build and see client.mk for other options.
Debugging a XULRunner Application - Archive of obsolete content
to download the package, right-click the install link and save the package locally.
Gecko Compatibility Handbook - Archive of obsolete content
you need to be connected to the internet to test your site on aol; it isn't possible to access your site on a local machine via your lan, without an internet connection.
Mozilla release FAQ - Archive of obsolete content
here are a few that are specific to the mozilla newsgroups: fe = front end -- the part of mozilla that handles the interface be = back end -- the part of mozilla that does all the behind-the-scenes stuff nspr = netscape portable runtime -- an abstraction layer over the local os gtk = a free gui toolkit native to unix qt = another gui toolkit xp = cross platform xpfe = cross-platform frontend based on nglayout m[number] = milestone release [number] (no longer used) i'm wondering how to do xxx with navigator 3.x...
2006-09-29 - Archive of obsolete content
updated l10n status for sunbird 0.3 release according to simon paquet, we now have a full l10n comparison on the trunk between en-us and all locales with a calendar localization.
2006-12-01 - Archive of obsolete content
a question regarding having an internal website use universalbrowserwrite on a local intranet.
2006-10-06 - Archive of obsolete content
cédric corazza recommends that the proposed documention should be made available on the l10n cvs once it reaches a decent stage so that localizers can get a head-start on the localization before the final version is made available.
2006-11-03 - Archive of obsolete content
bug found in nslocalmailfolder.cpp david bienvenu is following up on this bug.
Extentsions FAQ - Archive of obsolete content
however not all servers support user flags, in which case you get reduced functionality as follows: all flags are stored in your local cache and are lost if your cache gets invalidated, and only "known" properties are copied when messages are copied.
2006-09-22 - Archive of obsolete content
summary: mozilla.dev.i18n - feb 2nd - sep 22nd, 2006 announcements testing a dummy greek bon echo nsis installer bug #69230: accelerators should not be affected by keyboard group/level proposal of code changes for l10n in firefox 3 discussions thai language support: how can we add thai as an official localized build?
2006-10-13 - Archive of obsolete content
summary: mozilla.dev.l10n - october 13, 2006 announcements seamonkey 1.0.5 he-il seamonkey 1.0.5 in hebrew was released a while ago firefox 2 rc2 is out firefox 2 rc2 is out, to download click here sunbird_0_3_release tag being created sunbird_0_3_release tag being created seamonkey 1.1 localization freeze and beta upcoming there are no open blockers left.
2006-10-20 - Archive of obsolete content
feedback from localizers regarding sunbird/lightning 0.3 release the sunbird/lightning developers are requesting feedback on release 0.3.
2006-10-27 - Archive of obsolete content
alternative german locale while the alternative locale is active, the auto update of firefox stops working.
2006-09-22 - Archive of obsolete content
discussions discussion of l10n builds some discussion about the firefox 2 rc1 l10n builds happened, including why some locales are missing.
2006-11-03 - Archive of obsolete content
announcments mozilla scheduled downtime - 11/2/2006, 7pm - 11pm pdt (0300 - 0700 utc) mozilla scheduled downtime - 11/2/2006, 7pm - 11pm pdt (0300 - 0700 utc) opening l10n repository on mozilla_1_8_branch for approved check-ins opening l10n repository on mozilla_1_8_branch for approved check-ins discussion from 50 to 100 locales a discussion on how to make l10n easier and increase the number of locals with which mozilla products ship.
2006-11-17 - Archive of obsolete content
discussion from 50 to 100 locales continuation of the discussion of how to make l10n easier and increase the number of locals with which mozilla products ship.
2006-10-20 - Archive of obsolete content
neil notes that the format of localstore has changed from previous versions and that "persist" is not functioning properly using the new format.
2006-11-03 - Archive of obsolete content
last check-ins on sun-calendar-event-dialog.* files discussions about some localization issues with sun-calendar-event-dialog.
NPAPI plugin reference - Archive of obsolete content
npp_streamasfile provides a local file name for the data from a stream.
NSPR Release Engineering Guide - Archive of obsolete content
feature complete update ...pr/include/prinit.h with release numbers build all targets, debug and optimized on all platforms using local directories run the test suite on all targets verify release numbers show up in binaries resolve testing anomalies tag the tree with nsprpub_release_x_y_z_beta beta release checkout a whole new tree using the tag from above build all targets, debug and optimized on all platforms using the command: gmake release mdist=<dir>/mdist build_number=vx.y.z [build_opt=1 | use_debug_rtl=1] copy the bits from mdist to /share/builds/components/nspr20/.vx.y.z 1 run ex...
Threats - Archive of obsolete content
threats may involve intentional actors (e.g., attacker who wants to access information on a server) or unintentional actors (e.g., administrator who forgets to disable user accounts of a former employee.) threats can be local, such as a disgruntled employee, or remote, such as an attacker in another geographical area.
Vulnerabilities - Archive of obsolete content
the arp cache uses that information to provide a useful service—to enable sending data between devices within a local network.
Tamarin Tracing Build Documentation - Archive of obsolete content
description: self explanatory check the status of the build @ http://tamarin-builds.mozilla.org/sandbox/ tryserver etiquette the sandbox is not a good substitute for running the regression tests locally to catch obvious problems.
Building a Theme - Archive of obsolete content
that form the structure and behavior of an application ui), locale (dtd, .properties files etc that contain strings for the ui's localization), and skin (css and images that form the theme of the ui) finally, the path of a file to load.
Theme changes in Firefox 2 - Archive of obsolete content
the third is for locales, the fourth is for plugins, the fifth is for updates, and the sixth is for installs.
Themes - Archive of obsolete content
building a themecommon firefox theme issues and solutionscreating a skin for firefoxuuidcontents.rdfinstall.rdfmaking sure your theme works with rtl localestheme changes in firefox 2theme changes in firefox 3theme changes in firefox 3.5theme changes in firefox 4 ...
Updating an extension to support multiple Mozilla applications - Archive of obsolete content
if you haven't already created an extension, or would like to refresh your memory, take a look at the previous articles in this series: creating a status bar extension creating a dynamic status bar extension adding preferences to an extension localizing an extension download the sample you can download this article's sample code so you can look at it side-by-side with the article, or to use it as a basis for your own extension.
Using workers in extensions - Archive of obsolete content
if you haven't already created an extension, or would like to refresh your memory, take a look at the previous articles in this series: creating a status bar extension creating a dynamic status bar extension adding preferences to an extension localizing an extension updating an extension to support multiple mozilla applications download the sample you may download the complete example: download the example.
::-ms-clear - Archive of obsolete content
such inputs include: <input type="color"> <input type="date"> <input type="datetime"> <input type="datetime-local"> <input type="email"> <input type="month"> <input type="number"> <input type="search"> <input type="tel"> <input type="time"> <input type="url"> <input type="week"> allowable properties only the following css properties can be used in a rule with ::-ms-clear in its selector.
Processing XML with E4X - Archive of obsolete content
lements here either non-default var xhtml = <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>embedded svg demo</title> </head> <body> <h1>embedded svg demo</h1> <svg xmlns="http://www.w3.org/2000/svg" viewbox="0 0 100 100"> <circle cx="50" cy="50" r="20" stroke="orange" stroke-width="2px" fill="yellow" /> </svg> </body> </html>; alert(xhtml.name().localname); // alerts "html" alert(xhtml.name().uri); // alerts "http://www.w3.org/1999/xhtml" to access elements that are within a non-default namespace, first create a namespace object encapsulating the uri for that namespace: var svgns = new namespace('http://www.w3.org/2000/svg'); this can now be used in e4x queries by using namespace::localname in place of a normal element specifier: var svg...
Expression closures - Archive of obsolete content
the name is only local to the function body.
Legacy generator function expression - Archive of obsolete content
the name is only local to the function body.
ActiveXObject - Archive of obsolete content
for example, for the local intranet zone, you typically need to change a custom setting to "initialize and script activex controls not marked as safe for scripting." to identify members of an automation object that you can use in your code, you may need to use a com object browser, such as the ole/com object viewer, if no reference documentation is available for the automation object.
for each...in - Archive of obsolete content
this variable is local to the function, not to the loop.
Writing JavaScript for XHTML - Archive of obsolete content
(note that xhtml documents which behave correctly in both application/xhtml+xml and text/html environments are sometimes known as 'polyglot' documents.) to test the following examples locally, use firefox's extension switch.
XForms Custom Controls - Archive of obsolete content
for example, if you have an instance node of type xsd:date and you'd like to see the date displayed in a local format.
Troubleshooting XForms Forms - Archive of obsolete content
if you are developing on your local machine using apache tomcat for example then add the following regular expression on a new line: ^http://localhost:8080/.* use the xforms buddy to view instance data the xforms buddy extension allows you to dynamically view model instance data while the xforms is running in the firefox browser.
Implementation Status - Archive of obsolete content
334333; 7.8.3 digest() unsupported 7.8.4 hmac() unsupported 7.9.1 local-date() supported 7.9.2 local-datetime() supported 7.9.3 now() supported 7.9.4 days-from-date() supported 7.9.5 days-to-date() unsupported 7.9.6 seconds-from-datetime() suppo...
RFE to the Custom Controls - Archive of obsolete content
output should show data in current locale format the bug 331585 address the issue.
XForms Input Element - Archive of obsolete content
the names are localized (xhtml only).
XForms Submit Element - Archive of obsolete content
the result of which is all or part of an instance document being sent to a target destination, which could be local or remote (see the spec).
Mozilla XForms User Interface - Archive of obsolete content
submit invokes the submission of the selected instance data to its target destination, which could be local or remote (see the spec).
Describing microformats in JavaScript - Archive of obsolete content
the adr microformat is defined as follows: var adr_definition = { mfversion: 0.8, mfobject: adr, classname: "adr", properties: { "type" : { plural: true, types: ["work", "home", "pref", "postal", "dom", "intl", "parcel"] }, "post-office-box" : { }, "street-address" : { plural: true }, "extended-address" : { }, "locality" : { }, "region" : { }, "postal-code" : { }, "country-name" : { } } }; the properties are quite simple here.
XQuery - Archive of obsolete content
xquseme is a working proof-of-concept (so far tested on windows and linux with java installed; mac does not work) extension which allows one to perform xqueries on external urls, the currently loaded webpage (even if originally from poorly formed html), and/or xml (including well-formed xhtml) documents stored locally.
XUL Parser in Python - Archive of obsolete content
v.00001 to celebrate activestate's recent announcement about support for perl and python in mozilla, i have put together this little python script that parses your local xul and builds a list of all the xul elements and their attributes in an html page.
Introduction to game development for the Web - Game development
a great way to save game state and other information locally so it doesn't have to be downloaded every time it's needed.
Building up a basic demo with Babylon.js - Game development
conclusion here's the final code listing, along with a viewable live example: you can also see it on github and fork the repository if you want to play with it yourself locally.
Building up a basic demo with PlayCanvas editor - Game development
add this code to the initialize() function: this.timer = 0; and those two lines to the update() function: this.timer += dt; this.entity.setlocalscale(1, math.abs(math.sin(this.timer)), 1); the setlocalscale() method applies the given values to the x, y and z axes of the object.
Building up a basic demo with Three.js - Game development
conclusion here's the final code: you can also see it on github and fork the repository, if you want to play with it locally.
Visual-js game engine - Game development
path object can be saved intro localhost , you can collect object and put it direct source code .
Plug-in Development Overview - Gecko Plugin API Reference
file mode: the browser saves the data to a local file in cache and passes that file path to the plug-in.
Constructor - MDN Web Docs Glossary: Definitions of Web-related terms
function default() { } // a new reference of a default object assigned to a // local variable defaultreference var defaultreference = new default(); learn more general knowledge constructor on wikipedia technical reference the constructor in object oriented programming for javascript on mdn new operator in javascript on mdn ...
Git - MDN Web Docs Glossary: Definitions of Web-related terms
what sets it apart from previous scm systems is the ability to do common operations (branching, committing, etc.) on your local development machine, without having to change the master repository or even having write access to it.
Host - MDN Web Docs Glossary: Definitions of Web-related terms
a host is a device connected to the internet (or a local network).
I18N - MDN Web Docs Glossary: Definitions of Web-related terms
internationalization is the design and development of a product, application or document content that enables easy localization for target audiences that vary in culture, region, or language.
ICE - MDN Web Docs Glossary: Definitions of Web-related terms
this protocol lets two peers find and establish a connection with one another even though they may both be using network address translator (nat) to share a global ip address with other devices on their respective local networks.
Internationalization - MDN Web Docs Glossary: Definitions of Web-related terms
also so that a user can browse features to translate or localize the application to access all the content without breaking the layout.
NAT - MDN Web Docs Glossary: Definitions of Web-related terms
nat assigns unique addresses to each computer on the local network and adjusts incoming/outgoing network traffic to send data to the right place.
Proxy server - MDN Web Docs Glossary: Definitions of Web-related terms
a proxy can be on the user's local computer, or anywhere between the user's computer and a destination server on the internet.
SVN - MDN Web Docs Glossary: Definitions of Web-related terms
learn more general knowledge apache subversion on wikipedia official website learn about it svn guide for localizers on mdn ...
Slug - MDN Web Docs Glossary: Definitions of Web-related terms
in the context of mdn, it is the portion of the url following "<locale>/docs/".
TOFU - MDN Web Docs Glossary: Definitions of Web-related terms
to do that, clients will look for identifiers (for example public keys) stored locally.
XInclude - MDN Web Docs Glossary: Definitions of Web-related terms
// fix: we test for file extensions as well in case file:// doesn't return content type (as seems to be the case); can some other tool be uesd in ff (or ie) to detect encoding of local file?
caret - MDN Web Docs Glossary: Definitions of Web-related terms
<input type="text"> <input type="password"> <input type="search"> <input type="date">, <input type="time">, <input type="datetime">, and <input type="datetime-local"> <input type="number">, <input type="range"> <input type="email">, <input type="tel">, and <input type="url"> <textarea> any element with its contenteditable attribute set ...
MDN Web Docs Glossary: Definitions of Web-related terms
intrinsic size ip address ipv4 ipv6 irc iso isp itu j jank java javascript jpeg jquery json k key keyword l latency layout viewport lazy load lgpl ligature local scope local variable locale localization long task loop lossless compression lossy compression ltr (left to right) m main axis main thread markup mathml media media (audio-visual presentation) media (css) metadata method ...
Assessment: Accessibility troubleshooting - Learn web development
decompress the contents into a new directory somewhere on your local computer.
HTML: A good basis for accessibility - Learn web development
note: it is a good idea to have a screen reader set up on your local computer so that you can do some testing of the examples shown below.
HTML: A good basis for accessibility - Learn web development
note: it is a good idea to have a screen reader set up on your local computer so that you can do some testing of the examples shown below.
A cool-looking box - Learn web development
starting point to get this assessment started, you should: make local copies of the starting html and css — save them as index.html and style.css in a new directory.
Fundamental CSS comprehension - Learn web development
starting point to get this assessment started, you should: go and grab the html file for the exercise, and the associated image file, and save them in a new directory on your local computer.
Pseudo-classes and pseudo-elements - Learn web development
:local-link matches links pointing to pages that are in the same site as the current document.
Styling tables - Learn web development
to start with, make a local copy of the sample markup, download both images (noise and leopardskin), and put the three resulting files in a working directory somewhere on your local computer.
Test Your Skills: Fundamental layout comprehension - Learn web development
if you don't want to work locally then using a tool such as codepen or jsfiddle will work as well.
Beginner's guide to media queries - Learn web development
if you want to follow on and implement this example as we go, make a local copy of step1.html on your computer.
Positioning - Learn web development
we'd like you to follow along with the exercises on your local computer, if possible — grab a copy of 0_basic-flow.html from our github repo (source code here) and use that as a starting point.
Test your skills: Media Queries and Responsive Design - Learn web development
download the code and work locally, or use an online tool such as codepen, jsfiddle, or glitch to work on the tasks.
Using your new knowledge - Learn web development
if you prefer you could move this css to a separate file when you create the example on your local computer.
create fancy boxes - Learn web development
so let's see an example with a slightly different html snippet (which provide us an opportunity to see how to also handle design localization): <blockquote>people who think they know everything are a great annoyance to those of us who do.
Typesetting a community school homepage - Learn web development
make a copy of them on your local computer.
How do you make sure your website works properly? - Learn web development
a distant web server often behaves quite differently from a local one, so it's a good idea to test your website once it's online.
How to structure a web form - Learn web development
to start with, make a local copy of our blank template file and the css for our payment form in a new directory on your computer.
Test your skills: Form validation - Learn web development
note: you can try out solutions locally, however it may be helpful to put your code in an online tool such as codepen, jsfiddle, or glitch to work on the tasks.
Test your skills: Styling basics - Learn web development
note: you can try out solutions by editing the starting point file locally, however it may be helpful to put your code in an online tool such as codepen, jsfiddle, or glitch to work on the tasks.
UI pseudo-classes - Learn web development
note: numeric input types are date, month, week, time, datetime-local, number, and range.
Your first form - Learn web development
before you go any further, make a local copy of our simple html template — you'll enter your form html into here.
Publishing your website - Learn web development
then the program shows you your local files and the web server's files in two windows, and provides a way for you to transfer files back and forth.
Debugging HTML - Learn web development
first, download our debug-example demo and save it locally.
Structuring a page of content - Learn web development
create the example on your local computer, or alternatively use an online tool such as codepen, jsfiddle, or glitch to work on the tasks.
What’s in the head? Metadata in HTML - Learn web development
active learning: applying css and javascript to a page to start this active learning, grab a copy of our meta-example.html, script.js and style.css files, and save them on your local computer in the same directory.
Mozilla splash page - Learn web development
save the contents of index.html in a file called index.html on your local drive, in a new directory.
Assessment: Structuring planet data - Learn web development
starting point to start the assessment, make local copies of blank-template.html, minimal-table.css, and planets-data.txt in a new directory in your local computer.
HTML Tables - Learn web development
LearnHTMLTables
coupled with a little css for styling, html makes it easy to display tables of information on the web such as your school lesson plan, the timetable at your local swimming pool, or statistics about your favorite dinosaurs or football team.
Structuring the web with HTML - Learn web development
, and how to use it to style html (for example alter your text size and fonts used, add borders and drop shadows, layout your page with multiple columns, add animations and other visual effects.) javascript, and how to use it to add dynamic functionality to web pages (for example find your location and plot it on a map, make ui elements appear/disappear when you toggle a button, save users' data locally on their computers, and much much more.) modules this topic contains the following modules, in a suggested order for working through them.
Graceful asynchronous programming with Promises - Learn web development
you need to run it through a local testing server, or use an online solution such as glitch or github pages.
Build your own function - Learn web development
start by accessing the function-start.html file and making a local copy.
Functions — reusable blocks of code - Learn web development
first, make a local copy of our function-scope.html example.
Image gallery - Learn web development
starting point to get this assessment started, you should go and grab the zip file for the example, unzip it somewhere on your computer, and do the exercise locally to begin with.
Function return values - Learn web development
first of all, make a local copy of the function-library.html file from github.
A first splash into JavaScript - Learn web development
initial setup to begin this tutorial, we'd like you to make a local copy of the number-guessing-game-start.html file (see it live here).
Silly story generator - Learn web development
starting point to get this assessment started, you should: go and grab the html file for the example, save a local copy of it as index.html in a new directory somewhere on your computer, and do the assessment locally to begin with.
Adding features to our bouncing balls demo - Learn web development
objective: to test comprehension of javascript objects and object-oriented constructs starting point to get this assessment started, make a local copy of index-finished.html, style.css, and main-finished.js from our last article in a new directory in your local computer.
JavaScript object basics - Learn web development
to begin with, make a local copy of our oojs.html file.
Inheritance in JavaScript - Learn web development
getting started first of all, make yourself a local copy of our oojs-class-inheritance-start.html file (see it running live also).
Working with JSON - Learn web development
getting started to begin with, make local copies of our heroes.html and style.css files.
Object-oriented JavaScript for beginners - Learn web development
first of all, we'd like you to make a new local copy of the oojs.html file we saw in our first objects article.
Object building practice - Learn web development
getting started to begin with, make local copies of our index.html, style.css, and main.js files.
Object prototypes - Learn web development
go back to our oojs-class-further-exercises.html example and make a local copy of the source code.
Test your skills: JSON - Learn web development
the example won't work locally, or in an environment like codepen or jsfiddle, because of something called cross-origin security.
Client-Server Overview - Learn web development
guage: en-us,en;q=0.8,es;q=0.6 cookie: sessionid=6ynxs23n521lu21b1t136rhbv7ezngie; _gat=1; csrftoken=zipujsazv6pcgcbjscj1zu6pqzbfmuat; dwf_section_edit=false; dwf_sg_task_completion=false; _ga=ga1.2.1688886003.1471911953; ffo=true csrfmiddlewaretoken=zipujsazv6pcgcbjscj1zu6pqzbfmuat&user-username=hamishwillee&user-fullname=hamish+willee&user-title=&user-organization=&user-location=australia&user-locale=en-us&user-timezone=australia%2fmelbourne&user-irc_nickname=&user-interests=&user-expertise=&user-twitter_url=&user-stackoverflow_url=&user-linkedin_url=&user-mozillians_url=&user-facebook_url= the main difference is that the url doesn't have any parameters.
Introduction to the server side - Learn web development
sites like google maps can use saved or current locations for providing routing information, and search or travel history to highlight local businesses in search results.
Ember interactivity: Events, classes and state - Learn web development
replace it with the following: this.todos.add(text); if we try this out in the todo app in our browser (npm start, go to localhost:4200), it will look like nothing happens after hitting the enter key (although the fact that the app builds without any errors is a good sign).
Routing in Ember - Learn web development
in each case, replace {{outlet}} with <todolist /> so at this point, if you try the app again and visit any of the three routes localhost:4200 localhost:4200/active localhost:4200/completed you'll see exactly the same thing.
Creating our first Vue component - Learn web development
the data property is where you can manage local state in a component, it lives inside the component object alongside the props property and has the following structure: data() { return { key: value } } you'll note that the data property is a function.
Adding a new todo form: Vue events, methods, and models - Learn web development
we also lose all local state on page refresh.
Vue resources - Learn web development
you can do this like so: if your local server is still running, end it by pressing ctrl + c in the terminal.
Handling common HTML and CSS problems - Learn web development
to try this example, make a local copy of selectivizr-example-start.html.
Introduction to cross browser testing - Learn web development
this could be a group of friends or family, a group of other employees, a class at a local university, or a professional user testing setup, where people are paid to test out your site and provide results.
Strategies for carrying out testing - Learn web development
certain countries, or locales), then you will probably have different common browsers to test.
Cross browser testing - Learn web development
we will also look at how to integrate your local testing environment with commercial apps like the ones discussed in the previous article.
Client-side tooling overview - Learn web development
a typical vcs involves having a local version of the code that you make changes to.
Learn web development
accessibility — make the web usable by everyone accessibility is the practice of making web content available to as many people as possible regardless of disability, device, locale, or other differentiating factors.
Gecko info for Windows accessibility vendors
neither "description:" or "of" in the above strings is ever localized, so they should be parsed out.
Obsolete
creating a skin for firefox uuid contents.rdf install.rdf theme changes in firefox 2 theme changes in firefox 3 theme changes in firefox 3.5 theme changes in firefox 4 building a theme common theme issues and their solutions making sure your theme works with rtl locales creating a skin for seamonkey 2 dom inspector inspectorwidget force rtl yet another theme tutorial ...
Adding a new event
although, a lot of existing members don't have "m" prefix, but you shouldn't use the legacy local rules.
Adding a new word to the en-US dictionary
get into the dictionary sources directory using this command: cd extensions/spellcheck/locales/hunspell/dictionary-sources there's a special script used for editing dictionaries.
Benchmarking
rust optimization level local optimized builds are compiled with rust optimization level 1 by default, unlike nightly builds, which use rust optimization level 2.
Command line options
note: since firefox 2.0.0.7, use of the -install-global-extension and -install-global-theme command line arguments have been restricted to only allow installing add-ons that are on local disks or mapped drives.
Continuous Integration
clobber builds mean the directory hierarchy, including the local source and object directory are deleted if it exists from a previous build.
Debugging JavaScript
this can be a security risk, especially if you also set the devtools.debugger.force-local preference to false.) then, the browser toolbox displays the available tools for debugging.
Debugging OpenGL
if you start up firefox with this variable defined, the following behavior changes occur: each time you issue an opengl call, a check is performed to ensure that the gl context is current, using a thread-local static variable to keep track of this.
Debugging on Windows
if you have followed the steps in building firefox for windows and have a local debug build, you can execute ./mach run --debug from the same command line.
Simple Thunderbird build
get the latest mozilla source code from mozilla's mozilla-central mercurial code repository, and check it out into a local directory source/ (or however you want to call it).
Updating NSPR or NSS in mozilla-central
(because some developers might not be aware that nspr/nss are separately maintained and released, the mozilla hg server rejects accidental changes/forking, if the required keywords are missing in the commit comment.) if nspr or nss must be upgraded to a new static tag, follow this procedure: before starting, make sure your local repository is updated to mozilla-central tip and that there are no local changes: $ hg status -mard pull the new sources $ python client.py update_nspr nspr_tag_name or $ python client.py update_nss nss_tag_name if you update a branch older than mozilla 17 (without the change from bug 782784), you must manually add a dummy change (add or remove a blank line) to force a rebuild of ...
Eclipse CDT
once a "path mapping" is created, select "edit..." and add an entry with these values compilation path: / local file system path: / this is the only known workaround to bind binaries to source files.
Commenting IDL for better documentation
* * @param language the localization identification indicating the language in * which the cookie monster is to express his love of cookies.
Listening to events on all tabs
amessage localized text corresponding to astatus.
mach
$ cd objdir-firefox $ mach build adding mach to your shell's search path if you add mach to your path (by modifying the path environment variable to include your source directory, or by copying mach to a directory in the default path like /usr/local/bin) then you can type mach anywhere in your source directory or your objdir.
Error codes returned by Mozilla APIs
ction_err (0x805303ef) ns_error_dom_too_few_parameters_err (0x805303f0) ns_error_dom_bad_document_domain (0x805303f1) ns_error_dom_prop_access_denied (0x805303f2) ns_error_dom_xpconnect_access_denied (0x805303f3) ns_error_dom_bad_uri (0x805303f4) ns_error_dom_retval_undefined (0x805303f5) ns_error_dom_quota_reached (0x805303f6) an attempt was made to add data into the local or global storage for a given domain that would exceed the amount allowed for that domain.
Performance
better: instead of only keeping the state in the parent an addon can employ a master-slave architecture where the parent has the authoritative state and replicates it to the child processes in advance so they can act based on their local copy.
Performance best practices for Firefox front-end engineers
use indexeddb for storage appcache and localstorage are synchronous storage apis that will block the main thread when you use them.
Using the Browser API
MozillaGeckoChromeAPIBrowser APIUsing
to run the demo, the best approach is to clone the github repo locally (or just download it directly if you don't do github), open webide, open the repo as a packaged app, then run it either on a simulator or a real device if you have one.
Browser API
htmliframeelement.purgehistory() clears all the resources (cookies, localstorage, cache, etc.) associated with the browser <iframe>.
Overview of Mozilla embedding APIs
interface definition: nsilocalfile interface status...
Geckoview-Junit Tests
running tests locally if desired, connect an android device to your computer, or start an emulator, and make sure your device is visible to adb: $ adb devices list of devices attached emulator-5554 device if no device is found, 'mach geckoview-junit' will offer to start an emulator.
How to get a stacktrace for a bug report
if you want breakpad to leave the .dump and .extra files on your computer so that you can examine them locally, then set the moz_crashreporter_no_delete_dump environment variable to 1.
JavaScript Tips
prefer to use localname rather than tagname.
AddonManager
the existing add-on types are defined in xpiprovider.jsm and are, at this time, the following: extension, theme, locale, multipackage, dictionary and experiment.
Download
launcherpath string local file path of the application to be used to launch the target file, or null if the file should be launched with the default application associated with the contenttype property or the extension of the target file.
DownloadError
becausetargetfailed read only boolean indicates an error occurred while writing to the local target.
Interfacing with the Add-on Repository
nces-service;1"] .getservice(components.interfaces.nsiprefservice); var prefbranch = prefsservice.getbranch("extensions."); var recurl = ""; try { recurl = prefbranch.getcharpref("getaddons.recommended.url"); } catch(e) { recurl = ""; } if (recurl == "") { prefbranch.setcharpref("getaddons.recommended.url", "https://services.addons.mozilla.org/%locale%/%app%/api/%api_version%/list/recommended/all/%max_results%/%os%/%version%?src=firefox"); prefsservice.savepreffile(null); } this fetches the value of the extensions.getaddons.recommended.url preference, and, if the preference doesn't exist or has no value, sets the value of the preference to the correct one for the amo site.
Services.jsm
ce downloads nsidownloadmanager download manager droppedlinkhandler nsidroppedlinkhandler dropped link handler service els nsieventlistenerservice event listener service etld nsieffectivetldservice effectivetld service focus nsifocusmanager focus manager io nsiioservice nsiioservice2 i/o service locale nsilocaleservice locale service logins nsiloginmanager password manager service metro nsiwinmetroutils 2 mm nsimessagebroadcaster nsiframescriptloader global frame message manager3 obs nsiobserverservice observer service perms nsipermissionmanager permission manager service ppmm nsimessagebroadcaster...
JavaScript code modules
pluralform.jsm supplies an easy way to get the correct plural forms for the current locale, as well as ways to localize to a specific plural rule.
Mozilla Framework Based on Templates (MFBT)
threadlocal.h implements thread-local storage, aka "tls", also called thread-specific storage.
Fonts for Mozilla's MathML engine
a better alternative on unix systems is to install the otf files for latin modern math and stix into some local font folder and (if necessary) to run fc-cache on it.
Mozilla Development Strategies
here's how to create a branch: from your linux or mac os x box: # start from your trunk tree on your local disk cd mozilla find .
Mozilla projects on GitHub
mozilla-l10n scripts and tools used by the localization drivers.
BloatView
34320 nstexttransformer 548 8220 469088 1414936 1532756 3425000 0 0 0 0 0 nsstylecontextdata 736 259808 325312 489440 338560 1413120 141312 220800 -11040 94944 446016 nslinelayout 1100 2200 225500 402600 562100 1192400 0 0 0 0 0 nslocalfile 424 558832 19928 1696 1272 581728 72080 1272 424 -424 73352 the first set of columns, bytes allocated, shows the amount of memory allocated for the first log file (blank.txt), the difference between the first log file and the second (mozilla.txt), the difference between the second log file and the third (yahoo.txt), the difference between the third...
GC and CC logs
by default, they go to a temporary directory which differs per os - it's /tmp/ on linux/bsd, $localappdata\temp\ on windows, and somewhere in /var/folders/ on mac (whatever the directory service returns for tmpd/ns_os_temp_dir).
Gecko Profiler FAQ
overview of the changes in the last (year?) to cleopatra/etc faster, hopefully more reliable has a timeline tab lets you hide threads with a context menu supports symbolication for local builds on windows if you run “mach buildsymbols” first profiling non-nsthreads?
Leak-hunting strategies and tips
getting symbol information for system libraries windows setting the environment variable _nt_symbol_path to something like symsrv*symsrv.dll*f:\localsymbols*http://msdl.microsoft.com/download/symbols as described in microsoft's article.
Power profiling overview
if the problem manifests on a particular website, try saving a local copy of the site and then manually removing html elements to see if a particular page feature is causing the problem many power problems are caused by either high cpu usage or high wakeup frequency.
Profiling with Xperf
(note that it's not the first version number in the about window; that's the windows version.) if you have an older version, you will experience bugs, especially around symbol loading for local builds.
A brief guide to Mozilla preferences
none of the other preference files contain locale-specific preferences.
Patches and pushes
note that if your team selects a local version of an already default plugin (e.g., wikipedia), the xml filename should include the locale code (e.g., wikipedia-es).
Profile Manager
backup folder profile manager has a local backup folder where it can manage profile backups.
MailNews automated testing
message injection: inject synthesized messages via local or imap (using a fake server).
Date and Time
two often-used callback functions of this type are provided by nspr: prtimeparamfn pr_localtimeparameters and pr_gmtparameters functions the functions that create and manipulate time and date values are: pr_now pr_explodetime pr_implodetime pr_normalizetime ...
PRMcastRequest
ifaddr local ip address of interface.
PRSockOption
pr_sockopt_reuseaddr allow local address reuse.
PRSocketOptionData
reuse_addr allow local address reuse.
PR_Connect
if the socket is not bound, it will be bound to an arbitrary local address.
PR_CreateThread
scope specifies your preference for making the thread local (pr_local_thread), global (pr_global_thread) or global bound (pr_global_bound_thread).
PR_GetThreadScope
syntax #include <prthread.h> prthreadscope pr_getthreadscope(void); returns a value of type prthreadscope indicating whether the thread is local or global.
PR_OpenTCPSocket
can be pr_af_inet (ipv4), pr_af_inet6 (ipv6), or pr_af_local (unix domain, supported on posix systems only).
PR OpenUDPSocket
can be pr_af_inet (ipv4), pr_af_inet6 (ipv6), or pr_af_local (unix domain, supported on posix systems only).
Threads
setting global thread concurrency pr_setconcurrency sets the number of global threads used by nspr to create local threads.
An overview of NSS Internals
the goal is to eventually find a certificate b (or c or ...) that has an appropriate trust assigned (e.g., because it can be found in the ckbi module and the user hasn't made any overriding trust decisions, or it can be found in a nss database file managed by the user or by the local environment).
Certificate functions
edsoftfailurepolicy mxr 3.12 and later cert_getcommonname mxr 3.2 and later cert_getcountryname mxr 3.2 and later cert_getdbcontentversion mxr 3.2 and later cert_getdefaultcertdb mxr 3.2 and later cert_getdomaincomponentname mxr 3.2 and later cert_getfirstemailaddress mxr 3.7 and later cert_getlocalityname mxr 3.2 and later cert_getnextemailaddress mxr 3.7 and later cert_getnextgeneralname mxr 3.10 and later cert_getnextnameconstraint mxr 3.10 and later cert_getocspresponsestatus mxr 3.6 and later cert_getocspstatusforcertid mxr 3.6 and later cert_getoidstring mxr 3.9 and later cert_getor...
Introduction to Network Security Services
nss will pick the right one for the local system at run time.
Build instructions for JSS 4.3.x
unix setenv java_home /usr/local/jdk1.5.0 (or wherever your jdk is installed) windows set java_home=c:\programs\jdk1.5.0 (or wherever your jdk is installed) windows (cygnus) java_home=/cygdrive/c/programs/jdk1.5.0 (or wherever your jdk is installed) export java_home windows build configurations winnt vs win95 as of nss 3.15.4, nspr/nss/jss build generates a "win95" configuration by default on wi...
JSS FAQ
MozillaProjectsNSSJSSJSS FAQ
ssl_getclientauthdatahook sets a callback to return the local certificate for ssl client auth.
Using JSS
MozillaProjectsNSSJSSUsing JSS
you can put this directory in your classpath to run applications locally; or, you can package the class files into a jar file for easier distribution: cd mozilla/dist/classes[_dbg] zip -r ../jss42.jar .
NSS 3.12.6 release notes
mpressed_record new types in sslt.h sslextensiontype new environment variables sqlite_force_proxy_locking 1 means force always use proxy, 0 means never use proxy, null means use proxy for non-local files only.
NSS_3.12_release_notes.html
id_network_fetching cert_rev_m_allow_implicit_default_source cert_rev_m_ignore_implicit_default_source cert_rev_m_skip_test_on_missing_source cert_rev_m_require_info_on_missing_source cert_rev_m_ignore_missing_fresh_info cert_rev_m_fail_on_missing_fresh_info cert_rev_m_stop_testing_on_fresh_info cert_rev_m_continue_testing_on_fresh_info cert_rev_mi_test_each_method_separately cert_rev_mi_test_all_local_information_first cert_rev_mi_no_overall_info_requirement cert_rev_mi_require_some_fresh_info_available cert_policy_flag_no_mapping cert_policy_flag_explicit cert_policy_flag_no_any cert_enable_ldap_fetch cert_enable_http_fetch new macro in utilrename.h: smime_aes_cbc_128 the nssckbi pkcs #11 module's version changed to 1.70.
NSS 3.18 release notes
use -c one, two or three times to print information about the certificates received from a server, and information about the locally found and trusted issuer certificates, to diagnose server side configuration issues.
NSS 3.43 release notes
kong post root ca 3 sha-256 fingerprint: 5a2fc03f0c83b090bbfa40604b0988446c7636183df9846e17101a447fb8efd6 the following ca certificates were removed: none bugs fixed in nss 3.43 bug 1528669 and bug 1529308 - improve gyp build system handling bug 1529950 and bug 1521174 - improve nss s/mime tests for thunderbird bug 1530134 - if docker isn't installed, try running a local clang-format as a fallback bug 1531267 - enable fips mode automatically if the system fips mode flag is set bug 1528262 - add a -j option to the strsclnt command to specify sigschemes bug 1513909 - add manual for nss-policy-check bug 1531074 - fix a deref after a null check in seckey_setpublicvalue bug 1517714 - properly handle esni with hrr bug 1529813 - expose hkdf-expand-label with mecha...
PKCS11 FAQ
MozillaProjectsNSSPKCS11FAQ
to get a key into an initialized token, go to your local certificate authority and initiate a certificate request.
NSS tools : modutil
} } win32/setup.hlp { relativepath { %temp%/setup.hlp } } win32/setup.cab { relativepath { %temp%/setup.cab } } } } win95::x86 { equivalentplatform {winnt::x86} } sunos:5.5.1:sparc { modulename { "example unix module" } modulefile { unix/fort.so } defaultmechanismflags{0x0001} cipherenableflags{0x0001} files { unix/fort.so { relativepath{%root%/lib/fort.so} absolutepath{/usr/local/netscape/lib/fort.so} filepermissions{555} } xplat/instr.html { relativepath{%root%/docs/inst.html} absolutepath{/usr/local/netscape/docs/inst.html} filepermissions{555} } } } irix:6.2:mips { equivalentplatform { sunos:5.5.1:sparc } } } script grammar the script is basic java, allowing lists, key-value pairs, strings, and combinations of all of them.
NSS tools : vfychain
possible flags: "testlocalinfofirst" and "requirefreshinfo".
sslfnc.html
ssl_datapending returns the number of bytes waiting in internal ssl buffers to be read by the local application from the ssl socket.
sslintro.html
if ssl can locate the information about a previous connection in the local session cache, it can reestablish the connection much more quickly than it can without the connection information.
SSL functions
nd later ssl_getmaxservercachelocks mxr 3.4 and later ssl_getsessionid mxr 3.2 and later ssl_getstatistics mxr 3.2 and later ssl_handshakecallback mxr 3.2 and later ssl_importfd mxr 3.2 and later ssl_inheritmpserversidcache mxr 3.2 and later ssl_invalidatesession mxr 3.2 and later ssl_localcertificate mxr 3.4 and later ssl_optionget mxr 3.2 and later ssl_optiongetdefault mxr 3.2 and later ssl_optionset mxr 3.2 and later ssl_optionsetdefault mxr 3.2 and later ssl_peercertificate mxr 3.2 and later ssl_preencryptedfiletostream mxr 3.2 and later ssl_preencryptedstreamtofile mxr ...
NSS_3.12.3_release_notes.html
bug 466736: incorrect use of nss_use_64 in lib/libpkix/pkix_pl_nss/system/pkix_pl_object.c bug 466745: random number generator fails on windows ce bug 467298: sql db code uses local cache on local file system bug 468279: softoken crash importing email cert into newly upgraded db bug 468532: trusted ca trust flags not being honored in cert_verifycert bug 469583: coverity: uninitialized variable used in sec_pkcs5createalgorithmid bug 469944: when built with microsoft compilers bug 470351: crlutil build fails on windows because it calls undeclared isatty bug 471539:...
NSS Tools modutil
ab { relativepath { %temp%/setup.cab } } } } win95::x86 { equivalentplatform {winnt::x86} } sunos:5.5.1:sparc { modulename { "fortezza unix module" } modulefile { unix/fort.so } defaultmechanismflags{0x0001} cipherenableflags{0x0001} files { unix/fort.so { relativepath{%root%/lib/fort.so} absolutepath{/usr/local/netscape/lib/fort.so} filepermissions{555} } xplat/instr.html { relativepath{%root%/docs/inst.html} absolutepath{/usr/local/netscape/docs/inst.html} filepermissions{555} } } } irix:6.2:mips { equivalentplatform { sunos:5.5.1:sparc } }} script grammar the script file grammar is as follows: --> valuelistvaluel...
NSS tools : modutil
MozillaProjectsNSStoolsmodutil
{ %temp%/setup.cab } } } } win95::x86 { equivalentplatform {winnt::x86} } sunos:5.5.1:sparc { modulename { "example unix module" } modulefile { unix/fort.so } defaultmechanismflags{0x0001} cipherenableflags{0x0001} files { unix/fort.so { relativepath{%root%/lib/fort.so} absolutepath{/usr/local/netscape/lib/fort.so} filepermissions{555} } xplat/instr.html { relativepath{%root%/docs/inst.html} absolutepath{/usr/local/netscape/docs/inst.html} filepermissions{555} } } } irix:6.2:mips { equivalentplatform { sunos:5.5.1:sparc } } } script grammar the script is basic java, allo...
NSS tools : signtool
this script installs files from the jar archive in the local system after smartupdate has validated the digital signature.
NSS tools : vfychain
possible flags: "testlocalinfofirst" and "requirefreshinfo".
Proxies in Necko
proxies and local hosts requires gecko 9.0(firefox 9.0 / thunderbird 9.0 / seamonkey 2.6) starting with gecko 9.0 (firefox 9.0 / thunderbird 9.0 / seamonkey 2.6), proxy servers are not used when accessing hosts with no dots in their names, if manual proxy configuration is used and "<local>" is added to the "no proxy for:" text field field.
Rhino overview
if other properties files with extensions corresponding to the current locale exist, they will be used instead.
Performance Hints
with using the with statement prevents the compiler from generating code for fast access to local variables.
Shumway
it can be run locally through a web server or you can use the version hosted on mozilla's github.
Creating JavaScript tests
testing your test run your new test locally before checking it in (or posting it for review).
Bytecodes
local slots: holds the local variables used by the current code.
Exact Stack Rooting
when passed to an out-param, &handle would convert correctly to js::handlet*, but &local is a compile error.
Property cache
the opcodes that take advantage of the property cache, as of june 2009, are: getprop, get{x,this,arg,local}prop, and length; name; setprop, bindname, and setname; callprop and callname; and {inc,dec}name and name{inc,dec}.
Self-hosted builtins in SpiderMonkey
throwtypeerror, throwrangeerror, throwsyntaxerror, which self-hosted code should use instead of throw so that the error message is specified in js.msg and can be localized.
JSAPI Cookbook
*/ js::rootedvalue r(cx); if (!js_callfunctionname(cx, js_getglobalobject(cx), "foo", 0, null, &r)) return false; calling a js function via a local variable // javascript var r = f(); // where f is a local variable /* jsapi * * suppose f is a local c variable of type js::value.
JS::AutoValueArray
this is typically used for local variables being passed to function which requires js::handlevaluearray or a pointer to js::value array.
JS::HandleValueArray
this is useful as a parameter type, or a temporal local variable for it.
JSErrorReport
if null, the error is local to the script in the current html page.
JSIdArray
use js_idarraylength and js_idarrayget to access the property, and js_destroyidarray to free, or use js::autoidarray as a local variable.
JSObjectPrincipalsFinder
another example: when the function constructor is called, the javascript engine calls the object principals finder callback to obtain principals for the local scope object, to check that the caller has access to that object.
JSVAL_LOCK
to lock a value, use local roots with js_addroot.
JSVAL_UNLOCK
to unlock a value, use local roots with js_removeroot.
JS_NewDouble
the new jsdouble is subject to garbage collection until you protect it using a local root, an object property, or the js_addroot function.
JS_NewDoubleValue
the result is subject to garbage collection until you protect against it using a local root, an object property, or the js_addroot function.
JS_NewNumberValue
in this case, the value is subject to garbage collection until you protect against it using a local root, an object property, or the js_addroot function.
JS_NewScriptObject
once you have created a script, you should immediately ensure that its script object is reachable (perhaps by using js_addroot or js_enterlocalrootscope).
JS_SetFunctionCallback
note that debuggers should probably use js_setcallhook in preference to this function, because it is invoked when the javascript stack is guaranteed to be in a consistent state (and therefore it is valid to inspect and modify local variables, generate stack traces, and set breakpoints.) callback syntax typedef void (* jsfunctioncallback)(const jsfunction *fun,const jsscript *scr, const jscontext *cx, int entering); name type description fun const jsfunction * the javascript function being invoked or exited.
JS_ValueToString
protect it using a local root, an object property, or the js_addroot function.
TPS Tests
note that the testfile is not a path, it should only be the filename from services/sync/tests/tps/ runtps --debug --testfile %test_file_name% --binary %firefox_binary_path% additionally, omitting a --testfile parameter will cause it to run all tps tests listed in services/sync/tests/tps/all_tests.json an example on osx, for running just the test_sync.js testfile against a locally built firefox (where the mozconfig set the objdir to obj-ff-artifact): runtps --debug --testfile test_sync.js --binary obj-ff-artifact/dist/nightly.app/contents/macos/firefox running tps against stage, or dev fxa tps can be configured using the $tps_venv_path/config.json file.
WebReplayRoadmap
all features should be accessible to users operating locally.
Zest usecase: Reporting Security Vulnerabilities to Developers
in this case the sequence of events could be: the security team discovers a vulnerability using specialist security tools they use those tools to create a zest script which reproduces the problem they hand the script over to the developer the developer adjusts the script to match their local environment they run the script and see the vulnerability they fix the vulnerability they rerun the script to check that the vulnerability is fixed the fix is applied to the system that the security team is testing the security team rerun the script as an initial check they then perform any manual testing they think is necessary note that the developers could also include the script ...
Animated PNG graphics
MozillaTechAPNG
removed num_frames from 'anim' chunk from 0.3 added 'actl', 'fdat', 'fctl' chunk descriptions as per the latest png-list discussion added section 4, "interactions with other png chunks"; described global and local palettes and transparency changed 'offs' chunk section to refer to more general chunks updated 'adat' description to indicate that all frames must either be in a single chunk, or that the first chunk must have empty data.
Life After XUL: Building Firefox Interfaces with HTML
problems / solutions: accessibility localization caching for working offline / pre-caching for snappy first run visual performance / jank security privacy operations tooling build process third-party library use and management ...
Places utilities for JavaScript
localstore warning: local store provided access to the local-store rdf data source, which stores persisted information about the browser.
Generating GUIDs
bash you can put the following into your .bashrc file: uuidgen-c++() { local uuid=$(uuidgen) echo "// $uuid" echo "#define ns__iid \\" echo "{ 0x${uuid:0:8}, 0x${uuid:9:4}, 0x${uuid:14:4}, \\" echo -n " { 0x${uuid:19:2}, 0x${uuid:21:2}, 0x${uuid:24:2}, " echo -n "0x${uuid:26:2}, 0x${uuid:28:2}, 0x${uuid:30:2}, " echo "0x${uuid:32:2}, 0x${uuid:34:2} } }" } perl #!/usr/bin/perl $uuid = `uuidgen`; chomp $uuid; print $uuid, "\n"; @parts = ($uuid =~...
Avoiding leaks in JavaScript XPCOM components
consider this example from bug 285065: function _filterradiogroup(anode) { switch (anode.localname) { case "radio": return nodefilter.filter_accept; case "template": case "radiogroup": return nodefilter.filter_reject; default: return nodefilter.filter_skip; } } var iterator = this.ownerdocument.createtreewalker(this, nodefilter.show_element, _filterradiogroup, true); while (iterator.ne...
Component Internals
xpcom registry manifests xpcom uses special files called manifests to track and persist information about the components to the local system.
Creating the Component Code
an nsifile object is usually a file or directory on a local volume, but it may represent something on a network volume as well.
Creating XPCOM components
n xpidl the xpidl syntax scriptable interfaces subclassing nsisupports the web locking interface implementing weblock declaration macros representing return values in xpcom xpidl code generation getting the weblock service from a client implementing the iweblock interface the directory service modifying paths with nsifile manipulating files with nsifile using nsilocalfile for reading data processing the white list data iweblock method by method lock and unlock addsite removesite setsites getnext getsites hasmoreelements finishing the component using frozen interfaces copying interfaces into your build environment implementing the nsicontentpolicy interface receiving notifications implementing the nsicontentpolicy ...
HOWTO
mponents.classes; let ci = components.interfaces; // register resource://app/ uri let ios = cc["@mozilla.org/network/io-service;1"] .getservice(ci.nsiioservice); let reshandler = ios.getprotocolhandler("resource") .queryinterface(ci.nsiresprotocolhandler); let mozdir = cc["@mozilla.org/file/directory_service;1"] .getservice(ci.nsiproperties) .get("curprocd", ci.nsilocalfile); let mozdiruri = ios.newfileuri(mozdir); reshandler.setsubstitution("app", mozdiruri); // register chrome://* uris let cr = cc["@mozilla.org/chrome/chrome-registry;1"] .getservice(ci.nsichromeregistry); cr.checkfornewchrome(); } bug 546628 would make this unnecessary.
xpcshell
$ locate run-mozilla.sh /usr/lib/firefox-0.10.1/run-mozilla.sh /usr/lib/thunderbird-0.9/run-mozilla.sh /usr/local/mozilla/run-mozilla.sh /opt/mozilla/run-mozilla.sh /root/.trash/mozilla/run-mozilla.sh just pick one, cd over there, and run-mozilla.sh xpcshell, if it's present.
Standard XPCOM components
for instance, it can give you the path of the system's temporary directory, desktop directory, current working directory, and so on.nslocalfilea component implementing nsilocalfile.
NS_InitXPCOM2
the one exception is that you may call ns_newlocalfile or ns_newnativelocalfile to create a nsifile needed for the abindirectory parameter to ns_initxpcom2.
NS_InitXPCOM3
the one exception is that you may call ns_newlocalfile or ns_newnativelocalfile to create a nsifile needed for the abindirectory parameter to ns_initxpcom3.
Core XPCOM functions
ns_newlocalfilethe ns_newlocalfile function creates an instance of nsilocalfile that provides a platform independent representation of a file path.ns_newnativelocalfilethe ns_newnativelocalfile function creates an instance of nsilocalfile that provides a platform independent representation of a file path.ns_reallocreallocates a block of memory using the xpcom memory manager.ns_shutdownxpcomthe ns_shutdownxpc...
nsCStringEncoding
the native filesystem charset applies to strings passed to the "native" method variants on nsifile and nsilocalfile.
amIInstallTrigger
constant value description skin 1 locale 2 content 4 package 7 methods enabled() tests if installation is enabled.
mozIPlaceInfo
placeid long read only: the machine-local (internal) id of the place.
mozISpellCheckingEngine
each dictionary name is typically but not always a locale code.
mozIThirdPartyUtil
if it cannot be determined because one or both uris do not have a base domain (for instance, in the case of ip addresses, host aliases such as 'localhost', or a file:// uri), an exact string comparison on host is performed.
mozIVisitInfo
visitid long read only: the machine-local (internal) id of the visit.
DefaultKeyBinding
« nsiaccessible page summary provides localized string of global keyboard accelerator for default action, such as ctrl+o for open file (ctrl + o).
GetActionDescription
« nsiaccessible page summary this method retrieves the description (localized name) of the accessible action at the given zero-based index.
KeyboardShortcut
« nsiaccessible page summary provides localized string of accesskey name, such as alt+d (alt + d).
nsIContentSniffer
let charset = "iso-8859-1"; try { // this pref has been removed, see bug 910192 charset = services.prefs.getcomplexvalue("intl.charset.default", ci.nsipreflocalizedstring).data; } catch (e) { } let conv = cc["@mozilla.org/intl/scriptableunicodeconverter"] .createinstance(ci.nsiscriptableunicodeconverter); conv.charset = charset; try { let str = conv.convertfrombytearray(adata, alength); if (str.substring(0, 5) == "%pdf-") return "application/pdf"; //...
nsICrashReporter
minidumppath nsilocalfile get or set the path on the local system to which minidumps will be written when a crash happens.
nsICryptoHash
the following example shows how to compute the sha256 hash of a file: // hardcoded here for convenience var path = "c:\\windows\\notepad.exe"; var f = components.classes["@mozilla.org/file/local;1"] .createinstance(components.interfaces.nsilocalfile); f.initwithpath(path); var istream = components.classes["@mozilla.org/network/file-input-stream;1"] .createinstance(components.interfaces.nsifileinputstream); // open for reading istream.init(f, 0x01, 0444, 0); var ch = components.classes["@mozilla.org/security/hash;1"] .createinst...
nsIDNSService
any pending asynchronous requests will be canceled, and the local cache of dns records will be cleared.
nsIDOMNode
localname domstring read only.
nsIDOMOfflineResourceList
the nsidomofflineresourcelist interface provides access to the application cache that allows web content's resources to be cached locally for use while offline.
nsIDOMStorageEventObsolete
dom/interfaces/storage/nsidomstorageeventobsolete.idlscriptable this interface represents an event that occurs to notify interested parties about changes to the contents of a dom storage space; it is used for both session storage and local storage.
nsIDownload
targetfile nsilocalfile indicates the location at which the downloaded file will be (or is, if the download is complete) stored.
nsIFileInputStream
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) ioflags the file status flags define how the file is accessed.
nsIFileOutputStream
methods init() void init( in nsifile file, in long ioflags, in long perm, in long behaviorflags ); parameters file file to write to (must qi to nsilocalfile) ioflags file open flags listed are listed in the pr_open() documentation.
nsIFileSpec
use nsifile and nsilocalfile instead.
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).
nsIFileURL
the url scheme need not be file:, since other local protocols may map urls to files (e.g., resource:).
nsIFileView
ol id="filenamecolumn" label="name" flex="1" primary="true"/> <treecol id="lastmodifiedcolumn" label="date" flex="1"/> <treecol id="size" label="size" flex="1"/> </treecols> <treechildren/> </tree> <script> var dir="/home/"; //the directory to be opened var ftree = document.getelementbyid("ftree"); //the xul tree element var lfile = components.classes["@mozilla.org/file/local;1"] .createinstance(components.interfaces.nsilocalfile); lfile.initwithpath(dir); // open the directory var fview = components.classes["@mozilla.org/filepicker/fileview;1"] .createinstance(components.interfaces.nsifileview); //create an instance of the component tview = fview.queryinterface(components.interfaces.nsitreeview); //get the nsitreeview interface fview.setdire...
nsIINIParserWriter
.getservice(components.interfaces.nsiiniparserfactory) .createiniparser(somelocalfile) .queryinterface(components.interfaces.nsiiniparserwriter); here, somelocalfile is an nsifile based object, such as an nsilocalfile.
nsIInputStream
note: this method should not be used to determine the total size of a stream, even if the stream corresponds to a local file.
Using nsILoginManager
</form> creating a site authentication login var authlogininfo = new nslogininfo( 'http://www.example.com', null, 'exampleco login', 'alice', 'secret321', "", "" ); this would correspond to a login on http://www.example.com when the server sends a reply such as: http/1.0 401 authorization required server: apache/1.3.27 www-authenticate: basic realm="exampleco login" creating a local extension login var extlogininfo = new nslogininfo( 'chrome://firefoo', null, 'user registration', 'bob', '123secret', "", "" ); from a component creating a new info block is done slightly differently: var nslogininfo = new constructor("@org/manager/ci.init"); var extlogininfo = new aformsubmiturl, ausername, ausernamefield, ...
nsIMicrosummaryGenerator
localuri nsiuri for generators installed by the user or bundled with the browser, the local uri points to the location of the local file containing the generator's xml.
Building an Account Manager Extension
and the property file needs to be in chrome://example@mozilla.org/locale/am-devmo-account.properties.
nsIMsgIdentity
signature nsilocalfile the file containing the current signature.
nsIMsgProtocolInfo
defaultlocalfilepath nsilocalfile the default path under which all server data for this account type will be stored.
nsIMsgSearchCustomTerm
this should be localized.
nsIMsgSearchSession
void addallscopes(in nsmsgsearchscopevalue attrib); parameters attrib search() void search(in nsimsgwindow awindow); parameters awindow interruptsearch() void interruptsearch(); pausesearch() these two methods are used when the search session is using a timer to do local search, and the search adapter needs to run a url (e.g., to reparse a local folder) and wants to pause the timer while running the url.
nsINavHistoryQuery
setting it to an empty string is a real query and will match any uri that has no host name (local files and such).
nsINavHistoryQueryOptions
this is because sorting by title requires us to sort after using locale-sensetive sorting (as opposed to letting the database do it for us).
nsIProcess
example // create an nsifile for the executable var file = components.classes["@mozilla.org/file/local;1"] .createinstance(components.interfaces.nsifile); file.initwithpath("c:\\myapp.exe"); // create an nsiprocess var process = components.classes["@mozilla.org/process/util;1"] .createinstance(components.interfaces.nsiprocess); process.init(file); // run the process.
nsIProfile
langcode the locale to use for the new profile.
nsIProgressEventSink
astatusarg status code argument to be used with the string bundle service to convert the status message into localized, human readable text.
nsIPromptService
constant value description button_title_ok 1 these flags are used to select standard labels from the user's current locale.
nsISOCKSSocketInfo
internalproxyaddr prnetaddrptr the internal (local) proxy address.
nsIScriptableInputStream
note: this method should not be used to determine the total size of a stream, even if the stream corresponds to a local file.
nsISearchEngine
iconuri nsiuri a nsiuri corresponding to the engine's icon, stored locally.
nsISecurityCheckedComponent
code that has the "universalbrowserread" capability is allowed to perform certain actions that allow it to read information from the local system.
nsIURLFormatter
mozilla applications linking to mozilla websites are strongly encouraged to use urls of the following format: http[s]://%service%.mozilla.[com|org]/%locale%/ method overview astring formaturl(in astring aformat); astring formaturlpref(in astring apref); methods formaturl() formats a string url.
nsIUpdate
billboardurl astring the url to a page that is typically localized to display in the update prompt.
nsIUpdateItem
constant gecko version description 1.8 1.8.1 1.9 1.9.1 1.9.2 type_app 0x01 type_extension 0x02 type_theme 0x04 type_locale 0x08 type_multi_xpi 0x20 type_addon type_extension + type_theme + type_locale + type_plugin type_extension + type_theme + type_locale type_any type_app + type_addon 0xff type_plugin 0x10 methods init() initializes the object.
nsIWebContentHandlerRegistrar
typically they will prompt the user to confirm adding an entry to the local list.
nsIWebNavigation
load_flags_bypass_cache 256 this flag specifies that the local web cache should be bypassed, but an intermediate proxy cache could still be used to satisfy the load.
nsIWebProgressListener
amessage localized text corresponding to astatus.
nsIWindowsRegKey
constant value description root_key_classes_root 0x80000000 root_key_current_user 0x80000001 root_key_local_machine 0x80000002 access constants values for the mode parameter passed to the open() and create() methods.
nsIWindowsShellService
obsolete since gecko 1.8 hklm 3 hkey_local_machine.
nsIXULWindow
that is, ensures that it is visible and runs a local event loop, exiting only once the window has been closed.
Test-Info
running test-info locally "test-info" is a mach command and can be run from any source tree.
Autoconfiguration in Thunderbird
configuration file on harddisk local administrators may place a configuration file in the thunderbird installation folder.
Creating a gloda message query
this is a locally unique identifier.
LDAP Support
er homephone homephone faxnumber fax faxnumber facsimiletelephonenumber pagernumber pager pagernumber pagerphone cellularnumber mobile cellularnumber cellphone cellularnumber carphone workaddress postofficebox workaddress streetaddress workcity l workcity locality workstate st workstate region workzipcode postalcode workzipcode zip workcountry countryname jobtitle title department ou department orgunit department department department departmentnumber company o company company workcountry countryname...
Mailnews and Mail code review requirements
for xpcshell tests, it has either passed on try or has been run locally on the appropriate platform(s).
Thunderbird Binaries
latest english trunk builds are available at: https://archive.mozilla.org/pub/thunderbird/nightly/latest-comm-central/ latest localized trunk builds are available at: https://archive.mozilla.org/pub/thunderbird/nightly/latest-comm-central-l10n/ note: please use http://ftp.stage.mozaws.net/pub/thunderbird/nightly/latest-comm-central/ because the above two links currently do not work.
Building a Thunderbird extension 1: introduction
the tutorial has the following pages: introduction (this page) the extension filesystem (setting up your local system) install manifest (the install.rdf file that contains meta-information about the extension) chrome manifest (list of packages and overlays) xul (the xml user interface language that is used to modify the thunderbird user interface) adding javascript (explains how to add some simple javascript to your thunderbird extension) installing locally (enabling the extension on your local thund...
Filter Incoming Mail
by example, setting it to lower case subject = subject.tolocalelowercase(); // then we rebuild a subject objet by rencoding the string // and assign it to the message headers and we're done amsghdr.subject = mimeconvert.encodemimepartiistr_utf8(subject, false, "utf-8", 0, 72); } } }; function init() { var notificationservice = components.classes["@mozilla.org/messenger/msgnotificationservice;1"] .getservice(components.inte...
Using the Mozilla source server
the nightly debug builds are now also source indexed so that by following a couple of simple steps you can also have the source code served to you for debugging without a local build what you'll need windbg or visual studio (note: express editions will not work, but windbg is a free download) a nightly build that was created after april 15, 2008; go to the /pub/firefox/nightly/latest-mozilla-central/ folder and grab the installer for builds predating the switch to mercurial, you'll need cvs.exe, added to your path (the cvs.exe from mozillabuild has problems, use this one instead) note: do not use the cvs from mozillabuild, it will not work!
Virtualenv
here are a few such tools: carton: make a self-extracting virtualenv from directories or urls of packages; http://pypi.python.org/pypi/carton velcro: a script that sets up a python project for local installation; https://bitbucket.org/kumar303/velcro/ virtualenvwrapper: a set of extensions to ian bicking’s virtualenv tool for creating isolated python development environments; http://www.doughellmann.com/projects...tualenvwrapper the mozilla-central virtualenv in order to make use of various python modules located throughout mozilla-central, a virtualenv is created as part of the b...
WebIDL bindings
each new tag requires that a localized string be defined, containing the deprecation message to display.
Working with windows in chrome code
you could declare a local variable in each window along with corresponding setter functions to keep the "instances" of the variable in sync across windows, but fortunately, there's a better way.
Using js-ctypes
el = 2; var kcfusernotificationplainalertlevel = 3; // declare functions /* https://developer.apple.com/library/mac/documentation/corefoundation/reference/cfusernotificationref/index.html#//apple_ref/c/func/cfusernotificationdisplaynotice * sint32 cfusernotificationdisplaynotice ( * cftimeinterval timeout, * cfoptionflags flags, * cfurlref iconurl, * cfurlref soundurl, * cfurlref localizationurl, * cfstringref alertheader, * cfstringref alertmessage, * cfstringref defaultbuttontitle * ); */ var cfusernotificationdisplaynotice = libcf.declare("cfusernotificationdisplaynotice", ctypes.default_abi, sint32, // return cftimeinterval, // timeout cfoptionflags, // flags cfurlref, // iconurl cfurlref, // soundurl cfurlref, // localizationurl cfstringref, /...
Plug-in Basics - Plugins
directories pointed to by hkey_local_machine\software\mozillaplugins\*\path registry value, where * can be replaced by any name.
Plug-in Development Overview - Plugins
file mode: the browser saves the data to a local file in cache and passes that file path to the plug-in.
Plug-in Side Plug-in API - Plugins
npp_streamasfile provides a local file name for the data from a stream.
Accessibility Inspector - Firefox Developer Tools
this means trying your best to not lock anyone out of accessing information because of any disability they may have, or any other personal circumstances such as the device they are using, the speed of their network connection, or their geographic location or locale.
DOM Inspector internals - Firefox Developer Tools
source code organization the contents of the top-level directory for the dom inspector repository should look like base/ js/ inspector-cmdline.js makefile.in build/ install.js makefile.in resources/ content/ … locale/ … skin/ … makefile.in install.rdf jar.mn makefile.in makefiles.sh almost all the interesting stuff is in resources/content/.
Source map errors - Firefox Developer Tools
ressourcen-adresse: moz-extension://c7f0f003-4fcf-49fd-8ec0-c49361266581/background.js source-map-adresse: background.js.map the only workaround is to manually change the map url to a public one (http://localhost:1234/file.map.js) and start a local webserver at this port.
The Firefox JavaScript Debugger - Firefox Developer Tools
you can use it to debug code running locally in firefox or running remotely, for example on an android device running firefox for android.
DevTools API - Firefox Developer Tools
id: "inspector", icon: "chrome://browser/skin/devtools/inspector-icon.png", url: "chrome://browser/content/devtools/inspector/inspector.xul", get label() { let strings = services.strings.createbundle("chrome://browser/locale/devtools/inspector.properties"); return strings.getstringfromname("inspector.label"); }, istargetsupported: function(target) { return !target.isremote; }, build: function(iframewindow, toolbox, node) { return new inspectorpanel(iframewindow, toolbox, node); } }); open a tool, or select it if the toolbox is already open: let target = targetfactory.fortab(gbrowser.select...
All keyboard shortcuts - Firefox Developer Tools
because access keys are locale-dependent, they're not documented in this page.
Dominators - Firefox Developer Tools
so when an object becomes unreachable (for example, because it is only referenced by a single local variable which goes out of scope) then any objects it references also become unreachable, as long as no other objects reference them: conversely, this means that objects are kept alive as long as some other reachable object is holding a reference to them.
Migrating from Firebug - Firefox Developer Tools
in contrast to firebug the storage inspector not only allows to inspect cookies but also other kinds of storages like the local and session storage, the cache and indexeddb databases.
Network request list - Firefox Developer Tools
preview of the image in a tooltip: security icons the network monitor displays an icon in the domain column: this gives you extra information about the security status of the request: icon meaning https weak https (for example, a weak cipher was used) failed https (for example, a certificate was invalid) http localhost indicates that the url belongs to a known tracker that would be blocked with content blocking enabled.
Page Inspector - Firefox Developer Tools
you can examine pages loaded in the local copy of firefox or in a remote target such as firefox for android.
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.
The JavaScript input interpreter - Firefox Developer Tools
this means that if you've hit a breakpoint in a function you get autocomplete for objects local to the function.
about:debugging (before Firefox 68) - Firefox Developer Tools
however, you can also debug push notifications locally, without needing the server.
Firefox Developer Tools
storage inspector inspect cookies, local storage, indexeddb, and session storage present in a page.
AddressErrors - Web APIs
dependentlocality a domstring which, if present, indicates that the dependentlocality property of the paymentaddress could not be validated.
AnimationEffect.getComputedTiming() - Web APIs
localtime the current time of the animation in milliseconds.
AudioContext.createMediaStreamDestination() - Web APIs
the createmediastreamdestination() method of the audiocontext interface is used to create a new mediastreamaudiodestinationnode object associated with a webrtc mediastream representing an audio stream, which may be stored in a local file or sent to another computer.
Body.formData() - Web APIs
WebAPIBodyformData
if a user submits a form and a service worker intercepts the request, you could for example call formdata() on it to obtain a key-value map, modify some fields, then send the form onwards to the server (or use it locally).
CompositionEvent - Web APIs
compositionevent.locale read only returns the locale of current input method (for example, the keyboard layout locale if the composition is associated with ime).
Constraint validation API - Web APIs
if the element's value is not valid, it returns a localized validation message.
CustomElementRegistry.whenDefined() - Web APIs
const undefinedelements = container.queryselectorall(':not(:defined)'); const promises = [...undefinedelements].map( button => customelements.whendefined(button.localname) ); // wait for all the children to be upgraded, // then remove the placeholder.
DOMImplementation.createDocument() - Web APIs
qualifiednamestr is a domstring containing the qualified name, that is an optional prefix and colon plus the local root element name, of the document to be created.
DataTransfer - Web APIs
datatransfer.files contains a list of all the local files available on the data transfer.
Document.cookie - Web APIs
WebAPIDocumentcookie
the reason for the syntax of the document.cookie accessor property is due to the client-server nature of cookies, which differs from other client-client storage methods (like, for instance, localstorage): the server tells the client to store a cookie http/1.0 200 ok content-type: text/html set-cookie: cookie_name1=cookie_value1 set-cookie: cookie_name2=cookie_value2; expires=sun, 16 jul 3567 06:23:41 gmt [content of the page here] the client sends back to the server its cookies previously stored get /sample_page.html http/1.1 host: www.example.org cookie: cookie_name1=cookie_value1; ...
Document.getElementById() - Web APIs
because id values must be unique throughout the entire document, there is no need for "local" versions of the function.
Document.write() - Web APIs
WebAPIDocumentwrite
this happens when opening a local file with the .xhtml file extension or for any document served with an application/xhtml+xml mime type.
Document.writeln() - Web APIs
WebAPIDocumentwriteln
this is the case if opening a local file with a .xhtml file extension or for any document served with an application/xhtml+xml mime type.
DocumentOrShadowRoot.elementsFromPoint() - Web APIs
example html <div> <p>some text</p> </div> <p>elements at point 30, 20:</p> <div id="output"></div> javascript let output = document.getelementbyid("output"); if (document.elementsfrompoint) { let elements = document.elementsfrompoint(30, 20); for (var i = 0; i < elements.length; i++) { output.textcontent += elements[i].localname; if (i < elements.length - 1) { output.textcontent += " < "; } } } else { output.innerhtml = "<span style=\"color: red;\">" + "browser does not support <code>document.elementsfrompoint()</code>" + "</span>"; } specifications specification status shadow domthe definition of 'elementsfrompoint()' in that specification.
DocumentOrShadowRoot.nodeFromPoint() - Web APIs
examples html content <div> <p>some text</p> </div> <p>top node at point 30, 20:</p> <div id="output"></div> javascript content var output = document.getelementbyid("output"); if (document.nodefrompoint) { var node = document.nodefrompoint(30, 20); output.textcontent += node.localname; } else { output.innerhtml = "<span style=\"color: red;\">" + "browser does not support <code>document.nodefrompoint()</code>" + "</span>"; } specifications not part of any specification at present.
DocumentOrShadowRoot.nodesFromPoint() - Web APIs
example html content <div> <p>some text</p> </div> <p>nodes at point 30, 20:</p> <div id="output"></div> javascript content var output = document.getelementbyid("output"); if (document.nodesfrompoint) { var nodes = document.nodesfrompoint(30, 20); for(var i = 0; i < nodes.length; i++) { output.textcontent += nodes[i].localname; if (i < nodes.length - 1) { output.textcontent += " < "; } } } else { output.innerhtml = "<span style=\"color: red;\">" + "browser does not support <code>document.nodesfrompoint()</code>" + "</span>"; } specifications not part of any specification at present.
How to create a DOM tree - Web APIs
dom trees can be queried using xpath expressions, converted to strings or written to a local or remote files using xmlserializer (without having to first convert to a string), posted to a web server (via xmlhttprequest), transformed using xslt, xlink, converted to a javascript object through a jxon algorithm, etc.
Element.classList - Web APIs
WebAPIElementclassList
nt = window.document, object = window.object, hasownprop = object.prototype.hasownproperty; var defineproperty = object.defineproperty, allowtokenlistconstruction = 0, skippropchange = 0; function domtokenlist(){ if (!allowtokenlistconstruction) throw typeerror("illegal constructor"); // internally let it through } domtokenlist.prototype.tostring = domtokenlist.prototype.tolocalestring = function(){return this.value}; domtokenlist.prototype.add = function(){ a: for(var v=0, arglen=arguments.length,val="",ele=this[" ucl"],proto=ele[" uclp"]; v!==arglen; ++v) { val = arguments[v] + "", checkifvalidclasslistentry("add", val); for (var i=0, len=proto.length, resstr=val; i !== len; ++i) if (this[i] === val) continue a; else ...
Element.innerHTML - Web APIs
WebAPIElementinnerHTML
javascript function log(msg) { var logelem = document.queryselector(".log"); var time = new date(); var timestr = time.tolocaletimestring(); logelem.innerhtml += timestr + ": " + msg + "<br/>"; } log("logging mouse events inside this container..."); the log() function creates the log output by getting the current time from a date object using tolocaletimestring(), and building a string with the timestamp and the message text.
Element.removeAttributeNode() - Web APIs
the replacing attribute has the same namespace uri and local name, as well as the original prefix, when applicable.
Event.msConvertURL() - Web APIs
evt.converturl(file, "specified", url); } else { evt.msconverturl(file, "specified", url); } console.log("local file: " + file.name + " (" + file.size + ")"); bloblist.push(file); } // for } // handlepaste see also microsoft api extensions ...
FileError - Web APIs
WebAPIFileError
in fact, many of the powerful storage apis (such as file system, blobbuilder, and filereader) throw errors if you run the app locally from file://.
FileList - Web APIs
WebAPIFileList
tml> <head> </head> <body> <!--multiple is set to allow multiple files to be selected--> <input id="myfiles" multiple type="file"> </body> <script> var pullfiles=function(){ // love the query selector var fileinput = document.queryselector("#myfiles"); var files = fileinput.files; // cache files.length var fl = files.length; var i = 0; while ( i < fl) { // localize file var in the loop var file = files[i]; alert(file.name); i++; } } // set the input element onchange to call pullfiles document.queryselector("#myfiles").onchange=pullfiles; //a.t </script> </html> specifications specification status comment file apithe definition of 'filelist' in that specification.
HTMLAnchorElement.download - Web APIs
the value, if any, specifies the default file name for use in labeling the resource in a local file system.
msAudioCategory - Web APIs
examples include the following local media playback scenarios: local playlist streaming radio streaming playlist music videos streaming audio/radio, youtube, netflix, etc.
HTMLBaseFontElement - Web APIs
if no font listed is installed on the local system, the browser typically defaults to the proportional or fixed-width font for that system.
HTMLButtonElement - Web APIs
htmlbuttonelement.validationmessage read only is a domstring representing the localized message that describes the validation constraints that the control does not satisfy (if any).
HTMLFieldSetElement - Web APIs
htmlfieldsetelement.validationmessage a domstring representing a localized message that describes the validation constraints that the element does not satisfy (if any).
HTMLFormElement.elements - Web APIs
var inputs = document.getelementbyid("my-form").elements; // iterate over the form controls for (i = 0; i < inputs.length; i++) { if (inputs[i].nodename === "input" && inputs[i].type === "text") { // update text input inputs[i].value.tolocaleuppercase(); } } disabling form controls var inputs = document.getelementbyid("my-form").elements; // iterate over the form controls for (i = 0; i < inputs.length; i++) { // disable all form controls inputs[i].setattribute("disabled", ""); } specifications specification status comment html living standardthe definition of 'htmlformelement.elements' in that spe...
HTMLImageElement.useMap - Web APIs
syntax htmlimageelement.usemap = imagemapanchor; let imagemapanchor = htmlimageelement.usemap; value a usvstring providing the page-local url (that is, a url that begins with the hash or pound symbol, "#") of the <map> element which defines the image map to apply to the image.
HTMLInputElement.stepDown() - Web APIs
valid on all numeric, date, and time input types that support the step attribute, includingdate, month, week, time, datetime-local, number, and range.
HTMLInputElement.stepUp() - Web APIs
ments: <input type="date" min="2019-12-25" step="7"> month 1 (month) 12 month (one year) increments: <input type="month" min="2019-12" step="12"> week 1 (week) two week increments: <input type="week" min="2019-w23" step="2"> time 60 (seconds) 900 second (15 minute) increments: <input type="time" min="09:00" step="900"> datetime-local 1 (day) same day of the week: <input type="datetime-local" min="019-12-25t19:30" step="7"> number 1 0.1 increments <input type="number" min="0" step="0.1" max="10"> range 1 increments by 2: <input type="range" min="0" step="2" max="10"> the method, when invoked, changes the form control's value by the value given in the step attribute, multip...
HTMLKeygenElement - Web APIs
validationmessage read only is a domstring representing a localized message that describes the validation constraints that the control does not satisfy (if any).
HTMLObjectElement.validationMessage - Web APIs
the validationmessage read-only property of the htmlobjectelement interface returns a domstring representing a localized message that describes the validation constraints that the control does not satisfy (if any).
HTMLObjectElement - Web APIs
htmlobjectelement.validationmessage read only returns a domstring representing a localized message that describes the validation constraints that the control does not satisfy (if any).
HTMLOutputElement - Web APIs
htmloutputelement.validationmessageread only a domstring representing a localized message that describes the validation constraints that the control does not satisfy (if any).
HTMLSelectElement - Web APIs
htmlselectelement.validationmessageread only a domstring representing a localized message that describes the validation constraints that the control does not satisfy (if any).
History.pushState() - Web APIs
WebAPIHistorypushState
if you need more space than this, you're encouraged to use sessionstorage and/or localstorage.
Working with the History API - Web APIs
if you need more space than this, you're encouraged to use sessionstorage and/or localstorage.
Basic concepts - Web APIs
note, however, that locale-aware sorting has been allowed with an experimental flag enabled (currently for firefox only) since firefox 43.
install - Web APIs
summary installs one or more xpi files on the local machine.
KeyboardEvent.key - Web APIs
WebAPIKeyboardEventkey
the keyboardevent interface's key read-only property returns the value of the key pressed by the user, taking into consideration the state of modifier keys such as shift as well as the keyboard locale and layout.
MediaDevices.getUserMedia() - Web APIs
a secure context is, in short, a page loaded using https or the file:/// url scheme, or a page loaded from localhost.
active - Web APIs
example in this example, a new stream whose source is the user's local camera and microphone is requested using getusermedia().
MediaStreamTrack.stop() - Web APIs
syntax track.stop() description calling stop() tells the user agent that the track's source—whatever that source may be, including files, network streams, or a local camera or microphone—is no longer needed by the mediastreamtrack.
Recording a media element - Web APIs
lines 11-15 the recording process's resolution handler receives as input an array of media data blobs locally known as recordedchunks.
MediaStream Recording API - Web APIs
a second article, recording a media element, describes how to receive a stream from an <audio> or <video> element and use the captured stream (in this case, recording it and saving it to a local disk).
msPlayToSource - Web APIs
syntax ptr = object.msplaytosource; value playto is a means through which an app can connect local playback/display for audio, video, and img elements to a remote device.
MutationObserverInit.attributeFilter - Web APIs
note the use of mutationrecord.oldvalue to get the previous value of the "username" property so we have that information when doing lookups in our local array of users.
MutationRecord - Web APIs
mutationrecord.attributename string returns the local name of the changed attribute, or null.
NDEFRecord.lang - Web APIs
WebAPINDEFRecordlang
the record might be missing a language tag, for example, if the recorded information is not locale-specific.
NDEFRecord.recordType - Web APIs
local type name represents a local type name, frequently used to specify ndef record embedded within another record.
NavigatorID.userAgent - Web APIs
gecko-based browsers comply with the following general structure: useragent = appcodename/appversion number (platform; security; os-or-cpu; localization; rv: revision-version-number) product/productsub application-name application-name-version example alert(window.navigator.useragent) // alerts "mozilla/5.0 (windows; u; win98; en-us; rv:0.9.2) gecko/20010725 netscape6/6.1" specifications specification status comment html living standardthe definition of 'navigatorid.useragent' in that specification.
Navigator.onLine - Web APIs
in chrome and safari, if the browser is not able to connect to a local area network (lan) or a router, it is offline; all other conditions return true.
NavigatorStorage.storage - Web APIs
the returned object lets you examine and configure persistence of data stores and learn approximately how much more space your browser has available for local storage use.
NavigatorStorage - Web APIs
there are many apis which provide ways for web content to store data on a user's computer, including cookies, the web storage api (window.localstorage and window.sessionstorage), and indexeddb.
Using the Notifications API - Web APIs
it stores data locally using indexeddb and notifies users when tasks are due using system notifications.
PaymentAddress.languageCode - Web APIs
this is used while localizing the displayy of the address, allowing the determination of the field separators and the order of fields when formatting the address.
PaymentCurrencyAmount - Web APIs
this string must only contain an optional leading "-" to indicate a negative value, then one or more digits from 0 to 9, and an optional decimal point (".", regardless of locale) followed by at least one more digit.
Payment Request API - Web APIs
this can include localizing the ui into the user's preferred language.
PerformanceResourceTiming.decodedBodySize - Web APIs
if the resource is retrieved from an application cache or local resources, it returns the size of the payload after removing any applied content-codings.
PerformanceResourceTiming.encodedBodySize - Web APIs
if the resource is retrieved from an application cache or a local resource, it must return the size of the payload body before removing any applied content-codings.
PerformanceResourceTiming.initiatorType - Web APIs
the value of this string is as follows: if the initiator is a element, the property returns the element's localname.
PerformanceResourceTiming.requestStart - Web APIs
the requeststart read-only property returns a timestamp of the time immediately before the browser starts requesting the resource from the server, cache, or local resource.
PerformanceResourceTiming.responseStart - Web APIs
the responsestart read-only property returns a timestamp immediately after the browser receives the first byte of the response from the server, cache, or local resource.
PerformanceResourceTiming.transferSize - Web APIs
if the resource is fetched from a local cache, or if it is a cross-origin resource, this property returns zero.
PerformanceTiming.domainLookupEnd - Web APIs
if a persistent connection is used, or the information is stored in a cache or a local resource, the value will be the same as performancetiming.fetchstart.
PerformanceTiming.domainLookupStart - Web APIs
if a persistent connection is used, or the information is stored in a cache or a local resource, the value will be the same as performancetiming.fetchstart.
PerformanceTiming.responseEnd - Web APIs
the legacy performancetiming.responseend read-only property returns an unsigned long long representing the moment, in miliseconds since the unix epoch, when the browser received the last byte of the response, or when the connection is closed if this happened first, from the server from a cache or from a local resource.
PerformanceTiming.responseStart - Web APIs
the legacy performancetiming.responsestart read-only property returns an unsigned long long representing the moment in time (in milliseconds since the unix epoch) when the browser received the first byte of the response from the server, cache, or local resource.
Permissions.query() - Web APIs
WebAPIPermissionsquery
example navigator.permissions.query({name:'geolocation'}).then(function(result) { if (result.state == 'granted') { showlocalnewswithgeolocation(); } else if (result.state == 'prompt') { showbuttontoenablelocalnews(); } // don't do anything if the permission was denied.
Permissions - Web APIs
example navigator.permissions.query({name:'geolocation'}).then(function(result) { if (result.state === 'granted') { showlocalnewswithgeolocation(); } else if (result.state === 'prompt') { showbuttontoenablelocalnews(); } // don't do anything if the permission was denied.
RTCConfiguration.iceServers - Web APIs
if the array is empty, or if the iceservers option isn't specified, the ice agent will negotiate without the use of any servers, which will limit the connection to local peers.
RTCConfiguration.iceTransportPolicy - Web APIs
the permitted values are: all the ice agent is permitted to use any kind of candidate, including both local and relay candidates.
RTCDataChannelEvent.channel - Web APIs
example the first line of code in the datachannel event handler shown below takes the channel from the event object and saves it locally for use by the code handling data traffic.
RTCDtlsTransport - Web APIs
description allocation of dtls transports rtcdtlstransport objects are created when an app calls either setlocaldescription() or setremotedescription().
RTCIceCandidateStats.url - Web APIs
this property is only available for local candidates.
RTCIceParameters - Web APIs
during ice negotiation, each peer's username fragment and password are recorded in an rtciceparameters object, which can be obtained from the rtcicetransport by calling its getlocalparameters() or getremoteparameters() method, depending on which end interests you.
RTCIceTransport.getRemoteCandidates() - Web APIs
it's important to keep in mind that there's no way to correlate these remote candidates with compatible local candidates.
RTCIceTransport.ongatheringstatechange - Web APIs
example this snippet establishes a handler for the gatheringstatechange event that checks to see if the state has changed to "complete", indicating that all ice candidates from both the local and remote peers have been received and processed.
RTCInboundRtpStreamStats.packetsDuplicated - Web APIs
syntax var packetsduplicated = rtcinboundrtpstreamstats.packetsduplicated; value an integer value which specifies how many duplcate packets have been received by the local end of this rtp stream so far.
RTCInboundRtpStreamStats.remoteId - Web APIs
the remoteid property of the rtcinboundrtpstreamstats dictionary specifies the id of the rtcremoteoutboundrtpstreamstats object representing the remote peer's rtcrtpsender which is sending the media to the local peer.
RTCInboundRtpStreamStats - Web APIs
the webrtc api's rtcinboundrtpstreamstats dictionary, based upon rtcreceivedrtpstreamstats and rtcstats, contains statistics related to the receiving end of an rtp stream on the local end of the rtcpeerconnection.
RTCNetworkType - Web APIs
note: keep in mind that the specified value only reflects the initial connection between the local peer and the next hop along the network toward reaching the remote peer.
RTCOutboundRtpStreamStats.remoteId - Web APIs
the remoteid property of the rtcoutboundrtpstreamstats dictionary specifies the id of the rtcremoteinboundrtpstreamstats object representing the remote peer's rtcrtpreceiver which is sending the media to the local peer for this ssrc.
RTCPeerConnection.addIceCandidate() - Web APIs
addicecandidate(candidate); addicecandidate(candidate, successcallback, failurecallback); parameters candidate optional an object conforming to the rtcicecandidateinit dictionary, or an rtcicecandidate object; the contents of the object should be constructed from a message received over the signaling channel, describing a newly received ice candidate that's ready to be delivered to the local ice agent.
RTCPeerConnection.addStream() - Web APIs
the obsolete rtcpeerconnection method addstream() adds a mediastream as a local source of audio or video.
RTCPeerConnection: icecandidate event - Web APIs
an icecandidate event is sent to an rtcpeerconnection when an rtcicecandidate has been identified and added to the local peer by a call to rtcpeerconnection.setlocaldescription().
RTCPeerConnection.onicecandidate - Web APIs
this happens whenever the local ice agent needs to deliver a message to the other peer through the signaling server.
RTCPeerConnection.removeStream() - Web APIs
the rtcpeerconnection.removestream() method removes a mediastream as a local source of audio or video.
RTCPeerConnection.restartIce() - Web APIs
after restartice() returns, the offer returned by the next call to createoffer() is automatically configured to trigger ice restart on both the local peer (once the local peer has been set) and on the remote peer, once the offer is sent across your signaling mechanism and the remote peer has set its description as well.
RTCPeerConnectionIceErrorEvent - Web APIs
properties the rtcpeerconnectioniceerrorevent interface includes the properties found on the event interface, as well as the following properties: address read only a domstring providing the local ip address used to communicate with the stun or turn server being used to negotiate the connection, or null if the local ip address has not yet been exposed as part of a local ice candidate.
RTCRtpCodecParameters - Web APIs
note: on an rtcrtpreceiver, the format-specific parameters come from the sdp sent by the remote peer, while for rtcrtpsender, they're provided by the local description.
RTCRtpStreamStats - Web APIs
local-only measurements these properties are computed locally, and are only available to the device receiving the media stream.
RTCRtpTransceiver.mid - Web APIs
the read-only rtcrtptransceiver interface's mid property specifies the negotiated media id (mid) which the local and remote peers have agreed upon to uniquely identify the stream's pairing of sender and receiver.
RTCRtpTransceiver.stopped - Web APIs
the transceiver is stopped if the stop() method has been called or if a change to either the local or the remote description has caused the transceiver to be stopped for some reason.
RTCSessionDescription - Web APIs
example signalingchannel.onmessage = function (evt) { if (!pc) start(false); var message = json.parse(evt.data); if (message.sdp) pc.setremotedescription(new rtcsessiondescription(message), function () { // if we received an offer, we need to answer if (pc.remotedescription.type == "offer") pc.createanswer(localdesccreated, logerror); }, logerror); else pc.addicecandidate(new rtcicecandidate(message.candidate), function () {}, logerror); }; specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcsessiondescription' in that specification.
RTCSessionDescriptionCallback - Web APIs
example var pc = new rtcpeerconnection(); var descriptioncallback = function(offer) { pc.setlocaldescription(offer); } pc.createoffer(descriptioncallback); specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcsessiondescriptioncallback' in that specification.
SVGAnimationElement: beginEvent event - Web APIs
the beginevent event of the svganimationelement interface is fired when the element local timeline begins to play.
SVGAnimationElement: repeatEvent event - Web APIs
the repeatevent event of the svganimationelement interface is fired when the element's local timeline repeats.
SVGColorProfileElement - Web APIs
properties svgcolorprofileelement.local a domstring corresponding to the local attribute of the given element.
Service Worker API - Web APIs
it is designed to be fully async; as a consequence, apis such as synchronous xhr and localstorage can't be used inside a service worker.
SpeechSynthesisVoice.voiceURI - Web APIs
this is a generic uri and can point to local or remote services, e.g.
SpeechSynthesisVoice - Web APIs
speechsynthesisvoice.localservice read only a boolean indicating whether the voice is supplied by a local speech synthesizer service (true), or a remote speech synthesizer service (false.) speechsynthesisvoice.name read only returns a human-readable name that represents the voice.
Storage.key() - Web APIs
WebAPIStoragekey
examples the following function iterates over the local storage keys: function foreachkey(callback) { for (var i = 0; i < localstorage.length; i++) { callback(localstorage.key(i)); } } the following function iterates over the local storage keys and gets the value set for each key: for(var i =0; i < localstorage.length; i++){ console.log(localstorage.getitem(localstorage.key(i))); } note: for a real world example, see our web storage dem...
Storage.length - Web APIs
WebAPIStoragelength
example the following function adds three data items to the local storage for the current domain, then returns the number of items in the storage: function populatestorage() { localstorage.setitem('bgcolor', 'yellow'); localstorage.setitem('font', 'helvetica'); localstorage.setitem('image', 'cats.png'); return localstorage.length; // should return 3 } note: for a real world example, see our web storage demo.
Storage API - Web APIs
site storage—the data stored for a web site which is managed by the storage standard—includes: indexeddb databases cache api data service worker registrations web storage api data managed using window.localstorage history state information saved using history.pushstate() application caches notification data other kinds of site-accessible, site-specific data that may be maintained site storage units the site storage system described by the storage standard and interacted with using the storage api consists of a single site storage unit for each origin.
Using the Storage Access API - Web APIs
// let's access some items from the first-party cookie jar document.cookie = "foo=bar"; // set a cookie localstorage.setitem("username", "john"); // access a localstorage entry }).catch(_ => { // error obtaining storage access.
Stylesheet.href - Web APIs
WebAPIStyleSheethref
example // on a local machine: <html> <head> <link rel="stylesheet" href="example.css" type="text/css" /> <script> function sref() { alert(document.stylesheets[0].href); } </script> </head> <body> <div class="thunder">thunder</div> <button onclick="sref()">ss</button> </body> </html> // returns "file:////c:/windows/desktop/example.css notes if the style sheet is a linked style sheet, the value of its attribute is its location.
ValidityState.rangeOverflow - Web APIs
if the field is numeric in nature, including the date, month, week, time, datetime-local, number and range types and a max value is set, if the value don't doesn't conform to the constraints set by the max value, the rangeoverflow property will be true.
ValidityState.rangeUnderflow - Web APIs
if the field is numeric in nature, including the date, month, week, time, datetime-local, number and range types and a min value is set, if the value don't doesn't conform to the constraints set by the min value, the rangeunderflow property will be true.
ValidityState.stepMismatch - Web APIs
if the field is numeric in nature, including the date, month, week, time, datetime-local, number and range types and the step value is not any, if the value don't doesn't conform to the constraints set by the step and min values, then stepmismatch will be true.
Animating textures in WebGL - Web APIs
see how do you set up a local testing server?
Using textures in WebGL - Web APIs
for local testing, see our guide how do you set up a local testing server?
WebGL best practices - Web APIs
it's quicker to sample from smaller texture images due to better inherent texture fetch cache locality: zooming out on a non-mipmapped texture ruins texture fetch cache locality, because neighboring pixels no longer sample from neighboring texels!
Using WebRTC data channels - Web APIs
el = pc.createdatachannel("myapp channel", { negotiated: true }); datachannel.addeventlistener("open", (event) => { begintransmission(datachannel); }); requestremotechannel(datachannel.id); in this code snippet, the channel is created with negotiated set to true, then a function called requestremotechannel() is used to trigger negotiation, to create a remote channel with the same id as the local channel.
WebSocket: error event - Web APIs
bubbles no cancelable no interface event event handler property onerror examples // create websocket connection const socket = new websocket('ws://localhost:8080'); // listen for possible errors socket.addeventlistener('error', function (event) { console.log('websocket error: ', event); }); specifications specification status html living standardthe definition of 'websocket error' in that specification.
WebSocket: message event - Web APIs
const socket = new websocket('ws://localhost:8080'); // listen for messages socket.addeventlistener('message', function (event) { console.log('message from server ', event.data); }); specifications specification status html living standardthe definition of 'websocket message' in that specification.
WebSocket: open event - Web APIs
const socket = new websocket('ws://localhost:8080'); // connection opened socket.addeventlistener('open', (event) => { socket.send('hello server!'); }); specifications specification status html living standardthe definition of 'websocket open' in that specification.
WebSocket - Web APIs
WebAPIWebSocket
const socket = new websocket('ws://localhost:8080'); // connection opened socket.addeventlistener('open', function (event) { socket.send('hello server!'); }); // listen for messages socket.addeventlistener('message', function (event) { console.log('message from server ', event.data); }); specifications specification status html living standardthe definition of 'websocket' in that specification.
Writing a WebSocket server in C# - Web APIs
tcplistener constructor: tcplistener(system.net.ipaddress localaddr, int port) localaddr specifies the ip of the listener, and port specifies the port.
Web Video Text Tracks Format (WebVTT) - Web APIs
it is one of the good features supported by webvtt is the localization and use of class elements which can be used in same way they are used in html and css to classify the style for particular type of objects, but here these are used for styling and classifying the cues as shown below: webvtt 04:02.500 --> 04:05.000 j’ai commencé le basket à l'âge de 13, 14 ans 04:05.001 --> 04:07.800 sur les <i.foreignphrase><lang en>playground</lang></i>, ici à mo...
Viewpoints and viewers: Simulating cameras in WebXR - Web APIs
tilting is good for capturing the scope of a tall object or scene, such as a forest or a mountain, but is also a popular way to introduce a character or locale of importance or which inspires awe.
WebXR performance guide - Web APIs
but it's inefficient, because it allocates as local variables a number of things, including at least two matrices, an array of vertices, and more.
Advanced techniques: Creating and sequencing audio - Web APIs
each voice also has local controls, which allow you to manipulate the effects or parameters particular to each technique we are using to create those voices.
Background audio processing using AudioWorklet - Web APIs
it's also more efficient than loading multiple modules from over the network or even the user's local disk.
Web Authentication API - Web APIs
- the server is connected by https or is the localhost), and will not be available for use if the browser is not operating in a secure context.
Window.open() - Web APIs
WebAPIWindowopen
this function is the lonely key to get back the handle on a window if the developer has access only to its name (the name can be saved with cookies or local storage but not the window object handle).
Window.sessionStorage - Web APIs
sessionstorage is similar to localstorage; the difference is that while data in localstorage doesn't expire, data in sessionstorage is cleared when the page session ends.
WindowOrWorkerGlobalScope.origin - Web APIs
examples executed from inside a worker script, the following snippet will log the worker's global scope's origin to the console each time it receives a message onmessage = function() { console.log(self.origin); }; if the origin is not a scheme/host/port tuple (say you are trying to run it locally, i.e.
WindowOrWorkerGlobalScope.setTimeout() - Web APIs
// recommended window.settimeout(function() { alert('hello world!'); }, 500); // not recommended window.settimeout("alert('hello world!');", 500); a string passed to settimeout is evaluated in the global context, so local symbols in the context where settimeout() was called will not be available when the string is evaluated as code.
XMLDocument.load() - Web APIs
WebAPIXMLDocumentload
(to test this functionality, create the files on your local disk or on a webserver rather than loading the load.html file from the lxr-generated page, which will serve the text.xml file as html.) specifications old w3c working draft of the dom level 3 load & save module ...
XMLHttpRequest.onreadystatechange - Web APIs
examples const xhr = new xmlhttprequest(), method = "get", url = "https://developer.mozilla.org/"; xhr.open(method, url, true); xhr.onreadystatechange = function () { // in local files, status is 0 upon success in mozilla firefox if(xhr.readystate === xmlhttprequest.done) { var status = xhr.status; if (status === 0 || (status >= 200 && status < 400)) { // the request has been completed successfully console.log(xhr.responsetext); } else { // oh no!
XMLHttpRequest.response - Web APIs
var url = 'somepage.html'; //a local page function load(url, callback) { var xhr = new xmlhttprequest(); xhr.onreadystatechange = function() { if (xhr.readystate === 4) { callback(xhr.response); } } xhr.open('get', url, true); xhr.send(''); } specifications specification status comment xmlhttprequest living standard whatwg living standard ...
XPathResult.iterateNext() - Web APIs
html <div>xpath example</div> <div>tag names of the matched nodes: <output></output></div> javascript var xpath = "//div"; var result = document.evaluate(xpath, document, null, xpathresult.any_type, null); var node = null; var tagnames = []; while(node = result.iteratenext()) { tagnames.push(node.localname); } document.queryselector("output").textcontent = tagnames.join(", "); result specifications specification status comment document object model (dom) level 3 xpath specificationthe definition of 'xpathresult.iteratenext()' in that specification.
XPathResult.singleNodeValue - Web APIs
html <div>xpath example</div> <div>tag name of the element having the text content 'xpath example': <output></output></div> javascript var xpath = "//*[text()='xpath example']"; var result = document.evaluate(xpath, document, null, xpathresult.first_ordered_node_type, null); document.queryselector("output").textcontent = result.singlenodevalue.localname; result specifications specification status comment document object model (dom) level 3 xpath specificationthe definition of 'xpathresult.singlenodevalue' in that specification.
XPathResult.snapshotItem() - Web APIs
html <div>xpath example</div> <div>tag names of the matched nodes: <output></output></div> javascript var xpath = "//div"; var result = document.evaluate(xpath, document, null, xpathresult.ordered_node_snapshot_type, null); var node = null; var tagnames = []; for(var i = 0; i < result.snapshotlength; i++) { var node = result.snapshotitem(i); tagnames.push(node.localname); } document.queryselector("output").textcontent = tagnames.join(", "); result specifications specification status comment document object model (dom) level 3 xpath specificationthe definition of 'xpathresult.snapshotitem()' in that specification.
XRInputSource - Web APIs
local coordinate system each input source has its own local coordinate system, which is described by the gripspace property, which is an xrspace used to map the input's coordinate system into the world coordinate system.
XRPose - Web APIs
WebAPIXRPose
to obtain the xrpose for the xrspace used as the local coordinate system of an object, call xrframe.getpose(), specifying that local xrspace and the space to which you wish to convert: thepose = xrframe.getpose(localspace, basespace); the pose for a viewer (or camera) is represented by the xrviewerpose subclass of xrpose.
XRReferenceSpace.getOffsetReferenceSpace() - Web APIs
xrsession.requestreferencespace("local") .then((refspace) => { xrreferencespace = refspace; xrreferencespace = xrreferencespace.getoffsetreferencespace( new xrrigidtransform(startposition, {x:0, y:0, z:1.0, w: 1.0})); xrsession.requestanimationframe(drawframe); }); in this code, we obtain a local reference space, then use getoffsetreferencespace() to create a new space whose origin is adjusted to a position given by sta...
XRReferenceSpace: reset event - Web APIs
this is primarily an issue for local or local-floor reference spaces.
XRRigidTransform() - Web APIs
let animationframerequestid = 0; xrsession.requestreferencespace("local-floor") .then((refspace) => { xrreferencespace = refspace.getoffsetreferencespace( new xrrigidtransform(viewerposition, viewerorientation)); animationframerequestid = xrsession.requestanimationframe(drawframe); }); after requesting a reference space of type local-floor, the returned promise is eventually resolved, at which time we receive a new reference space object, refspace.
XRSession - Web APIs
WebAPIXRSession
const xr = navigator.xr; if (xr) { xr.requestsession("inline").then((xrsession) => { xrsession.requestreferencespace("local").then((xrreferencespace) => { xrsession.requestanimationframe((time, xrframe) => { let viewer = xrframe.getviewerpose(xrreferencespace); gl.bindframebuffer(xrwebgllayer.framebuffer); for (xrview of viewer.views) { let xrviewport = xrwebgllayer.getviewport(xrview); gl.viewport(xrviewport.x, xrviewport.y, xrviewport.width, x...
Using the alert role - Accessibility
the alert role is most useful for information that requires the user's immediate attention, for example: an invalid value was entered into a form field the user's login session is about to expire the connection to the server was lost, local changes will not be saved because of its intrusive nature, the alert role must be used sparingly and only in situations where the user's immediate attention is required.
Using the slider role - Accessibility
arrow keys should operate as follows (localization for right-to-left languages should reverse the direction of the arrows): key(s) action right and up arrows increase the selected value left and down arrows decrease the selected value page up and page down optionally increase and decrease the value by a set amount (e.g.
ARIA: timer role - Accessibility
this should be localized.
ARIA: application role - Accessibility
this should be localized.
Understanding the Web Content Accessibility Guidelines - Accessibility
if you are worried about the legal implications of web accessibility, we'd recommend that you check the specific legislation governing accessibility for the web/public resources in your country or locale, and seek the advice of a qualified lawyer.
prefers-reduced-data - CSS: Cascading Style Sheets
<link rel="preload" href="fonts/montserrat-regular.woff2" as="font" media="(prefers-reduced-data: no-preference)" crossorigin> <link rel="stylesheet" href="style.css"> </head> css @media (prefers-reduced-data: no-preference) { @font-face { font-family: montserrat; font-style: normal; font-weight: 400; font-display: swap; /* latin */ src: local('montserrat regular'), local('montserrat-regular'), url('fonts/montserrat-regular.woff2') format('woff2'); unicode-range: u+0000-00ff, u+0131, u+0152-0153, u+02bb-02bc, u+02c6, u+02da, u+02dc, u+2000-206f, u+2074, u+20ac, u+2122, u+2191, u+2193, u+2212, u+2215, u+feff, u+fffd; } } body { font-family: montserrat, -apple-system, blinkmacsystemfont, "segoe ui", roboto, helvetica, aria...
Border-image generator - CSS: Cascading Style Sheets
: [0, 0], size : [300, 200], preview_area : 400, }; properties['border6'] = { fill : false, slice_values : [42, 42, 42, 42], width_values : [42, 42, 42, 42], outset_values : [0, 0, 0, 0], slice_units : [0, 0, 0, 0], width_units : [0, 0, 0, 0], outset_units : [0, 0, 0, 0], repeat : [2, 2], size : [350, 350], preview_area : 500, }; var loadlocalimage = function loadlocalimage(source) { var location = "images/" + source; imgsource.src = location; }; var loadremoteimage = function loadremoteimage(source) { imgsource.src = source; if (selected) selected.removeattribute('selected'); tool.setoutputcss('source', 'url("' + source + '")'); }; var pickimage = function pickimage(e) { if (e.target.classname === 'imag...
Shapes From Images - CSS: Cascading Style Sheets
due to this requirement for cors compatible images, if you are previewing your file locally without using a local web server, your shape will not work.
Mozilla CSS extensions - CSS: Cascading Style Sheets
:-moz-broken ::-moz-canvas ::-moz-color-swatch ::-moz-cell-content :-moz-drag-over f – i :-moz-first-node ::-moz-focus-inner ::-moz-focus-outer :-moz-focusring :-moz-full-screen :-moz-full-screen-ancestor :-moz-handler-blocked :-moz-handler-crashed :-moz-handler-disabled ::-moz-inline-table l :-moz-last-node :-moz-list-bullet :-moz-list-number :-moz-loading :-moz-locale-dir(ltr) :-moz-locale-dir(rtl) :-moz-lwtheme :-moz-lwtheme-brighttext :-moz-lwtheme-darktext n – r :-moz-native-anonymous :-moz-only-whitespace ::-moz-page ::-moz-page-sequence ::-moz-pagebreak ::-moz-pagecontent :-moz-placeholderobsolete since gecko 51 ::-moz-placeholderdeprecated since gecko 51 ::-moz-progress-bar ::-moz-range-progress ::-moz-range-thumb ::-moz-range-tr...
CSS reference - CSS: Cascading Style Sheets
WebCSSReference
ne-sizeinsetinset()inset-blockinset-block-endinset-block-startinset-inlineinset-inline-endinset-inline-start<integer>:invalidinvert()isolationjjustify-contentjustify-itemsjustify-selfkkhz@keyframesl:lang:last-child:last-of-typeleader():leftleft@left-bottom<length><length-percentage>letter-spacingline-breakline-heightlinear-gradient():linklist-stylelist-style-imagelist-style-positionlist-style-typelocal()mmarginmargin-blockmargin-block-endmargin-block-startmargin-bottommargin-inlinemargin-inline-endmargin-inline-startmargin-leftmargin-rightmargin-top::markermarks (@page)maskmask-bordermask-border-modemask-border-outsetmask-border-repeatmask-border-slicemask-border-sourcemask-border-widthmask-clipmask-compositemask-imagemask-modemask-originmask-positionmask-repeatmask-sizemask-typematrix()matrix3...
WebKit CSS extensions - CSS: Cascading Style Sheets
sion -webkit-cursor-visibility d-i -webkit-dashboard-region -webkit-font-size-delta -webkit-font-smoothing -webkit-highlight -webkit-hyphenate-character -webkit-hyphenate-limit-after -webkit-hyphenate-limit-before -webkit-hyphenate-limit-lines -webkit-initial-letter l -webkit-line-align -webkit-line-box-contain -webkit-line-clamp -webkit-line-grid -webkit-line-snap -webkit-locale -webkit-logical-height -webkit-logical-width m -webkit-margin-after-collapse -webkit-margin-after -webkit-margin-before-collapse -webkit-margin-before -webkit-margin-bottom-collapse -webkit-margin-collapse -webkit-margin-end** -webkit-margin-start** -webkit-margin-top-collapse -webkit-marquee-direction -webkit-marquee-increment -webkit-marquee-repetition -webkit-marquee-speed ...
Actual value - CSS: Cascading Style Sheets
finally, the used value is transformed according to the limitations of the local environment, resulting in the actual value.
background - CSS: Cascading Style Sheets
] ]<bg-size> = [ <length-percentage> | auto ]{1,2} | cover | contain<repeat-style> = repeat-x | repeat-y | [ repeat | space | round | no-repeat ]{1,2}<attachment> = scroll | fixed | local<box> = border-box | padding-box | content-boxwhere <image> = <url> | <image()> | <image-set()> | <element()> | <paint()> | <cross-fade()> | <gradient><length-percentage> = <length> | <percentage>where <image()> = image( <image-tags>?
Demos of open web technologies
processing.js p5js 3d on 2d canvas minipaint: image editor (source code) zen photon garden (source code) multi touch in canvas demo (source code) svg bubblemenu (visual effects and interaction) html transformations using foreignobject (visual effects and transforms) phonetics guide (interactive) 3d objects demo (interactive) blobular (interactive) video embedded in svg (or use the local download) summer html image map creator (source code) video video 3d animation "mozilla constantly evolving" video 3d animation "floating dance" streaming anime, movie trailer and interview billy's browser firefox flick virtual barber shop transformers movie trailer a scanner darkly movie trailer (with built in controls) events firing and volume control dragable and sizable videos ...
Event reference
storage storageevent web storage a storage area (localstorage or sessionstorage) has changed.
Getting Started - Developer guides
declaring the httprequest variable local to a closure containing the ajax functions avoids this.
Guide to Web APIs - Developer guides
WebGuideAPI
the web includes a wide array of apis that can be used from javascript to build increasingly more powerful and capable applications, running either on the web, locally, or through technology such as node.js, on a server.
Setting up adaptive streaming media sources - Developer guides
the stream segmenter — provided by apple for mac platforms — takes a media stream from a local network and splits media into equally sized media files together with an index file.
Introduction to HTML5 - Developer guides
it offers new features that provide not only rich media support but also enhance support for creating web applications that can interact with users, their local data, and servers more easily and effectively than was previously possible.
The Unicode Bidirectional Text Algorithm - Developer guides
understanding this algorithm in at least basic terms is helpful when you're striving to produce localization-ready web content or apps.
User input and controls - Developer guides
contenteditable demo this is a working example showing how contenteditable can be used to create an editable document section, the state of which is then saved using localstorage.
Writing forward-compatible websites - Developer guides
to avoid this, fully qualify global variable access using "window.", like so: <script> function localname() { alert('function localname has been called'); } </script> <div onclick="window.localname()">clicking me should show an alert<div> don't concatenate scripts you don't control the "use strict;" directive in ecmascript, when used on the file level, applies to everything in the file.
HTML attribute: readonly - HTML: Hypertext Markup Language
the readonly attribute is supported by text, search, url, tel, email, password, date, month, week, time, datetime-local, and number<input> types and the <textarea> form control elements.
HTML attribute: required - HTML: Hypertext Markup Language
the required attribute is supported by text, search, url, tel, email, password, date, month, week, time, datetime-local, number, checkbox, radio, file, <input> types along with the <select> and <textarea> form control elements.
HTML attribute reference - HTML: Hypertext Markup Language
translate global attribute specify whether an element’s attribute values and the values of its text node children are to be translated when the page is localized, or whether to leave them unchanged.
<basefont> - HTML: Hypertext Markup Language
WebHTMLElementbasefont
if no font listed is installed on the local system, the browser typically defaults to the proportional or fixed-width font for that system.
<del>: The Deleted Text element - HTML: Hypertext Markup Language
WebHTMLElementdel
the format of the string if it includes both date and time is covered in local date and time strings.
<font> - HTML: Hypertext Markup Language
WebHTMLElementfont
if no font listed is installed on the local system, the browser typically defaults to the proportional or fixed-width font for that system.
<html>: The HTML Document / Root element - HTML: Hypertext Markup Language
WebHTMLElementhtml
manifest specifies the uri of a resource manifest indicating resources that should be cached locally.
<input type="datetime"> - HTML: Hypertext Markup Language
WebHTMLElementinputdatetime
instead, browsers are implementing (and developers are encouraged to use) <input type="datetime-local">.
<input type="range"> - HTML: Hypertext Markup Language
WebHTMLElementinputrange
html use similar html as in the previous examples, we add the attribute with a value of vertical: <input type="range" min="0" max="11" value="7" step="1" orient="vertical"> writing-mode: bt-lr; the writing-mode property should generally not be used to alter text direction for internationalization or localization purposes, but can be used for special effects.
<input type="week"> - HTML: Hypertext Markup Language
WebHTMLElementinputweek
using week inputs week inputs sound convenient at first glance, since they provide an easy ui for choosing weeks, and they normalize the data format sent to the server, regardless of the user's browser or locale.
<ins> - HTML: Hypertext Markup Language
WebHTMLElementins
the format of the string if it includes both date and time is covered in format of a valid local date and time string.
<time> - HTML: Hypertext Markup Language
WebHTMLElementtime
valid datetime values a valid year string 2011 a valid month string 2011-11 a valid date string 2011-11-18 a valid yearless date string 11-18 a valid week string 2011-w47 a valid time string 14:54 14:54:39 14:54:39.929 a valid local date and time string 2011-11-18t14:54:39.929 2011-11-18 14:54:39.929 a valid global date and time string 2011-11-18t14:54:39.929z 2011-11-18t14:54:39.929-0400 2011-11-18t14:54:39.929-04:00 2011-11-18 14:54:39.929z 2011-11-18 14:54:39.929-0400 2011-11-18 14:54:39.929-04:00 a valid duration string pt4h18m3s examples simple example html <p>the concert starts at <time datetime="2018-0...
Global attributes - HTML: Hypertext Markup Language
translate an enumerated attribute that is used to specify whether an element's attribute values and the values of its text node children are to be translated when the page is localized, or whether to leave them unchanged.
Evolution of HTTP - HTTP
ery limited and both browsers and servers quickly extended it to be more versatile: versioning information is now sent within each request (http/1.0 is appended to the get line) a status code line is also sent at the beginning of the response, allowing the browser itself to understand the success or failure of the request and to adapt its behavior in consequence (like in updating or using its local cache in a specific way) the notion of http headers has been introduced, both for the requests and the responses, allowing metadata to be transmitted and making the protocol extremely flexible and extensible.
MIME types (IANA media types) - HTTP
ipart/form-data; boundary=aboundarystring (other headers associated with the multipart document as a whole) --aboundarystring content-disposition: form-data; name="myfile"; filename="img.jpg" content-type: image/jpeg (data) --aboundarystring content-disposition: form-data; name="myfield" (data) --aboundarystring (more subparts) --aboundarystring-- the following <form>: <form action="http://localhost:8000/" method="post" enctype="multipart/form-data"> <label>name: <input name="mytextfield" value="test"></label> <label><input type="checkbox" name="mycheckbox"> check</label> <label>upload file: <input type="file" name="myfile" value="test.txt"></label> <button>send the file</button> </form> will send this message: post / http/1.1 host: localhost:8000 user-agent: mozilla/5.0 (macin...
Resource URLs - HTTP
furthermore, some default values of preferences differ between build configurations, such as platform and locale, which means web sites could identify individual users using this information.
Reason: CORS request did not succeed - HTTP
as of firefox 68, https pages are not permitted to access http://localhost, although this may be changed by bug 1488740.
HTTP caching - HTTP
WebHTTPCaching
for example, an isp or your company might have set up a web proxy as part of its local network infrastructure to serve many users so that popular resources are reused a number of times, reducing network traffic and latency.
Content negotiation - HTTP
traditionally, it was set to a different value for each locale for the browser, like iso-8859-1,utf-8;q=0.7,*;q=0.7 for a western european locale.
Content-Disposition - HTTP
in a regular http response, the content-disposition response header is a header indicating if the content is expected to be displayed inline in the browser, that is, as a web page or as part of a web page, or as an attachment, that is downloaded and saved locally.
Date - HTTP
WebHTTPHeadersDate
http dates are always expressed in gmt, never in local time.
If-Modified-Since - HTTP
http dates are always expressed in gmt, never in local time.
If-Range - HTTP
WebHTTPHeadersIf-Range
http dates are always expressed in gmt, never in local time.
If-Unmodified-Since - HTTP
http dates are always expressed in gmt, never in local time.
Last-Modified - HTTP
http dates are always expressed in gmt, never in local time.
Referer - HTTP
WebHTTPHeadersReferer
a referer header is not sent by browsers if: the referring resource is a local "file" or "data" uri.
Proxy servers and tunneling - HTTP
a proxy can be on the user's local computer, or anywhere between the user's computer and a destination server on the internet.
Redirections in HTTP - HTTP
special redirections 304 (not modified) redirects a page to the locally cached copy (that was stale), and 300 (multiple choice) is a manual redirection: the body, presented by the browser as a web page, lists the possible redirections and the user clicks on one to select it.
304 Not Modified - HTTP
WebHTTPStatus304
many developer tools' network panels of browsers create extraneous requests leading to 304 responses, so that access to the local cache is visible to developers.
HTTP response status codes - HTTP
WebHTTPStatus
203 non-authoritative information this response code means the returned meta-information is not exactly the same as is available from the origin server, but is collected from a local or a third-party copy.
Classes - JavaScript
the name given to a named class expression is local to the class's body.
Deprecated and obsolete features - JavaScript
tolocaleformat is deprecated.
JavaScript error reference - JavaScript
r: invalid argumentstypeerror: invalid assignment to const "x"typeerror: property "x" is non-configurable and can't be deletedtypeerror: setting getter-only property "x"typeerror: variable "x" redeclares argumenturierror: malformed uri sequencewarning: 08/09 is not a legal ecma-262 octal constantwarning: -file- is being assigned a //# sourcemappingurl, but already has onewarning: date.prototype.tolocaleformat is deprecatedwarning: javascript 1.6's for-each-in loops are deprecatedwarning: string.x is deprecated; use string.prototype.x insteadwarning: expression closures are deprecatedwarning: unreachable code after return statement ...
The arguments object - JavaScript
the arguments object is a local variable available within all non-arrow functions.
ArrayBuffer - JavaScript
you can also get an array buffer from existing data, for example from a base64 string or from a local file.
AsyncFunction - JavaScript
when running them, they will only be able to access their own local variables and global ones, not the ones from the scope in which the asyncfunction constructor was called.
Date() constructor - JavaScript
"1970-01-01") are treated as utc, not local.
Date.prototype.setFullYear() - JavaScript
the setfullyear() method sets the full year for a specified date according to local time.
Date.prototype.setHours() - JavaScript
the sethours() method sets the hours for a specified date according to local time, and returns the number of milliseconds since january 1, 1970 00:00:00 utc until the time represented by the updated date instance.
Date.prototype.setMilliseconds() - JavaScript
the setmilliseconds() method sets the milliseconds for a specified date according to local time.
Date.prototype.setMinutes() - JavaScript
the setminutes() method sets the minutes for a specified date according to local time.
Date.prototype.setSeconds() - JavaScript
the setseconds() method sets the seconds for a specified date according to local time.
Date.prototype.setYear() - JavaScript
the setyear() method sets the year for a specified date according to local time.
Function.prototype.apply() - JavaScript
arguments is a local variable of a function.
Function.length - JavaScript
by contrast, arguments.length is local to a function and provides the number of arguments actually passed to the function.
GeneratorFunction - JavaScript
when running them, they will only be able to access their own local variables and global ones, not the ones from the scope in which the generatorfunction constructor was called.
Intl​.ListFormat.prototype​.format() - JavaScript
the locales and options parameters customize the behavior of format() and let applications specify the language conventions that should be used to format the list.
Intl.RelativeTimeFormat.prototype.formatToParts() - JavaScript
the intl.relativetimeformat.prototype.formattoparts() method returns an array of objects representing the relative time format in parts that can be used for custom locale-aware formatting.
Math.cbrt() - JavaScript
-pow(-x, 1/3) : pow(x, 1/3); }; })(math.pow); // localize math.pow to increase efficiency } examples using math.cbrt() math.cbrt(nan); // nan math.cbrt(-1); // -1 math.cbrt(-0); // -0 math.cbrt(-infinity); // -infinity math.cbrt(0); // 0 math.cbrt(1); // 1 math.cbrt(infinity); // infinity math.cbrt(null); // 0 math.cbrt(2); // 1.2599210498948732 specifications specification ecmascript (ecma-262)the definition of 'math.c...
Object.entries() - JavaScript
if there is a need for certain ordering, then the array should be sorted first, like object.entries(obj).sort((a, b) => b[0].localecompare(a[0]));.
Object.getOwnPropertySymbols() - JavaScript
examples using getownpropertysymbols var obj = {}; var a = symbol('a'); var b = symbol.for('b'); obj[a] = 'localsymbol'; obj[b] = 'globalsymbol'; var objectsymbols = object.getownpropertysymbols(obj); console.log(objectsymbols.length); // 2 console.log(objectsymbols); // [symbol(a), symbol(b)] console.log(objectsymbols[0]); // symbol(a) specifications specification ecmascript (ecma-262)the definition of 'object.getownpropertysymbols' in that specification.
Object.keys() - JavaScript
onments that do not natively support it, copy the following snippet: // from /docs/web/javascript/reference/global_objects/object/keys if (!object.keys) { object.keys = (function() { 'use strict'; var hasownproperty = object.prototype.hasownproperty, hasdontenumbug = !({ tostring: null }).propertyisenumerable('tostring'), dontenums = [ 'tostring', 'tolocalestring', 'valueof', 'hasownproperty', 'isprototypeof', 'propertyisenumerable', 'constructor' ], dontenumslength = dontenums.length; return function(obj) { if (typeof obj !== 'function' && (typeof obj !== 'object' || obj === null)) { throw new typeerror('object.keys called on non-object'); } var resul...
Object - JavaScript
object.prototype.tolocalestring() calls tostring().
Symbol.for() - JavaScript
examples using symbol.for symbol.for('foo'); // create a new global symbol symbol.for('foo'); // retrieve the already created symbol // same global symbol, but not locally symbol.for('bar') === symbol.for('bar'); // true symbol('bar') === symbol('bar'); // false // the key is also used as the description var sym = symbol.for('mario'); sym.tostring(); // "symbol(mario)" to avoid name clashes with your global symbol keys and other (library code) global symbols, it might be a good idea to prefix your symbols: symbol.for('mdn.foo'); symbol.for('mdn.bar'); speci...
Symbol.keyFor() - JavaScript
examples using keyfor var globalsym = symbol.for('foo'); // create a new global symbol symbol.keyfor(globalsym); // "foo" var localsym = symbol(); symbol.keyfor(localsym); // undefined // well-known symbols are not symbols registered // in the global symbol registry symbol.keyfor(symbol.iterator) // undefined specifications specification ecmascript (ecma-262)the definition of 'symbol.keyfor' in that specification.
WebAssembly.Module.customSections() - JavaScript
(read high level structure for information on section structures, and how normal sections ("known sections") and custom sections are distinguished.) this provides developers with a way to include custom data inside wasm modules for other purposes, for example the name custom section, which allows developers to provide names for all the functions and locals in the module (like "symbols" in a native build).
Standard built-in objects - JavaScript
intl intl.collator intl.datetimeformat intl.listformat intl.numberformat intl.pluralrules intl.relativetimeformat intl.locale webassembly webassembly webassembly.module webassembly.instance webassembly.memory webassembly.table webassembly.compileerror webassembly.linkerror webassembly.runtimeerror other arguments ...
async function expression - JavaScript
the name is only local to the function body.
class expression - JavaScript
if named, the name of the class is local to the class body only.
delete operator - JavaScript
delete employeedetails; // returns true function f() { var z = 44; // delete doesn't affect local variable names delete z; // returns false } delete and the prototype chain in the following example, we delete an own property of an object while a property with the same name is available on the prototype chain: function foo() { this.bar = 10; } foo.prototype.bar = 42; var foo = new foo(); // foo.bar is associated with the // own property.
function* expression - JavaScript
the name is only local to the function body.
const - JavaScript
description this declaration creates a constant whose scope can be either global or local to the block in which it is declared.
export - JavaScript
bindings that are exported can still be modified locally; when imported, although they can only be read by the importing module the value updates whenever it is updated by the exporting module.
Statements and declarations - JavaScript
let declares a block scope local variable, optionally initializing it to a value.
JavaScript reference - JavaScript
ray biguint64array keyed collections map set weakmap weakset structured data arraybuffer sharedarraybuffer atomics dataview json control abstraction promise generator generatorfunction asyncfunction reflection reflect proxy internationalization intl intl.collator intl.datetimeformat intl.displaynames intl.listformat intl.locale intl.numberformat intl.pluralrules intl.relativetimeformat webassembly webassembly webassembly.module webassembly.instance webassembly.memory webassembly.table webassembly.compileerror webassembly.linkerror webassembly.runtimeerror statements javascript statements and declarations control flowblock break continue empty if...else switch t...
<math> - MathML
WebMathMLElementmath
you can achieve that easily by adding the .xhtml extension to your local files.
Codecs used by WebRTC - Web media technologies
that's done for each transceiver on the rtcpeerconnection; once all of the transceivers have been updated, we call the onnegotiationneeded event handler, which will create a new offer, update the local description, send the offer along to the remote peer, and so on, thereby triggering the renegotiation of the connection.
Making PWAs work offline with Service workers - Progressive web apps (PWAs)
if you want to experiment first before pushing your code to production, you can always test on a localhost or setup github pages — both support https.
Mobile first - Progressive web apps (PWAs)
volo has a number of useful commands available, of which we will just use a couple: volo server: starts a local web server at localhost:8080 and runs your app through it: great for easy testing.
Structural overview of progressive web apps - Progressive web apps (PWAs)
while progressive web apps (pwas) can do anything any web content can do, they need to have a particular structure and include specific components in order to be recognized as a web app that can be used both on the web and installed and run as a local application.
Progressive web apps (PWAs)
tools localforage — a nice simple javascript library for making client-side data storage really simple; it uses indexeddb by default and falls back to web sql/web storage if necessary.
max - SVG: Scalable Vector Graphics
WebSVGAttributemax
5 ; 0.75 ; 1"/> <animate attributename="cy" dur="4s" max="6s" repeatcount="indefinite" values="10 ; 60 ; 110 ; 60 ; 10" keytimes="0 ; 0.25 ; 0.5 ; 0.75 ; 1"/> </circle> </svg> usage notes value <clock-value> default value none animatable no <clock-value> specifies the length of the maximum value of the active duration, measured in local time.
min - SVG: Scalable Vector Graphics
WebSVGAttributemin
0.5 ; 0.75 ; 1"/> <animate attributename="cy" dur="4s" min="2s" repeatcount="indefinite" values="10 ; 60 ; 110 ; 60 ; 10" keytimes="0 ; 0.25 ; 0.5 ; 0.75 ; 1"/> </circle> </svg> usage notes value <clock-value> default value 0 animatable no <clock-value> specifies the length of the minimum value of the active duration, measured in local time.
pointsAtZ - SVG: Scalable Vector Graphics
the pointsatz attribute represents the y location in the coordinate system established by attribute primitiveunits on the <filter> element of the point at which the light source is pointing, assuming that, in the initial local coordinate system, the positive z-axis comes out towards the person viewing the content and assuming that one unit along the z-axis equals one unit in x and y.
result - SVG: Scalable Vector Graphics
WebSVGAttributeresult
it is only meaningful within a given <filter> element and thus has only local scope.
SVG Attribute reference - SVG: Scalable Vector Graphics
WebSVGAttribute
orientation-horizontal glyph-orientation-vertical glyphref gradienttransform gradientunits h hanging height href hreflang horiz-adv-x horiz-origin-x i id ideographic image-rendering in in2 intercept k k k1 k2 k3 k4 kernelmatrix kernelunitlength kerning keypoints keysplines keytimes l lang lengthadjust letter-spacing lighting-color limitingconeangle local m marker-end marker-mid marker-start markerheight markerunits markerwidth mask maskcontentunits maskunits mathematical max media method min mode n name numoctaves o offset opacity operator order orient orientation origin overflow overline-position overline-thickness p panose-1 paint-order path pathlength patterncontentunits patterntransform patter...
<a> - SVG: Scalable Vector Graphics
WebSVGElementa
attributes download instructs browsers to download a url instead of navigating to it, so the user will be prompted to save it as a local file.
<color-profile> - SVG: Scalable Vector Graphics
usage context categoriesnonepermitted contentany number of the following elements, in any order:descriptive elements attributes global attributes core attributes » xlink attributes » specific attributes local name rendering-intent xlink:href dom interface this element implements the svgcolorprofileelement interface.
<font-face-name> - SVG: Scalable Vector Graphics
the <font-face-name> element points to a locally installed copy of this font, identified by its name.
<font-face-src> - SVG: Scalable Vector Graphics
it serves as container for <font-face-name>, pointing to locally installed copies of this font, and <font-face-uri>, utilizing remotely defined fonts.
Getting started - SVG: Scalable Vector Graphics
unfortunately, it is very problematic to get gzip-compressed svg files to work reliably across all svg capable user agents when served from a microsoft iis server, and firefox cannot load gzip-compressed svg from the local computer.
SVG fonts - SVG: Scalable Vector Graphics
the above example states that if the renderer has a local font available named "super sans bold", it should use this instead.
Mixed content - Web security
chrome allows mixed content on http://127.0.0.1/ and http://localhost/.
Web security
local storage the window object's window.localstorage property is a way for servers to store data on a client that is persistent across sessions.
XML introduction - XML: Extensible Markup Language
most importantly, since the fundamental format of xml is standardized, if you share or transmit xml across systems or platforms, either locally or over the internet, the recipient can still parse the data due to the standardized xml syntax.
lang - XPath
WebXPathFunctionslang
syntax lang(string ) arguments string the language code or localization (language and country) code to be matched.
name - XPath
WebXPathFunctionsname
notes the qname is the node's qualified name, including its namespace prefix and its local name.
Functions - XPath
boolean() ceiling() choose() concat() contains() count() current() xslt-specific document() xslt-specific element-available() false() floor() format-number() xslt-specific function-available() generate-id() xslt-specific id() (partially supported) key() xslt-specific lang() last() local-name() name() namespace-uri() normalize-space() not() number() position() round() starts-with() string() string-length() substring() substring-after() substring-before() sum() system-property() xslt-specific translate() true() unparsed-entity-url() xslt-specific (not supported) ...
Index - XPath
WebXPathIndex
36 local-name xslt, xslt_reference the local-name function returns a string representing the local name of the first node in a given node-set.
XPath snippets - XPath
if you are using xmlhttprequest to read a local or remote xml file into a dom tree (as described in parsing and serializing xml), the first argument to evaluatexpath() should be req.responsexml.
<xsl:param> - XSLT: Extensible Stylesheet Language Transformations
WebXSLTElementparam
when used inside an <xsl:template> element, the parameter is local to that template.
PI Parameters - XSLT: Extensible Stylesheet Language Transformations
xslt-param the xslt-param pi supports 4 attributes: name the local-name part of the parameter name.
The Netscape XSLT/XPath Reference - XSLT: Extensible Stylesheet Language Transformations
ng() (supported) concat() (supported) contains() (supported) count() (supported) current() (supported) document() (supported) element-available() (supported) false() (supported) floor() (supported) format-number() (supported) function-available() (supported) generate-id() (supported) id() (partially supported) key() (supported) lang() (supported) last() (supported) local-name() (supported) name() (supported) namespace-uri() (supported) normalize-space() (supported) not() (supported) number() (supported) position() (supported) round() (supported) starts-with() (supported) string() (supported) string-length() (supported) substring() (supported) substring-after() (supported) substring-before() (supported) sum() (supported) system-proper...
Transforming XML with XSLT - XSLT: Extensible Stylesheet Language Transformations
upported) ceiling() (supported) concat() (supported) contains() (supported) count() (supported) current() (supported) document() (supported) element-available() (supported) false() (supported) floor() (supported) format-number() (supported) function-available() (supported) generate-id() (supported) id() (partially supported) key() (supported) lang() (supported) last() (supported) local-name() (supported) name() (supported) namespace-uri() (supported) normalize-space() (supported) not() (supported) number() (supported) position() (supported) round() (supported) starts-with() (supported) string() (supported) string-length() (supported) substring() (supported) substring-after() (supported) substring-before() (supported) sum() (supported) system-property() (supported...
Using the Mozilla JavaScript interface to XSL Transformations - XSLT: Extensible Stylesheet Language Transformations
these all take a namespace uri and a local name as the first two parameters, with xsltprocessor.setparameter() taking a third - the value of the parameter to be set.
Setting Parameters - XSLT: Extensible Stylesheet Language Transformations
they all take as the first argument the namespace uri of the xsl:param (usually the param will fall in the default namespace, so passing in null will suffice.) the local name of the xsl:param is the second argument.
Caching compiled WebAssembly modules - WebAssembly
it is ideal for persisting assets locally for the saved state of an application, including text, blobs, and any other type of cloneable object.
Compiling from Rust to WebAssembly - WebAssembly
load http://localhost:8080 and an alert box appears on the screen, with hello, webassembly!