Search completed in 1.03 seconds.
Tamarin Build System Documentation - Archive of obsolete content
the next phase is started when all slaves have completed the previous phase successfully. ...
... the next phase is started when all slaves have completed the previous phase successfully. ...
... the next phase is started when all slaves have completed the previous phase successfully. ...
...And 44 more matches
How Mozilla's build system works
this documentation is for mozilla developers who need to work on mozilla's
build system. the contents below will explain the basic concepts and terminology of the
build system and how to do common tasks such as compiling components and creating jar files. for many developers, typing mach
build to
build the tree is sufficient to work with the source tree. this document explains how the
build system works. note: this document is not intended for developers who just want to
build mozilla. for that, see the
build documentation. ...
...the configure script is a bash shell script. ...
...the configure script is a bash shell script. ...
...And 40 more matches
Tamarin build documentation - Archive of obsolete content
supported platforms tamarin currently supports the following operating systems and/or architectures. windows 32 and 64 bit mac osx 10.4, 10.5 on ppc mac osx 10.5, 10.6 on intel linux 32 and 64 bit solaris 10 on sparc android 2.2 on arm windows mobile 6.5 mips (linux) sh4 (linux) getting the tamarin source the tamarin source resides in mercurial at tamarin central. active development source resides at tamarin redux. ...
...urce resides in mercurial at tamarin central. active development source resides at tamarin redux. in this document replace instances of tamarin-central with tamarin-redux to operate in the redux repository. use the following command to create a copy of the tamarin repository: $ hg clone http://hg.mozilla.org/tamarin-central tamarin-central tips for working with mercurial can be found here.
building tamarin
building tamarin will create all the libraries for the avmplus and garbage collector (mmgc), and create a standalone executable (shell) for executing files in the abc file format. running the shell without any arguments will list the available options. note that additional command-line arguments are only available in the debug configuration. the tamarin codebase contains a cross-plat...
...amarin
building tamarin will create all the libraries for the avmplus and garbage collector (mmgc), and create a standalone executable (shell) for executing files in the abc file format. running the shell without any arguments will list the available options. note that additional command-line arguments are only available in the debug configuration. the tamarin codebase contains a cross-platform
build system for mozilla developers. the cross-platform
build system is used for daily automated
build testing so it is the most reliable system. the tamarin codebase has the ability to
build additional code which supports debugging hooks. in the xcode project, this is the debug_debugger and release_debugger configurations. ...
...And 39 more matches
Configuring Build Options
note: do not make substantive changes to this document without consulting benjamin smedberg <benjamin@smedbergs.us> or one of the
build-config peersthis document details how to configure firefox
builds. most of the time a mozconfig file is not required. the default options are the most well-supported, so it is preferable to add as few options as possible. please read the following directions carefully before
building, and follow them in order. skipping any step may cause the
build to fail, or the built software to be unusable.
build options, including options not usable from the command-line, may appear in "confvars.sh" files in the source tree. ...
...(it is possible to manually call configure with command-line options, but this is not recommended). the mozconfig file should be in your source directory (that is, /mozilla-central/mozconfig or /comm-central/mozconfig). ...
...e of the actual file you use, we refer to this file as the mozconfig file in the examples below. setting the mozconfig path: export mozconfig=$home/mozilla/mozconfig-firefox calling the file .mozconfig (with a leading dot) is also supported, but this is not recommended because it may make the file harder to find. this will also help when troubleshooting because people will want to know which
build options you have selected and will assume that you have put them in your mozconfig file. mozconfig contains two types of options: options prefixed with mk_add_options are passed to client.mk. the most important of these is moz_objdir, which controls where your application gets built (also known as the object directory). options prefixed with ac_add_options are passed to configure, and affe...
...And 31 more matches
SpiderMonkey Build Documentation
building spidermonkey obsolete: the canonical documentation now lives at: https://firefox-source-docs.mozilla.org/js/
build.html. use these instructions to
build the latest spidermonkey source code. before you begin, make sure you have the right
build tools for your computer: linux, windows, mac, others. when
building a version older than 28, you'll additionally need nspr. and of course, you'll need to get the spidermonkey source code. non-developer (optimized)
build use these steps if you want to install spidermonkey for production use or run performance benchmarks. ...
...
building a version older than 28, you'll additionally need nspr. and of course, you'll need to get the spidermonkey source code. non-developer (optimized)
build use these steps if you want to install spidermonkey for production use or run performance benchmarks. (if you want to use spidermonkey as a library in your c++ application, or work on improving spidermonkey itself, do a developer/debug
build instead, as described below.) cd js/src # this name should end with "_opt.obj" to make the version control system ignore it. mkdir
build_opt.obj cd
build_opt.obj /bin/sh ../configure.in # use "mozmake" on windows make a few notes about this: the most common
build problems are dependency problems. see the
build prerequisites page for your platform. spidermonkey does not support bui...
... note: if you are on mac and getting an error similar to "checking whether the c compiler (gcc-4.2 ) works... ...
...And 30 more matches
Creating XULRunner Apps with the Mozilla Build System - Archive of obsolete content
in most cases, developers of xulrunner applications can download an existing sdk and follow the instructions in getting started with xulrunner. this is by far the simplest approach. in some cases, however, you may want to use the mozilla
build system to create your application. the only obvious reason for this would be if you need to implement part of your application in c++, as described in the introduction to the now classic creating custom firefox extensions with the mozilla
build system. ...
...ason for this would be if you need to implement part of your application in c++, as described in the introduction to the now classic creating custom firefox extensions with the mozilla
build system. for the purposes of this article i'm using dave townsend's mccoy as an example. it's a straightforward xulrunner app that nonetheless uses most of the features any given application is likely to need.
building xulrunner do i need to
build xulrunner? if you are just creating a xulrunner app with some c++ components, you can avoid the challenge of
building xulrunner itself by downloading a prebuilt sdk. do this if at all possible and send me some of the money you save on psychiatry sessions. if you are actively modifying xulrunner as part of your development, however, you'll have to bite the bullet. f...
...o this if at all possible and send me some of the money you save on psychiatry sessions. if you are actively modifying xulrunner as part of your development, however, you'll have to bite the bullet. for example, you may be fixing bugs in xulrunner, applying patches from bugzilla that aren't yet checked into the main repository or making your own changes to deploy as part of a customized xulrunner
build. so basically, almost everyone should be able to skip the next section.
building xulrunner still here? hey, it's not all bad. you'll get a warm fuzzy feeling from mastering the complex but very powerful mozilla
build system. and all that furniture you smash in the meantime makes great kindling to get you through those cold winter nights. let's face it, it was probably time for you to get some new...
...And 27 more matches
Creating custom Firefox extensions with the Mozilla build system - Archive of obsolete content
options carefully before deciding to use native code (c++) in your extension. in addition, binary components need to be recompiled for every major firefox release, which can be frustrating. this article describes how to set up the development environment for a large, complex firefox extension with any or all of the above-mentioned requirements. ...
...g to use native code (c++) in your extension. in addition, binary components need to be recompiled for every major firefox release, which can be frustrating. this article describes how to set up the development environment for a large, complex firefox extension with any or all of the above-mentioned requirements. ...
... one final note: i've only tried these techniques inside firefox, but they'll probably work more or less unchanged on other gecko-based platforms like thunderbird or seamonkey. ...
...And 25 more matches
nsIXULTemplateBuilder
the nsitemplate
builder interface controls the display of elements using a xul template element and is automatically attached to an element containing a datasources attribute. a template
builder, given an input source of data, a template, and a reference point, generates a list of results from the input, and copies part of the template for each result. templates may generate content recursively, using the same template, but with the previous iteration's results as the reference point. as an example, for an xml data source the initial reference point would be a specific node in the dom tree and a template might generate a list of all child nodes. for the next iteration, those children would be used to generate output for their child nodes and so forth. ...
...rate content recursively, using the same template, but with the previous iteration's results as the reference point. as an example, for an xml data source the initial reference point would be a specific node in the dom tree and a template might generate a list of all child nodes. for the next iteration, those children would be used to generate output for their child nodes and so forth. a template
builder is attached to a single dom node; this node is called the root node and is expected to contain a xul template element as a direct child. different template
builders may be specialized in the manner in which they generate and display the resulting content from the template. the structure of a template is as follows: <rootnode datasources="" ref=""> <template> <queryset> <quer...
...ay be more than one <queryset> if multiple queries are desired, and this element is optional if only one query is needed -- in that case the <query> and <rule>s are allowed to be children of the <template> node. the contents of the query are processed by a separate component called a query processor. ...
...And 22 more matches
Simple Instantbird build
this page covers the basic steps needed to
build a bleeding-edge, development version of instantbird. for additional, more detailed information, see the
build documentation. this should be kept in sync with simple thunderbird
build, you might want to take a look at that page too.
build prerequisites hardware requirements: while you can
build instantbird on older hardware it can take quite a bit of time to compile on slower machines, and having 8gb of ram is recommended (though you can probably still get away with 4gb). good internet connection for the initial source download. setup: depending on your operating system you will need to carry out a different process to prepare your machine. ...
...e quite a bit of time to compile on slower machines, and having 8gb of ram is recommended (though you can probably still get away with 4gb). good internet connection for the initial source download. setup: depending on your operating system you will need to carry out a different process to prepare your machine. so firstly complete the instructions for your os and then continue following these
build instructions. windows
build prerequisites gnu/linux
build prerequisites mac os x
build prerequisites tip: after completing setup for your os, and before you get the source, you can opt to add the progressextension to your mercurial.ini (for windows) or .hgrc (for *nix / mac) file. this will provide status feedback during the lengthy clone / download process. see: configure mercurial .hgrc ...
...x
build prerequisites tip: after completing setup for your os, and before you get the source, you can opt to add the progressextension to your mercurial.ini (for windows) or .hgrc (for *nix / mac) file. this will provide status feedback during the lengthy clone / download process. see: configure mercurial .hgrc file for progress extension. get the source note: on windows, you won't be able to
build the instantbird source code if it's under a directory with spaces in the path (e.g., don't use "documents and settings"). you can pick any other location, such as a new directory c:\instantbird-src. note: parts of the
build process also have problems when the source code is in a directory where the path is long (nested many levels deep). on linux, this can manifest as problems setting up the vir...
...And 19 more matches
Simple Thunderbird build
this page covers the basic steps needed to
build a bleeding-edge, development version of thunderbird 60 or later. for thunderbird up to 59, see the old
build documentation. for additional, more detailed information, see the
build documentation. hardware requirements at least 4 gb of ram. 8 gb or more is recommended. while you can
build thunderbird on older hardware it can take quite a bit of time to compile on slower machines with less ram. good internet connection for the initial source download.
build prerequisites depending on your operating system you will need to carry out a different process to prepare your machine. so firstly complete the instructions for your os and then continue following these
build instructions. ...
...d on older hardware it can take quite a bit of time to compile on slower machines with less ram. good internet connection for the initial source download.
build prerequisites depending on your operating system you will need to carry out a different process to prepare your machine. so firstly complete the instructions for your os and then continue following these
build instructions. windows
build prerequisites gnu/linux
build prerequisites macos
build prerequisites mapi headers on windows: check that the mapi header files from https://www.microsoft.com/en-us/download/details.aspx?id=12905 are installed because the mapi header files (except mapi.h) are not bundled with visual studio 2017 (windows sdk 10). you should copy 17 of the 18 header files to a windows sdk include directory so ...
...note that the downloaded outlook 2010 mapi header files contain 18 fies, of which only 17 are needed. do not copy mapi.h, it is already in c:\program files (x86)\windows kits\10\include\10.0.17134.0\um\mapi.h. ...
...And 19 more matches
Obsolete Build Caveats and Tips
therefore, instead of deleting all these nuggets of information, it's best to collect them all here and remove them from the majority happy path documentation. each piece of information should mention the page and the section it originally came from. ...
...therefore, instead of deleting all these nuggets of information, it's best to collect them all here and remove them from the majority happy path documentation. each piece of information should mention the page and the section it originally came from. ...
...therefore, instead of deleting all these nuggets of information, it's best to collect them all here and remove them from the majority happy path documentation. each piece of information should mention the page and the section it originally came from. ...
...And 19 more matches
Tamarin Tracing Build Documentation - Archive of obsolete content
tamarin source versions the following instructions are for obtaining and
building the tamarin tracing source code. ...
... tamarin source versions the following instructions are for obtaining and
building the tamarin tracing source code. ...
... tamarin source versions the following instructions are for obtaining and
building the tamarin tracing source code. ...
...And 18 more matches
Old Thunderbird build
this page covers the basic steps needed to
build a thunderbird up to version 59. for thunderbird 60 and later, see the new
build instructions. for additional information, see the
build documentation. hardware requirements at least 4 gb of ram. 8 gb or more is recommended. while you can
build thunderbird on older hardware it can take quite a bit of time to compile on slower machines with less ram. good internet connection for the initial source download.
build prerequisites depending on your operating system you will need to carry out a different process to prepare your machine. so firstly complete the instructions for your os and then continue following these
build instructions. ...
...derbird on older hardware it can take quite a bit of time to compile on slower machines with less ram. good internet connection for the initial source download.
build prerequisites depending on your operating system you will need to carry out a different process to prepare your machine. so firstly complete the instructions for your os and then continue following these
build instructions. to
build on windows, please read the prerequisites so you don't skip preparing the mapi headers needed to compile thunderbird. windows
build prerequisites gnu/linux
build prerequisites mac os x
build prerequisites get the source note: on windows, you won't be able to
build the thunderbird source code if it's under a directory with spaces in the path (e.g., don't use "documents and settings"). you...
...inux
build prerequisites mac os x
build prerequisites get the source note: on windows, you won't be able to
build the thunderbird source code if it's under a directory with spaces in the path (e.g., don't use "documents and settings"). you can pick any other location, such as a new directory c:/thunderbird-src (where "c:/", with a forward slash, is intentional to clarify you are in the mozilla
build command prompt per windows
build prerequisite). note: parts of the
build process also have problems when the source code is in a directory where the path is long (nested many levels deep). on linux, this can manifest as problems setting up the virtualenv for running tests (failure to install pip or virtualenv because of os access denied errors, where access is denied not because of permission pr...
...And 16 more matches
Simple Sunbird build
building sunbird is no longer supported. you can give it a try, but its likely that the
build system will present you an error. instead it is suggested to
build thunderbird with lightning. please refer to the simple thunderbird
build guide. you can
build a bleeding-edge, development version of sunbird using the commands below. for complete information, see the
build documentation. installing
build tools if your system is not listed below, see the
build prerequisites page. ...
...t you an error. instead it is suggested to
build thunderbird with lightning. please refer to the simple thunderbird
build guide. you can
build a bleeding-edge, development version of sunbird using the commands below. for complete information, see the
build documentation. installing
build tools if your system is not listed below, see the
build prerequisites page. ubuntu linux: sudo apt-get
build-dep sunbird sudo apt-get install mercurial libasound2-dev libcurl4-openssl-dev libnotify-dev libiw-dev autoconf2.13 cvs fedora linux: sudo yum groupinstall 'development tools' 'development libraries' 'gnome software development' sudo yum install mercurial autoconf213 glibc-static libstdc++-static yasm wireless-tools-devel mesa-libgl-devel mac: install xcode tools. insert "mac os x inst...
...lopment libraries' 'gnome software development' sudo yum install mercurial autoconf213 glibc-static libstdc++-static yasm wireless-tools-devel mesa-libgl-devel mac: install xcode tools. insert "mac os x install disc 2", then open xcodetools.mpkg. (for some mac os x versions, you will find it in a directory called "optional installs".) install macports. run these commands to install the other
build tools: sudo port sync sudo port install mercurial libidl autoconf213 problems? see mac os x
build prerequisites. windows: if you're using windows xp, you must have windows xp service pack 2 and .net framework 2.0. install visual c++ 2005 or 2008. both the professional edition and the express edition will work. you may need to install one or more windows sdks. see windows sdk versions for...
...And 15 more matches
Building Trees - Archive of obsolete content
« previousnext » the most common element to use with a template is the tree. you can use a template with a tree just like any other template. however, since templates are often used with trees—especially with large amounts of data—the template system supports a special
builder just for creating trees. rather than generate content for every row in the tree, the results are stored in a list inside the
builder. this means that dom nodes are not constructed for any of the items. ...
...rts a special
builder just for creating trees. rather than generate content for every row in the tree, the results are stored in a list inside the
builder. this means that dom nodes are not constructed for any of the items. this is much more efficient; creating large numbers of dom nodes adds a lot of overhead. the performance advantage is possible since trees only display text. as a result, the
builder only has a few pieces of information to keep track of. to use the tree
builder, you need to add a flags attribute to the root node: <tree datasources="template-guide-streets.rdf" ref="http://www.xulplanet.com/rdf/myneighbourhood" flags="dont-
build-content"> the dont-
build-content flag causes no content to be built for the template. ...
...
builder only has a few pieces of information to keep track of. to use the tree
builder, you need to add a flags attribute to the root node: <tree datasources="template-guide-streets.rdf" ref="http://www.xulplanet.com/rdf/myneighbourhood" flags="dont-
build-content"> the dont-
build-content flag causes no content to be built for the template. but moreover, it uses a subtype of the main
builder called the tree
builder. without this flag, the template will be handled by the content
builder. note: while a tree
builder can only be used with trees, a content
builder can be used with any type of content. if you wish, you can also use the content
builder for a tree. there may be situations that call for this, typically when handling smaller amounts of data. ...
...And 12 more matches
Simple SeaMonkey build
you can
build a bleeding-edge, development version of seamonkey using the commands below. for complete information, see the
build documentation.
build prerequisites hardware requirements: the seamonkey
build process is both i/o- and cpu-intensive, and can take a long time to
build even on modern hardware. minimum and recommended hardware requirements for mozilla development are: recommended: 8gb of ram (having only 4gb ram and 4gb swap may give memory errors during compile) 35 gb free disk space. this will accomodate visual studio 2013 community edition, the required sdks, the mozilla
build package, the mercurial source repository and enough free disk space to compile. a fast ssd is recommended; the firefox
build process is i/o-intensive. ...
...ecommended: 8gb of ram (having only 4gb ram and 4gb swap may give memory errors during compile) 35 gb free disk space. this will accomodate visual studio 2013 community edition, the required sdks, the mozilla
build package, the mercurial source repository and enough free disk space to compile. a fast ssd is recommended; the firefox
build process is i/o-intensive. high speed internet installing
build tools if your system is not listed below, see the
build prerequisites page. ...
...ommunity edition, the required sdks, the mozilla
build package, the mercurial source repository and enough free disk space to compile. a fast ssd is recommended; the firefox
build process is i/o-intensive. high speed internet installing
build tools if your system is not listed below, see the
build prerequisites page. ...
...And 11 more matches
Build instructions
these instructions are outdated. use the
building nss page for more recent information. numerous optional features of nss
builds are controlled through make variables. gmake is gnu make, usually your linux-distro-regular "make" binary file, unless maybe it is a bsd make. make variables may be set on the gmake command line, e.g., gmake variable=value variable=value target1 target2 or defined in the environment, e.g. (for posix shells), variable=value; export variable gmake target1 target2 here are some (not all) of the make variables that affect nss
builds:
build_opt: if set to 1, means do optimized non-debug
build. default is debug, non-optimized
build. use_debug_rtl: if set to 1, on windows, causes
build with debug version of the c run-time library. ns_use_gcc: on ...
...e=value; export variable gmake target1 target2 here are some (not all) of the make variables that affect nss
builds:
build_opt: if set to 1, means do optimized non-debug
build. default is debug, non-optimized
build. use_debug_rtl: if set to 1, on windows, causes
build with debug version of the c run-time library. ns_use_gcc: on platforms where gcc is not the native compiler, tells nss to
build with gcc instead of the native compiler. default is to
build with the native compiler. use_64: on platforms that support both 32-bit and 64-bit abis, tells nss to
build for the 64-bit abi. default is 32-bit abi, except on platforms that do not support a 32-bit abi. ...
...un-time library. ns_use_gcc: on platforms where gcc is not the native compiler, tells nss to
build with gcc instead of the native compiler. default is to
build with the native compiler. use_64: on platforms that support both 32-bit and 64-bit abis, tells nss to
build for the 64-bit abi. default is 32-bit abi, except on platforms that do not support a 32-bit abi. moz_debug_symbols: tells nss to
build with debug symbols, even in an optimized
build. on windows, in both debug and optimized
builds, when using msvc, tells nss to put symbols in a .pdb file. required to
build with msvc 8 (2005 express). default is not to put debug symbols into optimized
builds, and for msvc, is to put symbols into the .exe or .dll file. nsdistmode: if set to 'copy', mozilla/dist/<obj_stuff>/bin/* real files instead...
...And 8 more matches
Template Builder Interface - Archive of obsolete content
« previousnext » when inserting an element into a xul document, the element is checked to see if it has a datasources attribute. if so, a template
builder will be created for the element and attached to the element. if the element is a <tree> element and has the flags attribute set to "dont-
build-content", a tree
builder will be created. otherwise, a content
builder will be created. both types of
builder share much of the same code except for how they generate output to be displayed. both types of
builders implement the nsixultemplate
builder interface, while the tree
builder also implements the nsixultree
builder interface. the
builder associated with an element is accessible via the element's '
builder' property both for content
builders and for tree
builders. an element that do...
...ilder share much of the same code except for how they generate output to be displayed. both types of
builders implement the nsixultemplate
builder interface, while the tree
builder also implements the nsixultree
builder interface. the
builder associated with an element is accessible via the element's '
builder' property both for content
builders and for tree
builders. an element that does not have a
builder will have this property set to null. the processes of creating a
builder for an element applies both when an element is created when the window is loaded and when an element is inserted dynamically. templates can only be used in xul documents, however, there is no requirement that the templates generate xul elements. they could also be used, for example, to generate html elements. this isn't a ...
...note that this particular whitespace issue has been fixed in firefox 3 and later. note also that the datasources attribute has been placed on an html element. this is also allowed. however, one thing to watch out for is that non-xul elements do not have their content generated lazily so all of the content will be generated at once. be careful that your templates do not recurse to deep levels. ...
...And 7 more matches
How to build custom form controls - Learn web development
there are some cases where the available native html form controls may seem like they are not enough. for example, if you need to perform advanced styling on some controls such as the <select> element or if you want to provide custom behaviors, you may consider
building your own controls. in this article, we will discuss how to
build a custom control. to that end, we will work with an example: re
building the <select> element. ...
... like they are not enough. for example, if you need to perform advanced styling on some controls such as the <select> element or if you want to provide custom behaviors, you may consider
building your own controls. in this article, we will discuss how to
build a custom control. to that end, we will work with an example: re
building the <select> element. we will also discuss how, when, and whether
building your own control makes sense, and what to consider when
building a control is a requirement. ...
... or if you want to provide custom behaviors, you may consider
building your own controls. in this article, we will discuss how to
build a custom control. to that end, we will work with an example: re
building the <select> element. we will also discuss how, when, and whether
building your own control makes sense, and what to consider when
building a control is a requirement. note: we'll focus on
building the control, not on how to make the code generic and reusable; that would involve some non-trival javascript code and dom manipulation in an unknown context, and that is out of the scope of this article. design, structure, and semantics before
building a custom control, you should start by figuring out exactly what you want. this will save you some precious time. in particular, it's importa...
...And 7 more matches
Building XULRunner with Python - Archive of obsolete content
this page provides instructions in the hope of eliminating much trial and error. ...
...ndows and while generally useful it is written based on experiences with accessibility projects. see also xulrunner. or, if you are interested in working with xulrunner with python on linux, see mark lise's post with the python extensions enabled xulrunner provides python script access to the dom and xpcom in addition to the usual java script. ...
...ith python on linux, see mark lise's post with the python extensions enabled xulrunner provides python script access to the dom and xpcom in addition to the usual java script. this gives access to python features and modules and
builds on mark hammond's pyxpcom work from active state. xpcom components can also be created in python. currently (mar 07) python is not enabled by default so a custom
build of mozilla is needed. this page provides instructions in the hope of eliminating much trial and error. you should also read the the developer documentation on source code and
building as wells as pyxpcom xulrunner with python promises to be a good platform for accessibility projects and both jambu alternative input and the iaccessible2 test tool are using it. of particular interested is access t...
...And 6 more matches
Downloading Nightly or Trunk Builds - Archive of obsolete content
n be helpful to know exactly what these refer to. note that this is an attempt at describing the current usage of these terms. this usage may change. cutting edge firefox downloads. as a development organization, the mozilla community tends to describe things from the bottom up. so to figure out how to download a cutting edge or bleeding edge or 'beta' version of firefox, you need to look for a "
build" (which is developer-speak for the packaged files you can download) of 1.9.1 (the number of the underlying 'platform' called 'gecko' or 'mozilla' that firefox uses). as it turns out there is a platform number for every firefox number, but they are not the same number. firefox 3.0 corresponds to mozilla 1.9.0; firefox 3.5 corresponds to mozilla 1.9.1; firefox 3.6 corresponds to mozilla 1.9.2. ho...
...r numbers are used, but rather special words indicating relative order are used. the three common cases are "trunk", meaning the most recent version of mozilla; "branch", meaning the version before trunk (though it can be any version before trunk); and "next", meaning a possible version in the future. ...
...the future. so, if you are looking for the cutting edge firefox, you probably want a mozilla branch nightly
build, that is, look for a mozilla thing (not a firefox thing), not the breaky one on trunk, but the most recent branch, and built very fresh (last night!), so you can install it. for firefox 3.5 that would be latest-mozilla-1.9.1 in https://archive.mozilla.org/pub/firefox/nightly/. trunk
build. a trunk
build is a
build made off the trunk, i.e., the latest, newest, but also least stable and most buggy state of the source. trunk
builds are provided so that one can execute tests without going to the trouble of
building the source. the current trunk is mozilla 1.9.2. tinderbox
builds. for the trunk and the latest two branches, there are machines at mozilla and maybe elsewhere compiling b...
...And 5 more matches
Building Mozilla XForms - Archive of obsolete content
getting started things to know first: the xforms extension has a dependency on the schema-validation extension, so you need to
build both (that's done automatically) mozilla switched from cvs to mercurial starting with firefox 3.5. during cvs times, the mozilla repository contained both extensions. since the switch to mercurial, the extensions live in separate repositories. before you can start
building the xforms extension, you should check your mozilla
build environment by doing a regular firefox
build. have a look at the
build instructions for detailed information for your platform. ...
...ository contained both extensions. since the switch to mercurial, the extensions live in separate repositories. before you can start
building the xforms extension, you should check your mozilla
build environment by doing a regular firefox
build. have a look at the
build instructions for detailed information for your platform. ...
...ollowing table gives you an overview of which version you want to
build: firefox version gecko/toolkit version source code notes status firefox 2.0 gecko 1.8.1 cvs, branch mozilla_1_8_branch not developed any more last release: 0.8.5ff2 firefox 3.0 gecko 1.9.0 cvs, branch head not developed any more last release: 0.8.5ff3 firefox 3.5 gecko 1.9.1 xforms/schema-validation code does not
build with firefox 3.5 any more not supported firefox 3.6 gecko 1.9.2 xforms/schema-validation code does not
build with firefox 3.6 any more not developed any more last release: 0.8.6 firefox 4 gecko 2.0 mercurial, repositories mozilla-central xforms schema-validation mostly works upcoming 0.8.7 release if you have your first working firefox
build, you can go on with
building the xforms exten...
...And 5 more matches
nsIJumpListBuilder
the default number of allowed items in a jump list is ten. users can change the number through system preferences. ...
...the default number of allowed items in a jump list is ten. users can change the number through system preferences. ...
...er.idlscriptable please add a summary to this article. 1.0 66 introduced gecko 2.0 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) jump lists are built and then applied. modifying an applied jump list is not permitted. callers should begin the creation of a new jump list using initlist
build(), add sub lists using addlistto
build(), then commit the jump list using commitlist
build(). lists are built in real-time during the sequence of
build calls, make sure to check for errors on each individual step. the default number of allowed items in a jump list is ten. users can change the number through system preferences. user may also pin items to jump lists, which take up additional slots. applications do not have control over t...
...And 5 more matches
NSPR build instructions
prerequisites on windows, the nspr
build system needs gnu make and a unix command-line utility suite such as mks toolkit, cygwin, and msys. the easiest way to get these tools is to install the mozilla
build package. introduction the top level of the nspr source tree is the mozilla/nsprpub directory. although nsprpub is a subdirectory under mozilla, nspr is independent of the mozilla client source tree.
building nspr consists of three steps: run the configure script. you may override the compilers (the cc environment variable) or specify options. ...
... get these tools is to install the mozilla
build package. introduction the top level of the nspr source tree is the mozilla/nsprpub directory. although nsprpub is a subdirectory under mozilla, nspr is independent of the mozilla client source tree.
building nspr consists of three steps: run the configure script. you may override the compilers (the cc environment variable) or specify options.
build the libraries
build the test programs for example, # check out the source tree from mercurial hg clone https://hg.mozilla.org/projects/nspr # create a
build directory mkdir target.debug cd target.debug # run the configure script ../nspr/configure [optional configure options] #
build the libraries gmake #
build the test programs cd pr/tests gmake on mac os x, use make, which is gnu make. co...
...figure options] #
build the libraries gmake #
build the test programs cd pr/tests gmake on mac os x, use make, which is gnu make. configure options although nspr uses autoconf, its configure script has two default values that are different from most open source projects. if the os vendor provides a compiler (for example, sun and hp), nspr uses that compiler instead of gcc by default. nspr
build generates a debug
build by default. --disable-debug --enable-optimize specify these two options to generate an optimized (release)
build. these two options can actually be used independently, but it's not recommended. --enable-64bit on a dual 32-bit/64-bit platform, nspr
build generates a 32-bit
build by default. to generate a 64-bit
build, specify the --enable-64bit configure option. --ta...
...And 4 more matches
Building NSS
introduction this page has detailed information on how to
build nss. because nss is a cross-platform library that
builds on many different platforms and has many options, it may be complex to
build. please read these instructions carefully before attempting to
build.
build environment nss needs a c and c++ compiler. it has minimal dependencies, including only standard c and c++ libraries, plus zlib. for
building, you also need make. ideally, also install gyp and ninja and put them on your path. this is recommended, as the
build is faster and more reliable. windows nss compilation on windows uses the same shared
build system as mozilla firefox. ...
... get the source nss and nspr use mercurial for source control like other mozilla projects. ...
... get the source nss and nspr use mercurial for source control like other mozilla projects. ...
...And 4 more matches
Build instructions for JSS 4.3.x
follow these steps: switch to the appropriate directory and check out jss from the root of your source tree. ...
...follow these steps: switch to the appropriate directory and check out jss from the root of your source tree. ...
...follow these steps: switch to the appropriate directory and check out jss from the root of your source tree. ...
...And 4 more matches
nsIXULBuilderListener
content/xul/templates/public/nsixul
builderlistener.idlscriptable this object is a listener that will be notified when a template
builder re
builds its content. inherits from: nsisupports last changed in gecko 1.7 method overview void didre
build(in nsixultemplate
builder a
builder); void willre
build(in nsixultemplate
builder a
builder); methods didre
build() called after a template
builder has rebuilt its content. void didre
build( in nsixultemplate
builder a
builder ); parameters a
builder the template
builder that has rebuilt the content. willre
build() called before a template
builder re
builds its content. void willre
build( in nsixultemplate
builder a
builder ); parameters a
builder the template
builder that re
builds the content. example create an object which implements ...
...as rebuilt its content. void didre
build( in nsixultemplate
builder a
builder ); parameters a
builder the template
builder that has rebuilt the content. willre
build() called before a template
builder re
builds its content. void willre
build( in nsixultemplate
builder a
builder ); parameters a
builder the template
builder that re
builds the content. ...
...der that has rebuilt the content. willre
build() called before a template
builder re
builds its content. void willre
build( in nsixultemplate
builder a
builder ); parameters a
builder the template
builder that re
builds the content. ...
...And 4 more matches
JSS build instructions for OSX 10.6 - Archive of obsolete content
the following
build instructions were provided by pavrw. the generic instructions didn't work to
build on osx 10.6.7. ...
... the following
build instructions were provided by pavrw. the generic instructions didn't work to
build on osx 10.6.7. ...
... the following
build instructions were provided by pavrw. the generic instructions didn't work to
build on osx 10.6.7. ...
...And 3 more matches
Building Mozilla
in this article, we list documents that will guide you in
building firefox or other projects based upon mozilla code. ...
... in this article, we list documents that will guide you in
building firefox or other projects based upon mozilla code. ...
... in this article, we list documents that will guide you in
building firefox or other projects based upon mozilla code. ...
...And 3 more matches
How to build a binary XPCOM component using Visual Studio
this is a simple tutorial for
building xpcom objects in c++ using visual studio. xpcom is mozilla’s cross platform component object model, similar to microsoft’s com technology. xpcom components can be implemented in c, c++, and javascript, and can be used from c, c++, and javascript. that means you can call javascript methods from c++ and vice versa. for more information on the workings of xpcom look elsewhere. development setup the simplest way to get an xpcom component built is to use the gecko sdk. on windows, the sdk is built using a microsoft compiler, so you need to use one too. this tutorial uses microsoft’s free visual c++ express and the sample project in the next paragraph. ...
... workings of xpcom look elsewhere. development setup the simplest way to get an xpcom component built is to use the gecko sdk. on windows, the sdk is built using a microsoft compiler, so you need to use one too. this tutorial uses microsoft’s free visual c++ express and the sample project in the next paragraph. you could try to use a different vendor's compiler, but you are going to need to
build the sdk from source code. not the simplest thing to do and it may be incompatible with production releases of firefox, thunderbird, and xulrunner from mozilla. for example, xulrunner 1.8.0.4 which has a pre-built sdk at gecko-sdk-win32-msvc-1.8.0.4.zip. extract the sdk to a folder. the tutorial assumes the folder is called xulrunner-1.8.0.4, but you can call yours whatever you want. you also need...
...t, you start with a standard multi-thread dll project. then make the following tweaks: add "..\gecko-sdk\include" to additional include directories add "..\gecko-sdk\lib" to additional library directories add "nspr4.lib xpcom.lib xpcomglue_s.lib" to additional dependencies add "xp_win;xp_win32″ to preprocessor definitions turn off precompiled headers (just to keep it simple) use a custom
build step for the xpcom idl file (spawns xpidl-
build.bat to process the idl with mozilla toolset, not midl) vc++ express project: xpcom-test.zip note: the project uses xpcom_glue. it also uses frozen linkage (dependent on xpcom). i am not defining xpcom_glue and i am linking against xpcomglue_s.lib create an xpcom component a full tutorial of xpcom is beyond the scope of this posting. check out th...
...And 3 more matches
Building Hierarchical Trees - Archive of obsolete content
« previousnext » a template may be used to generate hierarchical trees. this works just like with recursive generation using the content
builder. each level of the tree is created using a successive iteration of the template
build process. if the items are containers, the tree
builder will mark the right rows as containers, so that they can be opened and closed with the small icon twisties on the left of the column. remember to make the left column the primary column for these to appear. to be able to do this, the tree
builder must know that an item is a container. with an rdf datasource, this would usually be an rdf container such as a seq and the tree would display its children. for an xml datasource, the tree might display a node's children as the children in the tree, maki...
...ample, we have a container 'http://www.xulplanet.com/rdf/myphotos' with three photos. three results will be generated from a simple rule with no extra conditions. it is the result, or the photo, that will be checked, not the container of photos. since a photo isn't a container, the tree rows will not become containers, so you will not be able to open them. as the rows are not containers, the tree
builder does not recurse to find additional data. the tree
builder creates rows lazily, so a closed container will not have any data generated inside in it until the row is opened. when the user opens the tree row, the next level of rows are generated from the template and displayed in the tree. similarly, when the user closes a tree row, the rows inside it are removed, such that they will have to be g...
...tribute, it would be accepted as a container, and the user could open the row. when the user opens the row, the template will be re-examined for results using the photo as the starting point instead of the top level ref value. ...
...And 2 more matches
Building XULRunner - Archive of obsolete content
xulrunner is built using basically the same process as firefox or other applications. please read and follow the general
build documentation for instructions on how to get sources and set up
build prerequisites. by default, xulrunner is built with javaxpcom support; the
build system must be able to find an appropriate jdk on the system; see the instructions on
building javaxpcom for more details. if you do not want to
build javaxpcom support, specify --disable-javaxpcom in your configuration. on mac, xulrunner requires mac os x 10.3 or higher and xcode 1.5 or higher to
build properly. the runtime requirement is mac os x 10.2. ...
...ild system must be able to find an appropriate jdk on the system; see the instructions on
building javaxpcom for more details. if you do not want to
build javaxpcom support, specify --disable-javaxpcom in your configuration. on mac, xulrunner requires mac os x 10.3 or higher and xcode 1.5 or higher to
build properly. the runtime requirement is mac os x 10.2. ...
...unner requires mac os x 10.3 or higher and xcode 1.5 or higher to
build properly. the runtime requirement is mac os x 10.2. a basic minimal mozconfig which will
build a release configuration of xulrunner is: mk_add_options moz_co_project=xulrunner mk_add_options moz_objdir=@topsrcdir@/obj-xulrunner ac_add_options --enable-application=xulrunner #uncomment the following line if you don't want to
build javaxpcom: #ac_add_options --disable-javaxpcom cvs tags and xulrunner versions older xulrunner releases where tagged in cvs with (for instance xulrunner_1_8_0_5_release ) up to version 1.8.0.5 the cvs repository does not have specific tags for xulrunner anymore. instead a xulrunner
build is a just special
build made from the firefox/mozilla tree, using the same tag as a firefox
build. there i...
...And 2 more matches
Archived Mozilla and build documentation - Archive of obsolete content
activex control for hosting netscape plug-ins in ie microsoft has removed support for netscape plug-ins from ie 5.5 sp 2 and beyond. if you are a plug-in author, you may find this project saves you a lot of work! ant script to assemble an extension this ant script helps to package an extension archived spidermonkey docs this section contains old spidermonkey documentation. ...
... this section contains old spidermonkey documentation. autodial for windows nt this document is intended to explain how the autodial helper feature implemented for bug 93002 works and why it works that way. automated testing tips and tricks automatic mozilla configurator ankh8 automatically handle failed asserts in debug
builds as of 2004-12-8, it is now possible to automatically handle failed asserts in debug
builds of mozilla for windows. blackconnect blackwood bonsai it is a tool that lets you perform queries on the contents of a cvs archive; you can: get a list of checkins, see what checkins have been made by a given person, or on a given cvs branc...
...ly every web surfer has bookmarks, of course, and power surfers usually have hundreds stuffed into folders within folders. in addition to being handy pointers to useful resources, bookmarks in mozilla can be used to make the address bar itself a power tool. searches, lookups, package tracking, and even word definitions can all be retrieved from user-customized bookmarks.
building transformiix standalone calicalendarview an object implementing calicalendarview is generally intended to serve as a way of manipulating a set of dom nodes corresonding to a visual representation of calievent and calitodo objects. because of this close association between methods and attributes on the one hand, and content on the other, calicalendarv...
...And 2 more matches
Build your own function - Learn web development
previous overview:
building blocks next with most of the essential theory dealt with in the previous article, this article provides practical experience. here you will get some practice
building your own, custom function. along the way, we'll also explain some useful details of dealing with functions. prerequisites: basic computer literacy, a basic understanding of html and css, javascript first steps, functions — reusable blocks of code. objective: to provide some practice in
building a custom function, and explain a few more useful associated details. active learning: let's
build a function the custom function we are going to
build will be called displaymessage(). it will display a custom message box on a web page and will act as a customized repla...
.... type the following in your browser's javascript console, on any page you like: alert('this is a message'); the alert function takes a single argument — the string that is displayed in the alert box. try varying the string to change the message. the alert function is limited: you can alter the message, but you can't easily vary anything else, such as the color, icon, or anything else. we'll
build one that will prove to be more fun. note: this example should work in all modern browsers fine, but the styling might look a bit funny in slightly older browsers. we'd recommend you doing this exercise in a modern browser like firefox, opera, or chrome. the basic function to begin with, let's put together a basic function. note: for function naming conventions, you should follow the same r...
...remember the most important information? you can find some further tests to verify that you've retained this information before you move on — see test your skills: functions. these tests require skills that are covered in the next article, so you might want to read those first before trying it. ...
...And 2 more matches
NSS sources building testing
getting source code, and a quick overview the easiest way is to download archives of nss releases from mozilla's download server. find the directory that contains the highest version number. because nss depends on the base library nspr, you should download the archive that combines both nss and nspr. if you are a software developer and intend to contribute enhancements to nss, you should obtain the latest development snapshot of nss using mercurial/hg (a distributed source control management tool). in order to get started, anonymous read-only access is sufficient. ...
...ure. in past versions, all files were located in a directory hierarchy that started with the "mozilla" prefix. the nspr base library was located in directory mozilla/nsprpub. the subdirectories dbm, security/dbm, security/coreconf, security/nss were part of the nss sources.) the nss directory contains the following important subdirectories: nss/coreconf contains knowledge for cross platform
building. nss/lib contains all the library code that is used to create the runtime libraries used by applications. nss/cmd contains a set of various tool programs that are built using nss. several tools are general purpose and can be used to inspect and manipulate the storage files that software using the nss library creates and modifies. other tools are only used for testing purposes. however, a...
...faces. these can be found by looking at the files with the .def file extension, inside the nss/lib directory hierarchy. any c function that isn't contained in .def files is strictly for private use within nss, and applications and test tools are not allowed to call them. for any functions that are listed in the .def files, nss promises that the binary function interface (abi) will remain stable.
building nss nss is built using gyp and ninja, or with make on systems that don't have those tools. the complete
build instructions include more information. once the
build is done, you can find the
build output below directory dist/?, where ? will be a name dynamically derived from your system's architecture. exported header files for nss applications can be found in directory "include", library fil...
...And 2 more matches
Building TransforMiiX standalone - Archive of obsolete content
this document is out of date. we support
building a standalone version of transformiix on windows, unix and os x. read the
build instructions for your platform to get the requirements, which are the same as for mozilla. you need to get the source from cvs. add tx_exe=1 mk_add_options
build_modules="xpcom transformiix" ac_add_options --enable-standalone-modules="xpcom transformiix" to your .mozconfig, and use client.mk to pull as usual. ...
... read the
build instructions for your platform to get the requirements, which are the same as for mozilla. you need to get the source from cvs. add tx_exe=1 mk_add_options
build_modules="xpcom transformiix" ac_add_options --enable-standalone-modules="xpcom transformiix" to your .mozconfig, and use client.mk to pull as usual. 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.
building from a full mozilla tree is not supported. it is recommended to add ac_add_options --disable-gtktest ac_add_option...
... the binary transformiix(.exe) will be in extensions/transformiix/source and dist/bin/ (symbolic link). run it via run-mozilla.sh transformiix on unices and just transformiix.exe on windows. ...
... the binary transformiix(.exe) will be in extensions/transformiix/source and dist/bin/ (symbolic link). run it via run-mozilla.sh transformiix on unices and just transformiix.exe on windows. ...
Building Firefox with Rust code - Archive of obsolete content
this article is obsolete. please instead refer to the documentation found within the modern firefox
build system documentation; specifically, the section called including rust code in firefox. firefox uses the rust programming language extensively. this page is a rough guide for people using rust in firefox. see also the documentation on this topic on the oxidation wiki page. adding rust code we generally target stable rust, but sometimes issues temporarily require a beta or custom toolchain
build. our goal is to always ship a firefox release
build with a stable rust toolchain release. ...
...ic on the oxidation wiki page. adding rust code we generally target stable rust, but sometimes issues temporarily require a beta or custom toolchain
build. our goal is to always ship a firefox release
build with a stable rust toolchain release. if you don't have rust already, use the rustup tool to install it and update as new releases become available, or use the ./mach bootstrap command. the
build system will generate a special 'rust unified library' crate, compiled to a static library (libgkrust.a) which is in turn linked into xul, so all public symbols will be available to c++ code. if you have new rust libraries that code in libxul calls directly, then you should add the appropriate extern crate lines in toolkit/library/rust/shared/lib.rs, and add those libraries (crates) as dependenci...
...rates are compatible. cargo.lock files have also been checked in, so you will need to update those as well when appropriate. crates for unit tests can be added in a similar fashion to the files in toolkit/library/gtest/rust/. if your crate has optional features that aren't normally turned on, you are strongly encouraged to remove dependencies for those features when importing code so the
build system doesn't require that (unused) code to live in-tree. the
build system will check that there's only one copy of a given crate in a
build; this was a deliberate decision to try and avoid code bloat in libxul. if this turns out to be a serious problem in practice, we can look into ways of relaxing that check. if you need to locally patch a third-party crate, you'll need to add a [replace]...
...eplace] section to the referencing cargo.toml to declare that the vendored source shouldn't match the upstream release. this works even if you use the existing vendored source location, but be aware that other vendor updates could clobber your patch in that case. testing rust code there's a simple linkage unit test in the tree. you can use it to check that rust is enabled and working with your
build setup. ./mach gtest rust.* look for the rust.callfromcpp test to pass, along with any others. ...
builder - Archive of obsolete content
« xul reference
builder type: nsixultemplate
builder for content generated from a template, this is the xpcom object that is responsible for generating the content. for scripts it is only necessary in case you want to force the template content to be regenerated. you may need to do this if you have adjusted the rules manually. to re
build the content call the
builder's re
build method. ...
...generated from a template, this is the xpcom object that is responsible for generating the content. for scripts it is only necessary in case you want to force the template content to be regenerated. ...
... this is the xpcom object that is responsible for generating the content. for scripts it is only necessary in case you want to force the template content to be regenerated. ...
...he xpcom object that is responsible for generating the content. for scripts it is only necessary in case you want to force the template content to be regenerated. ...
Solaris 10 Build Prerequisites - Archive of obsolete content
the installer must install additional sun-provided packages from the os install dvd, so that dvd has to be available. the installer will try to install the sunwsmbas package, which is not available in newer versions of sxde. fortunately, it also isn't necessary, so you can fix this problem by simply removing the reference to that package from the installer script (cbe-install). ...
...y, so you can fix this problem by simply removing the reference to that package from the installer script (cbe-install). the installer may tell you your c compiler is not the recommended compiler, but the compiler you installed will work fine, so you should tell the installer to use the compiler anyway. run . /opt/jdsbld/bin/env.sh to import the jds cbe settings into your environment.
build environment 1. install sun studio 12 or sun studio 11 with a patch to avoid a compiler bug. 2. install cbe. make some changes to /opt/jdsbld/bin/env.sh. --- env.sh.orig tue jul 1 02:38:35 2008 +++ env.sh tue jun 24 01:08:01 2008 @@ -95,7 +95,8 @@ echo setting ld=$ld export ld -path="$cbe_prefix/bin:/usr/ccs/bin:/usr/gnu/bin:/usr/bin:/usr/sbin:/bin:/usr /sfw/bin:$ccdir" +path="/opt...
...t the desktop spec files for branch gnome-2-20. % svn co svn+ssh://anon at svn dot opensolaris dot org/svn/jds/spec-files/branches/gnome-2-20 5. unpack the extra spec file tarball to the spec file directory. % cd gnome-2-20 % gtar jxvf firefox-solaris-10-spec.tar.bz2 6. unpack the patch tarball to the patches directory. % cd gnome-2-20/patches % gtar jxvf firefox-3.0-solaris-10-patches.tar.bz2 7.
build pkg-config and gtk-doc from source. just unpack the source tarball, run "./configure --prefix=/opt/sfw", make and make install. add /opt/sfw/bin to path environment after installation. 8.
build glib/atk/cairo/pango/gtk2/dbus/dbus-glib/firefox. % . /opt/jdsbld/bin/env.sh % pkgtool --download
build-only -v solaris10/sfw{name1}.spec % pkgadd -d . {package_name1} % pkgadd -d . {package_name1}-devel %...
...doc from source. just unpack the source tarball, run "./configure --prefix=/opt/sfw", make and make install. add /opt/sfw/bin to path environment after installation. 8.
build glib/atk/cairo/pango/gtk2/dbus/dbus-glib/firefox. % . /opt/jdsbld/bin/env.sh % pkgtool --download
build-only -v solaris10/sfw{name1}.spec % pkgadd -d . {package_name1} % pkgadd -d . {package_name1}-devel % pkgtool --download
build-only -v solaris10/sfw{name2}.spec % pkgadd -d . {package_name2} % pkgadd -d . {package_name2}-devel ...... ...
Building up a basic demo with A-Frame - Game development
the webxr and webgl apis already enable us to start creating virtual reality (vr) experiences inside web browsers, but the community is still waiting for tools and libraries to appear, to make this easier. mozilla's a-frame framework provides a markup language allowing us to
build 3d vr landscapes using a system familiar to web developers, which follows game development coding principles; this is useful for quickly and successfully
building prototypes and demos, without having to write a lot of javascript or glsl. this article explains how to get up and running with a-frame, and how to use it to
build up a simple demo. high level overview the current version of a-frame is 0.3.2, which means it's highly experimental, but it already works and you can test it right away in the browser. it runs ...
...es, controls, animations, cursors, etc. it is based on the entity component system, which is known in the game development world, but it targets web developers with a familiar markup structure, manipulable with javascript. the end result is 3d web experiences, which are vr-enabled by default. environment setup let's start by setting up an environment to create something with a-frame. we'll then
build up a demo and run it. you should start off by: making sure you are using a modern browser with good webgl support (and webxr support if you have available vr or ar hardware) such as the latest firefox or chrome — download firefox nightly or chrome (v54 or higher). (optional) set up a vr device such as oculus rift or google cardboard. create a new directory to store your project in. save a...
...r support if you have available vr or ar hardware) such as the latest firefox or chrome — download firefox nightly or chrome (v54 or higher). (optional) set up a vr device such as oculus rift or google cardboard. create a new directory to store your project in. save a copy of the latest a-frame javascript library file inside your directory (check the github repository for latest stable a dev
builds). open the a-frame documentation in a separate tab — it is useful to refer to. html structure the first step is to create an html document — inside your project directory, create a new index.html file, and save the follow html inside it: <!doctype html> <html> <head> <meta charset="utf-8"> <title>mdn games: a-frame demo</title> <script src="aframe.min.js"></script> </head> <body> ...
...t = 0; function render() { t += 0.01; requestanimationframe(render); cylinder.setattribute('position', '3 '+(math.sin(t*2)+1)+' 0'); } render(); we're using the render() function to update the cylinder's position on every frame. try changing the given values on the y axis and see how it affects the movement. conclusion everything is rendered properly and animating — congratulations on
building your first a-frame scene! here's how the final version looks and works: if you have a vr device available, now is a good time to try out your scene with it too. note: you can also check it out on github. that was easier than you thought, right? a-frame targets web developers by offering easy to use web markup and all the advantages that brings, such as javascript manipulation. it is eas...
Building Firefox with Debug Symbols
ac_add_options --enable-debug-symbols this can optionally take an argument for the type of symbols that need to be produced (like "-g3"). by default it uses "-g" on linux and macos. this value takes precedence over the flags set in moz_debug_flags note that this will override the values provided for cflags and cxxflags. ...
...default, a release
build of firefox will not generate debug symbols suitable for debugging or post-processing into the breakpad symbol format. use the following mozconfig settings to do a
build with symbols:
building firefox with symbols there is a single configure option to enable
building with symbols on all platforms. this is enabled by default so unless you have explcitly disabled it your
build you should include symbols. ac_add_options --enable-debug-symbols this can optionally take an argument for the type of symbols that need to be produced (like "-g3"). by default it uses "-g" on linux and macos. this value takes precedence over the flags set in moz_debug_flags note that this will override the values provided for cflags and cxxflags. ...
...see https://dxr.mozilla.org/mozilla/source/toolkit/crashreporter/tools/upload_symbols.sh for more information about the environment variables used by this target. ...
... take an argument for the type of symbols that need to be produced (like "-g3"). by default it uses "-g" on linux and macos. this value takes precedence over the flags set in moz_debug_flags note that this will override the values provided for cflags and cxxflags. breakpad symbol files after the
build is complete, run the following command to generate an archive of breakpad symbol files: mach
buildsymbols the tinderbox uses an additional uploadsymbols target to upload symbols to a socorro server. see https://dxr.mozilla.org/mozilla/source/toolkit/crashreporter/tools/upload_symbols.sh for more information about the environment variables used by this target. make package if you use make package to package your
build, symbols will be stripped. if you want to keep the symbols in the patches...
Build - Archive of obsolete content
grab the latest release source code from mozilla's ftp site. extract the source code, and you should have a directory called mozilla/. change directory into mozilla/ and checkout the latest prism code : cd mozilla/ svn co http://svn.mozilla.org/projects/webrunner/trunk prism create a file called .mozconfig make sure it is in the mozilla/ directory. ...
...reate a file called .mozconfig make sure it is in the mozilla/ directory. the contents of the file should look something like this : mk_add_options moz_co_project=xulrunner mk_add_options moz_objdir=@topsrcdir@/mozilla-obj ac_add_options --enable-application=xulrunner ac_add_options --disable-debug ac_add_options --enable-optimize ac_add_options --disable-tests ac_add_options --disable-javaxpcom
build xulrunner : make -f client.mk
build once the
build is done, there will be a directory called mozilla-obj. go into the prism/ directory and create a .mozconfig file mk_add_options moz_objdir=@topsrcdir@/mozilla-obj/prism ac_add_options --with-libxul-sdk=../dist ac_add_options --enable-application=prism you need to define an environment variable to point the
build to the new .mozconfig. this var...
...onfig file mk_add_options moz_objdir=@topsrcdir@/mozilla-obj/prism ac_add_options --with-libxul-sdk=../dist ac_add_options --enable-application=prism you need to define an environment variable to point the
build to the new .mozconfig. this variable is called mozconfig export mozconfig=$pwd/.mozconfig #this should point to mozilla/prism/.mozconfig go back to the mozilla/ directory and do another
build, this time, prism will get built cd ../ make -f client.mk
build congratulations, you have just built prism. you can now find the executable in mozilla-obj/prism/dist/bin/prism. if you want to create a package, go to mozilla-obj/prism and call make package you will find the package in dist/ ...
Building accessible custom components in XUL - Archive of obsolete content
introduction dhtml accessibility is a new technology which enables developers to construct accessible controls within (x)html pages. developers have been doing this for some time, but the resulting controls were never as accessible as similar controls in desktop applications. assistive technologies could only see the generic html markup used to
build the control; they had no way of knowing that a particular collection of div and span elements should be treated as a single cohesive control (such as a tab bar or a treeview). by implementing dhtml accessibility techniques, web developers can declare that generic html elements are really acting as specific gui controls (such as a treeitem within a treeview). firefox 1.5 is the first browser to support dhtml accessibility; it maps the declar...
...sibility; it maps the declarations within the html page to the underlying accessibility architecture so that assistive technologies can "read" a web page and know how to present these complex controls to the end user. this has all been well-documented for some time. however, it is less well-known that the same dhtml accessibility techniques can be applied to xul, mozilla's xml markup language for
building user interfaces. (the firefox interface itself is built in xul, as well as the graphical interface presented by firefox extensions.) xul itself has a much richer set of built-in controls than html. there is generally no need to
build your own xul tab bar or treeview. firefox ships with a tabbox element and a tree element, and these elements are fully accessible out-of-the-box. however, if you ...
...user interfaces. (the firefox interface itself is built in xul, as well as the graphical interface presented by firefox extensions.) xul itself has a much richer set of built-in controls than html. there is generally no need to
build your own xul tab bar or treeview. firefox ships with a tabbox element and a tree element, and these elements are fully accessible out-of-the-box. however, if you are
building custom controls in xul, you may need to use dhtml accessibility techniques to ensure that your custom controls are equally accessible. a super-simple spreadsheet download stage-1.zip install stage-1.xpi to
build our xul spreadsheet, we'll use three built-in xul controls: a single grid element to contain the other elements and position them in rows and columns. description elements for each ...
Building the WebLock UI
it uses xul, which is an xml language that gecko knows how to render as user interface, but it also interacts with particular parts of the mozilla user interface, where it must install itself as an extension to the ui. ...
...it uses xul, which is an xml language that gecko knows how to render as user interface, but it also interacts with particular parts of the mozilla user interface, where it must install itself as an extension to the ui. ...
...ivided up into a couple of different sections. the second section, xul, describes the xml-based user interface language (xul) and how you can use it to create a dialog that provides access to the weblock component and its services. the third section, overlaying new user interface into mozilla, describes how to create an overlay into the browser that will make this dialog accessible from a mozilla
build. the overlay section, where we discuss how to import scripts, images, and other resources from mozilla into your own ui, is by far the more complicated of the two. if the weblock component is being installed in mozilla or another gecko-based browser, then this third section shows you how to create the entry point in the browser for controlling the web locking. if you are planning on deploying th...
Chapter 3: Introduction to XUL—How to build a more intuitive UI - Archive of obsolete content
the contribute page. « previousnext » this document was authored by hiroshi shimoda of clear code inc. and was originally published in japanese for the firefox developers conference summer 2007. shimoda-san is a co-author of firefox 3 hacks (o'reilly japan, 2008). before you learn how to develop extensions, let's learn about xul, the xml-based user-interface language, which is one of the
building blocks for extensions. introduction an overview of xul xul is an xml-based language, and was developed to be the gui markup language for the mozilla browser. there are earlier experiments going back a long way in developing user interfaces using a combination of html and scripting languages, and xul could be considered an evolutionary step from that. similar approaches are found in xaml, wh...
...d in xul—in practice, the browser element is used more often. the browser element is essentially a more powerful version of an inline frame, equipped with all the basic functions of a web browser. unlike an iframe, a browser element has the ability to navigate backward and forward through pages and includes the ability to prevent scripts in embedded frames from accessing outside the frame. for
building applications linked to external web pages, this is a more secure and more convenient approach. the tabbrowser element is even more capable than the browser element because it includes the basic tab-handling features from firefox. to use this requires xpconnect privileges, the same as autocomplete does; this will be covered in chapter 4. opening a page if you specify a uri value for the src ...
Chapter 5: Let's build a Firefox extension - Archive of obsolete content
refox developers conference summer 2007. gomita-san won "most useful upgraded extension" award in mozilla's 2006 "extend firefox" competition for scrapbook, and was runner-up in the "extend firefox 2" contest for firegestures. the chapters so far have each focused on technologies in isolation—xul, javascript, css, and xpcom. in this chapter, we’ll discuss how to put them together to actually
build an extension. an easier method of
building a firefox/thunderbird addon for developers who are well-acquainted with ides like netbeans, eclipse, etc. is to use netbeans (ide from sun microsystems) and foxbeans (plugin for netbeans, by teesoft). setting up your development environment in order to develop (and test) extensions in a most convenient way it is recommended to apply some changes to f...
... manager and click the “preferences” button to bring up the preference panel. try changing the preferences, and see if those changes are reflected when you restore or delete sessions. phase 4: xpi packaging this procedure is unchanged from phase 5 in the “developing a simple extension” section, but take note of everything within the defaults folder. conclusion we’ve looked at how to
build extensions at an extremely basic level in this chapter, and there are a lot of other interesting features to explore in extensions and xul. but i hope that having gotten your feet wet with extensions development, you’ll want to dive in now. operations checks on revised source files in the interest of developing extensions efficiently, you want to minimize the number of steps between revising ...
Appendix E: DOM Building and Insertion (HTML & XUL) - Archive of obsolete content
many add-ons need to dynamically generate dom content, either xul or html, from their scripts. for security reasons, and to prevent errors, care needs to be taken to avoid evaluating arbitrary text as html. failure to do so can lead to execution or remote scripts, and in the worst cases to privilege escalation which can leave a user's pc open to remote attack.
building dom trees in most cases, dom trees should be built exclusively with dom creation methods. the following methods will all safely create a dom tree without risk of remote execution. json templating jsontodom.namespaces = { html: "http://www.w3.org/1999/xhtml", xul: "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" }; jsontodom.defaultnamespace = jsontodom.namespaces.html; function jsontodom(jsontemplate, ...
...in most cases, .text() should be used instead of the latter. when using the jquery constructor, only empty tags should be specified in order to avoid invoking the dom parser. var href = "http://www.google.com/"; var text = "google"; $("body").append( $("<div>", { ...
Building up a basic demo with the PlayCanvas engine - Game development
ity and component system, advanced graphics manipulation, collision and physics engine (built with ammo.js), audio, and facilities to handle control inputs from various devices (including gamepads). that's quite an impressive list of features — let's see some in action. we will try putting together a simple demo first — a cube rendered on the screen. if you have already worked through our
building up a basic demo with three.js article (or you are familiar with other 3d libraries) you'll notice that playcanvas works on similar concepts: camera, light and objects. environment setup to start developing with playcanvas, you don't need much. you should start off by: making sure you are using a modern browser with good webgl support, such as the latest firefox or chrome. creating a dire...
...r. try changing the value to see how it affects the animation. 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. now you know the basics of playcanvas engine; happy experimentation! summary now you can continue reading the playcanvas editor article, go back to the
building up a basic demo with playcanvas page, or go back a level higher to the main 3d games on the web page. ...
JavaScript building blocks - Learn web development
ing is functions. functions allow you to store a piece of code that does a single task inside a defined block, and then call that code whenever you need it using a single short command — rather than having to type out the same code multiple times. in this article we'll explore fundamental concepts behind functions such as basic syntax, how to invoke and define functions, scope, and parameters.
build your own function with most of the essential theory dealt with previously, this article provides a practical experience. here you'll get some practice with
building up your own custom function. along the way, we'll also explain some further useful details of dealing with functions. function return values the last essential concept you must know about a function is return values. some functions...
... button on a webpage, you might want to respond to that action by displaying an information box. in this final article we will discuss some important concepts surrounding events, and look at how they work in browsers. assessments the following assessment will test your understanding of the javascript basics covered in the guides above. image gallery now that we've looked at the fundamental
building blocks of javascript, we'll test your knowledge of loops, functions, conditionals and events by
building a fairly common item you'll see on a lot of websites — a javascript-powered image gallery. ...
Building SpiderMonkey with UBSan
llvm_root to point to your installation. #! /bin/sh if [ -z $1 ] ; then echo "usage: $0 <dirname>" elif [ -d $1 ] ; then echo "directory $1 already exists" else autoconf2.13 autoconf213 mkdir $1 cd $1 llvm_root="$home/llvm" sanflag="-fsanitize=undefined -fno-sanitize=alignment,float-cast-overflow,float-divide-by-zero,vptr -dxmalloc=myxmalloc" \ cc="$llvm_root/
build/release+asserts/bin/clang" \ cxx="$llvm_root/
build/release+asserts/bin/clang++" \ cflags="$sanflag" \ cxxflags="$sanflag" \ moz_llvm_hacks=1 \ ../configure --enable-debug --disable-optimize make -j 8 fi 3. use the script to compile spidermonkey. this enables all the cheap undefined behavior checks other than: alignment, which hits known bugs in spidermonkey, and...
...tr, a check that requires rtti, which is disabled by default in spidermonkey 4. when you hit a bug and want a stack trace, run under gdb with a breakpoint at the end of __ubsan::diag::~diag(). the stack trace should show a function such as __ubsan_handle_load_invalid_value or __ubsan_handle_type_mismatch being called by the buggy c++ code. (for automated testing outside of gdb, you can instead
build with -fsanitize=undefined-trap -fsanitize-undefined-trap-on-error, but then you lose ubsan's diagnostics and the ability to continue past errors.) known bugs. please file new bugs with e.g. [-fsanitize=float-cast-overflow] in the status whiteboard. ...
How to add a build-time test
standalone executables to add a test that is written in c or c++ and which is called as a standalone executable, a few things must be done. ...
...ings must be done. for standalone executables, if one sets up the right variables, then the rules.mk file will do lots of magic and most of the heavy lifting. a simple example of adding a test is in . note that the following variables are supplied by the rules.mk file: cppsrcs, simple_programs, run_test_program. xpcshell tests here are the simple guidelines for adding an xpcshell test to the
build system. for now, enclose your test-related code (in the makefile) with ifdef enable_tests run the test program from the "check" target in the makefile. (example to run the testcookie program) in the test program: if the test fails, exit with a non-zero status and/or print the string "fail" to stdout if the test passes, exit with a zero status and don't print the string "fail" (...
Build Metrics
"
build metrics" is a catch-all term for performance measures that are generated by the firefox
build system and tracked by perfherder. num_constructors number of static constructors found by the compiler in the firefox c++ codebase. lower is better. static constructors are undesirable because their initialization imposes an unavoidable time penalty every time firefox is started. installer size size in bytes of the firefox installer. lower is better here, especially on space-restricted platforms like android.
build times amount of time it takes to
build firefox in automation on a specific platform / configuration. lower is better. compiler warnings number of compiler warnings detected during a
build. lower is better. ...
...very time firefox is started. installer size size in bytes of the firefox installer. lower is better here, especially on space-restricted platforms like android.
build times amount of time it takes to
build firefox in automation on a specific platform / configuration. lower is better. compiler warnings number of compiler warnings detected during a
build. lower is better. due to the way the
build system works, compiler warnings are not consistently detected. so the value may fluctuate from
build to
build even if the number of compiler warnings didn't actually change. since perfherder alerts are calculated based on the mean value of a range, a regression may be reported as a fractional value. ...
Building and installing NSS
this chapter describes how to
build and install nss. ...
... this chapter describes how to
build and install nss. ...
How to build an XPCOM component in JavaScript
g the typelib your interface definition must be compiled into a binary format (xpt) in order to be registered and used within mozilla applications. the compilation can be done using the gecko sdk. you can learn how to get mac, linux, and windows versions of the gecko sdk by reading the article gecko sdk. for code outside the tree note: on windows if you download the gecko sdk without the whole
build tree, you will be missing some required dlls for xpidl.exe and it will run with no errors but not do anything. to fix this download the mozilla
build tools for windows and copy the dlls from windows\bin\x86 within the zip into the bin directory of the gecko sdk. note: the mac version of the sdk provided for download is powerpc-only. if you need an intel version, you'll need to compile it yoursel...
... note: on windows you must use forward slashes for the include path. note: (the -i flag is an uppercase i, not a lowercase l.) this will create the typelib file helloworld.xpt in the current working directory. for a new component in firefox/thunderbird/b2g if you are adding a new feature to applications in the mozilla-central repository, you can create a makefile listing the idl files and the
build system will automatically generate the typelib. a sample makefile.in # this source code form is subject to the terms of the mozilla public # license, v. 2.0. if a copy of the mpl was not distributed with this # file, you can obtain one at http://mozilla.org/mpl/2.0/. depth = @depth@ topsrcdir = @top_srcdir@ srcdir = @srcdir@ vpath = @srcdir@ include $(depth)/config/autoconf.mk # module specif...
Building an Account Manager Extension
extension.prototype = { name : "devmo-account", chromepackagename : "example@mozilla.org", showpanel: function(server) { //this panel is only shown for imap accounts... if (server.type == \"imap\") return true; return false; }, queryinterface: xpcomutils.generateqi([ components.interfaces.nsimsgaccountmanagerextension ]) } step 2:
building a component we convert the interface to a xpcom component and register it in the component manager as account manager extension. therefore we add the following code to the previous. the javascript file has to be saved either in the extension's or thunderbird's component directory. // define the contract information needed for this component... // ... the unique component identifier (change ...
...nel step4: the new panel and javascript the javascript for an account manager panel needs to implement at least the following functions. these functions are invoked by the account manager. function onpreinit(account, accountvalues) { } function oninit(pageid, serverid) { } function onaccepteditor() { } function onsave() { } function updatepage() {} step5: putting it all together // todo
build an demo extension for this tutorial... how to
build an xpcom component in javascript ...
Building a Thunderbird extension 1: introduction
xpcom cross-platform component object model. similar to firefox, thunderbird functionality can be enhanced and customized via extensions. warning: this content is for older versions of thunderbird. much of it may no longer be relevant. see developer.thunderbird.net for newer information. this tutorial will introduce you to the components of a thunderbird extension and will show you how to
build your own. 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...
...) adding javascript (explains how to add some simple javascript to your thunderbird extension) installing locally (enabling the extension on your local thunderbird instance) packaging (making a distribution package that contains the extension) distributing (from your own site or from http://addons.mozilla.org/) this tutorial is compatible with thunderbird versions 2,3 and 5. all thunderbird
builds are available from the ftp site. references and resources tools and helper extensions there are many tools available that help with developing thunderbird extensions. at a minimum you will need: text editor: any editor that is capable of writing plain text can be used to write extensions. however, most developers use an editing program optimized for writing code (also known as an integrate...
BlobBuilder - Web APIs
the blob
builder interface provides an easy way to construct blob objects. just create a blob
builder and append chunks of data to it by calling the append() method. when you're done
building your blob, call getblob() to retrieve a blob containing the data you sent into the blob
builder. note: the blob
builder interface has been deprecated in favor of the newly introduced blob constructor. method overview void append(in arraybuffer data); void append(in blob data); void append(in string data, [optional] in string endings); blob getblob([optional] in domstring contenttype); file getfile(in domstring name, [optional] in domstring contenttype); methods append() appends the contents of the specified javascript object to the blob being built. ...
...blob object that has been constructed using the data passed through calls to append(). blob getblob( in domstring contenttype optional ); parameters contenttype optional the mime type of the data to be returned in the blob. this will be the value of the blob object's type property. return value a blob object containing all of the data passed to any calls to append() made since the blob
builder was created. this also resets the blob
builder so that the next call to append() is starting a new, empty blob. getfile() returns a file object. file getfile( in domstring name, [optional] in domstring contenttype ); parameters name the file name. contenttype optional the mime type of the data to be returned in the file. this will be the value of the file object's type property.
Builder - Archive of obsolete content
the add-on
builder tool was retired on april 1, 2014. the add-on
builder was a web-based development environment that allowed developers to create add-ons using the sdk apis, but without needing to use the jpm command line tool. it was retired on april 1, 2014, and the "
builder.addons.mozilla.org" domain now redirects to this page. ...
Index - Archive of obsolete content
ent archive, landing here at mdn, we try to avoid outright deleting content that might be useful to people targeting legacy platforms, operating systems, and browsers. perhaps your target audience is people that are using older hardware, for example, and can't upgrade to the latest and greatest browsers. or for "reasons," your company is required to use very old software and you need to
build web content that runs on that software. or perhaps you're just curious about the history of an obsolete feature or api, and how it worked. 2 .htaccess ( hypertext access ) 301 redirect, cache control, custom error pages, htaccess, permanent redirect, redirect file accessing : htaccess files can be opened using any text editor, like windows notepad, vin, sublime text editor or...
... window: deviceproximity event sensors, events the deviceproximity event is fired when fresh data is available from a proximity sensor. 8 window: userproximity event sensors, events no summary! 9 add-ons add-ons, archive, extensions archived add-ons documentation. 10 add-on sdk add-on sdk, jetpack no summary! 11
builder no summary! 12 guides add-on sdk no summary! 13 content scripts add-on sdk many add-ons need to access and modify the content of web pages. but the main add-on code doesn't get direct access to web content. instead, sdk add-ons need to factor the code that gets access to web content into separate scripts that are called content scripts. this ...
... set of privileged low-level firefox apis. 71 console/plain-text constructor for a console instance. 72 console/traceback functionality similar to python's traceback module. 73 content/content re-exports three objects from three other modules: loader, worker, and symbiont. 74 content/loader provides one of the
building blocks for those modules that use content scripts to interact with web content, such as panel and page-mod. 75 content/mod provides functions to modify a page content. 76 content/symbiont used by sdk modules that can load web content and attach content scripts to it. 77 content/worker used in the internal implementation of sdk m...
...And 67 more matches
Eclipse CDT Manual Setup
ns in order that the eclipse cdt page isn't hugely cluttered with mostly redundant information, make setting up eclipse look much more complicated than it is nowadays. setup time some points in the rest of this document below are old and taken care of by the mach commands described above (although some of the project configuration is not done automatically yet). some of it like the section on
building the index and usage tips are still relevant, and other parts still may provide useful background information to understand it in more detail on how eclipse works. you can expect it to take an hour or so to work through these instructions if you're doing so for the first time. (this assumes that you already have a copy of the mozilla source, and that you have also built the source so that yo...
...ide useful background information to understand it in more detail on how eclipse works. you can expect it to take an hour or so to work through these instructions if you're doing so for the first time. (this assumes that you already have a copy of the mozilla source, and that you have also built the source so that you have a pre-existing object directory. if that is not the case, then get your
build going now so that it can be running while you continue with the instructions below. faq: wait, why does eclipse need an object directory?) code assistance out of the box, eclipse can provide some code assistance for the mozilla source, but it will be incomplete and often just plain broken. if you set up eclipse as detailed below, you will experience much better results. important background t...
... follow (and so that you can modify them to meet your own needs if necessary), this section provides some background on what ides need in order to provide advanced code assistance, and what eclipse cdt needs in particular. to be able to provide really good code assistance for a project's source code, ides like eclipse need to carry out a thorough static analysis of the project's source files, to
build up a picture of the code (what eclipse is trying to do when it "indexes" the source.) static analysis involves parsing the source files, so naturally it can only produce good results if it has a sensible set of preprocessor defines, include paths and pre-include files for each source file. since eclipse doesn't initially have any of this information, the code assistance that it's able to provide ...
...And 35 more matches
Index - Learn web development
arning area is designed to provide answers to common questions that may come up, which are not necessarily part of the structured core learning pathways (e.g. the html or css learning articles.) these articles are designed to work on their own. 15 how can we design for all types of users? accessibility, beginner, design, example, intro, mobile, needsactivelearning when you're
building a website, one top issue to consider is universal design: accommodating all users regardless of disability, technical constraints, culture, location, and so on. 16 how do i start to design my website? beginner, composing, needsactivelearning, needsschema when starting with a web project, many people focus on the technical side. of course you must be familiar with the techn...
... it, learn from it, and improve on it. you can do that with other people's code too! this article provides a basic guide to publishing content using github's gh-pages feature. 18 how do you host your website on google app engine? beginner, google app engine, google cloud platform, guide, host, learn, web, publish, website google app engine is a powerful platform that lets you
build and run applications on google’s infrastructure — whether you need to
build a multi-tiered web application from scratch or host a static website. here's a step-by-step guide to hosting your website on google app engine. 19 how do you make sure your website works properly? beginner, document, guide, needsactivelearning, web, web development, webmechanics, troubleshooting s...
... there are a few basic terms you need to understand at the outset, since you'll hear these expressions all the time as you read on. it's easy to confuse these terms sometimes since they refer to related but different functionalities. in fact, you'll sometimes see these terms misused in news reports and elsewhere, so getting them mixed up is understandable! 33 what software do i need to
build a website? beginner, needsactivelearning, webmechanics you can download most of the programs you need for web development for free. we'll provide a few links in this article. 34 what text editors are available? beginner, composing, guide, tools, text editor a website consists mostly of text files, so for a fun, pleasant development experience you should choose your ...
...And 28 more matches
Eclipse CDT
m, although this will drop to just over 1 gb if you restart after indexing is complete). therefore, it is not recommended for use if your machine only has 4 gb of ram. installing eclipse regarding llvm4eclipsecdt, do not install or select this toolchain for mozilla development. this plugin is intended mainly for managed projects but we use an unmanaged project for mozilla (since it has its own
build system). using this plugin will result in parts of the ui described below being hidden or disabled. download "eclipse ide for c/c++ developers" (not eclipse ide for enterprise java developers) from the eclipse download page, install it, and add the directory containing the eclipse binary to your path (/applications/eclipse.app/contents/eclipse/ on mac). (while package managers like snap someti...
...b and max heap space of 5 gb, say, by modifying the values of the following two lines in eclipse.ini: -xms1g -xmx5g if you fail to increase these limits, then you will likely find that eclipse either hangs when it tries to index the mozilla source or else that the code intelligence is very broken after the indexing "completes". express setup for the eclipse indexer to work well you must first
build mozilla, so that it includes headers from the objdir etc. these can be found and processed by eclipse. note: your moz_objdir must be outside the mozilla source directory. once your
build is complete, mach can then generate a useful eclipse project on your behalf. first, make sure that the directory of eclipse's eclipse binary (typically /applications/eclipse.app/contents/macos/ on macos) is i...
... manual setup, and more more information can be found on the eclipse cdt manual setup page. ...
...And 27 more matches
Introduction to automated testing - Learn web development
of work, doesn't it? we agree — testing all the things we've looked at in previous articles manually can be a real pain. fortunately, there are tools to help us automate some of this pain away. there are two main ways in which we can automate the tests we've been talking about in this module: use a task runner such as grunt or gulp, or npm scripts to run tests and clean up code during your
build process. this is a great way to perform tasks like linting and minifying code, adding in css prefixes or transpiling nascent javascript features for maximum cross-browser reach, and so on. use a browser automation system like selenium to run specific tests on installed browsers and return results, alerting you to failures in browsers as they crop up. commercial cross-browser testing apps like la...
...a task runner to access a service like sauce labs, or lambdatest via an api, run cross browser tests, and return results. we will look at this below as well. using a task runner to automate testing tools as we said above, you can drastically speed up common tasks such as linting and minifying code by using a task runner to run everything you need to run automatically at a certain point in your
build process. for example, this could be every time you save a file, or at some other point. inside this section we'll look at how to automate task running with node and gulp, a beginner-friendly option. setting up node and npm most tools these days are based on node.js, so you'll need to install it from nodejs.org: download the installer for your system from the above site. (if you already have ...
...a dependency to your project. if you look in your project's package.json file, you'll see an entry for it in the devdependencies property. add the following dependency to gulpfile.js: const htmltidy = require('gulp-htmltidy'); add the following test to the bottom of gulpfile.js: function html(cb) { return gulp.src('src/index.html') .pipe(htmltidy()) .pipe(gulp.dest('
build')); cb(); } here we are grabbing our development index.html file with gulp.src(), which allows us to grab a source file to do something with. we next use the pipe() function to pass that source to another command to do something else with. we can chain as many of these together as we want. we first run htmltidy() on the source, which goes through and fixes errors in our file. the second...
...And 22 more matches
Deploying our app - Learn web development
study, focusing on deploying the app. post development there's potentially a large range of problems to be solved in this section of the project's lifecycle. as such, it's important to create a toolchain that handles these problems in a way that requires as little manual intervention as possible. here's just a few things to consider for this particular project: generating a production
build: ensuring files are minimised, chunked, have tree-shaking applied, and that versions are "cache busted". running tests: these can range from "is this code formatted properly?" to "does this thing do what i expect?", and ensuring failing tests prevent deployment. actually deploying the updated code to a live url: or potentially a staging url so it can be reviewed first. note: cache busting is...
...y deploying the updated code to a live url: or potentially a staging url so it can be reviewed first. note: cache busting is a new term that we haven't met before in the module. this is the strategy of breaking a browser's own caching mechanism, which forces the browser to download a new copy of your code. parcel (and indeed many other tools) will generate filenames that are unique to each new
build. this unique filename "busts" your browser's cache, thereby making sure the browser downloads the fresh code each time an update is made to the deployed code. the above tasks also break down into further tasks; note that most web development teams will have their own terms and processes for at least some part of the post-development phase. for this project, we're going to use netlify's wonderf...
... but with services such as netlify bringing down the cost of deployments (both in financial terms and also the time required to actually deploy) it's possible to deploy during development to either share work in progress or to have a pre-release for some other purpose. netlify, amongst other things, also allows you to run pre-deployment tasks, which in our case means that all the production code
build processes can be performed inside of netlify and if the
build is successful, the website changes will be deployed. although netlify offers a drag and drop deployment service, we are intending to trigger a new deployment to netlify each time we push to a github repo. it's exactly these kinds of connected services that we would encourage you to look for when deciding on your own
build toolchain. ...
...And 22 more matches
nsIXULTemplateQueryProcessor
content/xul/templates/public/nsixultemplatequeryprocessor.idlscriptable a query processor takes a template query and generates results for it given a datasource and a reference point. there is a one-to-one relationship between a template
builder and a query processor. the template
builder creates the query processor, and there is no other means to retrieve it. 1.0 66 introduced gecko 1.9 inherits from: nsisupports last changed in gecko 1.9 (firefox 3) a query processor takes a template query and generates results for it given a datasource and a reference point. there is a one-to-one relationship between a template
builder and a query processor. the template
builder creates the query processor, and there is no other means to retrieve it. a template query is the ...
...sor takes a template query and generates results for it given a datasource and a reference point. there is a one-to-one relationship between a template
builder and a query processor. the template
builder creates the query processor, and there is no other means to retrieve it. a template query is the contents inside a <query> element within the template. the actual syntax is opaque to the template
builder and defined by a query processor. the query is expected to consist of either text or dom nodes that, when executed by a call to the generateresults() method, will allow the generation of a list of results. ...
...ssor, and there is no other means to retrieve it. a template query is the contents inside a <query> element within the template. the actual syntax is opaque to the template
builder and defined by a query processor. the query is expected to consist of either text or dom nodes that, when executed by a call to the generateresults() method, will allow the generation of a list of results. the template
builder will supply two variables, the reference variable and the member variable to further indicate what part of the datasource is to be examined in addition to the query itself. the reference is always a placeholder for the starting point and the member is always a placeholder for the end points (the results). the reference point is important when generating output recursively, as the query will be ...
...And 21 more matches
Setting up your own test automation environment - Learn web development
cross browser testing, and automated testing. 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. selenium selenium is the most popular browser automation tool. there are other ways, but the best way to use selenium is via webdriver, a powerful api that
builds on top of selenium and makes calls to a browser to automate it, carrying out actions such as "open this web page", "move over this element on the page", "click this link", "see whether the link opens this url", etc. this is ideal for running automated tests. how you install and use webdriver depends on what programming environment you want to use to write and run your tests. most popular enviro...
...windows, follow the instructions at how can i add a new folder to my system path? ok, let's try a quick test to make sure everything is working. ...
...n i add a new folder to my system path? ok, let's try a quick test to make sure everything is working. ...
...And 19 more matches
HTML parser threading
historical reasons, it also contains unrelated fragment parsing code that should be refactored into a separate class in due course.) nshtml5streamparser contains the code for dealing with data from the network. nshtml5parser owns nshtml5streamparser. script-created parsers (i.e. parsers created using document.open()) don't have an nshtml5streamparser instance. nshtml5parser has one tokenizer/tree
builder pair for parsing data from document.write(). it also has another lazily initialized tokenizer/tree
builder for speculatively scanning the tail of document.write() data when the parser blocks without parsing the document.write() data to completion. nshtml5streamparser has one tokenizer/tree
builder pair for parsing data from the network. additionally, each nshtml5parser has an associated nshtml5...
...data if an encoding wasn't declared on the enclosing protocol (http) level. once a unicode decoder has been set up, dodataavailable passes the byte data to the decoder whose output is accumulated into a linked list of nshtml5owningutf16buffer objects. nshtml5owningutf16buffer objects are then passed to the tokenizer in sequence by the parseavailabledata() method. the tokenizer calls into the tree
builder which outputs nshtml5treeoperation objects (tree ops) into a queue. each tree op represents a small operation, such as element creation or appending a node into another, that can later be performed on the main thread. note that mtokenizermutex is being held by the parser thread for the entire time that the tokenizer runs. parseavailabledata() checks for parser termination or interruption from t...
...terruption indicators are guarded by a more narrowly scoped mterminatedmutex, so parseavailabledata() has the opportunity to receive an order to terminate or interrupt even while the parser thread is holding mterminatedmutex. the tree op queue is flushed to the main thread from time to time. there's a timer that calls timerflush() (which takes mtokenizermutex). tree ops from the queue in the tree
builder are moved to a tree op stage (nshtml5treeopstage). the staging queue is protected by a mutex. this way, the queues into which tree ops are produced and the queues from which they are consumed don't need to involve a mutex on each modification. it's more efficient to obtain a mutex only every once in a while when a whole bunch of tree ops is moved to or from the staging queue. after some tree op...
...And 18 more matches
Index - Archive of obsolete content
2 <statusbarpanel> deprecated, xul, xul elements, xul reference an individual element of a statusbar. this is a special type of button which is drawn differently. unlike normal buttons, a statusbarpanel can only have a label or an image but not both. ...
...developers have been doing this for some time, but the resulting controls were never as accessible as similar controls in desktop applications. assistive technologies could only see the generic html marku...
...ible custom components in xul accessibility, dhtml, xul dhtml accessibility is a new technology which enables developers to construct accessible controls within (x)html pages. developers have been doing this for some time, but the resulting controls were never as accessible as similar controls in desktop applications. assistive technologies could only see the generic html markup used to
build the control; they had no way of knowing that a particular collection of div and span elements should be treated as a single cohesive control (such as a tab bar or a treeview). 422 deprecated and defunct markup reference, xul {many elements on this page are wrongly marked as deprecated, this page needs review} 423 dynamically modifying xul-based user interface a...
...And 17 more matches
Setting Up a Development Environment - Archive of obsolete content
in regards to code editing, there's no official mozilla ide. on the other hand, extensions use the same (or similar) languages that are used for web development, so most text editors and ides are up to the task. ...
...commend you to give it a try. all of our examples are handled with komodo edit, so if you see a .kpf or .komodoproject file in an example you download, this is a komodo project file. we recommend git and github for source control, but any decent software configuration management system will do. to package xpi files, we use make. we chose make because this is the same system used by mozilla to
build firefox, and it is available for all operating systems. make is a default tool in most unix-based systems. it can be installed on mac os x as part of the xcode tools package, and on windows with cygwin. in cygwin installations you'll have to explicitly check the make and zip utilities from the long list of packages to download and install. also make sure that make is in the executable system pat...
...xplicitly check the make and zip utilities from the long list of packages to download and install. also make sure that make is in the executable system path. after setting up make, you should be able to open a command line window, run "make -ver", and get the installed version of make as output. ...
...And 15 more matches
mach
on 2.7. mach itself is python 3 compliant, but modules used by mach likely are not python 3 compliant - so stick to python 2.7. running from the root of the source tree checkout, you should just be able to type: $ ./mach if all is well, you should see a help message. of course, in a random dir you just get a cryptic error message to improve the experience. for full help: $ ./mach help try
building the tree: $ ./mach
build if you get error messages, make sure that you have all of the
build requisites for your system. if it works, you can look at compiler warnings: $ ./mach warnings-list try running the program: $ ./mach run try running your program in a debugger: $ ./mach run --debug try running some tests: $ ./mach xpcshell-test services/common/tests/unit/ or run an individ...
...ry, use that. if the mozconfig environment variable is set, use the file pointed to in that variable. if the current working directory mach is invoked with is inside an object directory, the mozconfig used when creating that object directory is used. the default mozconfig search logic is applied. here are some examples: # use an explicit mozconfig file. ...
...if the current working directory mach is invoked with is inside an object directory, the mozconfig used when creating that object directory is used. the default mozconfig search logic is applied. here are some examples: # use an explicit mozconfig file. $ mozconfig=/path/to/mozconfig ./mach
build # alternatively (for persistent mozconfig usage): $ export mozconfig=/path/to/mozconfig $ ./mach
build # let's pretend the mozconfig environment variable isn't set. ...
...And 15 more matches
ARIA Test Cases - Accessibility
e done in order to determine where to file a bug (browser or at). there are several purposes for providing this information: help browser vendors provide correct implementations help at vendors provide correct implementations inform authors as to what actually works reliably in general we're testing with the latest public releases. however, where things don't work we may test with nightly
builds if they are available, in order to show what is already fixed in upcoming releases. we can add more screen readers if people are willing to step up and provide test results for them. tested ua/at combinations: dragon 10 with firefox 3 and ie 8 beta 2 jaws 9 & 10 with firefox 3 jaws 9 & 10 with ie beta 2 nvda 0.6p2 with firefox 3 orca with firefox 3 window-eyes 7 with ie 8 beta 2 and fi...
... expected at behavior: when focus falls on a button, a screen reader speaks the text of the button plus alternative text of any images within the button (the accessible name of the button). the word "button" is also spoken before or after the accessible name. markup used: notes: results: at firefox ie opera safari ...
... indication is given that a button is pressed, or that it is pressed after activating it. - - - voiceover (leopard) n/a n/a - fail window-eyes - - - - nvda - n/a - - zoom (leopard) pass n/a pass pass zoomtext - - - - orca - - - - menu button dojo nightly
build expected at behavior: screen readers should indicate that this button has an associated menu. screen magnifiers should give indication (if this is not done visually anyway). when the button is pressed, the menu should be tracked like any other menu. when closing the menu, this should be indicated, and focus should be repeated for the menu button the menu was opened from, or the new focus ...
...And 15 more matches
JavaScript Daemons Management - Archive of obsolete content
ect optional methods (shortcuts). you could safely remove all or some of them, * depending on your needs. if you want to remove them and are using the daemon.safe subsystem you * should also remove the daemon.safe global object methods that require them. ...
... true; }; /* system not required daemon.safe global object methods */ /** * daemon.safe global object optional methods (shortcuts). you could safely remove all or some of * them, depending on your needs. ...
...daemon.safe global object methods */ /** * daemon.safe global object optional methods (shortcuts). you could safely remove all or some of * them, depending on your needs. ...
...And 14 more matches
RDF Modifications - Archive of obsolete content
eviousnext » one of the most useful aspects of using templates with rdf datasources is that when the rdf datasource changes, for instance a new triple is added, or a triple is removed, the template updates accordingly, adding or removing result output as needed. no extra code needs to be written to do this; it happens automatically. this involves a third type of observer involved in a template
builder, an nsirdfobserver, used to listen for modifications to the rdf datasource. naturally, this only applies to rdf queries. when the datasource is modified, the datasource will notify any observers of the change. the template
builder uses these notifcations to update the template as necessary based on the new or removed information. you don't need to implement this observer yourself, although you ...
...asource based on what has changed. when parsing, any triples that already exist are not added again. if a triple does not exist yet, it will be added. any triples that don't exist in the new data but were there before are removed. this means that the observer will be called only for the triples that differ between the new and old version of the data. if the reloaded datasource hasn't changed, the
builder won't receive any notifications. this saves a lot of extra work. the rdf observer also has two methods onbeginupdatebatch and onendupdatebatch. these are called when performing a lot of operations on a datasource. when changing the datasource, the changes are surrounded by begin and end batch calls. then, rather than notify on every change, the datasource will send one notification when the cha...
...ns. this saves a lot of extra work. the rdf observer also has two methods onbeginupdatebatch and onendupdatebatch. these are called when performing a lot of operations on a datasource. when changing the datasource, the changes are surrounded by begin and end batch calls. then, rather than notify on every change, the datasource will send one notification when the changes are finished. the template
builder then re
builds the template completely when done. this is useful when making a large amount of changes to avoid having to keep recalculating parts of the template that might change again quickly. adding rdf triples let's say we've just added the triple below to the datasource. subject: http://www.xulplanet.com/ndeakin/images/t/obelisk.jpg predicate: http://purl.org/dc/elements/1.1/descriptio...
...And 14 more matches
Introduction to client-side frameworks - Learn web development
ts, stream music, watch movies, and communicate with others over great distances instantaneously, with text, audio or video chat. the web allows us to do things that used to be possible only in native applications installed on our computers. these modern, complex, interactive websites are often referred to as web applications. the advent of modern javascript frameworks has made it much easier to
build highly dynamic, interactive applications. a framework is a library that offers opinions about how software gets built. these opinions allow for predictability and homogeneity in an application; predictability allows software to scale to an enormous size and still be maintainable; predictability and maintainability are essential for the health and longevity of software. javascript frameworks powe...
...coding principles. start learning ember angular angular is an open-source web application framework led by the angular team at google and by a community of individuals and corporations. it is a complete rewrite from the same team that built angularjs. angular was officially released on the 14th of september 2016. angular is a component-based framework which uses declarative html templates. at
build time, transparently to developers, the framework's compiler translates the templates to optimized javascript instructions. angular uses typescript, a superset of javascript that we’ll look at in a little more detail in the next chapter. vue evan you first released vue in 2014, after working on and learning from the original angularjs project. vue is the youngest of the big four, but has enjoy...
...remember that the application has to let the user to do all of these things through the browser, however, some cracks start to show. the real problem is this: every time we change our application’s state, we need to update the ui to match. we can examine the difficulty of this problem by looking at just one feature of our todo list app: rendering a list of tasks. the verbosity of dom changes
building html elements and rendering them in the browser at the appropriate time takes a surprising amount of code. let's say that our state is an array of objects structured like this: const state = [ { id: 'todo-0', name: 'learn some frameworks!' } ] how do we show one of those tasks to our user? we want to represent each task as a list item – an html <li> element inside of an unorder...
...And 14 more matches
Deployment and next steps - Learn web development
ploy your application and get it online, and also share some of the resources that you should go on to, to continue your svelte learning journey. prerequisites: at minimum, it is recommended that you are familiar with the core html, css, and javascript languages, and have knowledge of the terminal/command line. you'll need a terminal with node + npm installed to compile and
build your app. objective: learn how to prepare our svelte app for production, and what learning resources you should visit next. note that our application is fully functional and porting it to typescript is completely optional. there are different opinions about it, and in this chapter we will talk briefly about the pros and cons of using typescript. even if you are not planning...
...ial/08-next-steps or directly download the folder's content: npx degit opensas/mdn-svelte-tutorial/08-next-steps remember to run npm install && npm run dev to start your app in development mode. compiling our app so far we've been running our app in development mode with npm run dev. as we saw earlier, this instruction tells svelte to compile our components and javascript files into a public/
build/bundle.js file and all the css sections of our components into public/
build/bundle.css. it also starts a development server and watches for changes, recompiling the app and refreshing the page when a change occurs. your generated bundle.js and bundle.css files will be something like this (file size on the left): 504 jul 13 02:43 bundle.css 95981 jul 13 02:43 bundle.js to compile our applicat...
...f our components into public/
build/bundle.css. it also starts a development server and watches for changes, recompiling the app and refreshing the page when a change occurs. your generated bundle.js and bundle.css files will be something like this (file size on the left): 504 jul 13 02:43 bundle.css 95981 jul 13 02:43 bundle.js to compile our application for production we have to run npm run
build instead. in this case, svelte won't lunch a web server or keep watching for changes. it will however minify and compress our javascript files using terser. so, after running npm run
build, our generated bundle.js and bundle.css files will be more like this: 504 jul 13 02:43 bundle.css 21782 jul 13 02:43 bundle.js try running npm run
build in your app's root directory now. you might get a war...
...And 14 more matches
Getting started with Svelte - Learn web development
overview: client-side javascript frameworks next in this article we'll provide a quick introduction to the svelte framework. we will see how svelte works and what sets it apart from the rest of the frameworks and tools we've seen so far. 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. prerequisites: at minimum, it is recommended that you are familiar with the core html, css, and javascript languages, and have knowledge of the terminal/command line. svelte is a compiler that generates minimal and highly optimized javascript code from our sources; you'll need a terminal with node + npm installed to compile and
build your app. ...
...mended that you are familiar with the core html, css, and javascript languages, and have knowledge of the terminal/command line. svelte is a compiler that generates minimal and highly optimized javascript code from our sources; you'll need a terminal with node + npm installed to compile and
build your app. objective: to setup a local svelte development environment, create and
build a starter app, and understand the basics of how it works. svelte: a new approach to
building rich user interfaces svelte provides a different approach to
building web apps than some of the other frameworks covered in this module. while frameworks like react and vue do the bulk of their work in the user's browser while the app is running, svelte shifts that work into a compile step that ha...
... the outcome of this approach is not only smaller application bundles and better performance, but also a developer experience that is more approachable for people that have limited experience of the modern tooling ecosystem. ...
...And 14 more matches
Index - Web APIs
reference, string, text, utf-8, get, read the text() method in the blob interface returns a promise that resolves with a string containing the contents of the blob, interpreted as utf-8. 293 blob.type api, blob, dom, file, file api, format, mime, mime type, property, reference, type the type property of a blob object returns the mime type of the file. 294 blob
builder api, dom, dom reference, file api, obsolete, reference the blob
builder interface provides an easy way to construct blob objects. just create a blob
builder and append chunks of data to it by calling the append() method. when you're done
building your blob, call getblob() to retrieve a blob containing the data you sent into the blob
builder. 295 blobevent api, audio, blob...
... advanced, canvas, example, graphics, html, web 518 canvas tutorial canvas, graphics, guide, html, html5, intermediate, web this tutorial describes how to use the <canvas> element to draw 2d graphics, starting with the basics. the examples provided should give you some clear ideas what you can do with canvas, and will provide code snippets that may get you started in
building your own content. 519 advanced animations canvas, graphics, tutorial we are going to use a ball for our animation studies, so let's first draw that ball onto the canvas. the following code will set us up. 520 applying styles and colors canvas, graphics, html, html5, intermediate, tutorial up until now we have only seen methods of the drawing context. i...
...tecdatasection() creates a new cdata section node, and returns it. 880 document.createcomment() api, dom, method, reference createcomment() creates a new comment node, and returns it. 881 document.createdocumentfragment() api, dom, document, method, reference, createdocumentfragment creates a new empty documentfragment into which dom nodes can be added to
build an offscreen dom tree. 882 document.createelement() api, dom, document, method, reference, createelement in an html document, the document.createelement() method creates the html element specified by tagname, or an htmlunknownelement if tagname isn't recognized. 883 document.createelementns() api, dom, method, reference creates an element with the specifi...
...And 14 more matches
Index of archived content - Archive of obsolete content
.htaccess ( hypertext access ) 2015 mdn fellowship program api navigator navigator.moznotification add-ons add-on sdk
builder guides content scripts communicating with other scripts communicating using "port" communicating using "postmessage" cross-domain content scripts interacting with page scripts loading content scripts reddit example port self ...
...source for xul applications windows xml-related code snippets xml:base support in old browsers xpath getattributens common pitfalls communication between html and your extension creating custom firefox extensions with the mozilla
build system custom about: urls default preferences deploying a plugin as an extension developing add-ons displaying web content in an extension without security issues downloading json and javascript in extensions enhanced extension installation extension etiquette extension library extension packaging ...
...nu for form controls overlay extensions firefox addons developer guide appendix: what you should know about open-source software licenses chapter 1: introduction to extensions chapter 2: technologies used in developing extensions chapter 3: introduction to xul—how to
build a more intuitive ui chapter 4: using xpcom—implementing advanced processes chapter 5: let's
build a firefox extension chapter 6: firefox extensions and xul applications license and authors xul school tutorial adding events and commands adding too...
...And 13 more matches
JXON - Archive of obsolete content
eing added to it, prevents existing properties from being removed and prevents existing properties, or their enumerability, configurability, or writability, from being changed. in essence the object tree is made effectively immutable. this is a possible technique if you know the structure of the xml document. reverse algorithms it is possible to reverse the algorithms proposed here in order to
build a new xml document starting from a javascript objects tree. for simplicity, we will propose here a single example, which in a single method represents the inversion of all our algorithms. /*\ |*| |*| jxon snippet #5 mdndeveloper network |*| |*| https://developer.mozilla.org/docs/jxon |*| https://developer.mozilla.org/user:fusionchess |*| |*| this framework is released under the gnu public li...
...xist, are converted into strings through the togmtstring() method. nothing prohibits the use of any other conversion method. in addition, all properties of the tree with a true value will be converted into empty elements with no text nodes (see the code considerations). this is a good solution if you want to automate the creation of an xml document. it is a bad choice, however, if you want to re-
build an xml document previously converted into json. although the bidirectional conversion is very faithful (except for cdatasection nodes, which will be converted into text nodes), the process is unnecessarily costly. in fact, if your goal is to edit an xml document, it is strongly recommended to work on it rather than create new ones. the parker convention the functions listed above for the conver...
... ochild.appendchild(oxmldoc.createtextnode(vvalue.tostring())); } oparentel.appendchild(ochild); } } } /* uncomment the following code if you want to enable the .appendjxon() method for *all* the "element" objects! ...
...And 13 more matches
Template and Tree Listeners - Archive of obsolete content
« previousnext » there are several listeners (or observers) used during the template
build process, each used for different purposes. these each implement a different xpcom interface, as listed below: nsixul
builderlistener - used to listen to template re
builds. nsixultree
builderobserver - used to listen to particular tree operations. nsirdfobserver - for rdf datasources, used to listen to changes in the underlying rdf datasource. listening for template re
builds the first of these is the simplest and involves two methods, willre
build and didre
build. ...
...erobserver - used to listen to particular tree operations. nsirdfobserver - for rdf datasources, used to listen to changes in the underlying rdf datasource. listening for template re
builds the first of these is the simplest and involves two methods, willre
build and didre
build. you would implement this object with these two methods if you wish to be notified when the template is rebuilt using the
builder's re
build call. the template
builder might also force a re
build when the underlying data change notifications require it. ...
...d when the template is rebuilt using the
builder's re
build call. the template
builder might also force a re
build when the underlying data change notifications require it. the primary use of this listener is to store some state before the template is rebuilt and restore it afterwards. recall that when a template is rebuilt, all of the existing content will be removed and generated fresh. the willre
build method of any listeners will be called before the content is removed, and didre
build method will be called when the content has been regenerated. this listener will also work for tree
builders, and will call the appropriate methods before and after the tree has been generated. to assign a
builder listener to a
builder, use the addlistener method. ...
...And 13 more matches
Mozilla release FAQ - Archive of obsolete content
nts of reworking things. to start understanding the issues with this example, you should dig up the rfcs for the relevant protocols, any documents written on the subject, etc. ...
...g the issues with this example, you should dig up the rfcs for the relevant protocols, any documents written on the subject, etc. ...
... example, you would want to go look at relevant topics stuart cheshire's discussion on latency versus bandwidth internet -- under the covers (by me) the rfc for http the w3's html 4.0 definition
building mozilla i get x error when trying to
build mozilla - what's wrong? first, make sure that you have the latest release of the mozilla source. secondly, ensure that you have fully read the
build instructions for your platform. these instructions are included in the source tree, and are also available on the mozilla website: detailed
build instructions: unix/x win32 mac if your version of make chokes on the makefiles (on unix), you might not be using gnu make. grab the latest version of gnu make from the gnu ftp site. regarding shells, i would like to recommend the following: if y...
...And 13 more matches
Index - MDN Web Docs Glossary: Definitions of Web-related terms
page tags and summary 1 mdn web docs glossary: definitions of web-related terms beginner, definitions, dictionary, glossary, index, landing, terminology web technologies contain long lists of jargon and abbreviations that are used in documentation and coding. this glossary provides definitions of words and abbreviations you need to know to successfully understand and
build for the web. 2 404 glossary, http errors, infrastructure, navigation a 404 is a standard response code meaning that the server cannot find the requested resource. 3 502 502, bad gateway, glossary, http errors, infrastructure, navigation an http error code meaning "bad gateway". 4 alpn alpn, draft, glossary, needscontent, tls applicati...
...andard code for information interchange) is one of the most popular coding method used by computers for converting letters, numbers, punctuation and control codes into digital form. since 2007, utf-8 superseded it on the web. 9 atag atag, accessibility, authoring tool accessibility guidelines, glossary atag (authoring tool accessibility guidelines) is a w3c recommendation for
building accessible-authoring tools that produce accessible contents. 10 abstraction abstraction, coding, codingscripting, glossary, programming language abstraction in computer programming is a way to reduce complexity and allow efficient design and implementation in complex software systems. it hides the technical complexity of systems behind simpler apis. 11 accessibi...
... flash is an obsolescent technology developed by adobe for viewing expressive web applications, multimedia content, and streaming media. adobe flash can run from supporting web browsers via a browser plug-in. 14 ajax ajax, codingscripting, glossary, infrastructure, l10n:priority ajax, which initially stood for asynchronous javascript and xml, is a programming practice of
building complex, dynamic webpages using a technology known as xmlhttprequest. 15 algorithm codingscripting, glossary an algorithm is a self-contained series of instructions to perform a function. 16 alignment container alignment container, css, glossary, alignment the alignment container is the rectangle that the alignment subject is aligned within. this is de...
...And 13 more matches
Index
e implementation of nsifactory is needed. here is the interface, and a description of its use.</t> 10 how to pass an xpcom object to a new window needsexample, needshelp if you want to be able to call functions within an xpcom object from a xul window's code, you can do so if you pass the xpcom object as one of the arguments to the window creation method. 11 how to
build a binary xpcom component using visual studio add-ons, extensions, xpcom this is a simple tutorial for
building xpcom objects in c++ using visual studio. xpcom is mozilla’s cross platform component object model, similar to microsoft’s com technology. xpcom components can be implemented in c, c++, and javascript, and can be used from c, c++, and javascript. that means you can call jav...
...l of everything written down about nscomptr. if you have a question about nscomptr, and this document doesn't answer it, there probably isn't a document that answers it. you'll have to turn to the xpcom newsgroup or another experienced nscomptr user, or find the answer by experimentation. 80 frequently asked questions xpcom this section will help you if you're fixing a broken
build, or have what you think is a quick obvious question, and you don't have time to read the reference manual. this faq usually just refers back directly to the appropriate answer, there. if you're looking here just to learn about nscomptrs, you'll get a better introduction in the getting started guide. 81 getting started guide xpcom an nscomptr is an owning reference. whatever i...
...comptr, the nscomptr automatically always releases its old referent, if any, and (unless you tell it you already have) addrefs the new. 82 reference manual xpcom this section will help you if you're already familiar with nscomptr but you need details. if you've never use nscomptrs before, you might want to read the getting started guide first. if you're trying to fix a broken
build, the faq might lead you to the answer more quickly. 83 status, recent changes, and plans xpcom no summary! 84 using nsiclassinfo xpcom if you use a c++ class which implements nsiclassinfo from javascript, then you don't have to explicitly call queryinterface on the javascript object to access the object's interfaces. 85 using nsidirectoryservic...
...And 13 more matches
3D games on the Web - Game development
you can generate and render dynamic 3d graphics with javascript that is hardware accelerated. documentation and browser support the webgl project documentation and specification is maintained by the khronos group, not the w3c as with most of the web apis. ...
...the web apis. support on modern browsers is very good, even on mobile, so you don't have to worry about that too much. the main browsers are all supporting webgl and all you need to focus on is optimizing the performance on the devices you use. there's an ongoing effort on releasing webgl 2.0 (based on opengl es 3.0) in the near future, which will bring many improvements and will help developers
build games for the modern web using current, powerful hardware. explaining the basic 3d theory the basics of 3d theory centers around shapes represented in a 3d space, with a coordinate system being used to calculate their positions. see our explaining basic 3d theory article for all the information you need. advanced concepts you can do a lot more with webgl. there are some advanced concepts whic...
... from: 2d collision detection 3d collision detection webxr the concept of virtual reality is not new, but it's storming onto the web thanks to hardware advancements such as the oculus rift, and the (currently experimental) webxr api for capturing information from vr and ar hardware and making it available for use in javascript applications. for more, see webxr device api. there's also the
building up a basic demo with a-frame article showing you how easy it is to
build 3d environments for virtual reality using the a-frame framework. the rise of libraries and frameworks coding raw webgl is fairly complex, but you'll want to get to grips with it in the long run, as your projects get more advanced (see our webgl documentation to get started.) for real-world projects you'll probably also ...
...And 12 more matches
Debugging on Mac OS X
this document explains how to debug mozilla-derived applications such as firefox, thunderbird, and seamonkey on macos using xcode. if you want to debug from the terminal see debugging mozilla with lldb. for specific information on a way to debug hangs, see debugging a hang on os x. creating a debuggable
build first, you need to
build the application you're going to debug using --disable-optimize--enable-debug-symbols in your .mozconfig (also add --enable-debug if you want assertions etc. compiled in). see
building firefox for macos if you need help creating your own
build. debugging firefox on macos 10.14+ macos 10.14 introduced notarization and hardened runtime features for improved application security. macos 10.15 went further, requiring applications to be notarized with hardened...
...uplifts to firefox 68 and esr 68 to enable notarization are planned. as a result, it is not possible to attach a debugger to these official firefox releases on macos 10.14+ without disabling system integrity protection (sip). ...
...firefox on macos 10.14+ macos 10.14 introduced notarization and hardened runtime features for improved application security. macos 10.15 went further, requiring applications to be notarized with hardened runtime enabled in order to launch (ignoring workarounds.) when run on earlier macos versions, notarization and hardened runtime settings have no effect. official
builds at this time, official
builds of firefox 69 and later are notarized. uplifts to firefox 68 and esr 68 to enable notarization are planned. as a result, it is not possible to attach a debugger to these official firefox releases on macos 10.14+ without disabling system integrity protection (sip). this is due to notarization requiring hardened runtime to be enabled with the com.apple.security.get-task-allow entitlement disallowe...
...And 12 more matches
NSS_3.12_release_notes.html
cket extension (rfc 5077) nss 3.12 is tri-licensed under the mpl 1.1/gpl 2.0/lgpl 2.1. note: firefox 3 uses nss 3.12, but not the new sqlite-based shareable certificate and key databases. we missed the deadline to enable that feature in firefox 3. distribution information the cvs tag for the nss 3.12 release is nss_3_12_rtm. nss 3.12 requires nspr 4.7.1. see the documentation section for the
build instructions. nss 3.12 source and binary distributions are also available on ftp.mozilla.org for secure https download: source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/nss_3_12_rtm/src/. binary distributions: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/nss_3_12_rtm/. both debug and optimized
builds are provided. go to the subdirectory for y...
...st print debug output into stderr bug 399300: pkix error results not freed after use. bug 414985: crash in pkix_pl_ocsprequest_destroy bug 421870: strsclnt crashed in pkix tests. ...
...abase integrity checks not yet implemented. bug 391292: shared database implementation slow bug 391294: shared database implementation really slow on network file systems bug 392521: automatic shared db update fails if user opens database r/w but never supplies a password bug 392522: integrity hashes must be updated when passwords are changed. ...
...And 12 more matches
Hacking Tips
debugging tips getting help (from js shell) use the help function to get the list of all primitive functions of the shell with their description. ...
... debugging tips getting help (from js shell) use the help function to get the list of all primitive functions of the shell with their description. ...
... debugging tips getting help (from js shell) use the help function to get the list of all primitive functions of the shell with their description. ...
...And 12 more matches
Mozilla
a bird's-eye view of the mozilla framework the purpose of this article is to provide a high-level technical overview of the architecture of the extensible, object-based mozilla application framework. accessibility and mozilla accessibility is the idea that software (among other things) should be designed to be usable and, as much as possible, convenient to use for people with disabilities. ...
...or inspecting normal http cache. nsiapplicationcacheservice::chooseapplicationcache is given the url the channel is about to load. it synchronously returns an nsiapplicationcache object representing the most recent cache version from the most recent cache group containing the entry under the url or a matching namespace. benchmarking debug
builds (--enable-debug) and non-optimized
builds (--disable-optimize) are much slower. any performance metrics gathered by such
builds are largely unrelated to what would be found in a release browser. browser chrome tests the browser chrome test suite is an automated testing framework designed to allow testing of application chrome windows using javascrip...
... chrome tests the browser chrome test suite is an automated testing framework designed to allow testing of application chrome windows using javascript. it currently allows you to run javascript code in the same scope as the main firefox browser window and report results using the same functions as the mochitest test framework. as all tests, they won't work in a
build with tests disabled (--disable-tests). browser security an important aspect of developing code for any browser, including firefox, as well as any web-oriented project, is its security. these articles provide important guides and references to ensuring the code you write is secure, including both design recommendations and testing guidelin...
...And 12 more matches
Running Tamarin acceptance tests - Archive of obsolete content
ests can be used to verify your installation and or local changes that you have made to the source. to run acceptance tests on the android shell see the "testing the android shell" heading below. running the tamarin test suite requires the following steps: set the avm environment variable to the path of the avmplus executable (avmshell). note: the name of the avmshell executable varies among the
build systems; use the name of the avm shell produced from the
build process you used, above. set the builtinabc environment variable to the path of the generated/builtin.abc. you may
build the .abc files
build by downloading the latest asc.jar. the latest asc.jar can be downloaded from from ftp://ftp.mozilla.org/pub/js/tamarin...latest/asc.jar. also the source to asc.jar may be downloaded and rebuilt ...
...ar can be downloaded from from ftp://ftp.mozilla.org/pub/js/tamarin...latest/asc.jar. also the source to asc.jar may be downloaded and rebuilt from http://opensource.adobe.com/wiki/dis...exsdk/flex+sdk. set the asc environment variable, as described above. set the shellabc environment variable to the path of the generated/shell_toplevel.abc. ...
...rin...latest/asc.jar. also the source to asc.jar may be downloaded and rebuilt from http://opensource.adobe.com/wiki/dis...exsdk/flex+sdk. set the asc environment variable, as described above. set the shellabc environment variable to the path of the generated/shell_toplevel.abc. ...
...And 11 more matches
NSS 3.12.4 release notes
uilt from the source, at the cvs repository rooted at cvs.mozilla.org:/cvsroot, with the cvs tag nss_3_12_4_rtm. nss 3.12.4 requires nspr 4.8. this is not a hard requirement. our qa tested nss 3.12.4 with nspr 4.8, but it should work with nspr 4.7.1 or later. you can check out the source from cvs by cvs co -r nspr_4_8_rtm nspr cvs co -r nss_3_12_4_rtm nss see the documentation section for the
build instructions. nss 3.12.4 source is also available on ftp.mozilla.org for secure https download: source tarball: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/nss_3_12_4_rtm/src/. major changes in nss 3.12.4 nss 3.12.4 is the version that we submitted to nist for fips 140-2 validation. currently nss 3.12.4 is in the "review pending" state in the fips 140-2 pre-validation list at...
... sec_oid_x509_any_policy the nssckbi pkcs #11 module's version changed to 1.75. obsolete code for win16 has been removed. support for openvms has been removed. bugs fixed the following bugs have been fixed in nss 3.12.4. ...
...rning: passing enum* for an int* argument in pkix_validate.c bug 469588: coverity errors reported for softoken bug 470055: pkix_httpcertstore_findsocketconnection reuses closed socket bug 470070: multiple object leaks reported by tinderbox bug 470479: io timeout during cert fetching makes libpkix abort validation. ...
...And 11 more matches
Thread Sanitizer
sanitizer (tsan) is a fast data race detector for c/c++ programs. it uses a compile-time instrumentation to check all non-race-free memory access at runtime. unlike other tools, it understands compiler-builtin atomics and synchronization and therefore provides very accurate results with no real false positives. more information on how tsan works can be found on the thread sanitizer wiki. ...
...st data race detector for c/c++ programs. it uses a compile-time instrumentation to check all non-race-free memory access at runtime. unlike other tools, it understands compiler-builtin atomics and synchronization and therefore provides very accurate results with no real false positives. more information on how tsan works can be found on the thread sanitizer wiki. ...
...s a compile-time instrumentation to check all non-race-free memory access at runtime. unlike other tools, it understands compiler-builtin atomics and synchronization and therefore provides very accurate results with no real false positives. more information on how tsan works can be found on the thread sanitizer wiki. public
builds note: no public
builds are available at this time yet. manual
build build prerequisites note: this section assumes you're using linux to
build. threadsanitizer does not work on mac osx yet. llvm/clang the tsan instrumentation is implemented as an llvm pass and integrated into clang. the version of clang you need to use depends on what firefox release you are compiling if you are
building from mozilla-central, you must use clang 3.6 or later. clang 3.4 + t...
...And 11 more matches
Index
x index found 72 pages: 33 ldap support administration, enterprise, thunderbird this document is intended to "fill in the gaps" about how enterprise customers can leverage and customize ldap support in mozilla thunderbird. it is not intended as an introduction to ldap and mozilla products. it assumes you are already familiar with configuring preferences for deployed
builds in addition to setting up thunderbird to use an ldap directory. it should be noted that all of this information applies to both thunderbird and the seamonkey application suite. 34 mail and rdf mozilla mail exposes many of it's data structures to rdf through a few datasources. this allows exposure of mailnews-specific data to user interface using rdf templates. 35 ...
...ule by richard h. pizzarro <rhp@netscape.com> 52 thunderbird api documentation these pages have been moved from mozilla.org, and may or may not be relevant. 55 thunderbird binaries branch, trunk, comm-central, thunderbird described below are three types of generally available thunderbird packages - releases, early preview releases, and nightly
builds (including trunk development
builds) - and their downloaded locations. additionally, ad-hoc packages called try
builds are made available on an as-needed basis to allow for testing of certain patches, and are typically announced in related bug reports. 56 thunderbird configuration files config editor, configuration files many of the tips and tricks mentioned on this site ca...
...ns, guide, needscontent, thunderbird this is a stub page for a tutorial for thunderbird 3. 73 an overview of thunderbird components thunderbird the thunderbird mail application is a group of components built on a set of technologies that can seem daunting to new developers. however, in many cases you only need to learn a few concepts to write an extension. 74
building a thunderbird extension 1: introduction add-ons, extensions, thunderbird thunderbird is a community managed open-source email application. it shares many of the technologies used by mozilla firefox, including javascript, the gecko layout engine, the xul xml user interface language and the xpcom cross-platform component object model. similar to firefox, thunderbird functionality can b...
...And 11 more matches
BasicCardResponse - Web APIs
to change preferences in firefox, visit about:config.ie ...
...to change preferences in firefox, visit about:config.ope...
...to change preferences in firefox, visit about:config.ie no support noopera no support nosafari ? webview android no support ...
...And 11 more matches
MCD, Mission Control Desktop, AKA AutoConfig - Archive of obsolete content
ar 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) { if( queryresults ) { //
build the userinfo object for later use for( var attr in ldapattrs ) { userinfo[ ldapattrs[attr] ] = getldapvalue( queryresults, ldapattrs[attr] ); } } else { throw( "no ldap results" ); } } // call upon ldap for the values in ldapattrs array, // uses the previous processldapvalues() getldapattributes( ldaphost, ldapbase, ldapfilter, ldapattrs.join(",") ); // create account // s...
...-06-29 11:37:21.677372297 +0200 +++ thunderbird-3.0.autoldap/configure 2009-06-29 14:41:11.547435040 +0200 @@ -12855,7 +12855,7 @@ moz_feeds=1 moz_jsdebugger=1 moz_jsloader=1 -moz_ldap_xpcom= +moz_ldap_xpcom=1 moz_mail_news= moz_mork=1 moz_morkreader= and set --enable-extensions=pref in mozconfig file, in fedora source rpm it is: [root@b008-02 sources]# grep enable-extensions /root/rpm
build/sources/thunderbird-mozconfig ac_add_options --enable-extensions=pref it seems worse this time , as even after applying those compilation options mentioned above, i now get the following error message while stating thunderbird with autoconfig (autoconf.js having pref('general.config.filename','thunderbird.cfg'); ) and thunderbird.cfg calling getldap* functions to retrieve cn and mail address o...
...! so we needed to recompile thunderbird with autoconfig support, it's just a matter of adding --enable-extensions=pref in mozconfig file. ...
...And 10 more matches
Index - Game development
ollision detection introductory article first, and have basic knowledge about three.js. 15 3d games on the web games, graphics, needscontent, needsexample, webgl, webvr, three.js for rich gaming experiences on the web, the weapon of choice is webgl, which is rendered on html <canvas>. ...
..., webgl, webvr, three.js for rich gaming experiences on the web, the weapon of choice is webgl, which is rendered on html <canvas>. webgl is basically an opengl es 2.0 for the web — it's a javascript api providing tools to
build rich interactive animations and of course, also games. you can generate and render dynamic 3d graphics with javascript that is hardware accelerated. ...
...are accelerated. 16
building up a basic demo with a-frame 3d, a-frame, vr, virtual reality, web, webgl the webxr and webgl apis already enable us to start creating virtual reality (vr) experiences inside web browsers, but the community is still waiting for tools and libraries to appear, to make this easier. mozilla's a-frame framework provides a markup language allowing us to
build 3d vr landscapes using a system familiar to web developers, which follows game development coding principles; this is useful for quickly and successfully
building prototypes and demos, without having to write a lot of javascript or glsl. this article explains how to get up and running with a-frame, and how to use it to
build up a simple demo. ...
...And 10 more matches
DMD
file of the heap usage for the entire session. this is good for finding parts of the code that cause high heap churn, e.g. by allocating many short-lived allocations. "heap scanning" mode. this mode is like live mode, but it also records the contents of every live block in the log. this can be used to investigate leaks by figuring out which objects might be holding references to other objects.
building and running nightly firefox the easiest way to use dmd is with the normal nightly firefox
build, which has dmd already enabled in the
build. to have dmd active while running it, you just need to set the environment variable dmd=1 when running. for instance, on osx, you can run something like: dmd=1 /applications/firefox\ nightly.app/contents/macos/firefox you can tell it is working by goin...
... for "save dmd output". if dmd has been properly enabled, the "save" button won't be grayed out. look at the "trigger" section below to see the full list of ways to get a dmd report once you have it activated. note that stack information you get will likely be less detailed, due to being unable to symbolicate. you will be able to get function names, but not line numbers. desktop firefox (linux)
build build firefox with these options: ac_add_options --enable-dmd if
building via try server, modify browser/config/mozconfigs/linux64/common-opt or a similar file before pushing. launch use mach run --dmd; use --mode to choose the mode. add --debug to run under gdb. trigger there are three ways to trigger a dmd snapshot. visit about:memory and click the dmd button (depending on how old yo...
... if you wish to trigger dmd dumps from within c++ or javascript code, you can use nsimemoryinfodumper.dumpmemorytotempdir. ...
...And 10 more matches
2006-10-20 - Archive of obsolete content
summary: mozilla.dev.
builds - october 14th to october 20th 2006 linux reference platform 1.8.1 october 18th: marcus is wondering about the linux platform that is currently used to compile both public releases of firefox and xulrunner. on october 18th marcus responded to his original post and expanded on the original content of his question. marcus claims that when he
builds firefox using centos he encounters crashes (segmentation faults) under linux distributions such as gentoo, suse and fedora. 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. adding extension to extensions/ folder originally posted on oct 19th: christopher finke is currently learning how to comp...
... christopher finke is asking the community members for tutorials or any tips on how to get started. ...
... christopher finke is asking the community members for tutorials or any tips on how to get started. on october 20th christopher finke responded to his original post. he stated that he was able to pre-package the extensions that he wanted by following this walkthrough and a little bit of help from this post. ...
...And 8 more matches
Getting started with Ember - Learn web development
other frontend frameworks provide, such as react, vue, and angular. the service side provides long-lived shared state, behavior, and an interface to integrating with other libraries or systems. for example, the router (which will be mentioned later in this tutorial) is a service. components and services make up the majority of any emberjs application. use cases generally, emberjs works well for
building apps that desire either or both of the following traits: single page applications, including native-like web apps, and progressive web apps (pwas) ember works best when it is the entire front end of your application. increasing cohesion among many team's technology stacks community-backed "best practices" allow for faster long-term development speed. ember has clear ...
... javascript? ember is built on javascript technologies and is a thin layer on top of traditional object-oriented programming, while still allowing developers to utilize functional programming techniques. ember makes use of two main syntaxes: javascript (or optionally, typescript) ember's own templating language, which is loosely based on handlebars. the templating language is used to make
build and runtime optimizations that otherwise wouldn't be possible. most importantly, it is a superset of html — meaning that anyone who knows html can make meaningful contributions to any ember project with minimal fear of breaking code. designers and other non-developers can contribute to page templates without any knowledge of javascript, and interactivity can be added later. this language also ...
...aking a small web application, todomvc's value comes from providing pre-made css and recommended html structure, which eliminates small differences between implementations, allowing for easier comparison. later on in the tutorial, we'll focus on adding code to our application to fix some of todomvc's biggest faults. ...
...And 8 more matches
Index
found 550 pages: # page tags and summary 1 spidermonkey: the mozilla javascript runtime spidermonkey standalone source code releases can be found on the releases page. 2 creating javascript tests automated testing,
build documentation, guide, qa, spidermonkey in which test suite does your new test belong? 3 creating javascript jstest reftests ecmascript, guide, javascript, test in the js/src/tests directory, there are a few important subdirectories. 4 foss guide, spidermonkey feel free to add your own spidermonkey-based open source projects (and if necessary add categories)! 5 future directions guide, mozilla, spidermonkey this article documents future directions in f...
...re of: 8 getting spidermonkey source code guide, spidermonkey you can get the spidermonkey source code in gzipped form or directly from the mercurial repository. 9 hacking tips spidermonkey this page list a few tips to help you investigate issues related to spidermonkey. all tips listed here are dealing with the javascript shell obtained at the end of the
build documentation of spidermonkey. it is separated in 2 parts, one section related to debugging and another section related to drafting optimizations. many of these tips only apply to debug
builds of the js shell; they will not function in a release
build. 10 how to embed the javascript engine embedding mozilla, javascript, spidermonkey, tutorial see also jsapi user guide. in par...
...10 how to embed the javascript engine embedding mozilla, javascript, spidermonkey, tutorial see also jsapi user guide. in particular, it has more and better code examples! 11 index index, mdn meta, spidermonkey found 550 pages: 12 introduction to the javascript shell spidermonkey to get the spidermonkey javascript shell, see the spidermonkey
build documentation or download a compiled binary for your platform from the nightly
builds. 13 jit optimization outcomes beginner, firefox, intro, needscontent, spidermonkey spidermonkey's optimizing jit, ionmonkey, uses different optimization strategies to speed up various operations. the most typical operations that are relevant for fast program execution are property accesses a...
...And 8 more matches
Setting up the Gecko SDK
« previousnext » this chapter provides basic setup information for the gecko software development kit (sdk) used to
build the weblock component in this tutorial. the following four sections tell the developer how to download and organize the gecko sdk and create a new project in which components like weblock can be created. downloading and setting the sdk the gecko sdk provides all of the tools, headers, and libraries that you need to
build xpcom components. the sdk is available for windows, linux, and mac operating systems, and versions for other operating systems are being developed, and can be retrieved from as a single archive from the following platform-specific locations (need correction for last version (now 1.9.2.8). there is now separate archive with gecko-sdk, just...
...t gecko versions prior to 1.7: http://ftp.mozilla.org/pub/mozi...illa/releases/ gecko versions after 1.8: http://ftp.mozilla.org/pub/mozi...nner/releases/ once you download the sdk, you can expand it into any convenient location. in this appendix, we set up the windows gecko sdk in c:\gecko-sdk\. if you choose some other location, remember to adjust the settings described here (e.g., in the
building a microsoft visual cpp project section below) to point to this new location. when you extract the sdk, it should have the layout seen below: layout of the extracted sdk the directories represent different modules in the sdk. for example, the headers for networking are all located in the necko directory, and the headers that xpcom requires are in the xpcom directory. this directory structu...
...rosoft visual cpp project section below) to point to this new location. when you extract the sdk, it should have the layout seen below: layout of the extracted sdk the directories represent different modules in the sdk. for example, the headers for networking are all located in the necko directory, and the headers that xpcom requires are in the xpcom directory. this directory structure makes
build scripts slightly more complicated (since there will be many different include paths), but it helps to organize the parts of the sdk meaningfully. the two top level header files are special. the file mozilla-config.h lists all of the defines used in the sdk. including this header file in your project ensures that the component you create uses the same defines as the gecko libraries themselves. no...
...And 8 more matches
Thunderbird Binaries
releases thunderbird releases have been extensively tested and are made available for anyone to download and use it. ...
... releases thunderbird releases have been extensively tested and are made available for anyone to download and use it. ...
... releases thunderbird releases have been extensively tested and are made available for anyone to download and use it. ...
...And 8 more matches
Using the Payment Request API - Web APIs
payment provider, such as what payment methods are supported, etc. details — an object containing information concerning the specific payment, such as the total payment amount, tax, shipping cost, etc. options (optional) — an object containing addtional options related to the payment. ...
...details — an object containing information concerning the specific payment, such as the total payment amount, tax, shipping cost, etc. options (optional) — an object containing addtional options related to the payment. ...
... etc. options (optional) — an object containing addtional options related to the payment. ...
...And 8 more matches
The Joy of XUL - Archive of obsolete content
this guide is designed to introduce application developers and their managers to xul so they can not only understand why mozilla's platform is based on it, but how they might adopt it for their own use. xul (pronounced "zool") is mozilla's xml-based user interface language that lets you
build feature rich cross-platform applications that can run connected to or disconnected from the internet. ...
...ml-based user interface language that lets you
build feature rich cross-platform applications that can run connected to or disconnected from the internet. these applications are easily customized with alternative text, graphics, and layout so they can be readily branded or localized for various markets. web developers already familiar with dynamic html (dhtml) will learn xul quickly and can start
building applications right away. also described are some reasons application developers might choose to leverage xul and mozilla technology for
building cross-platform applications. this same investigation will provide sufficient explanation of mozilla's motivation to
build xul and why the mozilla platform is constructed using it. the key features and benefits of xul will be explored followed by an e...
...ing cross-platform applications. this same investigation will provide sufficient explanation of mozilla's motivation to
build xul and why the mozilla platform is constructed using it. the key features and benefits of xul will be explored followed by an examination of supporting mozilla technologies. finally, a mini case study of a calendar application written in xul will reinforce the benefits of
building applications with mozilla. key features and benefits powerful widget-based markup language the goal of xul is to
build cross platform applications, in contrast with dhtml which is intended for developing web pages. for this reason, xul is oriented toward application artifacts such as windows, labels, and buttons instead of pages, heading levels, and hypertext links. in fact, ...
...And 7 more matches
Getting started with Vue - Learn web development
previous overview: client-side javascript frameworks next now let's introduce vue, the third of our frameworks. 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. prerequisites: familiarity with the core html, css, and javascript languages, knowledge of the terminal/command line. vue components are written as a combination of javascript objects that manage the app's data and an html-based template syntax that maps to the underlying dom structure. for installation, and to use some of the more advanced features of vue (like single file com...
... production script (optimized version, minimal console warnings. it is recommended that you specify a version number when including vue on your site so that any framework updates do not break your live site without you knowing.) <script src="/static/external/29/29296ccacaa9ed35ed168fc51e36f54fd6f8db9c7786bbf38cc59a27229ba5c2.svg"></script> however, this approach has some limitations. to
build more complex apps, you’ll want to use the vue npm package. this will let you use advanced features of vue and take advantage of bundlers like webpack. to make
building apps with vue easier, there is a cli to streamline the development process. to use the npm package & the cli you will need: node.js 8.11+ installed. npm or yarn. note: if you don't have the above installed, find out more a...
...nt to create the project in, and run vue create <project-name>. the cli will then give you a list of project configurations you can use. there are a few preset ones, and you can make your own. these options let you configure things like typescript, linting, vue-router, testing, and more. we’ll look at using this below. initializing a new project to explore various features of vue, we will be
building up a sample todo list app. we'll begin by using the vue cli to create a new app framework to
build our app into. follow the steps below: in terminal, cd to where you'd like to create your sample app, then run vue create moz-todo-vue. use the arrow keys and enter to select the "manually select features" option. the first menu you’ll be presented with allows you to choose which features y...
...And 7 more matches
Introducing a complete toolchain - Learn web development
we'll go all the way from setting up a sensible development environment and putting transformation tools in place to actually deploying your app on netlify. in this article we'll introduce the case study, set up our development environment, and set up our code transformation tools. prerequisites: familiarity with the core html, css, and javascript languages. ...
...his article and the next is only one way that the featured tools can be used for a project. note: it's also worth repeating that not all of these tools need to be run on the command line. many of today's code editors (such as vs code and atom) have integration support for a lot of tools via plugins. introducing our case study the toolchain that we are creating in this article will be used to
build and deploy a mini site that lists data (taken from one of nasa's open apis) concerning potentially hazardous space objects that threaten our existence on earth! it looks like this: you can see a live version of the site at near-misses.netlify.com. tools used in our toolchain in this article we're going to use the following tools and features: jsx, a react-related set of syntax extensions ...
... javascript. you won't need to know react to follow this tutorial, but we've included this to give you an idea of how a non-native web language could be integrated into a toolchain. the latest built-in javascript features (at time of writing), such as import. useful development tools such as prettier for formatting and eslint for linting. postcss to provide css nesting capabilities. parcel to
build and minify our code, and to write a bunch of configuration file content automatically for us. github to manage our source code control. netlify to automate our deployment process. you may not be familiar with all the above features and tools or what they are doing, but don't panic — we'll explain each part as we move through this article. toolchains and their inherent complexity as with a...
...And 7 more matches
Extending a Protocol
once it's compiled, ./mach run and you should be able to spin up the developer console and type: navigator.echo("hi!"); that will return a pending promise that never settles. our goal is now to get that to settle with the value we sent in. ipdl basics while you are compiling, let's cover some ipdl basics. in ipdl there two kinds of "actors" - a ...
.... we will explain what all the parts mean below. note that the file's name and the protocol name must match. include protocol pwindowglobal; namespace mozilla { namespace dom { async refcounted protocol pecho { manager pwindowglobal; parent: async echo(nscstring data) returns (nscstring aresult); async __delete__(); }; } // namespace dom } // namespace mozilla now, edit "./dom/ipc/moz.
build" file and add 'pecho.ipdl', to the ipdl_sources array. remember that it needs to be in alphabetical order or it won't compile. breaking it down: include protocol pwindowglobal; - we include pwindowglobal, because it's going to manage the protocol for us. async refcounted protocol pecho {....} - this protocol is "async", meaning we are going to use mozpromises. it's also "refcounted", meanin...
...eive any messages. this is because of "async" and "returns" forms a mozpromise. async echo(nscstring data) returns (nscstring aresult); - the "returns" here translates to a mozpromise, with a resolver that will settle a promise with the expected value. async __delete__(); - this is called when an instance is deleted. it lets you do cleanup if needed. ok, if we now try to compile this (./mach
build), it will say: |manager| declaration in protocol `pecho' does not match any |manages| declaration in protocol `pwindowglobal' that's good! it means the syntax is correct, and now we need to pwindowglobal.ipdl to manage our pecho protocol. updating pwindowglobal.ipdl open up ./dom/ipc/pwindowglobal.ipdl. we need to add the following things: at the top of the file: include protocol pecho; ...
...And 7 more matches
NSS environment variables
value) it is an error to try to use a pkcs#11 crypto module in a process before it has been initialized in that process, even if the module was initialized in the parent process. beginning in nss 3.12.3, softoken will detect this error. this environment variable controls softoken's response to that error. ...
...#11 crypto module in a process before it has been initialized in that process, even if the module was initialized in the parent process. beginning in nss 3.12.3, softoken will detect this error. this environment variable controls softoken's response to that error. if set to to "1" or unset, softoken will trigger an assertion failure in debug
builds, and will report an error in non-debug
builds. ...
...ronment variable controls softoken's response to that error. if set to to "1" or unset, softoken will trigger an assertion failure in debug
builds, and will report an error in non-debug
builds. if set to "disabled", softoken will ignore forks, and behave as it did in older versions. if set to any other non-empty value, softoken will report an error in both debug and non-debug
builds. 3.12.3 nss_strict_shutdown string (any non-empty value) will trigger an assertion failure in debug
builds when a program tries to shutdown nss before freeing all the resources it acquired from nss while nss was initialized. 3.5 nss_trace_ocsp boolean (any value to enable) enables ocsp tracing. the trace information is written to the file ...
...And 7 more matches
Setting up CDT to work on SpiderMonkey
when you are interested in getting code hints, autocompletion, function, and field usage information and general ide goodness for c/c++. there is a guide for setting up cdt to work with the mozilla codebase, but it does not cover setting things up for just spidermonkey instead of the whole mozilla codebase. hence, here is a short-ish guide for doing just that. ...
...gs up for just spidermonkey instead of the whole mozilla codebase. hence, here is a short-ish guide for doing just that. step 1 - preparing a spidermonkey
build for cdt to index all code, spidermonkey has to be built with debug information. the full process of and requisites for doing so are described here. please follow those instructions up until the point of invoking configure. the initial
build was in clang, so the modified
build commands look like this: mkdir _dbg.obj cd _dbg.obj cc='clang -qunused-arguments -fcolor-diagnostics' cxx='clang++ -qunused-arguments -fcolor-diagnostics' \ ../configure --enable-debug --disable-optimize --enable-debug-symbols note: if you want to use ccache, you can enable it by adding --with-ccache to the arguments list. due to a bug in cdt, you have t...
... step 2 - installing eclipse and setting up the project the following run-down is a condensed and updated version of what is explained in much more detail for the entire mozilla codebase. ...
...And 7 more matches
DevTools API - Firefox Developer Tools
a toolbox (and all the tools it contains) is linked to a target, which is the object the tools are debugging. a target is usually a web page (a tab), but can be other things (a chrome window, a remote tab,…). in terms of code, each tool has to provide a tooldefinition object. a definition is a js light object that exposes different information about the tool (like its name and its icon), and a
build method that will be used later-on to start an instance of this tool. the gdevtools global object provides methods to register a tool definition and to access tool instances. an instance of a tool is called a toolpanel. the toolpanel is built only when the tool is selected (not when the toolbox is opened). there is no way to "close/destroy" a toolpanel. the only way to close a toolpanel is to clo...
...box has been created and is ready to use. the parameter is a toolbox object instance. toolbox-destroy(target) the toolbox for the specified target is about to be destroyed. toolbox-destoyed(target) the toolbox for the specified target has been destroyed. {toolid}-init(toolbox, iframe) a tool with the given id has began to load in the given toolbox to the given frame. {toolid}-
build(toolbox, panel) a tool with the given id has began to initialize in the given toolbox. the panel is the object returned by the tooldefinition.
build() method. {toolid}-ready(toolbox, panel) a tool with the given id has finished its initialization and is ready to be used. the panel is the object returned by the tooldefinition.
build() method. {toolid}-destroy(toolbox, panel) a tool wi...
... toolbox a toolbox is a frame for the toolpanels that is debugging a specific target. properties target target. the target this toolbox is debugging. hosttype toolbox.hosttype. the type of the host this toolbox is docked to. the value is one of the toolbox.hosttype constants. ...
...And 7 more matches
Advanced Rules - Archive of obsolete content
er of conditions, all of which must match. in the simple rule syntax, the conditions are placed directly on the rule element itself. if the conditions match for a resource, the content placed within the actions tag is generated. in the simple syntax, the content is placed directly inside the rule. rule conditions when a tree, menu or other element with a datasource generates content, the template
builder first finds the resource referred to by the ref attribute. it then iterates over all that resource's child resources. it applies each resource to the conditions. if the conditions match for that resource, the content in the actions element is generated for that resource. if the conditions do not match, no content is generated. content element the conditions element can contain three elements. t...
...t applies each resource to the conditions. if the conditions match for that resource, the content in the actions element is generated for that resource. if the conditions do not match, no content is generated. content element the conditions element can contain three elements. the first is the content element, which should always exist once and only once. it serves as a placeholder as the template
builder iterates through the resources. it specifies the name of a variable in which is placed a reference to the root resource while the conditions are analyzed for a match. the root resource is the one specified by the ref attribute on the element containing the template. the syntax of the content element is as follows: <content uri="?var"/> the question mark indicates that the text following it is ...
...u want to display a row in a tree for each city. ...
...And 6 more matches
Archive of obsolete content
here at mdn, we try to avoid outright deleting content that might be useful to people targeting legacy platforms, operating systems, and browsers. perhaps your target audience is people that are using older hardware, for example, and can't upgrade to the latest and greatest browsers. ...
...it's here for historical reference only. see the complete index of archived content note to writers: we need to try to keep the subpages here organized instead of all dumped into one large folder. try to create subtrees for categories of material. ...
...ng xhtml for its structure and a small collection of css files for its layout. the new design clearly shows what some experts have been saying: that standards-based design can be visually compelling and preserve the interface conventions we've come to expect from web pages. api archived documentation about obsolete web standards apis. archived mozilla and
build documentation these articles are archived, obsolete documents about mozilla, gecko, and the process of
building mozilla projects. archived open web documentation the documentation listed below is archived, obsolete material about open web topics. beginner tutorials this page includes archived beginners tutorials, from various places around mdn. case...
...And 6 more matches
Framework main features - Learn web development
rk from a high level, and the differences between them. prerequisites: familiarity with the core html, css, and javascript languages. objective: to understand the main code features of frameworks. domain-specific languages all of the frameworks discussed in this module are powered by javascript, and all allow you to use domain-specific languages (dsls) in order to
build your applications. in particular, react has popularized the use of jsx for writing its components, while ember utilizes handlebars. unlike html, these languages know how to read data variables, and this data can be used to streamline the process of writing your ui. angular apps often make heavy use of typescript. typescript is not concerned with the writing of user interfaces, but it is a domain...
...but it is a domain-specific language, and has significant differences to vanilla javascript. dsls can't be read by the browser directly; they must be transformed into javascript or html first. transformation is an extra step in the development process, but framework tooling generally includes the required tools to handle this step, or can be adjusted to include this step. while it is possible to
build framework apps without using these domain-specific languages, embracing them will streamline your development process and make it easier to find help from the communities around those frameworks. jsx jsx, which stands for javascript and xml, is an extension of javascript that brings html-like syntax to a javascript environment. it was invented by the react team for use in react applications, bu...
...owser, the above snippet will produce html that looks like this: <header> <h1>hello, world!</h1> </header> handlebars the handlebars templating language is not specific to ember applications, but it is heavily utilized in ember apps. handlebars code resembles html, but it has the option of pulling data in from elsewhere. ...
...And 6 more matches
Makefile - variables
extra_pp_components xpcomm files to pre-process before installation. garbage a "clean target" macro containing a list of files to remove. garbage_dirs a "clean target" macro containing a list of directories to remove. global_deps a list of common dependencies (makefile.in, autoconf.mk) that will force re
building. libobjs have_dtrace sun microsystem's dynamic tracing environment is available. local_includes allow use of moz_objdir in .mozconfig with older gnu gcc on beos. module module_name no_dist_install inhibit generating and copying exports/install targets into $...
...u gcc on beos. module module_name no_dist_install inhibit generating and copying exports/install targets into $(moz_objdir)/dist/install. .ns_printing objs obj_suffix filename suffix to use when writing object files. module instructs the
build system where to install exported headers. simple_programs suppress_default_rules inhibit processing of makefile tier targets/directory processing will be unordered. tier
build order dependencies - subdirectories for make to traverse prior to
building current. xpidl_module module name to use when generating .
...processing will be unordered. tier
build order dependencies - subdirectories for make to traverse prior to
building current. xpidl_module module name to use when generating .xpt files, default to module. xpidlsrcs internal: a list of .idl files to generate exported headers from. xpidl_name name of extension to
build see also configure.sh variables description
build_project_arg command line/environment override configure_env_args command line/environment override directory variable dirs a list of subdirectories to
build recursively. parallel_dirs a l...
...And 6 more matches
Gecko SDK
e.g. be accessed from xul using javascript. note that in order to develop such components, you do not need the full sources of e.g. firefox, since you do not access parts of the front end from within a component. furthermore, since a component contains basic functionality, it is intended to run with every product of the mozilla platform. therefore it makes no sense to use a particular product to
build general functionality. that's the reason why the gecko sdk was devised. do not confuse the gecko/xulrunner sdk with xulrunner itself. the gecko sdk is a collection of header files and tools used to develop general xpcom components which add functionality to the existing platform, whereas xulrunner is a framework which can be used to run standalone or embedded applications based on the mozilla fr...
...ponents which add functionality to the existing platform, whereas xulrunner is a framework which can be used to run standalone or embedded applications based on the mozilla framework. the gecko sdk contains all of the necessary tools and headers for making scriptable npapi plugins including the xpidl compiler/linker and the latest npapi.h. get the sdk updates there is no need to download or re
build the gecko sdk corresponding to security updates of mozilla (e.g., mozilla 1.7.3) since the headers and glue libs in the gecko sdk are usually not changed as a result of security updates. you do have to get and distribute the newest gecko components (gklayout.dll etc.), though. downloading for gecko versions before 2.0, you should choose the gecko sdk version for the earliest version of mozilla ...
...et. for gecko versions 2.0 and higher, you must recompile your component for each release as cross-version compatibility is no longer supported. in addition to the below versions, you can find other versions (including beta) here: xulrunner releases (files include "sdk" in the name). the sdk follows the same release schedule as firefox/thunderbird. once the sdk enters beta, it is suitable for
building extensions; your component should work with release
builds of the sdk without any modifications. due to the rapid release process, it may be a good idea to target the sdk in beta. download link latest gecko (latest firefox) gecko 1.9.2 (firefox 3.6) gecko 1.9.1 (firefox 3.5) gecko 1.9 (firefox 3.0) gecko 1.8 (firefox 1.5 and 2.0) windows download downlo...
...And 6 more matches
QA phase
ommitted it without needing a language pack. since such is the case, this part of the guide may not be entirely applicable to you. feel free to skip ahead to the next section by clicking on the next link at the bottom of the page. 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. manual & automated
builds with the click of a button, some l10n tools (like narro and koala) automatically create language pack
builds for you. if you're using one of these tools, feel free to skip ahead to the seeing your work section. if you're not using one of these tools, let's walk you through
building your own language pack manually. note: remember all of those pre-requisite tools we asked you to install in the i...
.../releases/mozilla-aurora )/ l10n-central (directory for l10n directories, one per l10n; often referred to as "l10n base")/ your-locale-code (a directory with your l10n files, in this example we'll use x-testing) example: root/mozilla-aurora & root/l10n-central/x-testing additionally, you will need to copy and translate the toolkit/defines.inc file directly from en-us before you can
build. this is due to a bug in the
build logic. please either follow the above structure closely or adjust the commands below according to your custom setup. to copy this file to the appropriate directory, do the following: navigate to your working directory from your command-line terminal (i.e., where you created the folder structure described above). enter the following commands: mkdir -p l10...
...following: navigate to your working directory from your command-line terminal (i.e., where you created the folder structure described above). ...
...And 6 more matches
How to embed the JavaScript engine
the code differs for each spidermonkey version, please choose right version for your spidermonkey. ...
...# if you're using version other than spidermonkey 31, please change -lmozjs-xx to your version. [mac] clan...
...# if you're using version other than spidermonkey 31, please change -lmozjs-xx to your version. [mac] clang++ -std=c++11 -i<objdir>/dist/include ...
...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. obtaining an update mar updates are served as mar files. there are two common ways to obtain a mar to use: download a prebuilt one, or
build one yourself. downloading a mar prebuilt nightly mars can be found here on archive.mozilla.org. be sure that you use the one that matches your machine's configuration. for example, if you want the nightly mar from 2019-09-17 for a 64 bit windows machine, you probably want the mar located at https://archive.mozilla.org/pub/firefox/nightly/2019/09/2019-09-17-09-36-29-mozilla-central/firefox-71.0a1.en-us.win64.complete.mar. prebuilt mars for release and beta can be found here. beta
builds are those with a b in the version string. after locating th...
...rebuilt mars for release and beta can be found here. beta
builds are those with a b in the version string. after locating the desired version, the mars will be in the update directory. you want to use the mar labelled complete, not a partial mar. here is an example of an appropriate mar file to use: https://archive.mozilla.org/pub/firefox/releases/69.0b9/update/win64/firefox-69.0b9.complete.mar.
building a mar
building a mar locally is more complicated. part of the problem is that mars are signed by mozilla and so you cannot really
build an "official" mar yourself. this is a security measure designed to prevent anyone from serving malicious updates. ...
...complete.mar.
building a mar
building a mar locally is more complicated. part of the problem is that mars are signed by mozilla and so you cannot really
build an "official" mar yourself. this is a security measure designed to prevent anyone from serving malicious updates. 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. see
building firefox for more information on
building firefox locally. these changes will need to be made in order to use the locally built mar: put this line in the mozconfig file in root of the
build directory (create it if it does not exist): ac_add_options --disable-verify-mar several files contain a line that must be uncommented. open them and find this line: #defines['disable_updater_authenticode...
...And 6 more matches
Signing an XPI - Archive of obsolete content
th real certificate this is a repeat of the earlier steps using the real certificate's details. here's the output on a test directory: c:\projects\codesigning>signtool -d . -k "code signing (certum)" -p ******* test using certificate directory: . generating test/meta-inf/manifest.mf file.. --> test.txt generating zigbert.sf file.. ...
...certificate's details. here's the output on a test directory: c:\projects\codesigning>signtool -d . -k "code signing (certum)" -p ******* test using certificate directory: . generating test/meta-inf/manifest.mf file.. --> test.txt generating zigbert.sf file.. tree "test" signed successfully incorporating signing into your
build process you may want to incorporate these steps into your existing
build process. ...
...ere's the output on a test directory: c:\projects\codesigning>signtool -d . -k "code signing (certum)" -p ******* test using certificate directory: . generating test/meta-inf/manifest.mf file.. --> test.txt generating zigbert.sf file.. tree "test" signed successfully incorporating signing into your
build process you may want to incorporate these steps into your existing
build process. i have a
build.bat file that automates the creation of the jar and xpi files. ...
...And 5 more matches
Static Analysis for Windows Code under Linux - Archive of obsolete content
this document will describe how to run mozilla static check for windows code under linux platform by creating a cross-compiler with dehydra support for mingw. we highly recommend you to read the cross compiling manual and the dehydra
build manual before you start the following reading.
build gcc corss-compiler with plugin support by default gcc does not support plugins. dehydra requires patching gcc such that it can load plugins as shared libraries: # prepare a directory mkdir $home/dehydra cd $home/dehydra #obtain gcc 4.3 sources wget ftp://mirrors.kernel.org/gnu/gcc/gcc...-4.3.0.tar.bz2 tar jxvf gcc-4.3.0.tar.bz2 # get the patches which enable plugins cd gcc-4.3.0/ # create an hg repository. this makes it easy to apply patches, they can be applied manually hg init . hg clone http...
...ate an hg repository. this makes it easy to apply patches, they can be applied manually hg init . hg clone http://hg.mozilla.org/users/tglek_mo...-moz-plugin-mq .hg/patches # apply gty.diff and plugin.diff # if you have mq setup, do hg qpush -a (for file in `cat .hg/patches/series`; do cat .hg/patches/$file; done) |patch -p1 cd .. ...
...tches # apply gty.diff and plugin.diff # if you have mq setup, do hg qpush -a (for file in `cat .hg/patches/series`; do cat .hg/patches/$file; done) |patch -p1 cd .. now, the gcc source with plugin supports is ready, we should now
build a cross compiler from this source. and the instructions are exactly the same with the one here. follow that instructions strictly for making a cross compiler.
build dehydra for cross-compiler
build the dehydra plugin dehydra is a shared library which will be loaded by the above plugin-support gcc. ...
...And 5 more matches
RDF Query Syntax - Archive of obsolete content
predicate="http://www.xulplanet.com/rdf/relateditem" object="?relateditem"/> </query> <rule> ... </rule> </template> </vbox> this query has two statements, each specified with a different tag. the template won't generate anything yet since we still need to fill in the content to be generated which goes in the missing part inside the rule. however, the template
builder will be able to compile the rules and examine them as described earlier. the
builder needs to start with a single result as the seed result. this is done with the content tag. it indicates that we are going to use a starting point when navigating the graph. obviously, since you need to start somewhere, you will have to use a content tag and it should be the first statement. also, because we can...
...e triple, which looks like this: <triple subject="?start" predicate="http://www.xulplanet.com/rdf/relateditem" object="?relateditem"/> the triple statement is used to follow arcs or arrows in the rdf graph. the predicate attribute specifies the labels of the arrows to follow. in the triple used here, the predicate is 'http://www.xulplanet.com/rdf/relateditem', so we know that the
builder will look for arrows with that label. the
builder can either follow the arrows in a forward or backward direction, but only one direction per statement. it determines which direction to use by examining which data is known and which data is not known yet. recall the data in the potential results set: (?start = http://www.xulplanet.com/rdf/a) this was the seed data created by the content statem...
...the
builder can either follow the arrows in a forward or backward direction, but only one direction per statement. it determines which direction to use by examining which data is known and which data is not known yet. recall the data in the potential results set: (?start = http://www.xulplanet.com/rdf/a) this was the seed data created by the content statement. you might be able to guess that the
builder fills in the value of the ?start variable as the triple's subject, giving something like this: <triple subject="http://www.xulplanet.com/rdf/a" predicate="http://www.xulplanet.com/rdf/relateditem" object="?relateditem"/> the
builder doesn't actually change the triple, but this might clarify how the
builder is working. ...
...And 5 more matches
Templates - Archive of obsolete content
home.netscape.com/nc-rdf#name rdf:http://home.netscape.com/nc-rdf#url"/> </template> </vbox> how templates are built when an element has a datasources attribute, it indicates that the element is expected to be built from a template. note that it isn't the template tag that determines whether content is built, it is the datasources attribute. ...
...m/nc-rdf#url"/> </template> </vbox> how templates are built when an element has a datasources attribute, it indicates that the element is expected to be built from a template. note that it isn't the template tag that determines whether content is built, it is the datasources attribute. when this attribute is present, an object called a
builder is added to the element which is responsible for
building the content from the template. ...
...element has a datasources attribute, it indicates that the element is expected to be built from a template. note that it isn't the template tag that determines whether content is built, it is the datasources attribute. when this attribute is present, an object called a
builder is added to the element which is responsible for
building the content from the template. ...
...And 5 more matches
Getting started with XULRunner - Archive of obsolete content
if you need to change xulrunner itself or integrate it with external binaries you may need to read that article. step 1: download xulrunner you can find a download link on the main xulrunner page here on mdn. ...
...if you need to change xulrunner itself or integrate it with external binaries you may need to read that article. step 1: download xulrunner you can find a download link on the main xulrunner page here on mdn. ...
...if you need to change xulrunner itself or integrate it with external binaries you may need to read that article. step 1: download xulrunner you can find a download link on the main xulrunner page here on mdn. ...
...And 5 more matches
What is RSS - Archive of obsolete content
want any of that done, then don't put it in a non-password-protected rss feed, and, of course, don't make the password public. news web sites use rss to provide everyone with a list of their newest articles. ...
...non-password-protected rss feed, and, of course, don't make the password public. news web sites use rss to provide everyone with a list of their newest articles. ...
... may 2005 13:02:08 -0700</pubdate> <link>http://news.example.com/artcle/552</link> </item> </channel> </rss> bloggers use rss to provide everyone with a list of their newest blog posts. ...
...And 5 more matches
RDF in Mozilla FAQ - Archive of obsolete content
la codebase, and the "extended" form, which allows for sophisticated pattern matching against the rdf graph. see the xul:template guide. (these are bizarrely arranged because the eventual intent is to introduce templates using the extended form -- which in many ways is conceptually simpler, even if more verbose -- and then treat the "simple" form as a shorthand for the extended form.) what can i
build with a xul template? you can
build any kind of content using a xul template. you may use any kind of tag (including html, or arbitrary xml) in the <action> section of a <rule>. when should i use a xul template? one alternative to using rdf and xul templates is to use the w3c dom apis to
build up and manipulate a xul (or html) content model. there are times, however, when doing so may be inconv...
...the "folder pane", in several menus, and in some of the dialogs. rather than writing three pieces of js (or c++) code to construct the dom trees each for <menubutton>, <menu>, and <tree> content models, you write three compact sets of rules for each content model. the data can change. for example, a mail/news user may add or remove imap folders. (note how this requirement complicates the task of
building a content model!) the xul template
builder uses the rules to automatically keep all content models in sync with your changes. in order to take advantage of this functionality, you must of course be able to express your information in terms of the rdf datasource api, either by using the built-in memory datasource, using rdf/xml to store your information, or writing your own implementation (po...
... your own implementation (possibly in javascript) of nsirdfdatasource. what gets loaded when i specify "datasources=" the datasources attribute on the "root" of a template specifies a whitespace-separated list of datasource uris to load. but what is a "datasource uri"? it is either: an abbreviated contractid for a locally installed component. by specifying rdf:name, you instruct the template
builder to load the xpcom component with the contractid @mozilla.org/rdf/datasource;1?name=name. the url of an rdf/xml file. for example, file:///tmp/foo.rdf chrome://mycomponent/content/component-data.rdf http://www.mysite.com/generate-rdf.cgi ftp://ftp.somewhere.org/toc.rdf the load will be processed asynchronously, and as rdf/xml arrives, the template
builder will generate content. in eit...
...And 5 more matches
The web and web standards - Learn web development
imbl founded the world wide web consortium (w3c), an organization that brings together representatives from many different technology companies to work together on the creation of web technology specifications. after that other technologies followed such as css and javascript, and the web started to look more like the web we know today. web standards web standards are the technologies we use to
build web sites. these standards exist as long technical documents called specifications, which detail exactly how the technology should work. these documents are not very useful for learning how to use the technologies they describe (this is why we have sites like mdn web docs), but instead are intended to be used by software engineers to implement these technologies (usually in web browsers). for ex...
...d for ecmascript, which javascript is based on), khronos (who publish technologies for 3d graphics, such as webgl), and others. "open" standards one of the key aspects of web standards, which timbl and the w3c agreed on from the start, is that the web (and web technologies) should be free to both contribute and use, and not encumbered by patents/licensing. therefore anyone can write the code to
build a website for free, and anyone can contribute to the standards creation process, where the specs are written. because web technologies are created openly, in collaboration between many different companies, it means that no one company gets to control them, which is a really good thing. you wouldn't want a single company suddenly deciding to put the entire web behind a paywall, or releasing a new...
... the web industry is a very attractive market to enter if you are looking for a job. recent published figures say that there are currently around 19 million web developers in the world, and that figure is set more than double in the next decade. and at the same time, there is a skill shortage in the industry — so what better time to learn web development? it isn't all fun and games however —
building web sites is a more complicated proposition than it used to be, and you'll have to put some time in to studying all the different technologies you need to use, all the techniques and best practices you need to know, and all the typical patterns you'll be called upon to implement. it'll take you a few months to really start to get into it, and then you'll need to keep learning so that your know...
...And 5 more matches
Package management basics - Learn web development
tested in a lot of different situations, making it more robust and cross-browser compatible than your own solution. a project dependency can be an entire javascript library or framework — such as react or vue — or a very small utility like our human-readable date library, or it can be a command line tool such as prettier or eslint, which we talked about in previous articles. without modern
build tools, dependencies like this might be included in your project using a simple <script> element, but this might not work right out of the box and you will likely need some modern tooling to bundle your code and dependencies together when they are released on the web. a bundle is the term that’s generally used to refer to a single file on your web server that contains all the javascript for your...
...let’s run through an example to get you started with using a package manager and registry to install a command line utility. parcel is a(nother) tool that developers commonly use in their development process. parcel is clever in that it can watch the contents of our code for calls to dependencies and automatically installs any dependencies it sees that our code needs. it can also automatically
build our code. in our previous chapter we installed prettier as a global tool. here however, let’s use npm to install parcel as a local tool, as best practices dictate. we'll install it as part of an experimental app. setting up the app as an npm package first of all, create a new directory to store our experimental app in, somewhere sensible that you’ll find again. we’ll call it parcel-exper...
...: no test specified\" && exit 1" }, "author": "chris mills", "license": "isc" } so this is the config file that defines your package. this is good for now, so let's move on. installing parcel run the following command to install parcel locally: npm install parcel-bundler once that's done all the things, we're now ready for some "modern client-side development" (which really means using
build tools to make the developer experience a little easier). first of all however, take another look at your package.json file. you'll see that npm has added a new field, dependencies: "dependencies": { "parcel-bundler": "^1.12.4" } this is part of the npm magic — if in future you move your codebase to another location, on another machine, you can recreate the same set up by running the command...
...And 5 more matches
Creating a Language Pack
this page is out of date. 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). you still need to specify which application you're localizing (e.g., for firefox, that's browser, thunderbird would be mail). configure step you need to prepare th...
...ase=../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). you still need to specify which application you're localizing (e.g., for firefox, that's browser, thunderbird would be mail). configure step you need to prepare the
build directory, which is done with ./mach configure you only need to run this if the version number of firefox changes. windows: replace make with mozmake in the commands below! creating a langpack we will now merge the localized files from x-testing locale with the en-us files from the original source. every time you want to create a langpack, you need to be in the directory obj-firefox-bui...
...f the mergedir. you'll see that it contains the files which in your localization were missing some entities. all other files will be taken from x-testing directly. it's now time to create a langpack with: $ make langpack-x-testing locale_mergedir=$(pwd)/mergedir each time you need to generate a new langpack, you need to run this command. remember that you need to be in the directory obj-firefox-
build/browser/locales. $ make langpack-x-testing locale_mergedir=$(pwd)/mergedir now go to the dist directory to find your langpack ready to use! $ cd ../../dist the xpi file can be found in the directory win32/xpi on windows, linux-i686/xpi or linux-x86_64 on linux or mac/xpi on mac. open the xpi file contained in this directory with firefox to see your work. you have to set your selected langua...
...And 5 more matches
Migration to HG
a/nsprpub" has been removed from the directory hierarchy, all files now live in the top directory of the nspr repository. likewise for nss and jss, "mozilla/security" has been removed and files now live at the top level. in addition for nss, we have merged the contents of directories mozilla/dbm and mozilla/security/dbm into the new directory lib/dbm. ...
...archy, all files now live in the top directory of the nspr repository. likewise for nss and jss, "mozilla/security" has been removed and files now live at the top level. in addition for nss, we have merged the contents of directories mozilla/dbm and mozilla/security/dbm into the new directory lib/dbm. besides the new layout, the
build system hasn't changed. ...
...n removed and files now live at the top level. in addition for nss, we have merged the contents of directories mozilla/dbm and mozilla/security/dbm into the new directory lib/dbm. besides the new layout, the
build system hasn't changed. most parts of the nss
build instructions remain valid, especially the instructions about setting environment variables. ...
...And 5 more matches
NSS_3.12.3_release_notes.html
feedback introduction network security services (nss) 3.12.3 is a patch release for nss 3.12. the bug fixes in nss 3.12.3 are described in the "bugs fixed" section below. nss 3.12.3 is tri-licensed under the mpl 1.1/gpl 2.0/lgpl 2.1. distribution information the cvs tag for the nss 3.12.3 release is nss_3_12_3_rtm. nss 3.12.3 requires nspr 4.7.4. see the documentation section for the
build instructions. nss 3.12.3 source and binary distributions are also available on ftp.mozilla.org for secure https download: source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/nss_3_12_3_rtm/src/. binary distributions: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/nss_3_12_3_rtm/. both debug and optimized
builds are provided. go to the subdirectory fo...
...an error to try to use a pkcs#11 crypto module in a process before it has been initialized in that process, even if the module was initialized in the parent process. beginning in nss 3.12.3, softoken will detect this error. this environment variable controls softoken's response to that error. if set to to "1" or unset, softoken will trigger an assertion failure in debug
builds, and will report an error in non-debug
builds. if set to "disabled", softoken will ignore forks, and behave as it did in older versions. if set to any other non-empty value, softoken will report an error in both debug and non-debug
builds. nss_use_decoded_cka_ec_point boolean (any non-empty valu...
... bug 464406: fix signtool regressions bug 465270: uninitialised value in devutil.c::create_object() bug 465273: dead assignment in devutil.c::nssslotarray_clone() bug 465926: during import of pkcs #12 files bug 466180: ssl_configmpserversidcache with default parameters fails on {net bug ...
...And 5 more matches
Installing Pork
our recent work has gotten mozilla to compile with gcc 4.2. gcc 4.3 should also work fairly well, but there may be 5 or so files that elsa can't parse. to make pork easy to use, you will want to install mcpp that integrates into gcc. you will probably want a separate gcc for this so you don't have to modify your standard system gcc. you can install gcc in the normal way in a special directory.
build and install mcpp mcpp generates macro expansion comments that allow pork's elsa to undo macros, which is necessary in order to get exact position information. to tell mcpp which gcc installation to integrate itself with, place the selected gcc bin dir as the first element of your path: path=/bindir/of/my/gcc:$path if you want to use a gcc that has binaries named something other than "gcc" and...
...ce the selected gcc bin dir as the first element of your path: path=/bindir/of/my/gcc:$path if you want to use a gcc that has binaries named something other than "gcc" and "g++", or you use "ccache" for you main gcc installation and want mcpp to override a separate installation, you need to pass the options "cc=gccxxx cxx=g++xxx" to "./configure". but don't give absolute paths there: mcpp won't
build right. instead, make sure the commands will be found on the path, as above. svn co https://mcpp.svn.sourceforge.net/svnroot/mcpp/trunk mcpp cd mcpp ./configure --enable-replace-cpp make sudo make install note: if you followed the dehydra installation instructions for linux and compiled your own gcc, then you should not need to "sudo" make install. if you run simply "make install" and see file p...
...hat (1) your "$path" is correct; (2) you passed the correct "cc=..." and "cxx=..." to "./configure". install the pork stack pork is a set of tools written at mozilla for refactoring c++. pork's aim is to simply doing c/c++ refactoring through elsa. ...
...And 5 more matches
SpiderMonkey 1.8.5
following features in earlier versions of spidermonkey have been dropped. support for extended class methods (in particular, jsequalityop) has been removed. multithreaded js programs that race against the same objects are now explicitly not supported. multithreaded programs are allowed, but each thread must operate on objects in a separate compartment, isolated from the other threads. the old
build system (using makefile.ref) is no longer supported. spidermonkey 1.8.5 includes a new configure-based
build system, introduced shortly after active development on the engine moved from cvs to mercurial. spidermonkey 1.8.5 is not binary-compatible with previous releases, nor is it source-code compatible. many jsapi types, functions, and callback signatures have changed, though most of them still ...
...proach 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. since this is a conservative collector, it will often find "garbage" addresses which can trigger warnings from certain code analysis tools. if you are running valgrind on your embedding, be sure to
build spidermonkey with the --enable-valgrind option to suppress superflous error messages triggered by the garbage collector. this also means that objects will be finalized in a non-deterministic order in spidermonkey 1.8.5. this is not a bug, and, any embedding which depends upon deterministic finalization is fatally flawed. typed rooting api the rooting api has been changed from an error-prone void...
...their pointers, and the js_newdoublevalue and js_newdouble interfaces have been removed. javascript shell changes there are many new built-in functions in the javascript shell, mostly useful for testing spidermonkey. the scatter function has been removed, and a shell worker class (similar to html dom workers) has been added. known issues mac os x 10.5 (leopard) and xcode 3.2 spidermonkey will not
build with certain
builds of apple's gcc 4.2 c++ compiler. to check what version you are running, issue the command /usr/bin/g++-4.2 -v from a terminal window. the following
builds are known to not work: i686-apple-darwin9-g++-4.2.1 (gcc) 4.2.1 (apple inc.
build 5574) to work around this issue, either upgrade your xcode or use an alternate version of gcc, such as the one that shipped with leopard. t...
...And 5 more matches
Intersection Observer API - Web APIs
u scroll, so that the user doesn't have to flip through pages. reporting of visibility of advertisements in order to calculate ad revenues. deciding whether or not to perform tasks or animation processes based on whether or not the user will see the result. implementing intersection detection in the past involved event handlers and loops calling methods like element.getboundingclientrect() to
build up the needed information for every element affected. since all this code runs on the main thread, even one of these can cause performance problems. when a site is loaded with these tests, things can get downright ugly. consider a web page that uses infinite scrolling. it uses a vendor-provided library to manage the advertisements placed periodically throughout the page, has animated graphics he...
...t becomes less obscured. decreasingcolor similarly, this is a string defining a color we'll apply when the visibility ratio is decreasing. ...
...we want to watch for changes in visibility of the target element relative to the document's viewport, so root is null. ...
...And 5 more matches
Capabilities, constraints, and settings - Web APIs
by setting their value. function getcurrentsettings() { if (videotrack) { videosettingstext.value = json.stringify(videotrack.getsettings(), null, 2); } if (audiotrack) { audiosettingstext.value = json.stringify(audiotrack.getsettings(), null, 2); } } this gets called after the stream first starts up, as well as any time we've applied updated constraints, as you'll see below. ...
...ttings() { if (videotrack) { videosettingstext.value = json.stringify(videotrack.getsettings(), null, 2); } if (audiotrack) { audiosettingstext.value = json.stringify(audiotrack.getsettings(), null, 2); } } this gets called after the stream first starts up, as well as any time we've applied updated constraints, as you'll see below. ...
... { videosettingstext.value = json.stringify(videotrack.getsettings(), null, 2); } if (audiotrack) { audiosettingstext.value = json.stringify(audiotrack.getsettings(), null, 2); } } this gets called after the stream first starts up, as well as any time we've applied updated constraints, as you'll see below. ...
...And 5 more matches
A basic 2D WebGL animation example - Web APIs
ndled through a load event handler called startup(): window.addeventlistener("load", startup, false); function startup() { glcanvas = document.getelementbyid("glcanvas"); gl = glcanvas.getcontext("webgl"); const shaderset = [ { type: gl.vertex_shader, id: "vertex-shader" }, { type: gl.fragment_shader, id: "fragment-shader" } ]; shaderprogram =
buildshaderprogram(shaderset); aspectratio = glcanvas.width/glcanvas.height; currentrotation = [0, 1]; currentscale = [1.0, aspectratio]; vertexarray = new float32array([ -0.5, 0.5, 0.5, 0.5, 0.5, -0.5, -0.5, 0.5, 0.5, -0.5, -0.5, -0.5 ]); vertexbuffer = gl.createbuffer(); gl.bindbuffer(gl.array_buffer, vertexbuffer); gl.bufferdata(gl.array_buffer, vertexarray, gl.static_...
...here, we're using code designed to let us add multiple shaders to our program quite easily. the array shaderset contains a list of objects, each describing one shader function to be compiled into the program. each function has a type (one of gl.vertex_shader or gl.fragment_shader) and an id (the id of the <script> element containing the shader's code). the shader set is pa...
... here, we're using code designed to let us add multiple shaders to our program quite easily. the array shaderset contains a list of objects, each describing one shader function to be compiled into the program. each function has a type (one of gl.vertex_shader or gl.fragment_shader) and an id (the id of the <script> element containing the shader's code). the shader set is passed into the function
buildshaderprogram(), which returns the compiled and linked shader program. we'll look at how this works next. once the shader program is built, we compute the aspect ratio of our context by dividing its width by its height. then we set the current rotation vector for the animation to [0, 1], and the scaling vector to [1.0, aspectratio]. the scaling vector, as we saw in the vertex shader, is used to ...
...And 5 more matches
Compiling from Rust to WebAssembly - WebAssembly
if you have some rust code, you can compile it into webassembly (wasm). this tutorial takes you through all you need to know to compile a rust project to wasm and use it in an existing web app. rust and webassembly use cases there are two main use cases for rust and webassembly: to
build an entire application — an entire web app based in rust. to
build a part of an application — using rust in an existing javascript frontend. for now, the rust team is focusing on the latter case, and so that's what we cover here. for the former case, check out projects like yew. in this tutorial, we
build an npm package using wasm-pack, a tool for
building npm packages in rust. this package will contain only webassembly and javascript code, and so the users of the package won't need rust installed.
... use for general rust development. rustup installs rustc, the rust compiler, as well as cargo, rust's package manager, rust-std, rust's standard libraries, and some helpful docs — rust-docs. note: pay attention to the post-install note about needing cargo's bin directory in your system path. this is added automatically, but you must restart your terminal for it to take effect. wasm-pack to
build the package, we need an additional tool, wasm-pack. this helps compile the code to webassembly, as well as produce the right packaging for npm. to download and install it, enter the following command into your terminal: $ cargo install wasm-pack install node.js we are
building an npm package in this tutorial, and so you need to have node.js and npm installed. to get node.js and npm, go to the...
...o download and install it, enter the following command into your terminal: $ cargo install wasm-pack install node.js we are
building an npm package in this tutorial, and so you need to have node.js and npm installed. to get node.js and npm, go to the get npm! page and follow the instructions. when it comes to picking a version, choose any one you'd like; this tutorial isn't version-specific.
building our webassembly npm package enough setup; let's create a new package in rust. navigate to wherever you keep your personal projects, and type this: $ cargo new --lib hello-wasm created library `hello-wasm` project this creates a new library in a subdirectory named hello-wasm with everything you need to get going: +-- cargo.toml +-- src +-- lib.rs first, we have cargo.toml; this is...
...And 5 more matches
Localization - Archive of obsolete content
ng localized strings in html this example uses the action button api, which is only available from firefox 29 onwards. ...
...is structure holds objects referenced by the locale name containing at least one of title, description or homepage as a property. ...
...on or homepage as a property. for example, here's a "package.json" defining a german localization for title and description: { "locales": { "de": { "title": "monstergenerator", "description": "erstelle dein eigenes monster" } }, "name": "monster-
builder", "license": "mpl 2.0", "author": "me", "version": "0.1", "title": "monster
builder", "id": "monster-
builder@me.org", "description": "
build your own monster" } using localized strings in preferences by including a "preferences" structure in your add-on's "package.json" file, you can define preferences for your add-on that the user can see and edit using firefox's add-ons manager. preferences have mandatory title and optional description fields. these are strings wh...
...And 4 more matches
Installing Dehydra - Archive of obsolete content
prerequisites mercurial 1.0 is needed to access source repositories. make sure that the mq extension is enabled. spidermonkey provides scripting capabilities for dehydra. gcc 4.5, with the package gcc-4.5-plugin-dev installed. (alternately,
build from source) a modern linux distribution. dehydra is not supported on mac os x.
building spidermonkey it is recommended that you use spidermonkey revision aurora_base_20110705 when
building dehydra. cd $home hg clone http://hg.mozilla.org/mozilla-central/ cd mozilla-central hg update aurora_base_20110705 cd js/src autoconf-2.13 mkdir $home/obj-js cd $home/obj-js $home/mozilla-central/js/src/configure --enable-optimize --disable-debug make it has to be checked whether later/newer branches (like aurora_base_20120131) are working, too. ...
.../src autoconf-2.13 mkdir $home/obj-js cd $home/obj-js $home/mozilla-central/js/src/configure --enable-optimize --disable-debug make it has to be checked whether later/newer branches (like aurora_base_20120131) are working, too. please also note that autoconf v2.13 is really needed: it does not work with e.g. v2.68. there is no need for some installation after make. you can skip the next section "
building gcc 4.5" if you are using gcc 4.6 or above.
building gcc 4.5 for treehydra's process_tree_decl to work, when compiling with g++, you must use a patched gcc 4.5 before
building dehydra. cd $home # obtain gcc 4.5.3 (see http://gcc.gnu.org/mirrors.html for alternate mirrors) wget http://www.netgull.com/gcc/releases/gcc-4.5.3/gcc-4.5.3.tar.bz2 tar -jxvf gcc-4.5.3.tar.bz2 # apply plugin_finish_dec...
...cxx should point to your copy of gcc 4.5. ...
...And 4 more matches
Running Tamarin performance tests - Archive of obsolete content
ory) set the asc environment variable to the path of the asc.jar compiler. you may download the latest asc.jar from ftp://ftp.mozilla.org/pub/js/tamarin...latest/asc.jar. also the source to asc.jar may be downloaded and rebuilt from http://opensource.adobe.com/wiki/dis...exsdk/flex+sdk. (optional) you may compare the performance of the avmshell to another avmshell. for example you may download or
build the latest checked in avmshell to compare against a local change. to compare a
build against another
build set the avm2 environment variable to the other avmshell or use the "-s --avm2" options. results from the two shells will be shown side to side and the percent speedup will be shown. $ cd tamarin-redux/test/performance $ python runtests.py executing tests at 2008-07-22 13:56:54.820920 avm: c...
...sc compiler to use -g --globalabc deprecated but still works - use builtin.abc (used to be location of global.abc) -b --builtinabc location of builtin.abc -s --shellabc location of shell_toplevel.abc -x --exclude comma separated list of directories to skip -h --help display help and exit -t --notime do not generate timestamps (cleaner diffs) -f --forcere
build force re
build all test files -c --config sets the config string [default os-tvm] -q --quiet display minimum output during testrun -l --log also log all output to given logfile --summaryonly only display final summary --re
buildtests re
build the tests only - do not run against vm --showtimes shows the time for each test --ascargs args to pass t...
...uild all test files -c --config sets the config string [default os-tvm] -q --quiet display minimum output during testrun -l --log also log all output to given logfile --summaryonly only display final summary --re
buildtests re
build the tests only - do not run against vm --showtimes shows the time for each test --ascargs args to pass to asc on re
build of test files --vmargs args to pass to vm --timeout max time to run all tests --testtimeout max time to let a test run, in sec (default -1 = never timeout) --html also create an html output file --notimecheck do not recompile .abc if timestamp is older than .as --java location of java executable (default=java) --javaargs argument...
...And 4 more matches
Introduction - Archive of obsolete content
ases, however, processors may be written to support other types of datasources. in xul, the datasource is specified by placing the datasources attribute on an element. typically, the value will be a uri that identifies the location of the data. for example, for an xml datasource, the url of an xml file is specified. when the xul parser sees an element with this attribute, it constructs a template
builder for the element and attaches it to the element. it is expected that there will be a template inside the element. the template
builder loads the datasource, performs a query on the datasource and generates content based on the results in combination with the template. the type of datasource is specified with the querytype attribute. the type affects how the datasource is used as well as the synt...
...tent generated by the template is inserted into the xul just as if you had placed it there yourself. here is an example: <vbox datasources="http://www.xulplanet.com/ds/sample.rdf" querytype="rdf"> this example specifies the datasource 'http://www.xulplanet.com/ds/sample.rdf', using the datasource type rdf as indicated by the querytype attribute'. we'll look at rdf datasources first. ...
...irst. the template
builder loads an rdf datasource using the rdf service in the same way as you would create a datasource through the rdf service directly. the datasource is loaded via its url. some rdf datasources are provided with mozilla -- their url's start with 'rdf:'. otherwise, the datasource is loaded as any other url is loaded. if the datasource is already loaded and cached, the template
builder can begin work right away. otherwise, there isn't anything to do until the data is loaded. actually, this isn't quite true. the rdf service starts the loading of the datasource in the background, and the template
builder goes through the process of
building content anyway. naturally, since there is no data yet, no results will be available, so the
builder ends up
building nothing. once some dat...
...And 4 more matches
Multiple Queries - Archive of obsolete content
or each query. in this particular example, we could actually have used two rules instead. this would be a better idea as it only requires one query, is simpler and more efficient, however you could imagine a more complex query where this wasn't possible. how multiple queries are processed we already know that a query generates a set of results. there's no magic to the way in which the template
builder processes multiple queries. it just takes the results generated from the first query, adds the results for the second query, adds the results for the third query, and so on. here are the results that would be generated by the first query above, before any bindings are applied: (?start = http://www.xulplanet.com/rdf/myphotos, ?photo = http://www.xulplanet.com/ndeakin/images/t/canal.jpg, then,...
...ocesses multiple queries. it just takes the results generated from the first query, adds the results for the second query, adds the results for the third query, and so on. ...
...net.com/ndeakin/images/t/obelisk.jpg) so four possible results are available, one from the first query and three from the second. however, the example shows that only content for three results are generated. what happened to the fourth result? this is where the useful aspect of multiple queries comes in. note that two of the results above are actually for the same photo (canal.jpg). the template
builder removes any duplicate items before generating content. it does this by only allowing the match for the earliest query. that is, the canal.jpg generated by the second query is removed, since an earlier query (the first query) already generated a match for that result. one important distinction is that the determination of duplicates is only based on the member variable, in this case the ?photo v...
...And 4 more matches
Rule Compilation - Archive of obsolete content
r. ...
...le> </template> </vbox> query/rule compilation and lazy content generation when the template
builder starts processing, and after it has started the datasource loading, it first must compile the query and rules. this step involves working through the query rules and processing them into internal structures. thus, changing the rule elements around dynamically doesn't affect anything. however, re
building the template (using the
builder.re
build method) will recompile the query and rules and reapply the template again. this means that you can change the rules using dom methods, re
build the template, and get different results. ...
...he query rules and processing them into internal structures. thus, changing the rule elements around dynamically doesn't affect anything. however, re
building the template (using the
builder.re
build method) will recompile the query and rules and reapply the template again. this means that you can change the rules using dom methods, re
build the template, and get different results. once the template
builder has compiled the rules, query processing and content generation can begin. the template
builder generates content lazily, that is, it processes as little as needed, and only continues when necessary. for instance, consider the example below: <vbox datasources="http://www.xulplanet.com/ds/sample.rdf" ref="http://www.xulplanet.com/rdf/a" hidden="true"> <template> ... </template> ...
...And 4 more matches
Simple Query Syntax - Archive of obsolete content
yntax is not more or less efficient, at least when a single query is involved. a simple query is equivalent to a query with only the content tag and a member tag, as well as optionally a set of triples from the child node. at its simplest, the simple query syntax is equivalent to the following: <query> <content uri="?start"/> <member container="?start" child="?photo"/> </query> the template
builder uses the simple query syntax whenever a template does not have a <query> element. if a <query> element is present, the full syntax is used instead. in the simple syntax, the
builder will use the default query shown above, although the variable names are randomly generated. since the photos list iterates over the children of a container, we can use the simple syntax. here is what it might look l...
...though the variable names are randomly generated. since the photos list iterates over the children of a container, we can use the simple syntax. here is what it might look like: <template> <vbox class="box-padded" uri="rdf:*"> <image src="rdf:*"/> <label value="rdf:http://purl.org/dc/elements/1.1/title"/> </vbox> </template> there is no <query> or <action> element used. ...
...ded" uri="rdf:*"> <image src="rdf:*"/> <label value="rdf:http://purl.org/dc/elements/1.1/title"/> </vbox> </template> there is no <query> or <action> element used. instead, the
builder uses a default query, and the action is placed directly inside the <template> element. you can see that this code is much simpler than the full syntax. to understand how this works, let's examine how the
builder processes a simple query. first, it evaluates the default query as above, except that no variables are used, or at least, not ones that are used externally. in reality, the
builder could be considered to convert a simple query into an extended query, so that it can be processed in the same way. after the default query statements are evaluated, the data network will look something like this: (?
...And 4 more matches
tree - Archive of obsolete content
he interface nsitreecontentview) which is a more specialized type of view, uses the treeitem elements and their descendants to determine the data to display in the tree. however, the treeitems are not displayed directly; they are used only as data to the content view. however, the content view will automatically update the tree if treeitems are changed. rdf tree nsitreeview, nsixultree
builder no this tree is generated from an rdf datasource. it is used when a tree has a datasources attribute, and has dont-
build-content in its flags attribute. for this tree, the data comes directly from the rdf datasource. dom treeitems are not created. even though the template uses treeitem elements to define the content, dom nodes for these elements are not created. this is the type that shou...
...dom treeitems are created, so you can access the data using rdf functions or dom functions. this type is suitable for rdf generated trees with a fairly small number of rows. ...
...dom treeitems are created, so you can access the data using rdf functions or dom functions. ...
...And 4 more matches
XULRunner/Old Releases - Archive of obsolete content
xulrunner 1.8.0.4 this is the last official stable developer preview release from the 1.8.0 branch. ...
... xulrunner 1.8.0.4 this is the last official stable developer preview release from the 1.8.0 branch. ...
... xulrunner 1.8.0.4 this is the last official stable developer preview release from the 1.8.0 branch. ...
...And 4 more matches
2006-11-03 - Archive of obsolete content
summary: mozilla.dev.
builds - october 28th to november 3rd 2006 no such file or directory (
build problem on winxp) november 2nd: kenoa complained that when he is compiling using cygwin on win32 he gets the following error no such file or directory1: /cygdrive/c/mozilla/mail/config/mozconfig client.mk:339: /cygdrive/c/mozilla/.mozconfig.mk: no such file or directory he claims that the file ".mozconfig" exists in /cygdrive/c/mozilla/mail/config/mozconfig the disable-crypto cause problem originally posted on november 2nd: gxk is
building minimo using the code base from sept. 11 2006. when he
builds using the disable.crypto option he encounters the following problem: no rule to make target `../../dist/lib/components/libpipboot.a', needed by `minimo'. he has also created a bug en...
...t. 11 2006. when he
builds using the disable.crypto option he encounters the following problem: no rule to make target `../../dist/lib/components/libpipboot.a', needed by `minimo'. he has also created a bug entry on bugzilla with the bug id of opened bug #344854. problem compiling with vs 2003 .net phil is trying to compile firefox for the first time and is getting an error when doing so:
building deps for /cygdrive/c/mozilla/toolkit/airbag/airbag/src/common/windows/guid_string.cc make[1]: leaving directory `/cygdrive/c/mozilla/obj-i686-pc-cygwin' make: *** [
build] error 2 he also noted that he is using make 3.80-1. on november 1st gavin sharp responded phil's question. he said that the problem that phil is experiencing is a known issue. ...
...
building deps for /cygdrive/c/mozilla/toolkit/airbag/airbag/src/common/windows/guid_string.cc make[1]: leaving directory `/cygdrive/c/mozilla/obj-i686-pc-cygwin' make: *** [
build] error 2 he also noted that he is using make 3.80-1. on november 1st gavin sharp responded phil's question. he said that the problem that phil is experiencing is a known issue. he also mentioned that airbag doesn't
build with msvc 7.1. (http://www.google.com/url?sa=d&q=htt...tail%3fid%3d64) gavin recommended that phil should add |ac_add_options --disable-airbag| to his .mozconfig. new windows compatibility issue? ...
...And 4 more matches
Getting started with React - Learn web development
iliarity with both html and javascript will help you to learn jsx, and better identify whether bugs in your application are related to javascript or to the more specific domain of react. 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. react is not a framework – it's not even exclusive to the web. it's used with other libraries to render to certain environments. for instance, react native can be used to
build mobile applications; react 360 can be used to
build virtual reality applications; and there are other possibilities besides. to
build for the web, developers use react in tandem with reactdom. react ...
...it does this through the use of components — self-contained, logical pieces of code that describe a portion of the user interface. these components can be composed together to create a full ui, and react abstracts away much of the rendering work, leaving you to concentrate on the ui design. ...
...ws teams to set conventions that work best for them, and to adopt react in any way they would like to. react can handle a single button, a few pieces of an interface, or an app's entire user interface. while react can be used for small pieces of an interface, it's not as easy to "drop into" an application as a library like jquery, or even a framework like vue — it is more approachable when you
build your entire app with react. in addition, many of the developer-experience benefits of a react app, such as writing interfaces with jsx, require a compilation process. adding a compiler like babel to a website makes the code on it run slowly, so developers often set up such tooling with a
build step. react arguably has a heavy tooling requirement, but it can be learned. this article is going to ...
...And 4 more matches
Debugging on Windows
l not hit any break-point (and even notifies you that it cannot find their location). microsoft child process debugging power tool allows automatically attaching to child processes, such as web content process, gpu process, etc. enable it by going its configuration menu in "debug > other debugging targets > child process debugging settings", and ticking the box. ...
...t it cannot find their location). microsoft child process debugging power tool allows automatically attaching to child processes, such as web content process, gpu process, etc. enable it by going its configuration menu in "debug > other debugging targets > child process debugging settings", and ticking the box. ...
...making it the startup project, by right clicking on it (it appears bold when it's the case) can be useful. breakpoints are kept across runs, this can be a good way to debug startup issues. run the program until you hit an assertion. ...
...And 4 more matches
Leak-hunting strategies and tips
as in bug 99180) or hide them completely and (2) large graphs of leaked objects tend to hide smaller ones, it's much better to go after the large graphs of leaks first. a good general pattern for finding and fixing leaks is to start with a task that you want not to leak (for example, reading email). start finding and fixing leaks by running part of the task under nstracerefcnt logging, gradually
building up from as little as possible to the complete task, and fixing most of the leaks in the first steps before adding additional steps. (by most of the leaks, i mean the leaks of large numbers of different types of objects or leaks of objects that are known to entrain many non-logged objects such as js objects. seeing a leaked globalwindowimpl, nsxulpdglobalobject, nsxbldocglobalobject, or nsxpcwr...
... the number of objects, not the size in bytes. ...
... the object graphs are small and easy to identify using gc-based leak detection.) what leak tools do we have? ...
...And 4 more matches
SpiderMonkey 1.8.7
proach 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. since this is a conservative collector, it will often find "garbage" addresses which can trigger warnings from certain code analysis tools. if you are running valgrind on your embedding, be sure to
build spidermonkey with the --enable-valgrind option to suppress superflous error messages triggered by the garbage collector. this also means that objects will be finalized in a non-deterministic order in spidermonkey 1.8.5. this is not a bug, and, any embedding which depends upon deterministic finalization is fatally flawed. typed rooting api the rooting api has been changed from an error-prone void...
...their pointers, and the js_newdoublevalue and js_newdouble interfaces have been removed. javascript shell changes there are many new built-in functions in the javascript shell, mostly useful for testing spidermonkey. the scatter function has been removed, and a shell worker class (similar to html dom workers) has been added. known issues mac os x 10.5 (leopard) and xcode 3.2 spidermonkey will not
build with certain
builds of apple's gcc 4.2 c++ compiler. to check what version you are running, issue the command /usr/bin/g++-4.2 -v from a terminal window. the following
builds are known to not work: i686-apple-darwin9-g++-4.2.1 (gcc) 4.2.1 (apple inc.
build 5574) to work around this issue, either upgrade your xcode or use an alternate version of gcc, such as the one that shipped with leopard. t...
...e following
builds are known to not work: i686-apple-darwin9-g++-4.2.1 (gcc) 4.2.1 (apple inc.
build 5574) to work around this issue, either upgrade your xcode or use an alternate version of gcc, such as the one that shipped with leopard. to select an alternate c++ compiler, invoke configure thus: cxx=/usr/bin/g++-4.0 /path/configure --my-configuration-options js-config the new configure-based
build system does not correctly generate the js-config script on many platforms, nor when js-ctypes are enabled. ...
...And 4 more matches
Using the Mozilla source server
using the mozilla source server is now even more feature-packed. ...
... using the mozilla source server is now even more feature-packed. ...
... using the mozilla source server is now even more feature-packed. ...
...And 4 more matches
Populating the page: how browsers work - Web Performance
t packet to around 28kb. subsequent packets increase in size until a predetermined threshold is reached, or congestion is experienced. if you’ve ever heard of the 14kb rule for initial page load, tcp slow start is the reason why the initial response is 14kb, and why web performance optimization calls for focusing optimizations with this initial 14kb response in mind. tcp slow start gradually
builds up transmission speeds appropriate for the network's capabilities to avoid congestion. congestion control as the server sends data in tcp packets, the user's client confirms delivery by returning acknowledgements, or acks. the connection has a limited capacity depending on hardware and network conditions. if the server sends too many packets too quickly, they will be dropped. meaning, there wi...
...nd attempting to render an experience based on the data it has. this is why it's important for web performance optimization to include everything the browser needs to start rendering a page, or at least a template of the page - the css and html needed for the first render -- in the first 14 kilobytes. but before anything is rendered to the screen, the html, css, and javascript have to be parsed.
building the dom tree we describe five steps in the critical rendering path. the first step is processing the html markup and
building the dom tree. html parsing involves tokenization and tree construction. html tokens include start and end tags, as well as attribute names and values. if the document is well-formed, parsing it is straightforward and faster. the parser parses tokenized input into the ...
... the dom tree describes the content of the document. the <html> element is the first tag and root node of the document tree. the tree reflects the relationships and hierarchies between different tags. tags nested within other tags are child nodes. ...
...And 4 more matches
system - Archive of obsolete content
ng system your add-on is running on and get information about the host application (for example, firefox or fennec), such as its version. ...
...xample, firefox or fennec), such as its version. ...
...ch as its version. ...
...And 3 more matches
MMgc - Archive of obsolete content
) must zero themselves out completely upon destruction. asserts enforce this. the reason is that our collector zeroes memory upon free and this was hurting performance. since mmgc must traverse objects to decrement refcounts properly upon destruction, i just made destructors do zeroing too. this mostly applies to non-pointer fields as drcwb smart pointers do this for you. poisoned memory in debug
builds, mmgc writes "poison" into deallocated memory as a debugging aid. here's what the different poison values mean: 0xfafafafa uninitialized unmanaged memory 0xedededed unmanaged memory that was freed explicitly 0xbabababa managed memory that was freed by the sweep phase of the garbage collector 0xcacacaca managed memory that was freed by an explicit call to gc::free (including drc reaping)...
...rs there are some automatic aids in the mmgc library which can help you find missing write barriers. look in mmgc/gc.cpp. // before sweeping we check for missing write barriers bool gc::incrementalvalidation = false; // check for missing write barriers at every alloc bool gc::incrementalvalidationpedantic = false; if you suspect you have missing write barriers, turn these switches on in a debug
build. (the second switch will slow your application down a lot more than the first switch, so you could try the first, then the second.) when a missing write barrier is detected, mmgc will assert and drop you into the debugger, and will print out a message telling you which object contained the missing write barrier, the address of the member variable that needs it, and what object didn't get marked d...
...r. sometimes, this missing write barrier detection will turn up a false positive. if you can't find anything wrong with the code, it might just be a false positive. debugging aids mmgc has several debugging aids that can be useful in your development work. underwrite/overwrite detection mmgc can often detect when you write outside the boundaries of an object, and will throw an assert in debugging
builds when this happens. leak detection (for unmanaged memory) when the application is exiting, mmgc will detect memory leaks in its unmanaged memory allocators and print out the addresses and sizes of the leaked objects, and stack traces if stack traces are enabled. stack traces are enabled via the mmgc_memory_profiler feature and setting the mmgc_profile environment variable to 1. the mmgc_memory_p...
...And 3 more matches
Source code directories overview - Archive of obsolete content
and given a unique name (e.g. txmgr in the editor directory in seamonkey). beneath this third level directory, there may be fourth level base, public and idl directories. thus, the scheme is recursive; it can apply to submodules, sub-submodules and so on. base contains the basic (core) functionality for the module. base contains all the source code that cannot be categorized into a submodule.
build contains any special makefiles for
building the particular module. doc contains any documentation associated with this module. idl contains the xpidl (cross platform interface definition language) interface files. interfaces are used so functionality can be available to both javascript scripts and c code with as little effort as possible. xpidl files have their own mini-language and processing ...
...n the general sense; some are only meant for internal use in a certain module. as more code is written with or converted to xpidl interfaces, the value of the public directory diminishes. src contains the bulk of the source code. tests contains c harnesses, html or xul that exercise this module. tools contains scripts for automatically generating certain source code and other special tools for
building this module. there are also platform dependent subdirectories which contain source code for specific platforms. windows contains source code for windows 95, windows 98 and windows nt 4.0. mac contains source code for macos: both the powerpc and 68000 versions. gtk contains source code for gtk (a.k.a. the gimp toolkit) which runs on x-windows on unix. motif contains source code for mot...
... contains source code for photon, a microkernel windowing system used in several real-time operating systems from qnx software systems ltd. seamonkey seamonkey is the development name for the mozilla browser suite. accessible contains code to support microsoft active accessibility and sun's atk accessibility api for linux. browser contains the code for firefox. this will be covered below.
build contains scripts (usually perl) and programs used by the mozilla
build team for
building and managing the mozilla code base. these programs coordinate the running of makefiles and the creation of the dist directory. calendar contains the code for the various mozilla calendar apps and extensions. caps contains c interfaces and code for determining the capabilities of content based on the securit...
...And 3 more matches
Sorting Results - Archive of obsolete content
atasource, the generated content corresponds to the order of results of the sql query. for an rdf datasource, again, the results are in the order the query generates them, although except in the case of an rdf seq, this order is arbitrary as rdf triples don't occur in any particular order. when the reference node is an rdf seq container and the results are in that container, however, the template
builder orders the results in the order the items appear in the seq. for instance, the photos are listed in the same order in this example as they appear in the seq in the datasource. this method of sorting a seq works best for the simple query syntax since it is obvious how the starting ref relates to the end member results (they are just the children), or for extended syntax queries that follow a sim...
... ref relates to the end member results (they are just the children), or for extended syntax queries that follow a similar pattern. for more complex queries, this natural sorting will not work, because the sort service assumes that the starting ref resource is the container and the end results are the children. in this case, the natural order of the results will just be the order that the template
builder generates the results. for ascending or descending sorts, this doesn't matter, since it will ignore whether results are containers and just sort by a value, alphabetically or numerically depending on the type of data. when using a tree, sorting may be performed on each column of the tree. for instance, if a list of photos was displayed in a two column tree showing the title and description, you...
...photos was displayed in a two column tree showing the title and description, you could sort by either title or description. the user can change the sort column and direction by clicking the column headers, however, you can programmatically change the sort as well. sorting tree results we'll examine sorting of trees first since trees are the most common element used with sorted items. using a tree
builder, you can sort the results in a tree by a column. to do this, place a sort attribute on a treecol element referring to the variable to sort by for that column. <treecol id="name" label="name" sort="?name" flex="1"/> <treecol id="date" label="date" sort="?date" flex="1"/> in this example, the first column will be sorted by the ?name variable and the second column by the ?date variable. when the ...
...And 3 more matches
Trees and Templates - Archive of obsolete content
« previousnext » the following describes how to use a template with a tree. adding datasources to trees when using a tree, you will often use a template to
build its content, to handle a large amount of hierarchial data. using a template with a tree uses very much the same syntax as with other elements. you need to add a datasources and a ref attribute to the tree element, which specify the datasource and root node to display. multiple rules can be used to indicate different content for different types of data. ...
...tree uses very much the same syntax as with other elements. you need to add a datasources and a ref attribute to the tree element, which specify the datasource and root node to display. multiple rules can be used to indicate different content for different types of data. the following example uses the history datasource: <tree datasources="rdf:history" ref="nc:historybydate" flags="dont-
build-content"> as described in the previous section, the tree may use a tree
builder for template generation instead of the normal content
builder. this means that elements will not be created for every row in the tree, making it more efficient. the flags attribute set to the value dont-
build-content, as used in the example above, indicates that the tree
builder should be used. if you leave the attri...
...with hierarchical trees, the children don't get generated until the parent nodes have been opened by the user. ...
...And 3 more matches
Using nsIXULAppInfo - Archive of obsolete content
to know the version of the application your code is running under. for example, one of unfrozen functions you're relying on was changed. note: nsixulappinfo provides information about the application and the platform, be careful to use the right one, especially when dealing with xulrunner-based applications. in such cases, you probably want to check nsixulappinfo.version and/or nsixulappinfo.app
buildid. the latter is useful if you're trying to support nightly development
builds of the application, and the former can be useful if you only support official releases, and to distinguish between branch and trunk
builds. example 1: checking firefox version // assuming we're running under firefox var appinfo = components.classes["@mozilla.org/xre/app-info;1"] .getservice(co...
... platform version nsixulappinfo provides version information about both the xul application (such as firefox) and the platform (i.e. gecko or xulrunner). for example, in firefox 1.5 beta 2 applica...
... platform version nsixulappinfo provides version information about both the xul application (such as firefox) and the platform (i.e. gecko or xulrunner). for example, in firefox 1.5 beta 2 application version is 1.4.1 and platform version is...
...And 3 more matches
XULRunner Hall of Fame - Archive of obsolete content
web site with embedded web applications. it also contains a built in email marketing system that is tightly integrated with the associated web site. one example of this tight integration is that the form in a web site can collect payment and set up a login for a members only section. a newsletter can be sent to members who sign up on a regular bases. instantbird multi-protocol im client.
build instructions komodo edit a multi-language code development tool.
build instructions pencil the pencil project's unique mission is to
build a free and opensource tool for making diagrams and gui prototyping that everyone can use. source qiqqa research manager, reference manager, and pdf manager. xulrunner is embedded to provide automatic search against journal archives, au...
...e! simplify your online social life. zotero reference manager with firefox, chrome, and safari integration. both firefox extension and xulrunner-based standalone application available. source applications based on xulrunner 1.9 or earlier buzzbird xul-based desktop twitter client. github bluegriffon the next-generation web editor based on the rendering engine of firefox. ...
...ntegration. both firefox extension and xulrunner-based standalone application available. source applications based on xulrunner 1.9 or earlier buzzbird xul-based desktop twitter client. github bluegriffon the next-generation web editor based on the rendering engine of firefox.
build instructions convertigo enterprise mashup server a web integrator and web clipper tool to
build enterprise mashups nightingale nightingale is a communtiy fork of the songbird media player, bringing back linux support and much more.
build instructions kirix strata a new specialty browser for accessing and manipulating data from the web telekast an open source teleprompter and script editor. source tomtom home 2 pc application to manage tomtom gps devices u...
...And 3 more matches
2006-10-27 - Archive of obsolete content
the question tony posted was that he wanted to know what was wrong with fx 1.5.0.x (linux) tinderbox because it has been failing since october 22 at around 5:45 pm pdt. gavin responded to tony's posting saying that the log file shows a "no space left on device" error when trying to link the final executable. on the same day tony replied to gavin's posting stating the possible choices to solve the problem. ...
...in's posting stating the possible choices to solve the problem. these were the following choices stated: search the filesystem for unneeded files delete or archive them, add a hard disk, move all or part of the concerned filesystem there move that tinderbox to a different machine with more empty disk space on october 23rd: nick responded to gavin and tony's posting. ...
...ony's posting. nick stated that the
build engineers knew that there was a problem with the tinderbox and that they would be solving the problem by adding a hard disk, and moving all or part of the concerned filesystem there. he also mentioned that the tinderbox is just a virtual machine, so you can easily allocate more space to it as need, assuming the host has some available. firefox 2 wont
build under solaris 10 x86 october 26: alex was trying to
build firefox 2 source on a solaris 10 x86 machine but was not successful with the
build. he has already built firefox 1.5.0.7 on the same machine with no problems. the following is his configuration script that he used to
build firefox 2 on solaris. ./configure --prefix=/export/home/alex/thunderbird --enable-application=browser --disable-te...
...And 3 more matches
2006-11-10 - Archive of obsolete content
summary: mozilla.dev.
builds - november 4th to november 10th 2006 browser buttons november 4th: mojr wants to know if firefox has a similar feature that the new ie 6 has built in. this feature consists of creating buttons using a small program, that allows you to create shortcuts to a particular address. the button gets added to the toolbar, separate from the links. reflow branch
build failed with vc 7.1 sp1 november 8th: roy received an error when he tried to reflow a branch
build using vc 7.1 sp1. on the same day he posted the answer to his posting that he found in last weeks posting. click here to see the answer to the problem.
building xulrunner application with mozilla november 8th: kirans is trying to
build mozilla with xulrunner option on a windows machine. when...
... 8th: roy received an error when he tried to reflow a branch
build using vc 7.1 sp1. on the same day he posted the answer to his posting that he found in last weeks posting. click here to see the answer to the problem.
building xulrunner application with mozilla november 8th: kirans is trying to
build mozilla with xulrunner option on a windows machine. when he ran this "make -f client.mk
build" command he receive an error saying "no such file or directory". he stated that he set is home variable to c:\mozilla, and is not sure what he is doing wrong. ...
...s machine. when he ran this "make -f client.mk
build" command he receive an error saying "no such file or directory". he stated that he set is home variable to c:\mozilla, and is not sure what he is doing wrong. november 9th: jonathan watt responded to his posting stating that he must have the wrong line endings in his mozconfig or some other script fill that he is probably using to run. ...
...And 3 more matches
Game distribution - Game development
you've followed a tutorial or two and created an html5 game — that's great! this article covers all you need to know about the ways in which you can distribute your newly created game into the wild. this includes hosting it yourself online, submitting it to open marketplaces, and submitting it to closed ones like google play or the ios app store. benefits of html5 over native
building games with html5 gives you extra advantages, such as: multiplatform bliss the technology itself is multiplatform, so you can write the code once and target multiple devices. this can range from low-end smartphones or tablets, through laptops and desktop computers, to smart tvs, watches or even a fridge if it can handle a modern enough browser. you don't need to have separate teams to work on the same title...
...ames to be played while on the move rather than huge immersive experiences. such games are often designed to be played with two, or even one finger, so you can hold the device, play the game and be able to use the second hand for whatever you currently need. saying this, desktop platforms can be used for distribution quite easily with the availability of wrappers that can help you prepare native
builds of your game see packaging games. it's also nice to provide desktop controls for your games even if you're mostly targeting mobile. players are enjoying your games on any platform available, and desktop is one of them. plus, it is usually easier to
build and test the game first on desktop, and then move on to debugging mobile. publishing the game there are three main options when it comes to p...
... link to your website or embed your game on their site. such exposure may just provide promotion for your game, or if you have adverts shown beside your game (or other money making options) it may also provide monetization. web and native stores you can also upload and publish your game directly to different types of stores, or marketplaces. to do that you'll have to prepare and package it to a
build format specific for every app ecosystem you want to target it at. see marketplaces — distribution platforms for more details of what marketplace types are available. marketplaces — distribution platforms let's see what the available options are regarding the marketplaces/stores available for different platforms and operating systems. note: these are the most popular distribution platforms...
...And 3 more matches
Client-side form validation - Learn web development
alidity.typemismatch property returns false, we call the setcustomvalidity() method an empty string. this renders the input valid, so the form will submit. ...
...ty string. this renders the input valid, so the form will submit. you can try it out below: note: you can find this example live on github as custom-error-message.html (see also the source code.) a more detailed example now that we've seen a really simple example, let's see how we can use this api to
build some slightly more complex custom validation. first, the html. ...
... padding: 0.3em; } the big changes are in the javascript code, which needs to do much more heavy lifting. // there are fewer ways to pick a dom node with legacy browsers const form = document.getelementsbytagname('form')[0]; const email = document.getelementbyid('mail'); // the following is a trick to reach the next sibling element node in the dom // this is dangerous because you can easily
build an infinite loop. // in modern browsers, you should prefer using element.nextelementsibling let error = email; while ((error = error.nextsibling).nodetype != 1); // as per the html5 specification const emailregexp = /^[a-za-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-za-z0-9-]+(?:\.[a-za-z0-9-]+)*$/; // many legacy browsers do not support the addeventlistener method. // here is a simple way to handle this; i...
...And 3 more matches
Styling web forms - Learn web development
html, browser vendors have historically been reluctant to make form controls stylable because users were so accustomed to the visual appearance of their respective platforms. but this has changed. website owners want form styles that fit in with their overall site design more than ever, and the web platform has changed to make this more possible. for some form widgets, it is still difficult to re
build controls to make them stylable, but we can now use css to style many form features, though we do need to take extra care to ensure we don't break usability. not all widgets are created equal when css is involved at present, some difficulties remain when using css with forms. these problems can be divided into three categories: the good some elements can be styled with few if any problems acro...
... to style the controls' internal components (such as the date picker calendar, or the button on the <select> that causes the options list to display) making up those widgets. if you want to thoroughly customize those widgets, you really have to create your own using html, css, and javascript. this is beyond the scope of the core form articles, but we do look at this in an advanced article how to
build custom form controls. note: there are some proprietary css pseudo-elements available that allow you to style internal components of these form controls, such as ::-moz-range-track, but these are not consistent across browsers, so can't be relied upon. we will mention these later as well. the good to style form controls that are easy to style with css, you shouldn't face much if any difficult...
...ese form controls, such as ::-moz-range-track, but these are not consistent across browsers, so can't be relied upon. we will mention these later as well. the good to style form controls that are easy to style with css, you shouldn't face much if any difficulties, since they mostly behave like any other html element. we already looked at some simple form styling in your first form, and the css
building blocks module contains some useful form styling essentials too. as well as the basic css tools covered above, we've also been provided with several selectors — ui pseudo-classes — that enable styling based on the current state of the ui. we cover these in detail in the next article, ui pseudo-classes. we'll walk through an example at the end of this article to give you some more ideas on...
...And 3 more matches
Aprender y obtener ayuda - Learn web development
king a plan it is a good idea to create a plan to help you achieve what you want to achieve through your learning. a goal statement it sounds silly, but why not start with a single sentence that says what you want to achieve? the following have different scopes, but are all realistic and achievable: i want to become a professional web developer in two years' time. ...
...eb developer in two years' time. i want to learn enough to
build a website for my local amateur tennis club. i want to learn html and css so i can expand my job role to take over updating the content on our company website. the following are not quite as reasonable: i want to go from a complete beginner to becoming a senior web developer in three months. i want to start my own company and
build a social network that will out-perform facebook, in two years. what do you need to get there? once you've worked out your goal, it is a good idea to research what you'll need to achieve the goal. for example: materials i need: a computer internet access pens and paper knowledge i need: how to use html, css, javascript, and associated tools and best practices to
build web sites and w...
..., and use them to put a web site or application online. how to run a small business. how to advertise my business and attract clients. how much time and money will it take? estimate the time and cost of getting these things. if you'll need to work to earn money to buy the materials required, then the time to do that will have to be factored in. once you have a time estimate, you can start to
build a plan around your life. how many hours per week do i need to do? once you know what you need to do, and how long you think it'll take you, you can start writing out a plan to follow, to achieve your goal. it can be as simple as: "it'll take me 500 hours to learn what i need to know, and i have a year to do it, so if i assume 2 weeks' holiday i'll need to do work on this for 10 hours per week.
...And 3 more matches
Starting our Svelte Todo list app - Learn web development
in this article we will first have a look at the desired functionality of our app, then we'll create a todos.svelte component and put static markup and styles in place, leaving everything ready to start developing our to-do list app features, which we'll go on to in subsequent articles. we want our users to be able to browse, add and delete tasks, and also to mark them as complete. ...
...ll be the basic functionality that we'll be developing in this tutorial series, plus we'll look at some more advanced concepts along the way too. prerequisites: at minimum, it is recommended that you are familiar with the core html, css, and javascript languages, and have knowledge of the terminal/command line. you'll need a terminal with node + npm installed to compile and
build your app. objective: to learn how to create a svelte component, render it inside another component, pass data into it using props, and save its state. code along with us git clone the github repo (if you haven't already done it) with: git clone https://github.com/opensas/mdn-svelte-tutorial.git then to get to the current app state, run cd mdn-svelte-tutorial/02-startin...
...on=3.23.2 todo list app features this is how our todo list app wil look like once it's ready: using this ui our user will be able to: browse their tasks. mark tasks as completed/pending without deleting them. remove tasks. add new tasks. filter tasks by status: all tasks, active tasks, or completed tasks. edit tasks. mark all tasks as active/completed. remove all completed tasks.
building our first component let's create a todos.svelte component — this will contain our list of todos. create a new folder — src/components. note: you can put your components anywhere inside the src folder, but the components folder is a recognized convention to follow, allowing you to find your components easily. create a file named src/components/todos.svelte with the fol...
...And 3 more matches
Continuous Integration
when you push a commit to mozilla-central or a related repository, it initiates a large chain of
builds and tests across multiple types of infrastructure. this document will help you understand all the pieces that comprise mozilla's continuous integration systems. taskcluster and treeherder taskcluster, mozilla's continuous integration (ci) system picks up changes pushed to hg. taskcluster generate binary
builds for firefox and firefox for android across a variety of operating sytems. after the
builds are completed, they are used to run a series of correctness and performance tests. the results of taskcluster jobs (both
builds and tests) are displayed in treeherder. there is a group of individuals who are constantly monitoring treeherder, looking for broken
builds and/or tests. ...
... results in treeherder are ordered by mercurial pushes. ...
...venting any additional commits). results in treeherder are ordered by mercurial pushes. each taskcluster job is represented by a colored label; green means a job has succeeded, while other colors represent different kinds of problems. the label text indicates the job type. for a full list of job types, see the help menu in treeherder's upper-right corner. below is a list of the most common.
builds b - normal
build jobs; these jobs perform compilation and some compiled-code tests (e.g., 'make check'). be - b2g
build jobs for engineering
builds; user
builds are denoted with b, the same as for desktop and android
builds. n and ne - nightly
build jobs; these jobs are similar to b and be jobs, but are triggered on a periodic basis instead of being triggered by a push to hg. hf - static r...
...And 3 more matches
What every Mozilla translator should know
elated bugs) this way you will receive mail for bugs affecting many or even all locales. when you create a bug, if you want the person in charge of the l10n to follow up your bug you should cc: l10n@mozilla.com if you choose to make changes to your localization, you should make the changes local to your disk, push them to your hg repository on merucial, test the changes on a nightly/tinderbox
build, fix any errors if some are found and test again, and send the new changeset id as your "opt-in" revisions to the l10-drivers. there is one exception to this process. if you choose to make any changes to the productization elements (i.e. search plugins, protocol handlers, rss/live bookmarks), you will need to upload a patch with the suggested changes to bugzilla and get approval before pushing ...
...:approval1.8.xxx+ now, you can upload the changes approved to the cvs server. when you commit the changes you must write in the comment the bug number, what you have changed and who has approved. for example: bug 12345, fix typos and resize prefwindow, a=l10n as soon as you have committed, put the bug in fixed state and write fixed1.8.xxx in the keyword field you have to verify in the next
build that the changes have been successful. if so, change the state of the bug to verified and write verified1.8.xxx in the keyword field tinderbox in tinderbox you can see the result of the
build process. once you have made some changes in mercurial, as soon as the next
build is done you can check the tinderbox and see if something was wrong. l10n tinderbox when the color is green, it means t...
...e changes have been successful. if so, change the state of the bug to verified and write verified1.8.xxx in the keyword field tinderbox in tinderbox you can see the result of the
build process. once you have made some changes in mercurial, as soon as the next
build is done you can check the tinderbox and see if something was wrong. l10n tinderbox when the color is green, it means that the
build process has finished with no errors. ...
...And 3 more matches
Profiling with the Firefox Profiler
that's a bug to be fixed, since we're likely "layout thrashing". some more tips and answers to common questions are available in a mid-2017 faq document. it's a good idea to search bugzilla before filing a bug about a performance problem in firefox but sometimes it's hard to find issues that have already been reported. therefore, it's usually a good idea to file a bug. ...
...em in firefox but sometimes it's hard to find issues that have already been reported. therefore, it's usually a good idea to file a bug. 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. profiling try
builds profiling try
builds is supported, but to have symbols in the profiles, they need to be available on the symbol server. symbols for try
builds are not uploaded to the symbol server automatically, you need to trigger a "sym" job on treeherder: using treeherder's add new jobs ui, schedule a "sym" job for each platform whose "b" job you want symbols for. (and "symn" if you have an "n" job you wan...
...s is supported, but to have symbols in the profiles, they need to be available on the symbol server. symbols for try
builds are not uploaded to the symbol server automatically, you need to trigger a "sym" job on treeherder: using treeherder's add new jobs ui, schedule a "sym" job for each platform whose "b" job you want symbols for. (and "symn" if you have an "n" job you want symbols for, i.e. a
build job with the "nightly configuration.) profiling firefox mobile firefox 61 for android supports gecko profiler again; see remote profiling on android for details. the following information is old version of firefox for android. ...
...And 3 more matches
Index
to the pkcs#12 file format. if you require it in pem format, you could use the openssl pkcs12 command (that's not nss) to convert the pkcs#12 file to pem. this line is a placeholder for how to prepare a database, how to dump a cert, and how to convert data. you might have been motivated to work with nss because it is used by the mozilla applications such as firefox, thunderbird, etc. if you
build the mozilla application, it will automatically
build the nss library, too. however, if you want to work with the nss command line tools, you will have to follow the standalone nss
build instructions, and
build nss outside of the mozilla application sources. the key database file will contain at least one symmetric key, which nss will automatically create on demand, and which will be used to pr...
...sed to protect your secret (private) keys. the symmetric key can be protected with pbe by setting a master password on the database. as soon as you set a master password, an attacker stealing your key database will no longer be able to get access to your private key, unless the attacker would also succeed in stealing the master password. now you might be interest in how to get the nss sources,
building and testing nss. 3
building nss guide, nss, security this page has detailed information on how to
build nss. because nss is a cross-platform library that
builds on many different platforms and has many options, it may be complex to
build. please read these instructions carefully before attempting to
build. 4 cert_findcertbydercert nss no summary! ...
.... jss also provides a pure java interface for asn.1 types and ber/der encoding. ...
...And 3 more matches
NSS 3.46 release notes
er secret will be enabled by default, where possible. see bug 1575411 for details. ...
...l be enabled by default, where possible. see bug 1575411 for details. ...
...) bug 1542077 - mp_set_ulong and mp_set_int should return errors on bad values bug 1572791 - read out-of-bounds in der_decodetimechoice_util from sslexp_delegatecredential bug 1560593 - cleanup.sh script does not set error exit code for tests that "failed with core" bug 1566601 - add wycheproof test vectors for aes-kw bug 1571316 - curve25519_32.c:280: undefined reference to `pr_assert' when
building nss 3.45 on armhf-linux bug 1516593 - client to generate new random during renegotiation bug 1563258 - fips.sh fails due to non-existent "resp" directories bug 1561598 - remove -wmaybe-uninitialized warning in pqg.c bug 1560806 - increase softoken password max size to 500 characters bug 1568776 - output paths relative to repository in nss coverity bug 1453408 - modutil -changepw fails in...
...And 3 more matches
Rebranding SpiderMonkey (1.8.5)
for example: ../configure --enable-ctypes --with-system-nspr note: your desired configuration may be different. the only required part in this step is the ../configure command. so far, so good. now for the tricky parts. ...
...for example: ../configure --enable-ctypes --with-system-nspr note: your desired configuration may be different. the only required part in this step is the ../configure command. so far, so good. now for the tricky parts. ...
...for example: ../configure --enable-ctypes --with-system-nspr note: your desired configuration may be different. the only required part in this step is the ../configure command. so far, so good. now for the tricky parts. ...
...And 3 more matches
SpiderMonkey 1.8
ins a few new language features and api features, described in detail below. please let us know about your experiences with this release by posting in the mozilla.dev.tech.js-engine newsgroup. or, file bugs at bugzilla.mozilla.org under product: core, component: javascript engine. —9 march 2009 known issues spidermonkey 1.8 has one known significant regression from 1.7. in js_threadsafe
builds, some objects are not safe to be shared among threads. this includes iterators and generators (bug 349263) and arrays (bug 417501). in short, applications that share objects among threads in such a way that two threads could access an array, iterator, or generator object at the same time should not use spidermonkey 1.8. there is a minor known bug in the new javascript 1.8 functionality. w...
...riends, bug 451729). js.mak, an old windows-specific nmake file, has been deleted. it hasn't worked for a long time. it is fairly easy to create a microsoft visual studio project file for spidermonkey 1.8 from scratch. (if you would like to contribute and maintain a project file, please feel free to contact the spidermonkey team via email, bugzilla, or irc.) alternatively, you can install mozilla
build and run the command make -f makefile.ref in the js/src directory. spidermonkey 1.8 does not include the new tracemonkey jit or the configure-based
build system, both of which are (a) pretty darn awesome and (b) coming in spidermonkey 1.8.1. on to the fun stuff. new javascript language features javascript 1.8 adds array.reduce() and reduceright(), expression closures, and generator expression...
...ult prototype object if you pass null. instead the object is created with no prototype. js_alreadyhasownproperty and friends are new functions for examining an object without triggering resolve hooks. it was possible to configure spidermonkey 1.7 to treat c/c++ char strings as utf-8 by compiling with a non-default compiler option. in spidermonkey 1.8, it is no longer necessary to make a special
build to get this behavior. applications can turn on utf-8 at run time by calling js_setcstringsareutf8. js_encodestring is a new variation on js_getstringbytes that returns a newly allocated, writable buffer which the application must js_free. js_reportallocationoverflow can be used (instead of js_reportoutofmemory) to indicate that the script is trying to do something that would require more memory...
...And 3 more matches
Shell global objects
oked, or the string 'eval:filename' if the code was invoked by eval or something similar. drainjobqueue() take jobs from the shell's job queue in fifo order and run them until the queue is empty. setpromiserejectiontrackercallback() sets the callback to be invoked whenever a promise rejection is unhandled or a previously-unhandled rejection becomes handled. functions available only in debug
build disassemble([fun/code]) return the disassembly for the given function or code. all disassembly functions take these options as leading string arguments: -r disassemble recursively -l show line numbers -s omit source notes dis([fun/code]) disassemble functions into bytecodes. disfile('foo.js') disassemble script file into bytecodes. dissrc([fun/code]) disassemble functi...
...ghfrequencylowlimit highfrequencyhighlimit highfrequencyheapgrowthmax highfrequencyheapgrowthmin lowfrequencyheapgrowth dynamicheapgrowth dynamicmarkslice allocationthreshold minemptychunkcount maxemptychunkcount compactingenabled refreshframeslicesenabled relazifyfunctions(...) perform a gc and allow relazification of functions. accepts the same arguments as gc(). get
buildconfiguration() return an object describing some of the configuration options spidermonkey was built with. haschild(parent, child) return true if child is a child of parent, as determined by a call to tracechildren setsavedstacksrngstate(seed) set this compartment's savedstacks' rng state. getsavedframecount() return the number of savedframe instances stored in this compartment's savedstack...
...binary(str) translates the given text wasm module into its binary encoding. wasmbinarytotext(bin) translates binary encoding to text format wasmextractcode(module) extracts generated machine code from webassembly.module. islazyfunction(fun) true if fun is a lazy jsfunction. isrelazifiablefunction(fun) ture if fun is a jsfunction with a relazifiable jsscript. enableshellallocationmetadata
builder() use shellallocationmetadata
builder to supply metadata for all newly created objects. getallocationmetadata(obj) get the metadata for an object. bailout() force a bailout out of ionmonkey (if running in ionmonkey). bailafter(number) start a counter to bail once after passing the given amount of possible bailout positions in ionmonkey. injit() returns true when called within (jit-)comp...
...And 3 more matches
Preface
compile the basic code and register it with mozilla - prompts a discussion of the relationship between components and modules, of xpcom interfaces, and of the registration process in general. the top of each chapter provides a list of the major topics covered. sidebar sections are included to highlight technical details. by the end of the book, if we've done our job, you will have learned how to
build a component and you will know something about the framework for these components in gecko, which is xpcom. who should read this book no one. it is badly out of date, and much of what it says is either no longer remotely accurate, or is severely deprecated. if you are a historian, though... creating xpcom components is meant for c++ developers. though you can create xpcom components in javas...
...amiliarity with that language is useful as well. xpcom stands for the cross platform component object model. as this name implies, xpcom is similar to microsoft com. if you have any experience with this technology, much of it can be applied to xpcom. however, this book does not assume any prior knowledge of com - all of the basic com ideas will be introduced. this book provides a tutorial about
building an xpcom component that controls browsing behavior. although, xpcom can be used in many environments which are unrelated to web browsing, xpcom's main client is gecko, an open source, standards compliant, embeddable web browser, where it's easiest and most practical to illustrate xpcom's functionality. a full description of the component in this tutorial can be found in the what we'll be worki...
...rial can be found in the what we'll be working on section of the tutorial. despite what old documentation says, xpcom should not be used to make npapi plugins scriptable. starting with gecko 1.7.5 (firefox 1.0) a special npapi extension for scriptability is supported, see scripting plugins. organization of the tutorial the following list provides an overview of the steps that we will take to
build an xpcom component called weblock, which provides site blocking functionality to gecko-based browsers. each one of these steps has its own chapter, in which a number of topics associated with the step are discussed. create the generic module code for the component. use c++ macros, special string classes and smart pointers to optimize your code. define the functionality for the component; cre...
...And 3 more matches
Timing element visibility with the Intersection Observer API - Web APIs
when an ad exceeds one minute of visible time, it will be replaced with a new one. ...
...then we set up an event listener for the visibilitychange event. this event is sent when the document becomes hidden or visible, such as when the user switches tabs in their browser. the intersection obser...
...r callback to execute whenever a targeted element becomes completely obscured or first starts to become unobscured (intersection ratio 0.0) or passes through 75% visible in either direction (intersection ratio 0.75). the observer, adobserver, is created by calling intersectionobserver's constructor, passing in the callback function, intersectioncallback, and our options. we then call a function
buildcontents(), which we'll define later to actually generate and insert into the document the articles and ads we want to present. finally, we set up an interval which triggers once a second to handle any necessary refreshing. we need a one second refresh since we're displaying timers in all visible ads for the purposes of this example. you may not need an interval at all, or you might do it differe...
...And 3 more matches
Porting the Library Detector - Archive of obsolete content
object contains a function called test(): if the function finds the library, it defines various additional properties for the test object, such as a version property containing the library version. each test also contains a chrome:// url pointing to the icon associated with its library. the script listens to gbrowser's domcontentloaded event. when this is triggered, the testlibraries() function
builds an array of libraries by iterating through the tests and adding an entry for each library which passes. once the list is built, the switchlibraries() function constructs a xul statusbarpanel element for each library it found, populates it with the icon at the corresponding chrome:// url, and adds it to the box. finally, it listens to gbrowser's tabselect event, to update the contents of the bo...
...e user interface showing the library array the widget module is a natural fit for displaying the library list. we'll specify its content using html, so we can display an array of icons. the widget must be able to display different content for different windows, so we'll use the widgetview object. ...
... module is a natural fit for displaying the library list. we'll specify its content using html, so we can display an array of icons. the widget must be able to display different content for different windows, so we'll use the widgetview object. ...
...And 2 more matches
Java in Firefox Extensions - Archive of obsolete content
rant full privileges to java within a firefox extension, but it is easier to understand and doesn't require creation of a xpcom component. ...
...'t require creation of a xpcom component. ...
...xtension full privileges var extensionurl = "file:///" + extensionpath.path.replace(/\\/g,"/"); var classloaderjarpath = extensionurl + "/java/javafirefoxextensionutils.jar"; // add the paths for all the other jar files that you will be using var myjarpath = extensionurl + "/java/testjava.jar"; // seems you don't actually have to replace the backslashes as they work as well var urlarray = []; //
build a regular javascript array (liveconnect will auto-convert to a java array) urlarray[0] = new java.net.url(myjarpath); urlarray[1] = new java.net.url(classloaderjarpath); var cl = java.net.urlclassloader.newinstance(urlarray); //set security policies using the above policyadd() function policyadd(cl, urlarray); now you can begin using liveconnect, including referencing the classes in your ...
...And 2 more matches
Mozilla Application Framework - Archive of obsolete content
we provide a comprehensive framework that does much of the work for you, tools to help you develop your apps, and a community of people to help. ...
...n 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. dom inspector a tool for inspecting and editing the structure and widgets of your user interface while your application is running. xulmaker a gui
builder currently under development that lets you drag-and-drop widgets onto a grid to
build your user interface. bugzilla the mozilla bug tracking webtool to help you track progress in fixing bugs and implementing features that affect your applications. lxr a web interface to the mozilla codebase that shows you every file in the repository as well as a line-by-line breakdown of who changed w...
...and implementing features that affect your applications. lxr a web interface to the mozilla codebase that shows you every file in the repository as well as a line-by-line breakdown of who changed which line when in each file bonsai a web interface to the checkin log that you can query for checkins between certain dates, of certain files, or by certain developers. tinderbox our 24/7
build and test webtool that constantly
builds, tests, and reports on the mozilla application suite on multiple platforms so you can see the state of the application at any given point in time. community a large, active development community that interacts via newsgroups, mailing lists, irc channels, and web sites. flexible licensing with three licenses to choose from (mpl, lgpl, and gpl) so you c...
...And 2 more matches
When To Use ifdefs - Archive of obsolete content
the mozilla codebase is used for many different projects and products, including firefox, thunderbird, xulrunner, and many others. sometimes the same basic code is used for multiple projects, but there are small differences needed. "ifdefs", or conditional instructions, are used to
build different code what are ifdefs ifdefs are conditional directives to a text preprocessor which mark that certain blocks of code are used only in certain conditions. in this document, the term is used more loosely to discuss any kind of conditional that differentiates between different
build configurations. when are ifdefs used? there are three major kinds of ifdefs in use in the mozilla tree: platform/widget ifdefs, feature ifdefs, and application-specific ifdefs: platform/widget ifdefs the mozi...
...es: since this code is downloaded on multiple platforms, platform-specific ifdefs are generally out of the question. for an example of platform-specfic ifdefs, see nscrt.h. feature ifdefs the mozilla code has many features that can be enabled or disabled by configure flags. for instance, it is possible to disable most of the xul rendering engine by specifying --disable-xul when configuring the
build. when adding ifdefs that implement these configure flags, care must be taken to obey the
build dependencies. for instance, xpcom, the spidermonkey javascript engine, and the networking engine do not know anything about xul and should not have any ifdefs based on --disable-xul. one special "feature ifdef" that deserves special attention is "moz_xul_app". this variable marks any application that is...
...based on --disable-xul. one special "feature ifdef" that deserves special attention is "moz_xul_app". this variable marks any application that is using the "toolkit". moz_xul_app ifdefs are not acceptable in tier 9, but are acceptable (even necessary) in later tiers. for an example of feature ifdefs, see layout/makefile.in. application-specific ifdefs finally, each application/project needs to
build different pieces of code. application ifdefs should only be made in application-specific code. this is the trickiest kind of ifdef, because it is frequently hard to determine what code is "shared" and what code is "application-specific". as a general rule, any code in tier 2, tier 9, or tier 50 is shared code, and should not have application-specific ifdefs. any code in later tiers is application...
...And 2 more matches
Mac stub installer - Archive of obsolete content
where does the mac stub installer code reside? the mac stub installer project resides at: <http://lxr.mozilla.org/seamonkey/sou...ll/wizard/mac/> the mac stub installer source code resides at: <http://lxr.mozilla.org/seamonkey/sou...izard/mac/src/> how do we get setup to debug the mac installer? ...
... where does the mac stub installer code reside? the mac stub installer project resides at: <http://lxr.mozilla.org/seamonkey/sou...ll/wizard/mac/> the mac stub installer source code resides at: <http://lxr.mozilla.org/seamonkey/sou...izard/mac/src/> how do we get setup to debug the mac installer? ...
...resides at: <http://lxr.mozilla.org/seamonkey/sou...izard/mac/src/> how do we get setup to debug the mac installer?
build the mac installer (debug or non-debug target) using miw.mcp grab a nightly
build, say from <http://ftp.mozilla.org/pub/mozilla/n...taller.sea.bin> drop in the installer binary next to the "mozilla installer" in the "mozilla installer" folder created by unstuffing the opt
build. run the installer from the opt "mozilla installer" folder. alternative to steps 3 and 4 copy the "installer modules" folder from the "mozilla installer" folder into the "mac
build" folder that contains the
build debug or non-debug installer binary next to miw.mcp. copy the license and readme from the "mozilla installer" folder" to the "mac
build" folder itself. now run the built installer from t...
...And 2 more matches
How to implement a custom XUL query processor component - Archive of obsolete content
custom query processors are xpcom components, must implement the nsixultemplatequeryprocessor interface and follow some conventions for when registering the component. ...
... return this._data[name]; }, // return an object instead of a string for convenient comparison purposes // or null to say just use string value getbindingobjectfor: function(avar) { return null; }, // called when a rule matches this item. ...
... } templatequeryprocessor.prototype = { queryinterface: xpcomutils.generateqi([components.interfaces.nsixultemplatequeryprocessor]), classdescription: "sample xul template query processor", classid: components.id("{282cc4ea-a49c-44fc-81f4-1f03cbb7825f}"), contractid: "@mozilla.org/xul/xul-query-processor;1?name=simpledata", getdatasource: function(adatasources, arootnode, aistrusted, a
builder, ashoulddelay
building) { // todo: parse the adatasources variable // for now, ignore everything and let's just signal that we have data return this._data; }, initializefor
building: function(adatasource, a
builder, arootnode) { // perform any initialization that can be delayed until the content
builder // is ready for us to start }, done: function() { // called w...
...And 2 more matches
Filtering - Archive of obsolete content
for instance, to apply a filter, you might add a new <triple> element. to remove the filter, the <triple> should be removed again. ...
...if this is set, we add a filter, otherwise we remove it. the code is fairly straightforward. a new <triple> element is created and the object attribute is set to the value to filter by. for example, the resulting triple for the netherlands might be: <triple subject="?photo" predicate="http://...
...if this is set, we add a filter, otherwise we remove it. the code is fairly straightforward. a new <triple> element is created and the object attribute is set to the value to filter by. for example, the resulting triple for the netherlands might be: <triple subject="?photo" predicate="http://www.xulpla...
...And 2 more matches
Using Remote XUL - Archive of obsolete content
on ui widgets (menus, buttons, toolbars, etc.) and many sophisticated ones (trees, browsers, color pickers). xul is often used by desktop applications like mozilla but can also be loaded from a web server and rendered inside the content pane of a compatible browser. xul loaded and rendered in this way is called remote xul and can be used for basic functions like web site navigation as well as to
build sophisticated web-based applications. [***aw: we should have a screenshot here of a xul document loaded in a content window***] this tutorial walks you through the process of
building xul-based navigation for the mozilla.org web site. after completing the tutorial you should understand how to: create xul documents; serve them from a web server; use cascading style sheets (css) to change th...
...vely, but for other sites you may need to provide another form of navigation as well. prerequisites to understand this tutorial you should have experience with tag-based languages like html along with basic javascript, css, and the dom. knowledge of xml and its syntax is useful but not required. you also need a text editor and a web browser that can render xul, like mozilla, or firefox. if you
build a xul file along with this tutorial and put it onto a web server, you need to configure your web server to specify the content type of xul files as application/vnd.mozilla.xul+xml. for apache, you can do this by adding the following line to your mime.types file: application/vnd.mozilla.xul+xml .xul alternately, add this line to your httpd.conf file or, if the apache server is configured to all...
....mozilla.org/projects/" /> <menuitem label="ports" value="https://www.mozilla.org/ports/" /> <menuitem label="module owners" value="https://www.mozilla.org/owners.html" /> <menuitem label="hacking" value="https://www.mozilla.org/hacking/" /> <menuitem label="get the source" value="https://www.mozilla.org/source.html" /> <menuitem label="
build it" value="https://www.mozilla.org/
build/" /> </menupopup> </menu> <menu label="testing"> <menupopup> <menuitem label="download" value="https://www.mozilla.org/releases/" /> <menuitem label="report a bug" value="https://bugzilla.mozilla.org/enter_bug.cgi?format=guided" /> <menuitem label="bugzilla" value="https://www.mozilla.org/...
...And 2 more matches
2006-11-24 - Archive of obsolete content
summary: mozilla.dev.
builds - november 17th to november 24th 2006 trouble
building xulrunner 1.8.4 on winxp using mingw32 november 20th: joe is trying to
build xulrunner using the ming compiler on windowsxp. however he has been unsuccessful and a bunch of errors. to view the joe's error please check the posting. he is using make 3.80, working with the source tarball for xulrunner 1.8.4,running "make -f client.mk distclean" followed by "make -f client.mk
build_all". joe is asking for help on a possible solution to fix his problem.
building xpcom components with msvs 2005 november 21st: buffaloaf is having trouble getting a personal xpcom component to work under xulrunner when compiled with msvs 2005. luke is migrating all of his code to compile with vc8 and is having some pro...
...error_xpc_gs_returned_failure) [nsijscid.getservice]" nsresult: "0x80570016 (ns_error_xpc_gs_returned_failure)" location: "js frame :: chrome://modzilla/content/js/pkg_zillacom.js :: <top_level> :: line 1202" data: no] he is running xulrunner v1.8.0.4. luke wants to know if compiling xulrunner with a static crt is better or worse than compiling with the mscvr80.dll dependency. ...
...lt: "0x80570016 (ns_error_xpc_gs_returned_failure)" location: "js frame :: chrome://modzilla/content/js/pkg_zillacom.js :: <top_level> :: line 1202" data: no] he is running xulrunner v1.8.0.4. luke wants to know if compiling xulrunner with a static crt is better or worse than compiling with the mscvr80.dll dependency. firefox 1.5
build on windows with gtk2 november 23rd: vin is trying to
build firefox 1.5.0.3 on windows xp. ...
...And 2 more matches
Why RSS Slash is Popular - Counting Your Comments - Archive of obsolete content
mation in an <item>, so the rss slash module exists to fill in this gap. ...
...ists to fill in this gap. ...
...itle> <description>an rss example with slash</description> <last
builddate>sun, 15 may 2005 13:02:08 -0500</last
builddate> <link>http://www.example.com</link> <item> <title>review of sin city</title> <guid>d77d2e80-0487-4e8c-a35d-a93f12a0ff7d:2005/05/15/114</guid> <pubdate>sun, 15 may 2005 13:02:08 -0500</last
builddate></pubdate> <link>http://www.example.com/blog/2005/05/15/114</link> <slash:comments>43</slash:comments> </item> <item> <title>what is the 3571st prime number</title> <guid>d77d2e80-0487-4e8c-a35d-a93f12a0ff7d:2005/05/15/113</guid> <pubdate>sun, 15 may 2005 10:55:12 -0500</last
builddate></pubdate> ...
...And 2 more matches
NSPR Release Engineering Guide - Archive of obsolete content
this paper is for engineers performing formal release for the netscape portable runtime (nspr) across all platforms. nspr generally follows the iplanet product lifecycle. ...
...oduct lifecycle. ...
..., 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 explode.pl run the test suite on all targets, using binaries & headers from shipped bits resolve testing anomalies tag the tree with nsprpub_release_x_y[_z] release candidate checkout a whole new tree using tag (including fixes) tag the treey with nsprpub_rel...
...And 2 more matches
XUL Parser in Python - Archive of obsolete content
warning: the content of this article may be out of date. this article is from 2000. 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. with new widgets and attributes landing all the time, i wanted to get some quicker way of looking at the xul--at particular
builds, at particular widgets, at which elements had which attributes, etc. the script writes out all the attributes and none of the values, but the parser itself is seeing the elements, their attributes, and the values of those attributes, and you just have to ask for them if you want them. for example, you could easily adapt ...
...ments had which attributes, etc. the script writes out all the attributes and none of the values, but the parser itself is seeing the elements, their attributes, and the values of those attributes, and you just have to ask for them if you want them. for example, you could easily adapt this to: return the id values of all the elements take elements on the command line and only spell them out
build new chrome subdirectories (i.e. new "packages") on the fly using search and replace. as i adapt the script in these ways and try to further generalize the actual code as i get time, i will make it available here. in the explanation section below, i try to say a little something about how this script works. it's really just a wrapper around python's xmllib xml parser, but i had to sort of fool a...
...a support. i will make these adjustments and change it into a real module when i get a second, so that someone can instantiate the parser from their own scripts and use it more flexibly: >>> import xultool >>> myxp = xulparser() >>> chrome_dir = 'd:\src\mozilla\xpfe' >>> res = myxp.parsexul(chrome_dir, 'window', 'id') where something like the above would write out all the xul window ids in the
build. ...
...And 2 more matches
Explaining basic 3D theory - Game development
ed by these attributes: position: identifies it in a 3d space (x, y, z). color: holds an rgba value (r, g and b for the red, green, and blue channels, alpha for transparency — all values range from 0.0 to 1.0). normal: a way to describe the direction the vertex is facing. texture: a 2d image that the vertex can use to decorate the surface it is part of instead of a simple color. you can
build geometry using this information — here is an example of a cube: a face of the given shape is a plane between vertices. for example, a cube has 8 different vertices (points in space) and 6 different faces, each constructed out of 4 vertices. a normal defines which way the face is directed in. also, by connecting the points we're creating the edges of the cube. the geometry is built from a ver...
...tput merging some processing is also applied to ignore information that is not needed — for example the parameters of objects that are outside of the screen or behind other objects, and thus not visible, are not calculated. ...
...lied to ignore information that is not needed — for example the parameters of objects that are outside of the screen or behind other objects, and thus not visible, are not calculated. ...
...And 2 more matches
Practical positioning examples - Learn web development
prerequisites: html basics (study introduction to html), and an idea of how css works (study introduction to css.) objective: to get an idea of the practicalities of positioning a tabbed info-box the first example we'll look at is a classic tabbed info box — a very common feature used when you want to pack a lot of information into a small area. this includes information-heavy apps like strategy/war games, mobile versions of websites where the screen is narrow and space is limited, and compact information boxes where you might want to make lots of information available without having it fill the whole ui. ...
...mobile versions of websites where the screen is narrow and space is limited, and compact information boxes where you might want to make lots of information available without having it fill the whole ui. our simple example will look like this once we are finished: note: you can see the finished example running live at info-box.html (source code). check it out to get an idea of what you will be
building in this section of the article. you might be thinking "why not just create the separate tabs as separate webpages, and just have the tabs clicking through to the separate pages to create the effect?" this code would be simpler, yes, but then each separate "page" view would actually be a newly-loaded webpage, which would make it harder to save information across views, and integrate this feat...
...ull web page. but not only that — we'll give it fixed position so that it stays in the same position in the browser window. when the main content scrolls, the info-box will stay in the same position on the screen. our finished example will look like this: note: you can see the finished example running live at fixed-info-box.html (source code). check it out to get an idea of what you will be
building in this section of the article. 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. html additions first of all, we need some additional html to represent the web site main content. add the following <section> just below your opening <body> tag, just before the existing section: <section...
...And 2 more matches
Responsive design - Learn web development
lows web pages to alter their layout and appearance to suit different screen widths, resolutions, etc. it is an idea that changed the way we design for a multi-device web, and in this article, we'll help you understand the main techniques you need to know to master it. prerequisites: html basics (study introduction to html), and an idea of how css works (study css first steps and css
building blocks.) objective: to understand the fundamental concepts and history of responsive design. historic website layouts at one point in history you had two options when designing a website: you could create a liquid site, which would stretch to fill the browser window or a fixed width site, which would be a fixed size in pixels. these two approaches tended to result in ...
... became more powerful and able to display full websites, this was frustrating to mobile users who found themselves trapped in the site's mobile version and unable to access information they knew was on the full-featured desktop version of the site. flexible layout before responsive design a number of approaches were developed to try to solve the downsides of the liquid or fixed-width methods of
building websites. in 2004 cameron adams wrote a post entitled resolution dependent layout, describing a method of creating a design that could adapt to different screen resolutions. this approach required javascript to detect the screen resolution and load the correct css. zoe mickley gillenwater was instrumental in her work to describe and formalize the different ways in which flexible sites could b...
...olumn layout when you know that you have enough screen width to handle it. this is often described as mobile first design. find out more in the mdn documentation for media queries. flexible grids responsive sites don't just change their layout between breakpoints, they are built on flexible grids. a flexible grid means that you don't need to target every possible device size that there is, and
build a pixel perfect layout for it. that approach would be impossible given the vast number of differently-sized devices that exist, and the fact that on desktop at least, people do not always have their browser window maximized. by using a flexible grid, you only need to add in a breakpoint and change the design at the point where the content starts to look bad. for example, if the line lengths beco...
...And 2 more matches
Advanced form styling - Learn web development
rs mostly seemed to be using the -webkit- prefixed version, so it was better for compatibility. if you look at the reference page you'll see a lot of different possible values listed for -webkit-appearance, however by far the most helpful value, and probably the only one you'll use, is none. this stops any control you apply it to from using system-level styling, as much as possible, and lets you
build up the styles yourself using css. 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> ...
... and colors. for example, firefox will apply color and background-color when set on the <option> elements, chrome won't. neither of them will apply any kind of spacing (e.g. padding). the same is also true of the autocomplete list that appears for the datalist. if you really need full control over the option styling, you'll have to either use some kind of library to generate a custom control, or
build your own custom control, or in the case of select use the multiple attribute, which makes all the options appear on the page, sidestepping this particular problem: <select id="select" name="select" multiple> ... </select> of course, this might also not fit in with the design you are going for, but it's worth noting! date input types the date/time input types (datetime-local, time, week, mon...
...we've got in this demo looks fine. however, the internal parts of the control (e.g. the popup calendar that you use pick a date, the spinner that you can use to increment/decrement values) are not stylable at all, and you can't get rid of them using appearence: none;. if you really need full control over the styling, you'll have to either use some kind of library to generate a custom control, or
build your own. note: it is worth mentioning <input type="number"> here too — this also has a spinner that you can use to increment/decrement values, so potentially suffers from the same problem. however, in the case of the number type the data being collected is simpler, and it is easy to just use a text input type instead if desired (or tel if you want mobile browsers to show the numeric keypad).
...And 2 more matches
How to structure a web form - Learn web development
tail at the elements used to provide structure and meaning to the different parts of a form. prerequisites: basic computer literacy, and a basic understanding of html. objective: to understand how to structure html forms and give them semantics so they are usable and accessible. the flexibility of forms makes them one of the most complex structures in html; you can
build any kind of basic form using dedicated form elements and attributes. using correct structure when
building an html form will help ensure that the form is both usable and accessible. the <form> element the <form> element formally defines a form and attributes that determine the form's behavior. each time you want to create an html form, you must start it by using this element, nesting all the co...
...r use cases, and in general the <fieldset> element can also be used to section a form. ideally, long forms should be spread across multiple pages, but if a form is getting long and must be on a single page, putting the different related sections inside different fieldsets improves usability. because of its influence over assistive technology, the <fieldset> element is one of the key elements for
building accessible forms; however it is your responsibility not to abuse it. if possible, each time you
build a form, try to listen to how a screen reader interprets it. if it sounds odd, try to improve the form structure. the <label> element as we saw in the previous article, the <label> element is the formal way to define a label for an html form widget. this is the most important element if you w...
...essible forms; however it is your responsibility not to abuse it. if possible, each time you
build a form, try to listen to how a screen reader interprets it. if it sounds odd, try to improve the form structure. the <label> element as we saw in the previous article, the <label> element is the formal way to define a label for an html form widget. this is the most important element if you want to
build accessible forms — when implemented properly, screenreaders will speak a form element's label along with any related instructions, as well as it being useful for sighted users. take this example, which we saw in the previous article: <label for="name">name:</label> <input type="text" id="name" name="user_name"> with the <label> associated correctly with the <input> via its for attribute (whic...
...And 2 more matches
Graceful asynchronous programming with Promises - Learn web development
mples that you'll encounter in web apis. in the first example, we'll use the fetch() method to fetch an image from the web, the blob() method to transform the fetch response's raw body contents into a blob object, and then display that blob inside an <img> element. this is very similar to the example we looked at in the first article of the series, but we'll do it a bit differently as we get you
building your own promise-based code. note: the following example will not work if you just run it directly from the file (i.e. via a file:// url). you need to run it through a local testing server, or use an online solution such as glitch or github pages. first of all, download our simple html template and the sample image file that we'll fetch. add a <script> element at the bottom of t...
...ning all those results as a parameter. if any of the promises passed to promise.all() reject, the whole block will reject. this can be very useful. imagine that we’re fetching information to dynamically populate a ui feature on our page with content. in many cases, it makes sense to receive all the data and only then show the complete content, rather than displaying partial information. let's
build another example to show this in action. download a fresh copy of our page template, and again put a <script> element just before the closing </body> tag. download our source files (coffee.jpg, tea.jpg, and description.txt), or feel free to substitute your own. in our script, we'll first define a function that returns the promises we want to send to promise.all(). this would be e...
...) .catch(e => { console.log(`there has been a problem with your fetch operation for resource "${url}": ` + e.message); }) .finally(() => { console.log(`fetch attempt for "${url}" finished.`); }); } this logs a simple message to the console to tell us when each fetch attempt has finished. note: then()/catch()/finally() is the async equivalent to try/catch/finally in sync code.
building your own custom promises the good news is that, in a way, you've already built your own promises. when you've chained multiple promises together with .then() blocks, or otherwise combined them to create custom functionality, you are already making your own custom async promise-based functions. take our fetchanddecode() function from the previous examples, for example. combining different pro...
...And 2 more matches
A first splash into JavaScript - Learn web development
prerequisites: basic computer literacy, a basic understanding of html and css, an understanding of what javascript is. ...
...is requires a mixture of hard work, experience with the programming syntax, and practice — plus a bit of creativity. the more you code, the better you'll get at it. we can't promise that you'll develop "programmer brain" in five minutes, but we will give you plenty of opportunity to practice thinking like a programmer throughout the course. ...
...n't promise that you'll develop "programmer brain" in five minutes, but we will give you plenty of opportunity to practice thinking like a programmer throughout the course. with that in mind, let's look at the example we'll be
building up in this article, and review the general process of dissecting it into tangible tasks. ...
...And 2 more matches
What is JavaScript? - Learn web development
to our html content, for example setting background colors and fonts, and laying out our content in multiple columns. javascript is a scripting language that enables you to create dynamically updating content, control multimedia, animate images, and pretty much everything else. (okay, not everything, but it is amazing what you can achieve with a few lines of javascript code.) the three layers
build on top of one another nicely. let's take a simple text label as an example. we can mark it up using html to give it structure and purpose: <p>player 1: chris</p> then we can add some css into the mix to get it looking nice: p { font-family: 'helvetica neue', helvetica, sans-serif; letter-spacing: 1px; text-transform: uppercase; text-align: center; border: 2px solid rgba(0,0,200,0.6...
...lick event in our example above to detect when the button is clicked and then run the code that updates the text label. and much more! what is even more exciting however is the functionality built on top of the client-side javascript language. so-called application programming interfaces (apis) provide you with extra superpowers to use in your javascript code. ...
...on top of the client-side javascript language. so-called application programming interfaces (apis) provide you with extra superpowers to use in your javascript code. apis are ready-made sets of code
building blocks that allow a developer to implement programs that would otherwise be hard or impossible to implement. they do the same thing for programming that ready-made furniture kits do for home
building — it is much easier to take ready-cut panels and screw them together to make a bookshelf than it is to work out the design yourself, go and find the correct wood, cut all the panels to the right size and shape, find the correct-sized screws, and then put them together to make a bookshelf. they generally fall into two categories. browser apis are built into your web browser, and are able ...
...And 2 more matches
Object prototypes - Learn web development
used to add methods to existing constructors. note: this article covers traditional javascript constructors and classes. in the next article, we talk about the modern way of doing things, which provides easier syntax to achieve the same things — see ecmascript 2015 classes. prerequisites: understanding javascript functions, familiarity with javascript basics (see first steps and
building blocks), and oojs basics (see introduction to objects). objective: to understand javascript object prototypes, how prototype chains work, and how to add new methods onto the prototype property. a prototype-based language? javascript is often described as a prototype-based language — to provide inheritance, objects can have a prototype object, which acts as a template obje...
...structor. at this point we'll finally add something to our person() constructor's prototype. go back to our oojs-class-further-exercises.html example and make a local copy of the source code. below the existing javascript, add the following code, which adds a new method to the constructor's prototype property: person.prototype.farewell = function() { alert(this.name.first + ' has left the
building. bye for now!'); }; save the code and load the page in the browser, and try entering the following into the text input: person1.farewell(); you should get an alert message displayed, featuring the person's name as defined inside the constructor. this is really useful, but what is even more useful is that the whole inheritance chain has updated dynamically, automatically making this ne...
...bye for now!'); }; but the farewell() method is still available on the person1 object instance — its members have been automatically updated to include the newly defined farewell() method. note: if you are having trouble getting this example to work, have a look at our oojs-class-prototype.html example (see it running live also). you will rarely see properties defined on the prototype ...
...And 2 more matches
Understanding client-side JavaScript frameworks - Learn web development
many modern companies use frameworks as a standard part of their tooling, so many front-end development jobs now require framework experience. as an aspiring front-end developer, it can be hard to work out where to begin when learning frameworks — there are so many different frameworks to choose from, new ones appear all the time, they mostly work in a similar way but do some things differently, and there are some specific things to be careful about when using frameworks. ...
...rks" prerequisites you should really learn the basics of the core web languages first before attempting to move on to learning client-side frameworks — html, css, and especially javascript. your code will be richer and more professional as a result, and you'll be able to troubleshoot problems with more confidence if you understand the fundamental web platform features that the frameworks are
building on top of. looking to become a front-end web developer? we have put together a course that includes all the essential information you need to work towards your goal. get started introductory guides 1. introduction to client-side frameworks we begin our look at frameworks with a general overview of the area, looking at a brief history of javascript and frameworks, why frameworks exist...
...ks tend to work from a high level and the differences between them. react tutorials note: react tutorials last tested in may 2020, with react/reactdom 16.13.1 and create-react-app 3.4.1. if you need to check your code against our version, you can find a finished version of the sample react app code in our todo-react repository. for a running live version, see https://mdn.github.io/todo-react-
build/. 1. getting started with react in this article we will say hello to react. 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. 2. beginning our react todo list let's say that we’ve been tasked with creating a proo...
...And 2 more matches
Android-specific test suites
oid-specific test suites that run on the firefox for android codebase: android-test ensures that the code passes unit tests. android-checkstyle ensures that the java coding style is consistent throughout. android-findbugs ensures that the code avoids common java coding errors. android-lint ensures that the code avoids common android coding errors. all of these suites require a functioning
build of firefox for android — either a full
build or an artifact
build. all of the suites are configured by and invoked using gradle. 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;...
...they can only test java code; there's no connection to the gecko rendering engine. use these to test java data structures and logic, and to ensure that basic android integration works. they should always be preferred to on-device robocop tests. see https://developer.android.com/training/testing/unit-testing/local-unit-tests.html for more details. running android-test to run android-test, first
build firefox for android with your changes; then run ./mach android test this will run the tests and report the results to stdout, as well as produce an html report. while developing, you can launch these tests from within android studio, which is the fastest way to iterate on code and tests. disabling one failing test there is no manifest listing the android local unit tests. to disable a single ...
...roid-test is currently owned by :sebastian and :nalexander. file tickets in the firefox for android product in bugzilla. android-checkstyle verifies that the java coding style is consistent throughout. see http://checkstyle.sourceforge.net/index.html and https://docs.gradle.org/2.14/userguide/checkstyle_plugin.html for more details. running android-checkstyle to run android-checkstyle, first
build firefox for android with your changes; then run ./mach android checkstyle this will run the tests and report the results to stdout, as well as produce an html report. disabling one failing test in general, it's not sensible to allow java code that doesn't observe the existing coding style; in this respect, this job is equivalent to the eslint jobs that check the javascript coding style throug...
...And 2 more matches
Investigating leaks using DMD heap scan mode
through shutdown. you could modify these steps for leaks that go away in shutdown by collecting a cc and dmd log prior to shutdown. however, in that case it may be easier to use refcount logging, or rr with a conditional breakpoint set on calls to release() for the leaking object, to see what object actually does the release that causes the leaked object to go away. prerequisites a debug dmd
build of firefox. this page describes how to do that. this should probably be an optimized
build. non-optimized dmd
builds will generate better stack traces, but they can be so slow as to be useless. the
build is going to be very slow, so you may need to disable some shutdown checks. first, in toolkit/components/terminator/nsterminator.cpp, delete everything in runwatchdog but the call to ns_setcurren...
... you need the cycle collector analysis script find_roots.py, which can be downloaded as part of this repo on github. generating logs the next step is to generate a number of log files. you need to get a shutdown cc log and a dmd log, for a single run. ...
...pp, as this also seems to trigger when shutdown is extremely slow. you need the cycle collector analysis script find_roots.py, which can be downloaded as part of this repo on github. generating logs the next step is to generate a number of log files. you need to get a shutdown cc log and a dmd log, for a single run. definitions i'll write $objdir for the object directory for your firefox dmd
build, $srcdir for the top level of the firefox source directory, and $heapgraph for the location of the heapgraph repo, and $logdir for the location you want logs to go to. $logdir should end in a path separator. for instance, ~/logs/leak/. the command you need to run firefox will look something like this: xpcom_mem_bloat_log=1 moz_cc_log_shutdown=1 moz_disable_content_sandbox=t moz_cc_log_directory...
...And 2 more matches
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. in the past you had to need to run mach
buildsymbols manually, but this is no longer needed. the profiler automatically reads symbols from the pdb files that are generated during the
build process. you probably need a 64 bit
build of firefox for this to work, though. it looks like we consume too much memory when creating the symbol table for this to work in 32 bit firefox
builds. unfortunately, 32 bit is still the default when
building firefox locally. you need to add the lines ac_add_options --target=x86_64-pc-mingw32 and ac_add_options --host=x86_64-pc-mingw32 to your mozconfig in order to
build a 64 bit
build of firefox. profiling local talos runs i...
...follow the steps below: note: you only need to do this if you're on windows and you've built firefox yourself. for any official release of firefox (nightly, beta, etc), you do not need to use these steps. ...
...y. you need to add the lines ac_add_options --target=x86_64-pc-mingw32 and ac_add_options --host=x86_64-pc-mingw32 to your mozconfig in order to
build a 64 bit
build of firefox. 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. follow the steps below: note: you only need to do this if you're on windows and you've built firefox yourself. for any official release of firefox (nightly, beta, etc), you do not need to use these steps. ...
...And 2 more matches
Refcount tracing and balancing
step is to run firefox with refcount tracing enabled, which produces one or more log files. refcount tracing logs calls to addref and release, preferably for a particular set of classes, including call-stacks in symbolic form (on platforms that support this). refcount balancing is a follow-up step that analyzes the resulting log to help a developer figure out where refcounting went wrong. how to
build for refcount tracing
build with --enable-debug or --enable-logrefcnt. how to run with refcount tracing on there are several environment variables that can be used. first, you select one of three environment variables to choose what kind of logging you want. you almost certainly want xpcom_mem_refcnt_log. note: due to an issue with the sandbox on windows (bug 1345568), refcount logging curren...
...e size of the log file and also improves the performance. perl -w tools/rb/filter-log.pl --object 0x00253ab0 < ./refcounts.log > my-leak.log linux users the log file generated on linux system often lack function names, file names and line numbers. linux users need to run a script to fix the call stack. python tools/rb/fix_stacks.py < ./refcounts.log > fixed_stack.log post-processing step 3:
building the balance tree now that you've the log file fully prepared, you can
build a balance tree. this process takes all the stack addref() and release() stack traces and munges them into a call graph. each node in the graph represents a call site. each call site has a balance factor, which is positive if more addref()s than release()es have happened at the site, zero if the number of addref()s and...
...rocess takes all the stack addref() and release() stack traces and munges them into a call graph. each node in the graph represents a call site. each call site has a balance factor, which is positive if more addref()s than release()es have happened at the site, zero if the number of addref()s and release()es are equal, and negative if more release()es than addref()s have happened at the site. ...
...And 2 more matches
JSS
nt to read these documents: introduction to public-key cryptography. explains the basic concepts of public-key cryptography that underlie nss and jss. introduction to ssl. introduces the ssl protocol, including information about cryptographic ciphers supported by ssl and the steps involved in the ssl handshake. ...
...luding information about cryptographic ciphers supported by ssl and the steps involved in the ssl handshake. for information on downloading nss releases, see nss sources
building testing. read using jss to get you started with development after you've built and downloaded it. ...
...ographic ciphers supported by ssl and the steps involved in the ssl handshake. for information on downloading nss releases, see nss sources
building testing. read using jss to get you started with development after you've built and downloaded it. ...
...And 2 more matches
NSS 3.47 release notes
bug 1542207 - limit policy check on signature algorithms to known algorithms bug 1560329 - drbg: add continuous self-tes...
... bug 1542207 - limit policy check on signature algorithms to known algorithms bug 1560329 - drbg: add continuous self-test on entropy source bug 1579290 -...
...l nested s/mime test messages for thunderbird bug 1399095 - allow nss-try to be used to test nspr changes bug 1267894 - libssl should allow selecting the order of cipher suites in clienthello bug 1581507 - fix unportable grep expression in test scripts bug 1234830 - [cid 1242894][cid 1242852] unused values bug 1580126 - fix
build failure on aarch64_be while
building freebl/gcm bug 1385039 -
build nspr tests as part of nss continuous integration bug 1581391 - fix
build on openbsd/arm64 after bug #1559012 bug 1581041 - mach-commands -> mach-completion bug 1558313 - code bugs found by clang scanners. bug 1542207 - limit policy check on signature algorithms to known algorithms bug 1560329 - drbg: add continuous self-test on entropy source bug 1579290 - asan
builds should disable lsan wh...
...And 2 more matches
NSS 3.50 release notes
arballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/nss_3_50_rtm/src/ other releases are available in nss releases. notable changes in nss 3.50 verified primitives from hacl* were updated, bringing performance improvements for several platforms. ...
...poly1305 due to a
build issue; such platforms will fall-back to less optimized algorithms. see bug 1609569 for details. updated dtls 1.3 implementation to draft-30. see bug 1599514 for details. added nist sp800-108 kbkdf - pkcs#11 implementation. see bug 1599603 for details. bugs fixed in nss 3.50 bug 1599514 - update dtls 1.3 implementation to draft-30 bug 1603438 - fix native tools
build failure due to lack of zlib include dir if external bug 1599603 - nist sp800-108 kbkdf - pkcs#11 implementation bug 1606992 - cache the most recent pbkdf1 password hash, to speed up repeated sdr operations, important with the increased kdf iteration counts. nss 3.49.1 sped up pbkdf2 operations, though pbkdf1 operations are also relevant for older nss databases (also included in nss 3.49.2) bug...
... lack of zlib include dir if external bug 1599603 - nist sp800-108 kbkdf - pkcs#11 implementation bug 1606992 - cache the most recent pbkdf1 password hash, to speed up repeated sdr operations, important with the increased kdf iteration counts. ...
...And 2 more matches
NSS 3.53 release notes
nss_3_53_rtm. nss 3.53 requires nspr 4.25 or newer. nss 3.53 source distributions are available on ftp.mozilla.org for secure https download: source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/nss_3_53_rtm/src/ other releases are available in nss releases. notable changes in nss 3.53 when using the makefiles, nss can be built in parallel, speeding up those
builds to more similar performance as the
build.sh/ninja/gyp system. (bug 290526) seed is now moved into a new freebl directory freebl/deprecated (bug 1636389). seed will be disabled by default in a future release of nss. at that time, users will need to set the compile-time flag (bug 1622033) to disable that deprecation in order to use the algorithm. algorithms marked as deprecated will ulti...
...e.c:67 bug 1640042 - fix a null pointer in security/nss/lib/ssl/sslsock.c:4460 bug 1638289 - avoid multiple definitions of sha{256,384,512}_* symbols when linking libfreeblpriv3.so in firefox on ppc64le bug 1636389 - relocate deprecated seed algorithm bug 1637083 - lib/ckfw: no such file or directory. stop. ...
... avoid multiple definitions of sha{256,384,512}_* symbols when linking libfreeblpriv3.so in firefox on ppc64le bug 1636389 - relocate deprecated seed algorithm bug 1637083 - lib/ckfw: no such file or directory. stop. ...
...And 2 more matches
Python binding for NSS
lly supports utf-8. strings may be python str objects or python unicode objects. if a python unicode object is passed to a nss/nspr function it will be encoded as utf-8 first before being passed to nss/nspr. python-nss tries to be flexible when generating a print representation of complex objects. for simplicity you can receive a block of formatted text but if you need more control, such as when
building gui elments you can access a list of "lines", each line is paired with an indentation level value. the (indent, text) pairs allow you to insert the item into a gui tree structure or simply change the indentation formatting. deprecated elements of the python-nss api are marked with python deprecation warnings as well as being documented in the nss module documentation. as of python 2.7 depreca...
...neral public license, and the gnu lesser general public license. for information on downloading python-nss releases as tar files, see source download. documentation python-nss api documentation the python-nss api documentation for the current release can be viewed at python-nss api documentation. the api documentation is generated from the python-nss source code and compiled modules. you can
build it yourself via ./setup.py
build_doc. most distributions include the python-nss api documentation in the python-nss packaging. consult your distribution for more information. example code the doc/examples directory contains numerous examples of python-nss programs and libraries you may wish to consult. they illustrate suggested usage and best practice. test code in addition the test directory...
...location is mozilla/security/python/nss. release information release 1.0.1 release date 2017-02-28 scm tag pynss_release_1_0_1 source download https://ftp.mozilla.org/pub/mozilla.org/security/python-nss/releases/pynss_release_1_0_1/src/ change log add tls 1.3 cipher suites ssl_cipher_info.py now attempts to enable tls 1.3 fix
build issue in setup.py. python-nss can now be
build as python wheel, e.g. `pip wheel -w dist .` the following constants were added: ssl.tls_aes_128_gcm_sha256 ssl.tls_aes_256_gcm_sha384 ssl.tls_chacha20_poly1305_sha256 release 1.0.0 release date 2016-09-01 scm tag pynss_release_1_0_0 source downloa...
...And 2 more matches
troubleshoot.html
troubleshooting nss and jss
builds newsgroup: mozilla.dev.tech.crypto this page summarizes information on troubleshooting the nss and jss
build and test systems, including known problems and configuration suggestions. if you have suggestions for this page, please post them to mozilla.dev.tech.crypto.
building nss having /usr/ucb/bin in the path before /usr/ccs/bin breaks the
build on 64-bit solaris. the solaris compiler needs to be workshop-5.0 or greater. the 64-bit
builds don't support gcc. ...
...shooting the nss and jss
build and test systems, including known problems and configuration suggestions. if you have suggestions for this page, please post them to mozilla.dev.tech.crypto.
building nss having /usr/ucb/bin in the path before /usr/ccs/bin breaks the
build on 64-bit solaris. the solaris compiler needs to be workshop-5.0 or greater. the 64-bit
builds don't support gcc. if the
build fails early on the gmakein coreconf try updating your cvs tree with -p: cd mozilla cvs update -p
building a 32-bit version on a 64-bit may fail with: /usr/include/features.h:324:26: fatal error: bits/predefs.h: no such file or directory in this case remember to set use_64=1 testing nss the ssl stress test opens 2,048 tcp connections in quick succession. kernel data structure...
... in this case remember to set use_64=1 testing nss the ssl stress test opens 2,048 tcp connections in quick succession. kernel data structures may remain allocated for these connections for up to two minutes. some systems may not be configured to allow this many simultaneous connections by default; if the stress tests fail, try increasing the number of simultaneous sockets supported.
building jss windows only: the shell invoked by gmake, shmsdos.exe, is likely to crash when invoking some java tools on windows. the current workaround is to use some other shell in place of shmsdos, such as sh.exe, which should be distributed with the cygnus toolkit you installed to
build nss. the change is unfortunately rather drastic: to trick gmake, you rename the shell program. cd c:/progr...
...And 2 more matches
Introduction to the JavaScript shell
the javascript shell (js) is a command-line program included in the spidermonkey source distribution. it is the javascript equivalent of python's interactive prompt, the lisp read-eval-print loop, or ruby's irb. this article explains how to use the shell to experiment with javascript code and run javascript programs. to get the spidermonkey javascript shell, see the spidermonkey
build documentation or download a compiled binary for your platform from the nightly
builds. for a list of other javascript shells, see javascript shells. note: starting with spidermonkey 44 (firefox 44 / thunderbird 44 / seamonkey 2.41), the standard, web-compatible javascript version is used by default (and not js1.7+ anymore). the version() shell builtin is still there for testing legacy features. running th...
...ures. running the javascript shell the shell offers two modes of operation. you can use it as an interactive shell, in which you type javascript code at a prompt and get instant gratification, which is handy for experimenting or testing new features. you can also pass in, on the command line, a javascript program file to run, in which case the program is run automatically. after following the
build documentation and installing the built shell using make install, you can run the shell in interactive mode using the command: js [ if you get " symbol lookup error: ./js: undefined symbol: pr_setcurrentthreadname" e.g. from a bash console when using a pre-compiled binary, try <path to your firefox's run-mozilla.sh>/run-mozilla.sh ./js -- that worked for me] if you'd like to run the javasc...
...stdout=file redirect stdout to file. js_stderr=file redirect stderr to file. built-in functions to make the javascript shell more useful, there are a number of built-in functions provided that you can use either from javascript programs or in interactive mode. note: this list is incomplete and overlaps with shell global objects. see js/src/shell/js.cpp (around shell_functions) for more.
build() returns the date and time at which the javascript shell was built. note: clear() with no parameters really clears everything. this includes all these built-in functions. clone(function, [scope]) clones the specified function object. if scope isn't specified, the new object's parent is the same as the original object's. otherwise, the new object is placed in the scope of the object specified...
...And 2 more matches
JS_THREADSAFE
g as no objects or strings are shared between them. we have recently made major changes to this feature. until recently, sharing objects among threads would mostly work, although scripts could easily make it crash. we have now completely removed that feature. each thread that uses the javascript engine must essentially operate in a totally separate region of memory. requests in a js_threadsafe
build, the application must separate code that uses the jsapi from code that performs blocking i/o or time-consuming calculations. a request is a region of code that uses the jsapi. requests must be bracketed with calls to js_beginrequest() and js_endrequest(). js_beginrequest(cx); /* ... do jsapi stuff ... */ js_endrequest(cx); a request is always associated with a specific jscontext and runs from...
...t(cx); a request is always associated with a specific jscontext and runs from start to finish on a single thread. most jsapi functions require the caller to be in a request. in this reference, these jsapi functions are marked with the words "requires request", like this: name type description cx jscontext * the context to use. requires request. ...
... the callback does not need to call js_beginrequest()). in particular, jsnative callbacks provide a request. this means that any potentially long-running operation in a native must be bracketed with calls to js_suspendrequest() and js_resumerequest(). ...
...And 2 more matches
XForms Accessibility
supported starting from firefox 3 (gecko 1.9). implementation of accessible objects for xforms elements is based on top of the existing object hierarchy introduced in the mozilla accessibility module. xforms elements behavior is implemented in accordance with accessible toolkit checklist. in general, when elements are similar to html elements, they are exposed to msaa/atk in a similar way. ...
...bjects for xforms elements is based on top of the existing object hierarchy introduced in the mozilla accessibility module. xforms elements behavior is implemented in accordance with accessible toolkit checklist. in general, when elements are similar to html elements, they are exposed to msaa/atk in a similar way. get
build subsections below explain how you can obtain accessible xforms-enabled
build. these are either downloading latest
build of firefox or
building it yourself. downloading
builds notion: xforms is no longer distributed with firefox
build. you must
build it yourself. see section below. for firefox, you may directly download the nighly "trunk"
build of firefox and install the xforms extension which lives in 'xpi' directory of the
build. note, xforms accessibility is implemen...
...ading latest
build of firefox or
building it yourself. downloading
builds notion: xforms is no longer distributed with firefox
build. you must
build it yourself. see section below. for firefox, you may directly download the nighly "trunk"
build of firefox and install the xforms extension which lives in 'xpi' directory of the
build. note, xforms accessibility is implemented only on trunk. trunk
builds are not considered stable and should not be installed on top of the firefox used for daily browsing. currently we have verified that xforms accessibility is working on the windows platform, and linux testing has not yet been done, although everything should work and is ready to be tested. ...
...And 2 more matches
Introduction to XPCOM for the DOM
scomptr's described until now covers about 80% of what you need to know to read the code, and even write some. i could go on about do_getservice, explain the implementation of queryinterface, etc, but i feel this is not worth the trouble. for the more advanced topics of xpcom, please see the xpcom project page. the next section is a tutorial on how to add a new interface to the mozilla dom, with
build instructions et al, and the last section is a discussion of the more advanced topics of object-oriented c++ , interface inheritance, and other fun stuff. tutorial : how to add a new interface introduction the purpose of this tutorial is to describe the process of adding a new interface to the dom and then implementing it. a good understanding of the previous sections is preferred to understand...
... of adding a new interface to the dom and then implementing it. a good understanding of the previous sections is preferred to understand this tutorial. you could want to add a new interface for several reasons, like the addition of a new dom object, or to respect an eventual "interface freeze". first we will take a look at xpidl and how it can help you define interfaces. next we will describe the
build system, makefiles, etc... and finally, we will look at the implementation of our new interface through the creation of an nsidomfabian interface (fabian is my first name ;-). xpidl xpidl stands for cross-platform interface definition language. instead of coding interfaces directly in c++ , one can use xpidl. it simplifies greatly the task of defining interfaces, and offers some interesting feat...
...erface become two functions: a getter, and a setter. in our example, since the attribute is declared as read-only, only a getter is defined: getneat. the argument is a pointer to an object of type prbool, automatically generated by xpidl. clever uh. note that the same intercaps model applies to idl attributes as well. the three macros are explained in detail in section 1.e.d. the next step is to
build our new interface.
build system this is the really easy part: it's just copying what's already there. first, we have to decide in which directory we will place our interface. the most logical choice for us is in dom/public/idl/html, where all the html interfaces live. next, we have to add nsidomfabian.idl to all the makefiles of this directory. this includes, if needed, "manifest", "makefile.wi...
...And 2 more matches
XPCshell Test Manifest Expressions
n double quotes " or single quotes '. no escape sequences are supported. variables variables are supported as a series of letters, digits or underscores beginning with a letter or an underscore. there are a fixed set of variables provided by the test harness via mozinfo.py, with many of the values initialized at configure time by writemozinfo.py which writes mozinfo.json into the root of the
build directory. see also the official docs for this set of variables. note that it currently seems like neither this list nor the one on the official docs is exhaustive, so if you need something and it's not here, best check the source code! os - the operating system on which the test is being run one of: 'win', 'mac', 'linux', 'android' os_version - the version of the operating system...
...t currently seems like neither this list nor the one on the official docs is exhaustive, so if you need something and it's not here, best check the source code! ...
... comments if an expression contains a # (pound/hash) character outside of a string, the character and the rest of the line will be treated as a comment. ...
...And 2 more matches
xptcall FAQ
uding void* to represent arbitrary pointer types). given the correct set of parameters, this function can call any method on any xpcom interface. xpconnect uses information from typelib files to reflect arbitrary xpcom interfaces into javascript and to make calls from javascript to xpcom using xptc_invokebyindex. the information in the typelibs allows xpconnect to convert function parameters and
build the nsxptcvariant array required to make this call. the stubs (or impersonation) facility of xptcall allows for implementing a class which can, at runtime, pretend to be any xpcom interface. this is done by providing a vtbl full of generic function stubs in xptcall. these stubs forward calls to a shared function whose job it is to use the typelib information to extract the parameters from the pl...
...ake this call. the stubs (or impersonation) facility of xptcall allows for implementing a class which can, at runtime, pretend to be any xpcom interface. this is done by providing a vtbl full of generic function stubs in xptcall. these stubs forward calls to a shared function whose job it is to use the typelib information to extract the parameters from the platform specific calling convention to
build an array of variants to hold the parameters and then call an inherited method which can then do whatever it wants with the call. this code also does the platform specific cleanup as the call returns. this all works and is being used in mozilla today on numerous platforms. why can't xptcall just be implemented in c or c++? neither of these two facilities can be done in a fully cross platform wa...
... also does the platform specific cleanup as the call returns. this all works and is being used in mozilla today on numerous platforms. why can't xptcall just be implemented in c or c++? neither of these two facilities can be done in a fully cross platform way. nor can they generally be done fully in c or c++. let's take them one at a time to see why. the invoke facility requires code that can
build and invoke an arbitrary call frame. the c++ compiler
builds such call frames all the time. but the compiler
builds frames customized at compile time for the specific signature of the callee. xptcall needs to be able to call any valid xpcom method signature and it needs to specify this at runtime. the stubs facility needs to impersonate the full vtbl full of methods for any given valid xpcom inte...
...And 2 more matches
Adding items to the Folder Pane
er in the main viewing pane of thunderbird. first, some necessary background on how the folder pane constructs the data it displays. the folder pane tracks modifications to a user's folders and accounts. ...
...ate all its data (because of too many changes, or more commonly because the folder pane's "mode" (aka view) has changed), a "re
build" occurs. when this happens, the folder pane consults the map-generator for the current mode, and that generator returns the necessary data for the folder pane's display. this data is returned in the form of an array of folder-tree-items. listening for folder pane re
builds every time the folder pane re
builds, it fires a "mapre
build" event, which is the ideal opportunity for extensions to step in and modify the display data. the following code snippet listens for that event: let gnumbersext = { load: function gne_load() { window.removeeventlistener("load", gnumbersext.load, false); let tree = document.getelementbyid("foldertree"); tree.addeventliste...
...this property is an array of folder-tree-items. ...
...And 2 more matches
WebIDL bindings
notes: need to document the setup for indexed and named setters/creators/deleters. the webidl bindings are generated at
build time based on two things: the actual webidl file and a configuration file that lists some metadata about how the webidl should be reflected into gecko-internal code. all webidl files should be placed in dom/webidl and added to the list in the moz.
build file in that directory. note that if you're adding new interfaces, then the test at dom/tests/mochitest/general/test_interfaces.html will most likely fail. this is a signal that you need to get a review from a dom peer. resist the urge to just add your interfaces to the moz.
build list without the review; it will just annoy the dom peers and they'll make you get the review anyway. the configuration file, dom/b...
...ace. for each interface, a namespace whose name is the name of the interface with binding appended is created, and all the things pertaining to that interface's binding go in that namespace. there are various helper objects and utility methods in dom/bindings that are also all in the mozilla::dom namespace and whose headers are all exported into mozilla/dom (placed in $objdir/dist/include by the
build process). adding webidl bindings to a class to add a webidl binding for interface myinterface to a class mozilla::dom::myinterface that's supposed to implement that interface, you need to do the following: if your interface doesn't inherit from any other interfaces, inherit from nswrappercache and hook up the class to the cycle collector so it will trace the wrapper cache properly. note t...
...es; this is not usually ok for things that are exposed to web content. again, if you do not need wrapper caching you don't need to do this. the actual type returned from getparentobject must be defined in a header included from your implementation header, so that this type's definition is visible to the binding code. add the webidl for myinterface in dom/webidl and to the list in dom/webidl/moz.
build. add an entry to dom/bindings/bindings.conf that sets some basic information about the implementation of the interface. if the c++ type is not mozilla::dom::myinterface, you need to set the 'nativetype' to the right type. if the type is not in the header file one gets by replacing '::' with '/' and appending '.h', then add a corresponding 'headerfile' annotation (or headerfile annotation to the ...
...And 2 more matches
Adding captions and subtitles to HTML5 video - Developer guides
this article will take the same player and show how to add captions and subtitles to it, using the webvtt format and the <track> element. captioned video example in this article, we will refer to the video player with captions example. this example uses an excerpt from the sintel open movie, created by the blender foundation. note: you can find the source on github, and also view the example live. ...
...hat language each subtitle files' contents are in. the default attribute is set on the english <track> element, indicating to the browser that this is the default subtitle file definition to use when subtitles have been turned on and the user has not made a specific selection. in addition to adding the <track> elements, we have also added a new button to control the subtitles menu that we will
build. as a consequence, the video controls now look as follows: <div id="video-controls" class="controls" data-state="hidden"> <button id="playpause" type="button" data-state="play">play/pause</button> <button id="stop" type="button" data-state="stop">stop</button> <div class="progress"> <progress id="progress" value="0" min="0"> <span id="progress-bar"></span> </progres...
...urns any of them on by default: for (var i = 0; i < video.texttracks.length; i++) { video.texttracks[i].mode = 'hidden'; } the video.texttracks property contains an array of all the text tracks attached to the video. we loop through each one and set its mode to hidden. note: the webvtt api gives us access to all the text tracks that are defined for an html5 video using the <track> element.
building a caption menu our aim is to use the subtitles button we added earlier to display a menu that allows users to choose which language they want the subtitles displayed in, or to turn them off entirely. we have added the button, but before we make it do anything, we need to
build the menu that goes with it. this menu is built dynamically, so that languages can be added or removed later by sim...
...And 2 more matches
Index - Developer guides
y, to support all browsers we need to specify two formats, although with the adoption of mp3 and mp4 formats in firefox and opera, this is changing fast. you can find compatibility information in the guide to media types and formats on the web. 7 adding captions and subtitles to html5 video html5, media, webvtt, captions, subtitles, track in other articles we looked at how to
build a cross browser video player using the htmlmediaelement and window.fullscreen apis, and also at how to style the player. this article will take the same player and show how to add captions and subtitles to it, using the webvtt format and the <track> element. 8 creating a cross-browser video player apps, html5, video, full screen this article describes a simple html5 video pla...
...to the subject and let you know how you can get started. 11 media buffering, seeking, and time ranges apps, buffer, html5, timeranges, video, buffering, seeking sometimes it's useful to know how much <audio> or <video> has downloaded or is playable without delay — a good example of this is the buffered progress bar of an audio or video player. this article discusses how to
build a buffer/seek bar using timeranges, and other features of the media api. 12 setting up adaptive streaming media sources audio, hls, html5, http live streaming, mpeg-dash, video, adaptive streaming let's say you want to set up an adaptive streaming media source on a server, to be consumed inside an html5 media element. how would you do that? this article explains how, looking ...
...ant to set up an adaptive streaming media source on a server, to be consumed inside an html5 media element. how would you do that? this article explains how, looking at two of the most common formats: mpeg-dash and hls (http live streaming.) 13 video player styling basics apps, guide, media, styling, video in the previous cross browser video player article we described how to
build a cross-browser html5 video player using the media and fullscreen apis. this follow-up article looks at how to style this custom player, including making it responsive. 14 web audio playbackrate explained apps, audio, media, video, playbackrate the playbackrate property of the <audio> and <video> elements allows us to change the speed, or rate, at which a piece of web audio o...
...And 2 more matches
Browser detection using the user agent - HTTP
stead of /(?<=look_behind_stuff)/, even in the lookbehind supported section of your code. progressive enhancement this design technique involves developing your web site in 'layers', using a bottom-up approach, starting with a simpler layer and improving the capabilities of the site in successive layers, each using more features. graceful degradation this is a top-down approach in which you
build the best possible site using all the features you want, then tweak it to make it work on older browsers. this can be harder to do, and less effective, than progressive enhancement, but may be useful in some cases. mobile device detection arguably the most common use and misuse of user agent sniffing is to detect if the device is a mobile device. however, people too often overlook what they are ...
... pay attention not to trigger false-positives when detecting the rendering engine. must contain gecko gecko/xyz webkit applewebkit/xyz pay attention, webkit browsers add a 'like gecko' string that may trigger false positive for gecko if the detection is not careful. presto opera/xyz note: presto is no longer used in opera browser
builds >= version 15 (see 'blink') trident trident/xyz internet explorer put this token in the comment part of the user agent string edgehtml edge/xyz the non-chromium edge puts its engine version after the edge/ token, not the application version. note: edgehtml is no longer used in edge browser
builds >= version 79 (see 'blink'). blink chrome/xyz ...
...ng engine version most rendering engines put the version number in the renderingengine/versionnumber token, with the notable exception of gecko. gecko puts the gecko version number in the comment part of the user agent after the rv: string. from gecko 14 for the mobile version and gecko 17 for the desktop version, it also puts this value in the gecko/version token (previous version put there the
build date, then a fixed date called the geckotrail). os the operating system is given in most user agent strings (although not web-focused platforms like firefox os), but the format varies a lot. it is a fixed string between two semi-colons, in the comment part of the user agent. these strings are specific for each browser. they indicate the os, but also often its version and information on the rely...
...And 2 more matches
Low-Level APIs - Archive of obsolete content
privileged modules that expose powerful low-level capabilities such as window/utils and net/xhr. ...
... privileged modules that expose powerful low-level capabilities such as window/utils and net/xhr. ...
... add-on sdk add-on access to the components object, which in turn gives it access to a large set of privileged low-level firefox apis. console/plain-text constructor for a console instance. console/traceback functionality similar to python's traceback module. content/content re-exports three objects from three other modules: loader, worker, and symbiont. content/loader provides one of the
building blocks for those modules that use content scripts to interact with web content, such as panel and page-mod. content/mod provides functions to modify a page content. content/symbiont used by sdk modules that can load web content and attach content scripts to it. content/worker used in the internal implementation of sdk modules which use content scripts to interact with web content. core/...
...vascript, that can be added to a designated area of the firefox user interface. ui/id create ui component ids. ui/sidebar enables you to create sidebars. ui/toolbar add a toolbar to the firefox user interface. util/array helper functions for working with arrays. util/collection a simple list-like class and utilities for using it. util/deprecate functions to deprecate code. util/list
building blocks for composing lists. util/match-pattern test strings containing urls against simple patterns. util/object functions for working with objects. util/uuid generate or parse uuids. window/utils functions for working with browser windows. ...
Storing annotations - Archive of obsolete content
editor.hide(); }, onshow: function() { this.postmessage('focus'); } }); listing stored annotations to prove that this works, let's implement the part of the add-on that displays all the previously entered annotations. this is implemented as a panel that's shown in response to the widget's right-click message. the panel has three new files associated with it: a content-script which
builds the panel content a simple html file used as a template for the panel's content a simple css file to provide some basic styling. these three files can all go in a new subdirectory of data which we will call list. annotation list content script here's the annotation list's content script: self.on("message", function onmessage(storedannotations) { var annotationlist = $('#annotation-list'...
... the user will be able to click links in the panel, but we want to open them in the main browser window rather than the panel. so the content script binds a click handler to the links which will send the url to the add-on. save this file in data/list as annotation-list.js. annotation list html and css here's the html for the ann...
...if the annotation does not reappear when ...
...if the annotation does not reappear when you restart firefox, double check you installed the add-on and didn't just use cfx run again. responding to overquota events add-ons have a limited quota of storage space. ...
Tinderbox - Archive of obsolete content
the tool enables mozilla.org to be immediately notified of changes to the code that prevent mozilla from compiling and running (or compromise performance and footprint) so they can get someone to fix the problem or reverse the changes. mozilla engineers regularly check tinderbox before changing the code because changes are prohibited while the codebase is broken. ...
...ching the code and getting engineers to fix breakage, checks tinderbox even more regularly. while it isn't difficult to load the tinderbox web page or sidebar, it would be useful to have an even quicker way to check tinderbox that doesn't require going to a web page, changing sidebars, or even having the sidebar open. ...
... or sidebar, it would be useful to have an even quicker way to check tinderbox that doesn't require going to a web page, changing sidebars, or even having the sidebar open. although there are multiple tinderbox clients machines doing different kinds of
builds (f.e. different platforms), most people only care about the overall situation, i.e. whether or not any clients have failed. by checking for
build failures first and test failures second, we make sure to show users the worst possible situation, i.e. ...
... or even having the sidebar open. although there are multiple tinderbox clients machines doing different kinds of
builds (f.e. different platforms), most people only care about the overall situation, i.e. whether or not any clients have failed. by checking for
build failures first and test failures second, we make sure to show users the worst possible situation, i.e. if any clients have failed to
build, we will display a red icon that signifies a
build failure; if all clients built successfully but some failed tests we will display an orange icon that signifies a test failure. only if all clients reported both successful
builds and successful tests will we display a green icon that signifies all is well with the code. « previousnext » ...
How to Write and Land Nanojit Patches - Archive of obsolete content
dache so they were merged. the first version of this document was written just after that merge occurred.) resources nanojit development now takes place on a single shared repository nanojit-central. repository: http://hg.mozilla.org/projects/nanojit-central (or clone ssh://hg.mozilla.org/projects/nanojit-central if you want to actually commit changes) tinderbox: http://tinderbox.mozilla.org/show
builds.cgi?tree=nanojit commit log: http://hg.mozilla.org/projects/nanojit-central/shortlog/ irc channel: irc.mozilla.org #nanojit procedure the first thing to understand is that there are now three copies of nanojit in public mozilla.com repositories: one in nanojit-central, one in tracemonkey, one in tamarin-redux. we land patches initially in nanojit-central, and those landings are followed up wit...
...emonkey and tamarin-redux! so, do not land nanojit changes directly to the tracemonkey and tamarin-redux repositories! the following files in tracemonkey are from nanojit: everything in js/src/nanojit/ everything in js/src/vprof/ scenario 0: a common prefix for all scenarios make private clones of all three repositories: nanojit-central, tracemonkey and tamarin-redux. here's how to clone and
build nanojit-central: $ hg clone ssh://hg.mozilla.org/projects/nanojit-central $ cd nanojit-central $ autoconf $ mkdir
build $ cd
build $ ../configure $ make $ make check learn and setup automated testing for all three repositories. write a script for copying patches between repositories, it'll come in useful. scenario 1: creating an internal (ie. nanojit-only) patch write the patch in whichever r...
...nsion be enabled; add "hgext.convert =" to your .hgrc file under "[extensions]"). for tamarin, use the update-nanojit.sh script. note that updating will clobber the contents of the nanojit/ directory in your private tm/tr repo. it will also generate a commit that updates the nanojit-import-rev file in your target repository; this file records which commits have been copied over from nanojit.
build and test the changes. in the easy case, you'll have a consistent tm/tr repo. land the tm/tr changes. then for each revision involved, mark its whiteboard as fixed-in-tracemonkey or fixed-in-tamarin. you're done, but watch the tinderbox. in the hard case, you'll have a broken tm/tr repo. this is because one or more recent external patch(es), p, landed on the other (tr/tm) repo, thus changing ...
...t to push will consist of a sequence of converted revisions from nanojit-central, followed by one of more "fixups" to tr/tm to make them work properly. test this entire group and land them with a single hg push. then update the whiteboard for the each such bug p and add a comment url. and likewise for all revisions involved in the update. you're done, but watch the tm/tr testing results (tbpl or
buildbot). if you ever want to "undo" revisions you copied from nanojit-central, you can backout copied revisions using the existing mercurial "backout" command in your target repository. if you do so, the next time you copy revisions from nanojit-central to your target repository, the script will re-copy the backed-out revisions, as well as those that occurred after. you can explicitly manipulate the ...
Frequently Asked Questions - Archive of obsolete content
o install it. can you have both native svg support and an svg plug-in installed? yes. if the plug-in works with the equivalent non-svg version of mozilla, then it should also work in the svg enabled version. to be able to use it, you must make sure the svg.enabled pref is set to false. this will disable the native svg support. does the <embed> tag support svg documents? yes. ...
... what can i do to help the svg project? okay so maybe this isn't such a frequently asked question, but if it was, just think how much further on with our svg implementation we could be! we're always looking for help from anyone willing to lend a hand. ...
... what can i do to help the svg project? okay so maybe this isn't such a frequently asked question, but if it was, just think how much further on with our svg implementation we could be! we're always looking for help from anyone willing to lend a hand. ...
... work' and cool stuff like xtf and jssh. tim is working on implementing <filter> and working on items that need to be done before turning on svg by default. after recently implementing gradients, scooter is working on fixing some issues that remain outstanding and fixing <switch>. jonathan is working on various bugs, especially those that need to be fixed before svg can be enabled in the official
builds. david continues to create svg enabled nightlies and answer
build related questions as he has done for some time. finally, occasional fixes are provided by other mozilla hackers. how can i get in contact with you? the best way to get in contact with us is to join the #svg channel on mozilla.org's irc server. this is where most of us hang out to discuss issues relating to the svg implementation...
Standalone XPCOM - Archive of obsolete content
warning: the content of this article may be out of date. these instructions were last updated in 2000. standalone xpcom is a tree configuration that
builds a minimal set of libraries (shared mostly) that can be used to get all features of xpcom. the contents of this standalone xpcom in general are: nspr : mozilla/nsprpub xpcom : mozilla/xpcom note 1: xpcom apis are not frozen yet. by xpcom 1.0 release they will be. note 2: xpcom standalone differs from the xpcom built with mozilla. hence cannot be used with the mozilla browser. ...
...n that
builds a minimal set of libraries (shared mostly) that can be used to get all features of xpcom. the contents of this standalone xpcom in general are: nspr : mozilla/nsprpub xpcom : mozilla/xpcom note 1: xpcom apis are not frozen yet. by xpcom 1.0 release they will be. note 2: xpcom standalone differs from the xpcom built with mozilla. hence cannot be used with the mozilla browser. ...
...that can be used to get all features of xpcom. the contents of this standalone xpcom in general are: nspr : mozilla/nsprpub xpcom : mozilla/xpcom note 1: xpcom apis are not frozen yet. by xpcom 1.0 release they will be. note 2: xpcom standalone differs from the xpcom built with mozilla. hence cannot be used with the mozilla browser.
building standalone xpcom here are the instructions for
building the standalone xpcom on unix or windows: step 1 : pull the sources cvs -z 3 co mozilla/client.mk cd mozilla gmake -f client.mk pull_all
build_modules=xpcom step 2 :
build xpcom standalone ./configure --enable-standalone-modules=xpcom --enable-application=standalone gmake testing standalone xpcom xpcom/sample contains a sample application and a component. this should get built by...
...at went wrong? the most common case of why the sample would have failed if you didn't run it from the bin directory. here are some error messsages and possible ways of fixing them. ./nstestsample: error in loading shared libraries: libxpcom.so: cannot open shared object file: no such file or directory ld_library_path not set. to fix, setenv ld_library_path . (note the dot). link errors when
building xpcom standalone this is usually due to xpcom not being built standalone. make sure you did configure --enable-standalone-modules=xpcom. what's the difference between standalone and non-standalone xpcom? there is no binary difference between standalone xpcom and the xpcom that ships with the mozilla browser. the one functional difference is that xpt files cannot be read from .zip files in ...
Actionscript Performance Tests - Archive of obsolete content
untests.py --iterations=10 sunspider/*.as test avm 95% conf metric sunspider/access-binary-trees.as 565 1.0% time [565, 586, 573, 577, 567, 567, 579, 576, 565, 585] sunspider/access-fannkuch.as 361 0.3% time [365, 366, 362, 363, 366, 361, 363, 363, 364, 364] ... ...
...spider/*.as test avm 95% conf metric sunspider/access-binary-trees.as 565 1.0% time [565, 586, 573, 577, 567, 567, 579, 576, 565, 585] sunspider/access-fannkuch.as 361 0.3% time [365, 366, 362, 363, 366, 361, 363, 363, 364, 364] ... ...
... time [365, 366, 362, 363, 366, 361, 363, 363, 364, 364] ... # compare 2
builds $ ./runtests.py --avm2=
build2/avmshell sunspider/*.as test avm avm2 %sp metric sunspider/access-binary-trees.as 565 564 0.2 time sunspider/access-fannkuch.as 366 362 1.1 time ... ...
...mpare 2
builds $ ./runtests.py --avm2=
build2/avmshell sunspider/*.as test avm avm2 %sp metric sunspider/access-binary-trees.as 565 564 0.2 time sunspider/access-fannkuch.as 366 362 1.1 time ... ...
Tamarin Acceptance Testing - Archive of obsolete content
in order to ensure that changes to the tamarin code base are high quality before submitting, all developers are required to complete the following steps. ...
... in order to ensure that changes to the tamarin code base are high quality before submitting, all developers are required to complete the following steps. ...
... ...
... ...
Tamarin-central rev 703:2cee46be9ce0 - Archive of obsolete content
ave passed on the following supported platforms: * windows, 32 & 64 bit * mac ox x ppc & intel, 32 bit * linux, 32 bit * windows mobile arm version asc-4200 of the actionscript compiler was used for all tests. performance testsuite time metric the following is a comparison of the current tamarin-central (tc-703) versus the prior
build (tc-700) as well as current against the vm in flash player 10. the key takeaway is that the interpreter is much improved. osdefault-jitinterpretedaggressive jit mac (os/x 10.4 intel, 2ghz dual core)tc-703 vs tc-700: 0.0%tc-703 vs flash10: 1.1% slowertc-703 vs tc-700: 17.4% fastertc-703 vs flash10: 165.3% fastertc-703 vs tc-700: 0.1% fastertc-703 vs flash10: 0.8...
... there is no linux comparison due to a linux memstat bug only recently resolved in the tamarin-central branch. osdefault-jitinterpretedaggressive jit mac (os/x 10.4 intel, 2ghz dual core)tc-703 vs tc-700: 2.0% smallertc-703 vs tc-663: 7.8% smallertc-703 vs tc-700: 7.1% largertc-703 vs tc-663: 14.6% largertc-703 vs tc-700: 16.4% largertc-703 vs tc-663: ...
... 2.13ghz dual core)tc-703 vs tc-700: 3.2% largertc-703 vs tc-663: 7.6% largertc-703 vs tc-700: 3.9% largertc-703 vs tc-663: 12.4% largertc-703 vs tc-700: 3.3% largertc-703 vs tc-663: 21.4% larger linux (ubuntu linux, 2.13 ghz dual core)n/an/an/a vm code size the following is a comparison of the current tamarin-central compiled size (tc-703) versus the prior
build (tc-700) as well as the current
build against the vm in flash player 10.
buildsize flash10576k tc-700740k tc-703655k known issues known failures in the acceptance testsuite include: number failures in testsuite when running on linux windows mobile system.privatebytes and -memstats privateby...
...in testsuite when running on linux windows mobile system.privatebytes and -memstats privatebytes always returns 0 amd64 longjmp hack needs reengineering on non-windows platforms different runtime errors when -dforcemir set in acceptance test run arm: math failures running with thumb or arm jit and interp. recursive pcre testcases kills the stack on pocketpc
builds ...
Unix stub installer - Archive of obsolete content
copy the installer.ini and config.ini files over into the src2 directory. ...
... copy the installer.ini and config.ini files over into the src2 directory. ...
... copy the installer.ini and config.ini files over into the src2 directory. ...
...into the src2 directory you are debugging from. run the installer from the src2 directory by either using the mozilla-installer shell script or the mozilla-installer-bin binary with the appropriate flags. if you need to use gdb to debug the installer run it by typing "gdb mozilla-installer-bin" on the shell prompt. how we get setup to debug the xpinstall engine from the unix stub installer?
build your entire mozilla tree (which should
build the installer in the src2 directory as well). go to mozilla/xpinstall/packager/unix. on the shell prompt type "perl deliver.pl". now you will find an installer *and* the xpcom.xpi and other debug xpis delivered to mozilla/installer/raw. debug using "gdb mozilla-installer-bin" and set a breakpoint at xpi_init(). you can step into the xpinstall engi...
Introduction to XUL - Archive of obsolete content
then, look a great deal like html 4. xul is an application of xml. in fact, it is just xml with specific meaning defined for a few element types, and into which html can be scattered. terms "xpfe" is the term mozilla-the-organization is using to describe mozilla-the-browser's cross platform front end, because x and c look similar if you beat them long and hard with a hammer. ...
... the term "cross-platform ui" is somewhat misleading. ui designers will be able to create ui descriptions which will work on multiple platforms. ...
..."cross-platform ui" is somewhat misleading. ui designers will be able to create ui descriptions which will work on multiple platforms. but proper ui descriptions which take into account various platforms' differing ideas about proper placement of such things as dialog buttons will require some platform-specific work. a single xul specification can only cross-platform to a degree. ui designers and
build engineers will need to maintain separate, platform-specific versions of at least some xul documents. "xptoolkit" is rather synonymous with xpfe. though the former term seems more concrete than the other, and therefore is not an exact replacement, no one is completely certain why we have both. "xul" already introduced, is an application of xml used to describe the layout of most windows in the m...
... the layout of most windows in the mozilla browser, including and especially the main, browser window. scope this paper makes no attempt to explain requirements. we don't have a current "requirements" document. xptoolkit architecture is a better place to gain an understanding of such things. this paper contains a short introduction to mozilla front-end architecture, concentrating on the task of
building uis. it is, as always, incomplete. mozilla applications will be built of "small" components like dialog buttons and mail inbox folders, which we collectively term "widgets." within a widget, drawing and user interactions are completely under control of the individual widget, and set when the widget was built. relative placement of widgets, their interactions with each other, and optionally so...
Actions - Archive of obsolete content
onally. instead, the action element is placed directly inside the <xul:template> element after the query is defined. this action contains only one element, but you can put as many or as few elements as you need. in this case, a button will be created for each result. there are three results, so three buttons will be created. here is the [example], and an image of what it looks like: the template
builder iterates through the three results, processing the body of the action for each one in turn. the uri attribute on the button is used to specify the ending or member variable. in this example, there's only one variable to use, ?relateditem, since ?start is the starting point and the start and end points cannot be the same. there are a number of things that will happen for each result. let's look ...
... end points cannot be the same. there are a number of things that will happen for each result. let's look at the results again: (?start = http://www.xulplanet.com/rdf/a, ?relateditem = http://www.xulplanet.com/rdf/b) (?start = http://www.xulplanet.com/rdf/a, ?relateditem = http://www.xulplanet.com/rdf/c) (?start = http://www.xulplanet.com/rdf/a, ?relateditem = http://www.xulplanet.com/rdf/d) the
builder will start with the first result. the button element will be copied and inserted into the document after the template. the id attribute of the new element will be set to the same value of the member variable, ?relateditem. you could think of this as changing the uri attribute to the id attribute, and replacing the variable. since the first result has a value of 'http://www.xulplanet.com/rdf/b' ...
...his value. then, the remaining attributes on the element are examined and any variables are replaced in place. that is, the text ?relateditem in the label attribute will be replaced with the string 'http://www.xulplanet.com/rdf/b' for the first result. in the image, you can see that the label for the first button does indeed have this value. processing is now complete for the first result, so the
builder moves on to the next result. for result b, the
builder would have generated the following content: <button id="http://www.xulplanet.com/rdf/b" label="http://www.xulplanet.com/rdf/b"/> naturally, you wouldn't use an id attribute inside a template action since the id would be replaced anyway. in fact, any ids you put inside a template action will be ignored. however, you may use ids on the other...
...utton id="http://www.xulplanet.com/rdf/b" label="http://www.xulplanet.com/rdf/b"/> naturally, you wouldn't use an id attribute inside a template action since the id would be replaced anyway. in fact, any ids you put inside a template action will be ignored. however, you may use ids on the other parts of the template, such as within the query statements, if you wish to change the statements and re
build the template. you can use getelementbyid to get at particular results, for instance document.getelementbyid("http://www.xulplanet.com/rdf/c") would retrieve the second generated button. after all the results have been examined, the dom tree will look like the following: <vbox datasources="http://www.xulplanet.com/ds/sample.rdf" ref="http://www.xulplanet.com/rdf/a"> <template> <quer...
Additional Navigation - Archive of obsolete content
been evaluated: (?start = http://www.xulplanet.com/rdf/myphotos, ?photo = http://www.xulplanet.com/ndeakin/images/t/palace.jpg) (?start = http://www.xulplanet.com/rdf/myphotos, ?photo = http://www.xulplanet.com/ndeakin/images/t/canal.jpg) (?start = http://www.xulplanet.com/rdf/myphotos, ?photo = http://www.xulplanet.com/ndeakin/images/t/obselisk.jpg) when evaluating the triple, the template
builder will iterate over the three potential results found so far. for the first result, the value of the ?photo variable 'http://www.xulplanet.com/ndeakin/images/t/palace.jpg' will be used as the subject, the predicate will be 'http://purl.org/dc/elements/1.1/title', and the object will be 'canal'. since there are no variables to fill into the triple, the
builder will just confirm that such a triple ...
...the subject and object attributes may have variables. another thing that you cannot have is a triple where both variables would be unknown as in the following: <query> <content uri="?start"/> <member container="?start" child="?photo"/> <triple subject="?category" predicate="http://purl.org/dc/elements/1.1/title" object="?title"/> </query> in this case when the template
builder gets to the triple, neither the ?category nor the ?title variables can be filled in so the
builder doesn't know what to generate. the
builder won't generate any output in this situation. the member tag must have variables for both the container and child attributes. it wouldn't be very common to filter for a specific child anyway. source navigation triples may also be used to navigate up the...
...iso#it'. after the first triple is examined, the data network will look like the following: (?start = http://www.daml.org/2001/09/countries/iso#it, ?countrytitle = italy) only one result is present since there is only one title available. the second triple is the more interesting one. it is used to look up nodes that have a country predicate pointing in. it may be difficult to tell whether the
builder will look for arcs pointing out from a node or into a node just by looking at the triple element. the template
builder doesn't know this either until the triple is evaluated and variable substitution is done. here, the value of the ?start variable is already known for the potential result, so it will be filled in. however, the value of the ?photo variable is not known. since the object is known...
...there are two photos in the rdf datasource that point to the node 'http://www.daml.org/2001/09/countries/iso#it', so the existing result will be copied for these two photos. ...
Result Generation - Archive of obsolete content
rces="http://www.xulplanet.com/ds/sample.rdf" ref="http://www.xulplanet.com/rdf/a" flex="1"> this is an indicator that we want to construct a xul template using the reference point with the uri 'http://www.xulplanet.com/rdf/a'. query processing a query for an rdf datasource consists of a number of statements, placed as children of the query element. during query processing, the template
builder
builds up a network of information such as: possible results that are available where content should be generated information that indicates what to do when the rdf datasource changes this network of information remains for the lifetime of the template, or until it is rebuilt. the template
builder uses a method based on the rete algorithm to match data. this allows for a fairly efficien...
...uld be generated information that indicates what to do when the rdf datasource changes this network of information remains for the lifetime of the template, or until it is rebuilt. the template
builder uses a method based on the rete algorithm to match data. this allows for a fairly efficient means of updating results when, for instance, a new statement is added to the rdf graph. rather than re
build the entire template, the algorithm allows only specific parts of the network of information to be re-examined. a similar method can be used when removing rdf statements. while the information network created by the template
builder contains a number of different pieces of necessary information, for the purposes of this discussion, we will only be interested in the list of possible results. the bu...
... the network of information to be re-examined. a similar method can be used when removing rdf statements. while the information network created by the template
builder contains a number of different pieces of necessary information, for the purposes of this discussion, we will only be interested in the list of possible results. the
builder begins with a single possible result, called the seed. the
builder processes each of a query's statements in sequence. to do this for a particular statement, the
builder iterates over the possible results found so far and either accepts each result or rejects each result. for the first statement, only the seed will be available as a possible result. at each step, new possible results may be added, or more information pertaining to an existing result may be add...
...iterates over the possible results found so far and either accepts each result or rejects each result. for the first statement, only the seed will be available as a possible result. at each step, new possible results may be added, or more information pertaining to an existing result may be added to the network. naturally, a rejected result will be removed. once all results have been examined, the
builder moves on to the next statement in the query. once all statements have been analyzed, any results which still remain go on to become matches. the matches are the endpoints and will cause content to be generated. so, to summarize: start out with a one possible result as the seed iterate over the results determined so far and augment them with additional data add any new possible results ...
Static Content - Archive of obsolete content
xamined, the menulist would have one item in it, with the label 'all'. the template generates two results as before, one for each country, and appends a menuitem for each one. one interesting thing about this example is that only one menupopup will be created, even though there are two in the code, one outside the template and another one inside the action body. this demonstrates how the template
builder generates content, and the specifics of how this is done become important when dealing with recursive content and multiple rules. what's going on here is that the xul parser first creates the outer menulist element. the static content outside the template will also be created. the result will be a xul display that looks just like the code above, except that the template and its content is hidde...
...st like the code above, except that the template and its content is hidden. at this point, the menulist will have a menupopup as a child, and the menupopup will in turn have one menuitem child. next, the template is examined and two results are generated. remember that only the content at the uri attribute or below inside the action are copied for each result. when processing the action body, the
builder looks at the first element inside the action, in this case, the menupopup. this element doesn't have a uri attribute, so the
builder knows that this element should only be created once. you might think that the
builder would then just create a menupopup, but it doesn't. instead, it looks to see if a menupopup already exists in the location where it would be generated. in this case, there is one...
...'t have a uri attribute, so the
builder knows that this element should only be created once. you might think that the
builder would then just create a menupopup, but it doesn't. instead, it looks to see if a menupopup already exists in the location where it would be generated. in this case, there is one, the static menupopup defined outside the template. instead of creating another menupopup, the
builder uses the existing one. this is convenient since it makes it easy to combine static results and template generated results into one list. the
builder then switches where generated content would be generated to inside to existing menupopup and moves onto the next part of the action, the menuitem. this element has the uri attribute so this content will be duplicated for each result. the technique ...
...combine static results and template generated results into one list. the
builder then switches where generated content would be generated to inside to existing menupopup and moves onto the next part of the action, the menuitem. this element has the uri attribute so this content will be duplicated for each result. the technique of looking for an existing element applies to any type of content. the
builder will treat the element as already present as long as some element with the same tag name exists. if you were to change the static content to be some other element besides a menupopup, it won't match, so the
builder will create a new one when handling the action. this becomes useful when using multiple rules and we'll see some examples of this later. here is the example to try. note that the wor...
Samples and Test Cases - Archive of obsolete content
there is a guide to compiling the npruntime sample in visual studio. in addition to those samples, there are 2 more plugins in the tree that might be helpful. ...
... there is a guide to compiling the npruntime sample in visual studio. in addition to those samples, there are 2 more plugins in the tree that might be helpful. ...
... there is a guide to compiling the npruntime sample in visual studio. in addition to those samples, there are 2 more plugins in the tree that might be helpful. ...
... there is a guide to compiling the npruntime sample in visual studio. in addition to those samples, there are 2 more plugins in the tree that might be helpful. ...
Writing a plugin for Mac OS X - Archive of obsolete content
you go on reading this article, you may wish to grab the sample code located here, as it will be referenced during this tutorial. the sample is posted under a bsd-style license that means you can use it for anything, even if you don't plan to release your source code. getting started if you check out the mozilla source code in mac os x, you can simply open basicplugin.xcodeproj in xcode, click
build, and you're done. xcode will create a "
build" directory next to the project file, and if you built it in release mode, that folder in turn contains a "release" directory with the plugin inside it. to install the plugin, just copy it into one of these two locations: /library/internet plugins/ ~/library/internet plugins/ from this point, you can simply modify the sample plugin to do whateve...
... in turn contains a "release" directory with the plugin inside it. to install the plugin, just copy it into one of these two locations: /library/internet plugins/ ~/library/internet plugins/ from this point, you can simply modify the sample plugin to do whatever you want. notes and tips this section provides some additional information that may be helpful if you're trying to get a plugin
building on your own. info.plist the plugin communicates its mime and filename extension information using the info.plist file, which is packaged in the plugin bundle. the plugin also communicates its bundle type in that file, under the key cfbundlepackagetype; the type is 'brpl'. if the type isn't an npapi plugin type, the bundle won't load as an npapi plugin. you can always just use 'brpl'. xp_...
... file, which is packaged in the plugin bundle. the plugin also communicates its bundle type in that file, under the key cfbundlepackagetype; the type is 'brpl'. if the type isn't an npapi plugin type, the bundle won't load as an npapi plugin. you can always just use 'brpl'. xp_macosx it's important to define the gcc preprocessor definition xp_macosx to 1; this is used by the npapi headers to
build properly on mac os x. if you don't define it, they won't be interpreted correctly. this is easy to miss in the sample project's
build settings. symbol visibility symbol visibility is a common problem for people trying to get npapi plugins working. some symbols must be visible as standard c symbols so the browser can find them, which means they need to be prefixed by an underscore, and must n...
... working. some symbols must be visible as standard c symbols so the browser can find them, which means they need to be prefixed by an underscore, and must not have the c++ obfuscation that is generated by the c++ compiler. the three symbols that must always be visible are: np_initialize() np_getentrypoints() np_shutdown() the sample plugin is written entirely in c, using a standard xcode
build configuration, so by default all of its symbols are c-style and visible. if you want to implement your plugin in c++ or objective-c++, you need to tell the compiler to export them in c format by using extern "c" in the header, like this: #pragma gcc visibility push(default) extern "c" { nperror np_initialize(npnetscapefuncs *browserfuncs); nperror np_getentrypoints(nppluginfuncs *pluginfun...
Using SSH to connect to CVS - Archive of obsolete content
certain you can access cvs.mozilla.org from the open internet. if you are behind a firewall with an http tunneling proxy, you can use a program called corkscrew, in combination with the proxycommand ssh config directive to continue to access the mozilla cvs server. this technique was taken from eric engstrom's site, but the instructions have been re-written specifically for mozilla. download,
build, and install corkscrew by following the instructions in the install file in the corkscrew source distribution. corkscrew uses the standard "./configure; make install" technique common to many open source projects. make sure you have a ~/.ssh/config file that has at least the following directives preferredauthentications hostbased,publickey,password host cvs.mozilla.org proxycommand corkscrew...
...er.foo.com with the hostname of your proxy server, andport with the numeric tcp port on which the http tunnel is running. the usual cvs commands should now work. avoiding passphrase requests you can avoid repeated passphrase requests by using ssh-agent. if you don't already run ssh-agent on your computer, it's probably easiest to start it up whenever you set up your environment to checkout and
build mozilla. assuming you use a shell script or batch file to set things up, just add the commands below to the end of your file. posix shell eval `ssh-agent -s` ssh-add ~/.ssh/id_dsa $shell ssh-agent -k exit x windows in "~/.xinitrc" add "ssh-add". this will bring up a graphic box just after login, and before the desktop loads, asking for your passphrase. the passphrase will be held for the len...
...that let cvs know how to find and use the agent. your private key is then added to ssh-agent using ssh-add at which point you will be prompted for the key's passphrase. since it's important that you kill the agent when you're finished with it, the last three lines start a child environment that, when exited, will result in the agent's process being killed. the environment you will actually use to
build is the child environment. there are a few things to note about the commands for the ms-dos command prompt. first of all they will only work in versions of windows based on nt (nt/2000/xp). if you're
building on win9x/winme you'll need to find an alternative solution. if you're typing the commands directly (as opposed to storing them in a batch file that you call), you'll need to replace the occu...
... (nt/2000/xp). if you're
building on win9x/winme you'll need to find an alternative solution. if you're typing the commands directly (as opposed to storing them in a batch file that you call), you'll need to replace the occurances of "%%" in the first line with "%". finally, note that ssh-add needs the environment variable home to be set with the cygwin path to your cygwin home directory. mozilla
build if you're using mozilla
build, ssh-agent should be started when you run the start-msvc???.bat file. you should be prompted to enter your passphrase. mozilla
build 1.2 contains a bug that will stop ssh-agent from automatically starting with msys. to fix this, apply this diff to c:\mozilla-
build\msys\etc\profile.d\profile-sshagent.sh. ...
Anatomy of a video game - Game development
experienced game programmers who are new to web development could also benefit, too. ...
...oop based on something else entirely. modern javascript — as described in the next sections — thankfully makes it easy to develop an efficient, execute-once-per-frame main loop. of course, your game will only be as optimized as you make it. if something looks like it should be attached to a more infrequent event then it is often a good idea to break it out of the main loop (but not always).
building a main loop in javascript javascript works best with events and callback functions. modern browsers strive to call methods right as they are needed and idle (or do their other tasks) in the gaps. it is an excellent idea to attach your code to the moments that are appropriate for them. think about whether your function really needs to be called on a strict interval of time, every frame, or onl...
...rst person shooter (or a similar game) presents a new scene once every frame. you cannot really get more smooth and responsive than that. but do not immediately assume animations require frame-by-frame control. simple animations can be easily performed, even gpu-accelerated, with css animations and other tools included in the browser. there are a lot of them and they will make your life easier.
building a better main loop in javascript there are two obvious issues with our previous main loop: main() pollutes the window object (where all global variables are stored) and the example code did not leave us with a way to stop the loop unless the whole tab is closed or refreshed. for the first issue, if you want the main loop to just run and you do not need easy (direct) access to it, you could cr...
...ion to how the different systems involved interplay. you may have multiple components driven by multiple different types of events. this feels like unnecessary complexity but it might just be good optimization (not necessarily, of course). the problem is that you are not programming a typical main loop. in javascript, you are using the browser's main loop and you are trying to do so effectively.
building a more optimized main loop in javascript ultimately, in javascript, the browser is running its own main loop and your code exists in some of its stages. the above sections describe main loops which try not to wrestle away control from the browser. these main methods attach themselves to window.requestanimationframe(), which asks the browser for control over the upcoming frame. it is up to the...
2D maze game with device orientation - Game development
it’s quite new, but growing rapidly thanks to the passionate community involved in the development process. you can check it out on github where it’s open sourced, read the online documentation and go through the big collection of examples. ...
...ding an html5 mobile game that uses the device orientation and vibration apis to enhance the gameplay and is built using the phaser framework. basic javascript knowledge is recommended to get the most from this tutorial. example game by the end of the tutorial you will have a fully functional demo game: cyber orb. it will look something like this: phaser framework phaser is a framework for
building desktop and mobile html5 games. it’s quite new, but growing rapidly thanks to the passionate community involved in the development process. you can check it out on github where it’s open sourced, read the online documentation and go through the big collection of examples. the phaser framework provides you with a set of tools that will speed up development and help handle generic tasks need...
... framework, to add the canvas element to the page, you would have to write something like this inside the <body> tag: <canvas id='game' width='320' height='480'></canvas> the important thing to remember is that the framework is setting up helpful methods to speed up a lot of things like image manipulation or assets management, which would be a lot harder to do manually. note: you can read the
building monster wants candy article for the in-depth introduction to the basic phaser-specific functions and methods. back to game states: the line below is adding a new state called boot to the game: game.state.add('boot', ball.boot); the first value is the name of the state and the second one is the object we want to assign to it. the start method is starting the given state and making it active...
... the create() function of our game state: this.hole = this.add.sprite(ball._width*0.5, 90, 'hole'); this.physics.enable(this.hole, phaser.physics.arcade); this.hole.anchor.set(0.5); this.hole.body.setsize(2, 2); the difference is that our hole’s body will not move when we hit it with the ball and will have the collision detection calculated (which will be discussed later on in this article).
building the block labyrinth to make the game harder and more interesting we will add some obstacles between the ball and the exit. we could use a level editor, but for the sake of this tutorial let's create something on our own. to hold the block information we'll use a level data array: for each block we'll store the top and left absolute positions in pixels (x and y) and the type of the block — ...
Visual-js game engine - Game development
under : created by romuald quantin. ...
... and project files generator . now you can use on-page-editor (nice for visual setup , checking positions and dimensions - not for logic ) . manual start from cmd : server_folder/node editor.js after starting on-page-editor open browser icon to open internet browser in editor mode . see video explanation : if you use editor.js to visual create game object method , you must start ***node
build_from_editor_to_visual_js_file.js*** on the end of work. this tool will create visual.js in folder starter/ with all your game object was created in editor style . or you can use visual-js source editor. visual-js source editor (2d part only) is new and better way .in future visual staff will be better (real time simulator will be implemented).for now this place is good for coding . visu...
...ork. this tool will create visual.js in folder starter/ with all your game object was created in editor style . or you can use visual-js source editor. visual-js source editor (2d part only) is new and better way .in future visual staff will be better (real time simulator will be implemented).for now this place is good for coding . visual-js works direct with project files , no need for
build . add->new game object (form dialog for define type of new game object ) add->quick code (make your work faster - add usually code blocks) resources - explorer view for images and audios , you can drag or edit also need to execute node
build_resources for creating resources object for engine. inserting new code will be always at current line selected intro editor . save on drop menu or...
...urce code : paths.js see the pen visual js - pencil by visualjs game engine (@zlatnaspirala) on codepen. online demo examples at : https://jsfiddle.net/user/zlatnaspirala/fiddles/ demo slot mashine basic demo at : https://jsfiddle.net/zlatnaspirala/7d0d8v6d/ help about new 2d part - implementation of matter.js based typescript . i make strong relation with webpack and project .
build folder is full vendor nature. html css and resources come from dependency logic taken from source. to make all dependency works in
build proccess we need some plugins. features : tile's background draw for images (alias sprite - but for now there's no sprite and frame by frame animation methods). small engine config . some option in aspect view like npm install ... npm install typescript...
Visual typescript game engine - Game development
n 3.1.3. text editor used and recommended: visual studio code. luanch debugger configuration comes with this project. physics engine based on matter.js. multiplatform video chat (for all browsers) implemented. socketio used for session staff. multirtc2 used for data transfer also for video chat. multirtc3 alias 'broadcaster' used for video chat. client part to make all dependency works in
build process we need some plugins. npm install npm run
build navigate in browser /
build/app.html to see client app in action -the client part is a browser web application. no reloading or redirecting. this is a single page application. i use html request only for loading local/staged html (like register, login etc.). networking is based on websocket full-duplex communication only.you must be c...
...don't edit or add content in this folder. src,/ is the main client part (browser web application). main file: app.ts src/libs/ is a common and smart pack of classes, interfaces etc. easy access. server/ folder is fully independent server size. i use one git repo but consider '/server' represent the standalone application. there's server package.json independently from the c...
...ne git repo but consider '/server' represent the standalone application. there's server package.json independently from the client part also config is not common. i just like it like that. ...
...at works with other hybrid frameworks or custom implementation throw the native mobile application web control (chrome implementation usually tested). npm run broadcaster documentation : beta version for documentation. api documentation if you wanna generate doc you will need manual remove the comment from plugin section in webpack.config.js. restart 'npm run dev' best way to fully healthy
build. html/css is not prior to this project. if you wanna insert some new html page just define it intro webpack.config.js : plugins : [ new htmlwebpackplugin({ filename: '/templates/mygamelobby.html', template: 'src/html-components/mygamelobby.html' }), ... see register and login example. code format : npm run fix npm run tslint or use : tslint ...
How do I start to design my website? - Learn web development
ritized list of goals, let's move on to the next question. how could a website bring me to my goals? so you have a list of goals and you feel you need a website to reach those goals. are you sure? let's look back at our example. we have five goals connected to music, one goal related to personal life (finding your significant other), and the completely unrelated cat photos. ...
... a website to reach those goals. are you sure? let's look back at our example. we have five goals connected to music, one goal related to personal life (finding your significant other), and the completely unrelated cat photos. is it reasonable to
build a single website to cover all those goals? is it even necessary? after all, scores of existing web services might bring you to your goals without
building a new website. finding a girl/boyfriend is a prime case where it makes more sense to use existing resources rather than
build a whole new site. why? because we'll spend more time
building and maintaining the website rather than actually searching for a girl/boyfriend. since our goal is what matters most, we should spend our energy on leveraging existing tools rather than starting from scratch...
...ather than
build a whole new site. why? because we'll spend more time
building and maintaining the website rather than actually searching for a girl/boyfriend. since our goal is what matters most, we should spend our energy on leveraging existing tools rather than starting from scratch. again, there are so many web services already available for showcasing photos that it isn't worth the effort to
build a new site just to spread the word about how cute our cats are. the other five goals are all connected to music. there are, of course, many web services that could handle these goals, but it makes sense in this case to
build a dedicated website of our own. such a website is the best way to aggregate all the stuff we want to publish in a single place (good for goals 3, 5, and 6) and promote inter...
...eb services?) give people access to your videos on some part of your website two things to notice. first, some of these items are not web-related (e.g., record music, write articles). often those offline activities matter even more than the web side of the project. in sales, for instance, it's far more important and time-consuming to handle supply, payment, and shipment than to
build a website where people can place orders. second, setting out actionable steps leads to new questions you'll need to answer. usually there turn out to be more questions than we originally thought. (for example, should i learn how to do all this myself, ask someone to do it for me, or use third-party services?) conclusion as you can see, the simple idea "i want to make a website" generates a lon...
HTML forms in legacy browsers - Learn web development
ebkit aggregate the best articles by webkit core developers. chrome platform status site is also important. as well as the apple web site. make things simple because html forms involves complex interaction, there is one rule of thumb: keep it simple, also known as the "kiss principal". ...
... let's see some examples related to html forms. ...
... of design or technology. rather, it's about simplicity, intuitivess, and ease of user interaction. the tutorial, forms usability on ux for the masses, explains it well. graceful degradation is web developer's best friend graceful degradation and progressive enhancement are development patterns that allow you to
build great stuff by supporting a wide range of browsers at the same time. when you
build something for a modern browser, and you want to be sure it will work, one way or another, on legacy browsers, you are performing graceful degradation. let's see some examples related to html forms. html input types the input types added in html5 are all useable, even in ancient browsers, because the way they degrade is highly predictable. if a browser does not know the value of the type attrib...
... font color), there are always side effects. the best approach remains to not style html form widgets at all. but you can still apply styles to all the surrounding items. and, if you must alter the default styles of your form widgets, define a style guide to ensure consistency among all your form controls so user experience is not destroyed. you can also investigate some hard techniques such as re
building widgets with javascript. but in that case, do not hesitate to charge your client for such foolishness. feature detection and polyfills css and javascript are awesome technologies, but it's important to ensure you don't break legacy browsers. before using features that aren't fully supported in the browsers your targeting, you should feature detect: css feature detection before styling a re...
Sending forms through JavaScript - Learn web development
the user, and not for data submission. when the user tries to send the data, the application takes control and transmits the data asynchronously in the background, updating only the parts of the ui that require changes. sending arbitrary data asynchronously is generally called ajax, which stands for "asynchronous javascript and xml". how is it different? the xmlhttprequest (xhr) dom object can
build http requests, send them, and retrieve their results. historically, xmlhttprequest was designed to fetch and send xml as an exchange format, which has since been superceded by json. but neither xml nor json fit into form data request encoding. form data (application/x-www-form-urlencoded) is made of url-encoded lists of key/value pairs. for transmitting binary data, the http request is reshaped i...
...xecuted in the browser) and the back-end (the code which is executed on the server), you can send json/xml and process them however you want. but if you want to use a third party service, you need to send the data in the format the services require. so how should we send such data? the different techniques you'll require are done below. sending form data there are 3 ways to send form data:
building an xmlhttprequest manually. using a standalone formdata object. using formdata bound to a <form> element. let's look at them in detail.
building an xmlhttprequest manually xmlhttprequest is the safest and most reliable way to make http requests. to send form data with xmlhttprequest, prepare the data by url-encoding it, and obey the specifics of form data requests. let's look at an exam...
...inally, send our data. xhr.send( urlencodeddata ); } btn.addeventlistener( 'click', function() { senddata( {test:'ok'} ); } ) here's the live result: note: this use of xmlhttprequest is subject to the same-origin policy if you want to send data to a third party web site. for cross-origin requests, you'll need cors and http access control. using xmlhttprequest and the formdata object
building an http request by hand can be overwhelming. fortunately, the xmlhttprequest specification provides a newer, simpler way to handle form data requests with the formdata object. the formdata object can be used to
build form data for transmission, or to get the data within a form element to manage how it's sent. note that formdata objects are "write only", which means you can change them, but no...
...some legacy browsers can't access binary data or require complicated workarounds. to learn more about the filereader api, see using files from web applications. the least complicated way of sending binary data is by using formdata's append() method, demonstrated above. if you have to do it by hand, it's trickier. in the following example, we use the filereader api to access binary data and then
build the multi-part form data request by hand: <form id="theform"> <p> <label for="thetext">text data:</label> <input id="thetext" name="mytext" value="some text data" type="text"> </p> <p> <label for="thefile">file data:</label> <input id="thefile" name="myfile" type="file"> </p> <button>send me!</button> </form> as you see, the html is a standard <form>. there's nothing m...
UI pseudo-classes - Learn web development
o why have both? the issue is really one of semantics — out-of-range is a more specific type of invalid communication, so you might want to provide a different message for out-of-range inputs, which will be more helpful to users than just saying "invalid". you might even want to provide both. let's look at an example that does exactly this. our out-of-range.html demo (see also the source code)
builds on top of the previous example to provide out-of-range messages for the numeric inputs, as well as saying whether they are required. the numeric input looks like this: <div> <label for="age">age (must be 12+): </label> <input id="age" name="age" type="number" min="12" max="120" required> <span></span> </div> and the css looks like this: input + span { position: relative; } input + s...
...unchecked, they are considered indeterminate and will match the :indeterminate pseudo-class. more on what this means below. :checked when checked, they will be matched by the :checked pseudo-class. the most common use of this is to add a different style onto the checkbox/radiobutton when it is checked, in cases where you've removed the system default styling with appearance: none; and want to
build the styles back up yourself. we saw examples of this in the previous article when we talked about using appearence: none on radios/checkboxes. as a recap, the :checked code from our styled radio buttons example looks like so: input[type="radio"]::before { display: block; content: " "; width: 10px; height: 10px; border-radius: 6px; background-color: red; font-size: 1.2em; transfo...
...we then use a transition to make it nicely animate into view when the radio is selected/checked. the advantage of using a transform rather than transitioning width/height is that you can use transform-origin to make it grow from the center of the circle, rather than having it app...
... styles! next up, we'll move on to something different — client-side form validation. ...
Your first form - Learn web development
ut your form. designing a quick mockup will help you to define the right set of data you want to ask your user to enter. from a user experience (ux) point of view, it's important to remember that the bigger your form, the more you risk frustrating people and losing users. keep it simple and stay focused: ask only for the data you absolutely need. designing forms is an important step when you are
building a site or application. it's beyond the scope of this article to cover the user experience of forms, but if you want to dig into that topic you should read the following articles: smashing magazine has some good articles about forms ux, including an older but still relevant extensive guide to web form usability article. uxmatters is also a very thoughtful resource with good advice from basi...
...ience of forms, but if you want to dig into that topic you should read the following articles: smashing magazine has some good articles about forms ux, including an older but still relevant extensive guide to web form usability article. uxmatters is also a very thoughtful resource with good advice from basic best practices to complex concerns such as multi-page forms. in this article, we'll
build a simple contact form. let's make a rough sketch. our form will contain three text fields and one button. we are asking the user for their name, their e-mail and the message they want to send. hitting the button will send their data to a web server. active learning: implementing our form html ok, let's have a go at creating the html for our form. we will use the following html elements: <for...
...ge defined by the action attribute of the <form> element. a click on a reset button resets all the form widgets to their default value immediately. from a ux point of view, this is considered bad practice, so you should avoid using this type of button unless you really have a good reason to include one. a click on a button button does... nothing! that sounds silly, but it's amazingly useful for
building custom buttons — you can define their chosen functionality with javascript. note: you can also use the <input> element with the corresponding type to produce a button, for example <input type="submit">. the main advantage of the <button> element is that the <input> element only allows plain text in its label whereas the <button> element allows full html content, allowing more complex, cre...
...wer than what we saw here and the other articles in this module will help you to master the rest. ...
Inheritance in JavaScript - Learn web development
shows how to create "child" object classes (constructors) that inherit features from their "parent" classes. in addition, we present some advice on when and where you might use oojs, and look at how classes are dealt with in modern ecmascript syntax. prerequisites: basic computer literacy, a basic understanding of html and css, familiarity with javascript basics (see first steps and
building blocks) and oojs basics (see introduction to objects). objective: to understand how it is possible to implement inheritance in javascript. prototypal inheritance so far we have seen some inheritance in action — we have seen how prototype chains work, and how members are inherited going up a chain. but mostly this has involved built-in browser functions. how do we create a...
...bye for now!`); }; } the class statement indicates that we are creating a new class. inside this block, we define all the features of the class: the constructor() method defines the constructor function that represents our person class. greeting() and farewell() are class methods. any methods you want associated with the class are defined inside it, after the constructor. in this exam...
...used template literals rather than string concatenation to make the code easier to read. we can now instantiate object instances using the new operator, in just the same way as we did before: let han = new person('han', 'solo', 25, 'male', ['smuggling']); han.greeting(); // hi! i'm han let leia = new person('leia', 'organa', 19, 'female', ['government']); leia.farewell(); // leia has left the
building. bye for now note: under the hood, your classes are being converted into prototypal inheritance models — this is just syntactic sugar. but i'm sure you'll agree that it's easier to write. inheritance with class syntax above we created a class to represent a person. they have a series of attributes that are common to all people; in this section we'll create our specialized teacher class...
...ect and grade are specific to teacher this.subject = subject; this.grade = grade; } } now when we instantiate teacher object instances, we can call methods and properties defined on both teacherand person as we'd expect: let snape = new teacher('severus', 'snape', 58, 'male', ['potions'], 'dark arts', 5); snape.greeting(); // hi! i'm severus. snape.farewell(); // severus has left the
building. bye for now. snape.age // 58 snape.subject; // dark arts like we did with teachers, we could create other subclasses of person to make them more specialized without modifying the base class. note: you can find this example on github as es2015-class-inheritance.html (see it live also). getters and setters there may be times when we want to change the values of an attribute in the classe...
The "why" of web performance - Learn web development
eact to user interaction, or appears janky, this causes site visitors to lose interest and trust. here's some real-world examples of performance improvements: tokopedia reduced render time from 14s to 2s for 3g connections and saw a 19% increase in visitors, 35% increase in total sessions, 7% increase in new users, 17% increase in active users and 16% increase in sessions per user. ...
...kopedia reduced render time from 14s to 2s for 3g connections and saw a 19% increase in visitors, 35% increase in total sessions, 7% increase in new users, 17% increase in active users and 16% increase in sessions per user. re
building pinterest pages for performance resulted in a 40% decrease in wait time, a 15% increase in seo traffic and a 15% increase in conversion rate to signup. to
build websites and applications people want to use; to attract and retain site visitors, you need to create an accessible site that provides a good user experience. ...
... good performance is an asset. bad performance is a liability. ...
... good performance is an asset. bad performance is a liability. site speed directly affects bounce rates, conversion, revenue, user satisfaction, and search engine ranking. performant sites have been shown to increase visitor retention and user satisfaction. ...
Client-side tooling overview - Learn web development
objective: to understand what types of client-side tooling there are, and how to find tools and get help with them. overview of modern tooling writing software for the web has become more sophisticated through the ages. although it is still entirely reasonable to write html, css, and javascript "by hand" there is now a wealth of tools that developers can use to speed up the process of
building a web site, or app. there are some extremely well-established tools that have become common "household names" amongst the development community, and new tools are being written and released every day to solve specific problems. you might even find yourself writing a piece of software to aid your own development process, to solve a specific problem that existing tools don’t already seem to h...
...is possible to waste hours attempting to get a tooling pipeline working before even touching a single line of application code. if you have found yourself struggling in the past, then don’t worry — you are not alone. in these articles, we won’t answer every question about web tooling, but we will provide you with a useful starting point of understanding the fundamentals, which you can then
build from. as with any complex topic, it is good to start small, and gradually work your way up to more advanced uses. the modern tooling ecosystem today's modern developer tooling ecosystem is huge, so it's useful to have a broad idea of what main problems the tools are solving. if you jump on your favourite search engine and look for "front-end developer tools" you're going to hit a huge spectrum ...
...t uncommon for companies to have some kind of policy or pre-baked configuration available to install so that all their developers are all using the same processes. this includes anything that makes your development process easier with respect to generating stable and reliable code. safety net tooling should also help you either prevent mistakes or correct mistakes automatically without having to
build your code from scratch each time. a few very common safety net tool types you will find being used by developers are as follows. linters linters are tools that check through your code and tell you about any errors that are present, what error types they are, and what code lines they are present on. often linters can be configured to not only report errors, but also report any violations of a s...
...anguage. for example: sass/scss: this css extension allows you to use variables, nested rules, mixins, functions, and many other features, some of which are available in native css (such as variables), and some of which aren't. typescript: typescript is a superset of javascript that offers a bunch of additional features. the typescript compiler converts typescript code to javascript when
building for production. frameworks such as react, ember, and vue: frameworks provide a lot of functionality for free and allow you to use it via custom syntax built on top of vanilla javascript. in the background, the framework’s javascript code works hard to interpret this custom syntax and render it as a final web app. post development post-development tooling ensures that your software...
Benchmarking
debug
builds debug
builds (--enable-debug) and non-optimized
builds (--disable-optimize) are much slower. any performance metrics gathered by such
builds are largely unrelated to what would be found in a release browser. rust optimization level local optimized
builds are compiled with rust optimization level 1 by default, unlike nightly
builds, which use rust optimization level 2. this setting reduces
build times significantly but comes with a serious hit to runtime performance for any rust code (for example stylo and webrender). ...
...uld be found in a release browser. rust optimization level local optimized
builds are compiled with rust optimization level 1 by default, unlike nightly
builds, which use rust optimization level 2. this setting reduces
build times significantly but comes with a serious hit to runtime performance for any rust code (for example stylo and webrender). add the following to your mozconfig in order to
build with level 2: ac_add_options rustc_opt_level=2 gc poisoning many firefox
builds have a diagnostic tool that causes crashes to happen sooner and produce much more actionable information, but also slow down regular usage substantially. in particular, "gc poisoning" is used in all debug
builds, and in optimized nightly
builds (but not opt developer edition or beta
builds). the poisoning can be di...
...(this may be disabled for many situations in the future. see bug 1280819. accelerated graphics especially on linux, accelerated graphics can sometimes lead to severe performance problems even if things look ok visually. ...
...(this may be disabled for many situations in the future. see bug 1280819. ...
A bird's-eye view of the Mozilla framework
cation suite, not the architecture of the individual applications themselves. prerequisites this article assumes you have access to mozilla sources and are familiar with the directory structure of the source tree. the code samples in the article are based on mozilla/5.0 (windows; u; windows nt 5.1; en-us; rv:1.9a1) gecko/20051104 seamonkey/1.1a from a new source tree checked out 11/04/05. the
build id is 2005110409. thehelp viewer files referenced in the article are located in /seamonkey/extensions/help/ this article also assumes you are familiar with the javascript and c++ programming languages, object-oriented programming (oop) terminology and design concepts, the microsoft® component object model (com), and the corba omg interface definition language (idl). organization this article...
...es the x window system toolkit defines the termwidget as a pre-defined object that encapsulates both the command actions and data associated with a graphical user interface (gui) control. the various x toolkit implementations provide a set of widgets for ui controls such as menus, command buttons, dialog boxes and scroll bars. the mozilla xptoolkit module provides a similar set of facilities for
building cross-platform ui controls implemented as xml user interface language (xul) packages. a xul package consists of a xul description of the ui widget cascading style sheets customizing appearance javascript services implementing the ui behavior a package (also known as chrome) is really just a bundling of a set of ui widgets and associated services implementing a particular application fea...
..., and nsgetmodule(), the entry point used to load the xpcom component. xpcom components also link with a set of xpcom utilities, such as strings, smart pointers, basic assertion and condition checking. these utilities are referred to as xpcom glue. ...
...com glue. at startup, the core application component identifies and loads all of the different xpcom components comprising the core application services and
builds a central registry it uses to generate instances of xpcom components and instances of interface implementation classes on demand. ...
Gmake vs. Pymake
a relative configure produces paths that look like "../../foo" which can be understood by gmake and pymake. to configure relatively, invoke configure or client.mk from your objdir. ...
... supports
building with two different (but mostly compatible)
build tools: gmake and pymake. path issues on windows on windows, you must take special care to be able to switch back and forth between gmake and pymake on the same object dir. gmake uses msys paths ("/c/dev/foo"), while pymake uses native windows paths ("c:\dev\foo"). if you try to switch from gmake to pymake or pymake to gmake the
build will fail unless you did a relative configure. a relative configure produces paths that look like "../../foo" which can be understood by gmake and pymake. to configure relatively, invoke configure or client.mk from your objdir. ...
... the working directory must be your objdir when you invoke configure to get paths that will work in gmake and pymake. ...
...e. a relative configure produces paths that look like "../../foo" which can be understood by gmake and pymake. to configure relatively, invoke configure or client.mk from your objdir. for example, if using the default objdir, you might type in the root of your source tree: mkdir obj-i686-pc-mingw32; cd obj-i686-pc-mingw32; python ../
build/pymake/make.py -f ../client.mk. note that typing "python
build/pymake/make.py -f client.mk" does not trigger a relative configure. the working directory must be your objdir when you invoke configure to get paths that will work in gmake and pymake. you should also make sure that the object directory path specified in your mozconfig matches the directory in which you're invoking pymake. ...
pymake
on other operating systems (linux, os x, etc), pymake itself only requires python 2.6 or higher (but not python 3). please note that python 2.7 is strongly recommended. usage if you use mach for everything, you don't have to worry about gmake and pymake: mach will run whatever is best for the current machine. note: on windows, you must take special care to be able to switch back and forth between gmake and pymake on the same object dir. ...
...ed. usage if you use mach for everything, you don't have to worry about gmake and pymake: mach will run whatever is best for the current machine. note: on windows, you must take special care to be able to switch back and forth between gmake and pymake on the same object dir. see gmake vs. pymake for more information. anywhere you would normally type make, instead type python /path/to/srcdir/
build/pymake/make.py. for example: instead of make -f client.mk to start a
build, you would type python
build/pymake/make.py -f client.mk. to run tests instead of typing make mochitest-plain in the object directory, you would type python ../
build/pymake/make.py mochitest-plain. alternately, if you would like to simply type in pymake -f client.mk from within the mingw32 shell. while in the shell ...
...test-plain. alternately, if you would like to simply type in pymake -f client.mk from within the mingw32 shell. while in the shell type cd ~ (without quotes). ...
...is at c:/mozilla-central, if not, adjust your path accordingly.) alias pymake=c:/mozilla-central/
build/pymake/make.py save your .profile edit and close the shell, then restart the shell. try typing just pymake into the shell and press enter. this should come back with "no makefile found." if it does, your pymake alias is connected and you are ready to type in pymake -f client.mk to start the
build. unlike gmake on windows, pymake is capable of doing parallel
builds, so you can set a moz_make_flags=-jn in your .mozconfig without risk of deadlocks. note: on windows, if using an absolute path moz_objdir in your .mozconfig, it must be a windows-style (i.e. c:/foo/bar) rather than an msys-style (i.e. /c/foo/bar) path. ...
Creating a New Protocol
the protocol hierarchy unless you are working on some special project, your protocol will fit into the protocol hierarchy for multi-process plugins or tabs. ...
...the protocol hierarchy unless you are working on some special project, your protocol will fit into the protocol hierarchy for multi-process plugins or tabs. the toplevel protocol for plugins is ppluginmodule. ...
...should know how ipdl works first! create the protocol file the protocol file should live in the same directory as the code which will implement it. protocol names start with p, and protocol files must be named pprotocolname.ipdl. ipdl protocols should be in the mozilla namespace or a sub-namespace. to hook up the file to the
build, you need to add your ipdl file to ipdl_sources in the nearest moz.
build file. see dom/ipc/moz.
build for an example. the protocol hierarchy unless you are working on some special project, your protocol will fit into the protocol hierarchy for multi-process plugins or tabs. the toplevel protocol for plugins is ppluginmodule. the toplevel protocol for tabs is pcontent. you should know what protocol will manage the new protocol and what lifetime issues that creates. if t...
...ol hierarchy unless you are working on some special project, your protocol will fit into the protocol hierarchy for multi-process plugins or tabs. the toplevel protocol for plugins is ppluginmodule. the toplevel protocol for tabs is pcontent. you should know what protocol will manage the new protocol and what lifetime issues that creates. if there is any doubt, ask on irc in the #content channel.
building the new protocol to
build the new protocol declaration and generate headers, make in ipc/ipdl: make -c objdir/ipc/ipdl if there are any protocol-level errors, the ipdl compiler will print the relevant error messages and stop. to view the generated headers, look in objdir/ipc/ipdl/_ipdlheaders . creating the implementation the c++ implementation inherits from the abstract ipdl-generated classe...
Profiling with Xperf
his page applies to xperf version 4.8.7701 or newer. to see your xperf version, either run 'xperf' on a command line with no arguments, or start 'xperfview' and look at help -> about performance analyzer. (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. installation for all versions, the tools are part of the latest windows 7 sdk (sdk version 7.1). use the web installer to install at least the "win32 development tools". once the sdk installs, execute either wpt_x86.msi or wpt_x64.msi in the redist/windows performance toolkit folder of the sdk's install location (typically program files/microsoft sdks/windows/v7.1/redist/windows performance t...
...fy the _nt_symbol_path and _nt_symcache_path environment variables to make these changes permanent. the standard symbol path that includes both mozilla's and microsoft's symbol server configuration is as follows: _nt_symcache_path: c:\symbols _nt_symbol_path: srv*c:\symbols*http://msdl.microsoft.com/download/symbols;srv*c:\symbols*http://symbols.mozilla.org/firefox/ to add symbols from your own
builds, add c:\path\to\objdir\dist\bin to _nt_symbol_path. as with all windows paths, the symbol path uses semicolons (;) as separators. make sure you select the trace -> load symbols menu option in the windows performance analyzer (xperfview). there seems to be a bug in xperf and symbols; it is very sensitive to when the symbol path is edited. if you change it within the program, you'll have to clos...
...fview out.etl the msdn "quickstart" page goes over this in more detail, and also has good explanations of how to use xperfview. i'm not going to repeat it here, because i'd be using essentially the same screenshots, so go look there. the 'stack' view will give results similar to shark. heap profiling xperf has good tools for heap allocation profiling, but they have one major limitation: you can't
build with jemalloc and get heap events generated. the stock windows crt allocator is horrible about fragmentation, and causes memory usage to rise drastically even if only a small fraction of that memory is in use. however, even despite this, it's a useful way to track allocations/deallocations. capturing heap data the "-heap" option is used to set up heap tracing. firefox generates lots of events, so...
...ound will change grouping in various ways; experiment to get the data that you're looking for. also experiment with turning columns on and off; removing a column will allow data to be aggregated without considering that column's contributions. disabling all but one core will make the numbers add up to 100%. this can be done by running 'msconfig' and going to advance options from the "boot" tab.
building firefox to get good data from a firefox
build, it is important to
build with the following options in your mozconfig: export cflags="-oy-" export cxxflags="-oy-" this disables frame-pointer optimization which lets xperf do a much better job unwinding the stack. traces can be captured fine without this option (for example, from nightlies), but the stack information will not be useful. ac_add_o...
NSS 3.12.6 release notes
(nss) 3.12.6 is a patch release for nss 3.12. the bug fixes in nss 3.12.6 are described in the "bugs fixed" section below. nss 3.12.6 is tri-licensed under the mpl 1.1/gpl 2.0/lgpl 2.1. distribution information the cvs tag for the nss 3.12.6 release is nss_3_12_6_rtm. nss 3.12.6 requires nspr 4.8.4. see the documentation section for the
build instructions. nss 3.12.6 source and binary distributions are also available on ftp.mozilla.org for secure https download: source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/nss_3_12_6_rtm/src/. you also need to download the nspr 4.8.4 binary distributions to get the nspr 4.8.4 header files and shared libraries, which nss 3.12.
...kix_default_max_response_length) is too small for downloading some crls. ...
... bug 542538: nss: add function for recording ocsp stapled replies bug 544191: use system zlib on mac os x bug 544584: segmentation fault wh...
...it patches from fedora bug 545273: remove unused function sec_init bug 546389: nsssysinit binary built inside source tree documentation for a list of the primary nss documentation pages on mozilla.org, see nss documentation. new and revised documents available since the release of nss 3.11 include the following:
build instructions nss shared db compatibility nss 3.12.6 shared libraries are backward compatible with all older nss 3.x shared libraries. a program linked with older nss 3.x shared libraries will work with nss 3.12.6 shared libraries without recompiling or relinking. furthermore, applications that restrict their use of nss apis to the functi...
NSS 3.44 release notes
a.org for secure https download: source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/nss_3_44_rtm/src/ other releases are available in nss releases. new in nss 3.44 new functionality new functions in lib/certdb/cert.h cert_getcertificateder - access the der-encoded form of a certcertificate. notable changes in nss 3.44 it is now possible to
build nss as a static library (bug 1543545) initial support for
building for ios. bugs fixed in nss 3.44 1501542 - implement checkarmsupport for android 1531244 - use __builtin_bswap64 in crypto_primitives.h 1533216 - cert_decodecertpackage() crash with netscape certificate sequences 1533616 - sdb_getattributevaluenolock should make at most one sql query, rather than one for each attribute 15...
...ather than one for each attribute 1531236 - provide accessor for certcertificate.dercert 1536734 - lib/freebl/crypto_primitives.c assumes a big endian machine 1532384 - in nss test certificates, use @example.com (not @bogus.com) 1538479 - post-handshake messages after async server authentication break when using record layer separation 1521578 - x25519 support in pk11pars.c 1540205 - freebl
build fails with -dnss_disable_chachapoly 1532312 - post-handshake auth doesn't interoperate with openssl 1542741 - certutil -f crashes with segmentation fault 1546925 - allow preceding text in try comment 1534468 - expose chacha20 primitive 1418944 - quote cc/cxx variables passed to nspr 1543545 - allow to
build nss as a static library 1487597 - early data that arrives before the handshake comp...
...shake auth doesn't interoperate with openssl 1542741 - certutil -f crashes with segmentation fault 1546925 - allow preceding text in try comment 1534468 - expose chacha20 primitive 1418944 - quote cc/cxx variables passed to nspr 1543545 - allow to
build nss as a static library 1487597 - early data that arrives before the handshake completes can be read afterwards 1548398 - freebl_gtest not
building on linux/mac 1548722 - fix some coverity warnings 1540652 - softoken/sdb.c: logically dead code 1549413 - android log lib is not included in
build 1537927 - ipsec usage is too restrictive for existing deployments 1549608 - signature fails with dbm disabled 1549848 - allow
building nss for ios using gyp 1549847 - nss's sqlite compilation warnings make the
build fail on ios 1550041 - fre...
...a program linked with older nss...
NSS 3.49 release notes
49_rtm. nss 3.49 requires nspr 4.24 or newer. nss 3.49 source distributions are available on ftp.mozilla.org for secure https download: source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/nss_3_49_rtm/src/ other releases are available in nss releases. ...
... other releases are available in nss releases. notable changes in nss 3.49 the legacy dbm database, libnssdbm, is no longer built by default when using gyp
builds. see bug 1594933 for details. bugs fixed in nss 3.49 bug 1513586 - set downgrade sentinel for client tls versions lower than 1.2. ...
... database, libnssdbm, is no longer built by default when using gyp
builds. see bug 1594933 for details. bugs fixed in nss 3.49 bug 1513586 - set downgrade sentinel for client tls versions lower than 1.2. ...
...a program linked with ...
NSS 3.52 release notes
on. see the bug for more information. bug 1623374 - support new pkcs #11 v3.0 message interface for aes-gcm and chachapoly. bug 1612493 - integrate avx2 chacha20, poly1305, and chacha20poly1305 from hacl*. bugs fixed in nss 3.52 bug 1633498 - fix unused variable 'getauxval' error on ios compilation. bug 1630721 - add softoken functions for fips. bug 1630458 - fix problem of gyp msvc
builds not producing debug symbol files. bug 1629663 - add ikev1 quick mode kdf. bug 1629661 - mpconfig calls in ssl initialize policy before nss is initialized. bug 1629655 - support temporary session objects in ckfw. bug 1629105 - add pkcs11 v3.0 functions to module debug logger. bug 1626751 - fix error in generation of fuzz32 docker image after updates. bug 1625133 - fix implicit declaration o...
... - add ikev1 quick mode kdf. bug 1629661 - mpconfig calls in ssl initialize policy before nss is initialized. bug 1629655 - support temporary session objects in ckfw. bug 1629105 - add pkcs11 v3.0 functions to module debug logger. bug 1626751 - fix error in generation of fuzz32 docker image after updates. bug 1625133 - fix implicit declaration of function 'getopt' error. bug 1624864 - allow
building of gcm-arm32-neon on non-armv7 architectures. bug 1624402 - fix compilation error in firefox android. bug 1624130 - require ck_function_list structs to be packed. bug 1624377 - fix clang warning for unknown argument '-msse4'. bug 1623374 - support new pkcs #11 v3.0 message interface for aes-gcm and chachapoly. bug 1623184 - fix freebl_cpuid for querying extended features. bug 1622555 - f...
...irefox android. bug 1624130 - require ck_function_list structs to be packed. bug 1624377 - fix clang warning for unknown argument '-msse4'. bug 1623374 - support new pkcs #11 v3.0 message interface for aes-gcm and chachapoly. bug 1623184 - fix freebl_cpuid for querying extended features. bug 1622555 - fix argument parsing in lowhashtest. bug 1620799 - introduce nss_disable_gcm_arm32_neon to
build on arm32 without neon support. bug 1619102 - add workaround option to include both dtls and tls versions in dtls supported_versions. bug 1619056 - update readme: tls 1.3 is not experimental anymore. bug 1618915 - fix ubsan issue in ssl_parsesessionticket. bug 1618739 - don't assert fuzzer behavior in ssl_parsesessionticket. bug 1617968 - update delegated credentials implementation to draft-0...
...en fipstest handling of ki_len. bug 1608245 - consistently handle null slot/session. bug 1603801 - avoid dcache pollution from sdb_measureaccess(). bug 1603628 - update nss to support pkcs #11 v3.0. bug 1561637 - tls 1.3 does not work in fips mode. bug 1531906 - fix overzealous assertion when evicting a cached sessionid or using external cache. bug 1465613 - fix issue where testlib makefile
build produced extraneous object files. bug 1619959 - properly handle multi-block seed ecb inputs. bug 1630925 - guard all instances of nsscmssigneddata.signerinfo to avoid a cms crash bug 1571677 - name constraints validation: cn treated as dns name even when syntactically invalid as dns name this bugzilla query returns all the bugs fixed in nss 3.52: https://bugzilla.mozilla.org/buglist.cgi?res...
NSS API Guidelines
ntifying new files, functions, and data types. cvs id each file should include a cvs id string for identification. the preferred format is: "@(#) $rcsfile: nss-guidelines.html, v $ $revision: 48936 $ $date: 2009-08-11 07:45:57 -0700 (tue, 11 aug 2009) $ $name$" you can put the string in a comment or in a static char array. use #ifdef debug to include the array in debug
builds only. the advantage of using an array is that you can use strings(1) to pull the id tags out of a (debug) compiled library. you can even put them in header files; the header files are protected from double inclusion. the only catch is that you have to determine the name of the array. here is an example from lib/base/baset.h: #ifdef debug static const char baset_cvs_id[] = "@(#) $rcsfil...
...$revision: 48936 $ $date: 2009-08-11 07:45:57 -0700 (tue, 11 aug 2009) $ $name$"; #endif /* debug */ the difference, between this and id, is that id has some useless information (every file is "experimental"), and doesn't have name. name is the tag (if any) from which this file was pulled. if you're good with tagging your releases, and then checking out (or exporting!) from the tag for your
build, this saves you from messing around with specific files revision numbers. header files we have a preferred naming system for include files. we had been moving towards one, for some time, but for the nss 3.0 project we finally wrote it down. data types function prototypes public nss____t.h nss____.h friend (only if required) nss____tf.h nss____f.
... arena, or the heap, as long as from our allocators. combined with purify, this also helps us catch cases where things being allocated by one allocator are freed by another, which is a common windows pitfall. the security code often wants to be sure to zero memory, when it's being freed; we'll add it to the primitives to deal with. the arena_threadmark preprocessor definition (default in debug
builds), and code it encloses, will add some checking for the following situation: thread a marks the arena, and allocates some memory from it. thread b allocates some memory from the arena. thread a releases the arena back to the mark. thread b now finds itself with a pointer to released data. some thread -- doesn't matter which -- allocates some data from the arena; this may overlap the chunk ...
...t found, and on top is an error precisely relating to what you are doing. note: error stacks are vertical, and never horizontal. if multiple things go wrong simultaneously, and you want to report them all, use another mechanism. errors, though not integers, are done as external constants, instead of preprocessor definitions. this is so any additional error doesn't trigger the entire tree to re
build. likewise, the external references to errors are made in the prototypes files, with the functions which can return them. error stacks are thread-private. the usual semantic is that public routines clear the stack first, private routines don't. usually, every public routine has a private counterpart, and the implementation of the public routine looks like this: nssimplement rv * nsstype...
SpiderMonkey Internals
e generated from a line greater than or equal to the input line, and may return the pc of a for-loop update part, if given the line number of the loop body's closing brace. any line after the last one in a script or function maps to a pc one byte beyond the last bytecode in the script. an example, from perfect.js: function perfect(n) { print("the perfect numbers up to " + n + " are:"); // we
build sumofdivisors[i] to hold a string expression for // the sum of the divisors of i, excluding i itself. var sumofdivisors = new exprarray(n + 1, 1); for (var divisor = 2; divisor <= n; divisor++) { for (var j = divisor + divisor; j <= n; j += divisor) { sumofdivisors[j] += " + " + divisor; } // at this point everything up to 'divisor' has its sumofdivisors // expression ...
...gc.cpp, jsgc.h the garbage collector and tracing routines. jsinterp.*, jscntxt.*, jsinvoke.cpp the bytecode interpreter, and related functions such as call and allocstack, live in jsinterp.cpp. the jscontext constructor and destructor are factored out into jscntxt.cpp for minimal linking when the compiler part of js is split from the interpreter part into a separate program. jsinvoke.cpp is a
build hack used on some platforms to
build js_interpret under different compiler options from the rest of jsinterp.cpp. jsemit.*, jsopcode.tbl, jsopcode.*, jsparse.*, jsscan.*, jsscript.* compiler and decompiler modules. the jsopcode.tbl file is a c preprocessor source that defines almost everything there is to know about js bytecodes. see its major comment for how to use it. for now, a debugger will...
...y where i'm too smart or paranoid to believe the assertion will never fail... jsclist.h doubly-linked circular list struct and macros. jscpucfg.cpp this standalone program generates jscpucfg.h, a header file containing bytes per word and other constants that depend on cpu architecture and c compiler type model. it tries to discover most of these constants by running its own experiments on the
build host, so if you are cross-compiling, beware. jsdtoa.cpp, jsdtoa.h, dtoa.c dtoa.c contains david gay's portable double-precision floating point to string conversion code, with permission to use notice included. jsdtoa.cpp #includes this file. jshash.cpp, jshash.h, jsdhash.cpp, jsdhash.h portable, extensible hash tables. these use multiplicative hash for strength reduction over division hash, y...
...values inaccurately. prmjtime.c, prmjtime.h time functions. these interfaces are named in a way that makes local vs. universal time confusion likely. caveat emptor, and we're working on it. to make matters worse, java (and therefore javascript) uses "local" time numbers (offsets from the epoch) in its date class. jsfile.cpp, jsfile.h, jsfile.msg obsolete. do not use these files. makefile.in,
build.mk mozilla makefiles. if you're
building gecko or firefox, the larger
build system will use these files. they are also used for current standalone
builds. makefile.ref, rules.mk, config.mk, config/* obsolete spidermonkey standalone makefiles from 1.8 and earlier. see spidermonkey
build documentation. see also jsd ...
JS_BeginRequest
cx jscontext * the context in which the calling thread intends to call jsapi functions. description when your multithreaded application wants to use a jscontext, it must use js_beginrequest and js_endrequest to bracket maximal non-blocking hunks of native code that call the jsapi. this "request model" is necessary to interlock with the global garbage collector. ...
... requests constrain garbage collection. if any thread is in a requests, garbage collection can happen only when that thread calls into the jsapi. ...
... requests constrain garbage collection. if any thread is in a requests, garbage collection can happen only when that thread calls into the jsapi. if one thread needs garbage collection, it blocks until each other thread makes a jsapi call. ...
...e the jsapi. any blocking native call, or lengthy computation that can race safely with the garbage collector, within a request, must be bracketed with js_suspendrequest and js_resumerequest. it is safe to nest calls to js_beginrequest so long as each call is balanced by a matching call to js_endrequest. jsapi 1.7 and earlier js_beginrequest and js_endrequest are available only in js_threadsafe
builds. in spidermonkey 1.8 and later, these functions are present, but do nothing, in non-js_threadsafe
builds. mxr id search for js_beginrequest mxr id search for js_endrequest ...
JS_SetGCZeal
frequency allocations. with gc zeal enabled, gc-related crashes are much easier to reproduce (they happen more reliably) and debug (they happen sooner, closer to the source of the bug). the drawback is that gc zeal can cause javascript code to run extremely slowly. regularly running your test suite with gc zeal enabled at level 2 is a good practice. ...
...ed, gc-related crashes are much easier to reproduce (they happen more reliably) and debug (they happen sooner, closer to the source of the bug). the drawback is that gc zeal can cause javascript code to run extremely slowly. regularly running your test suite with gc zeal enabled at level 2 is a good practice. this function is available only in debug
builds. ...
...ier to reproduce (they happen more reliably) and debug (they happen sooner, closer to the source of the bug). the drawback is that gc zeal can cause javascript code to run extremely slowly. regularly running your test suite with gc zeal enabled at level 2 is a good practice. this function is available only in debug
builds. ...
...reliably) and debug (they happen sooner, closer to the source of the bug). the drawback is that gc zeal can cause javascript code to run extremely slowly. regularly running your test suite with gc zeal enabled at level 2 is a good practice. this function is available only in debug
builds. ...
Parser API
this makes it easier to write tools in javascript that manipulate javascript source programs, such as syntax highlighters, static analyses, translators, compilers, obfuscators, etc. note: this page describes spidermonkey-specific behavior and might be incomplete. visit estree spec for a community ast standard that includes latest ecmascript features and is backward-compatible with spidermonkey format. ...
...urned ast nodes. source string default: null a description of the input source; typically a filename, path, or url. this string is not meaningful to the parsing process, but is produced as part of the source location information in the returned ast nodes. line number default: 1 the initial line number to use for source location information.
builder
builder default: null a
builder object, which can be used to produce ast nodes in custom data formats. the expected callback methods are described under
builder objects. target string default: script a type of the parsing target, can be either script or module. if parsing fails due to a syntax error, an instance of syntaxerror is t...
...e: string; } an xml attribute value. interface xmlcdata <: xml { type: "xmlcdata"; contents: string; } an xml cdata node. interface xmlcomment <: xml { type: "xmlcomment"; contents: string; } an xml comment. interface xmlprocessinginstruction <: xml { type: "xmlprocessinginstruction"; target: string; contents: string | null; } an xml processing instruction.
builder objects the optional
builder parameter to reflect.parse() makes it possible to construct user-specified data from the parser, rather than the default node objects.
builder objects may contain any of the callback methods described in this section. each callback can produce any custom, user-defined datatype; these are referred to below as customexpression, customstatement, etc. note: because t...
...referred to below as customexpression, customstatement, etc. note: because this library uses null for optional nodes, it is recommended that user-defined datatypes not use null as a representation of an ast node. if the loc option is enabled (see the reflect.parse() options above), then each callback is provided with the source location information of the parsed node as an extra parameter. all
builder callbacks are optional. when a callback is missing, the default format is used, but the provided
builder methods are still used recursively for sub-nodes. programs program(body[, loc]) body: [ customstatement ] loc: sourcelocation returns: customprogram callback to produce a custom program node. statements emptystatement([loc]) loc: sourcelocation returns: customstatement callback t...
Creating a Python XPCOM component
creating applications with mozilla already provides a tutorial for making a simple javascript or c++ component (implementing the nsisimple interface). here is how to make the same component in python using pyxpcom. (note that some details may be missing.) preparation if a binary of pyxpcom is not available, you will need to
build it - see
building pyxpcom. tip: you can achieve a copy of binary of pyxpcom from pythonext; simply unpack xpi and take everything you need. if you wish to use pyxpcom from a normal python executable, you will need to tell python where it can find the pyxpcom library. this is probably best done by setting a pythonpath variable pointing at the 'bin/python' directory in the application. this is not necessary when your components are loaded by mozilla as the py...
...e: there are exceptions; see this discussion for information on the use of string and wstring for unicode transfer. see here for info on describing interfaces, and on which types can be used. registering the interface in the "components" directory, execute : ../xpidl -m typelib -w -v -i /usr/share/idl/mozilla/ nsipysimple.idl on windows you must point to the idl directory as part of your mozilla
build. for example: xpidl.exe -m typelib -w -v -i c:\source\mozilla\obj-i686-pc-mingw32\dist\idl foo.idl xpidl will then create nsipysimple.xpt, which should be placed correctly (e.g., in the 'components' directory). implementing the component unlike c++, pyxpcom does much of the work for you. make a file named "py_simple.py" for the actual code (again, in the 'components' directory): from xpcom impor...
...ng" def write(self): print self.yourname def change(self, newname): self.yourname = newname then register your component; the procedure is the same for any component, but will not work if python components weren't enabled. to register the component, touch the .autoreg (a hidden file) in the bin directory, or delete xpti.dat. then, the next time mozilla starts, it will re
build the index of components, including any new one in the 'components' directory. it is helpful to then start mozilla from the command line to see if new components register successfully. generating implementation templates the module xpcom.xpt is used internally to process type information, but it has a nice feature - it can spit out a template for a python implementation of any interface. just exec...
... valid python code, with basic signatures and useful comments for each of the methods. testing it to see this work, you will have to start firefox from the command line, since that'll be where the stuff will be printed out. external links creating xpcom components, on which this short tutorial is based. a three-part tutorial on ibm developerworks: getting to know pyxpcom - info on
building pyxpcom (and maybe mozilla) to get it to work. getting started with pyxpcom, part 2 - accessing xpcom from python. getting started with pyxpcom, part 3 - creating your own components. the problem with this one is that the sample code they give is slightly broken (it ends with a "retu" which shouldn't be there. i haven't tried it, but it looks like nothing is missing, so getting rid...
Component Internals
piled into a shared library (a dll on a windows system or a dso on unix). the illustration below shows the basic relationship between the shared library containing the component implementation code you write and the xpcom framework itself. in this diagram, the outer boundary is that of the module, the shared library in which a component is defined. a component in the xpcom framework when you
build a component or module and compile it into a library, it must export a single method named nsgetmodule. this nsgetmodule function is the entry point for accessing the library. it gets called during registration and unregistration of the component, and when xpcom wants to discover what interfaces or classes the module/library implements. in this chapter we will outline this entire process. as a co...
...y also provide its own way of registering xpcom components using the interface that is in fact used by both xpinstall and regxpcom, nsicomponentregistrar. an application, for example, could provide a "registration-less" component directory whose components are automatically registered at startup and unregistered at shutdown. component discovery does not currently happen automatically in non-debug
builds of gecko, however. when the registration process begins, xpcom broadcasts to all registered observers a notification that says xpcom has begun the registration of new components. after all components are registered, another notification is fired saying that xpcom is done with the registration step. the nsiobserver interface that handles this notification is discussed in starting weblock. once ...
... component. to register, unregister, load and manage various component types, xpcom abstracts the interface between the xpcom component and xpcom with the component loader. this loader is responsible for initialization, loading, unloading, and supporting the nsimodule interface on behalf of each component. it is the component loader's responsibility to provide scriptable component support. when
building a "native" component, the component loader looks for an exported symbol from the components shared library. "native" here includes any language that can generate a platform native dynamically loaded library. scripting languages and other "non-native" languages usually have no way to
build native libraries. in order to have "non-native" xpcom components work, xpcom must have a special component...
...imum to support the nsastring/nsacstring functionality. in your own component, you can go "slim" and restrict yourself to the nsembedstring or go "hog wild" and use any of the the other strings. weblock restricts itself to using the simple nsembedstring family of classes. string classes and xpcom the glue library provides stub functions for the public functions that xpcom provides (see xpcom/
build/nsxpcom.h). when the glue library is initialized, it dynamically loads these symbols from the xpcom library, which allows the component to avoid linking directly with the xpcom library. you shouldn't have to link to the xpcom library to create a xpcom component - in fact, if your component has to, then something is wrong. « previousnext » copyright (c) 2003 by doug turner and ian oeschge...
Finishing the Component
interfaces outside of the sdk are considered "experimental" or unfrozen. see the following sidebar for information about how frozen and unfrozen interfaces can affect your component development, and for technical details about how interface changes beneath your code can cause havoc. the danger of using unfrozen interfaces suppose that you need to use the interface nsifoo that isn't frozen. you
build your component using this interface, and it works great with the version of gecko that you have tested against. however, some point in the future, the nsifoo interface requires a major change, and methods are reordered, some are added, others are removed. moreover, since this interface was never supposed to be used by clients other than gecko or mozilla, the maintainers of the interface don't kno...
...erface reaches this state when a group of module owners and peers are actively engaged in discussion about how best to expose it. usually there are only minor changes to interfaces marked with such a tag. even with interfaces marked "under review," however, it's still a good idea to contact the module owners responsible for the interfaces you are interested in using. copying interfaces into your
build environment to get and implement interfaces that are not part of gecko in your component, simply create a new directory in the gecko sdk named unfrozen. copy the headers and idl files that you need from the content/base/public source directory of the gecko
build into this new directory. (for weblock, all you need are the headers for nsicontentpolicy and the nsicontentpolicy.idl.) then, using the...
...n objects nsicontentpolicy content not frozen interface for policy control mechanism iweblock web lock not frozen enables and disables weblock. also, provides access to the url that are whitelisted. ...
... web lock not frozen enables and disables weblock. also, provides access to the url that are whitelisted. implementing the nsicontentpolicy interface to implement the new interface, you must #include the unfrozen nsicontentpolicy, and you must also make sure the
build system can find the file you've brought over. the location of the file and the steps for adding that location to the
build system vary depending on how you
build this component. once you have made sure that your component
builds with the new header file, you must derive the weblock class from the interface nsicontentpolicy, which you can do by simply adding a public declaration when defining the class. at the same time, you can add the macro ns_decl_nsicontentpolicy to the class declaration that provides all of the ...
Mozilla internal string guide
familiar with them, see the appendix describing what class to use when. nsastring/nsacstring: the abstract base class for all strings. it provides an api for assignment, individual character access, basic manipulation of characters in the string, and string comparison. this class corresponds to the xpidl astring parameter type. nsastring is not necessarily null-terminated. nsstring/nscstring:
builds on nsastring by guaranteeing a null-terminated storage. this allows for a method (.get()) to access the underlying character buffer. the remainder of the string classes inherit from either nsastring or nsstring. thus, every string class is compatible with nsastring. since every string derives from nsastring (or nsacstring), they all share a simple api. common read-only methods: .length() -...
...runcate(length) - shortens the string to the given length. complete documentation can be found in the appendix. read-only strings the const attribute on a string determines if the string is writable. if a string is defined as a const nsastring then the data in the string cannot be manipulated. if one tries to call a non-const method on a const string the compiler will flag this as an error at
build time. for example: void nsfoo::reversecharacters(nsastring& str) { ... str.assign(reversedstr); // modifies the string } this should not compile, because you're assigning to a const class: void nsfoo::reversecharacters(const nsastring& str) { ... str.assign(reversedstr); } as function parameters for methods which are exposed across modules, use nsastring references t...
...n the windows-1252 sense). these helpers are very similar to the utf-8 / utf-16 conversion helpers above. utf-16 to latin1 converters these converters are very dangerous because they lose information during the conversion process. you should avoid utf-16 to latin1 conversions unless your strings are guaranteed to be latin1 or ascii. (in the future, these conversions may start asserting in debug
builds that their input is in the permissible range.) if the input is actually in the latin1 range, each 16-bit code unit in narrowed to an 8-bit byte by removing the high half. unicode code points above u+00ff result in garbage whose nature must not be relied upon. (in the future the nature of the garbage will be cpu architecture-dependent.) if you want to printf() something and don't care what happen...
..."out" parameters. retrieving "out" string/wstrings nsstring nscstring use getter_copies(). similar to nsstring / nscstring. wrapping character buffers nsdependentstring nsdependentcstring wrap const char* / const char16_t* buffers. literal strings nsliteralstring nsliteralcstring similar to nsdependent[c]string, but pre-calculates length at
build time. appendix b - nsastring reference read-only methods. length() isempty() isvoid() - xpconnect will convert void nsastrings to javascript null. beginreading(iterator) endreading(iterator) equals(string[, comparator]) first() last() countchar() left(outstring, length) mid(outstring, position, length) right(outstring, length) findchar(character) methods that modify the s...
XPCOM Stream Guide
odeflags) and .opensafefileoutputstream(file, modeflags) methods, and for closing those output streams with the .closesafefileoutputstream(inputstream) method. as we mentioned earlier, you can use the io service to get any channel, and from there an input stream. the io service is available through the services.jsm module as the .io property. stream listeners a stream listener is an object you
build to let you know when there is data in a stream ready for you to consume. most streams are asynchronous: they make no assumptions that all the data a resource provides is available immediately. (this is particularly true of streams that reach out over a network connection, like http and ftp channels.) stream listeners implement three methods. from the nsistreamlistener interface, the .ondataavail...
...de characters from an underlying stream. nsconverterinputstream @mozilla.org/intl/converter-input-stream;1 nsiconverterinputstream .init(stream, charset, buffersize, replacechar) mime separate headers from data. nsmimeinputstream @mozilla.org/network/mime-input-stream;1 nsimimeinputstream .setdata(stream) similarly, there are complex output streams which
build from primitive output streams: complex output stream types type purpose native class contract id interface how to bind to a primitive output stream buffered store data in a buffer until the buffer is full or the stream closes. then, write that data to the underlying stream. nsbufferedoutputstream @mozilla.org/network/buffered-output-stream;1 nsi...
.../ if queued for later operations, and all operations are queued zipwriter.processqueue(); // when we don't need the zipwriter anymore zipwriter.close(); concatenating input streams var stringstream = components.constructor("@mozilla.org/io/string-input-stream;1", "nsistringinputstream", "setdata"); function
buildstream(data) { return new stringstream(data, data.length); } function run_test() { var str1 =
buildstream("we "); var str2 =
buildstream("will "); var str3 =
buildstream("rock "); var str4 =
buildstream("you!"); var check = "we will rock you!"; var multi = components.classes["@mozilla.org/io/multiplex-input-stream;1"] .createinstance(components.interfaces.n...
...am = components.constructor("@mozilla.org/io/string-input-stream;1", "nsistringinputstream", "setdata"); var inputstream = components.constructor("@mozilla.org/scriptableinputstream;1", "nsiscriptableinputstream", "init"); function
buildstream(data) { return new stringstream(data, data.length); } components.utils.import("resource://gre/modules/netutil.jsm"); function run_test() { var check = "we will rock you!"; var baseinputstream =
buildstream(check); var store = components.classes["@mozilla.org/storagestream;1"] .createinstance(components.interfaces.nsistoragestream); /* in practice, you...
nsIXFormsModelElement
element.idlscriptable defines scriptable methods for manipulating instance data and updating computed and displayed values. ...
...recalculate() signals the xforms processor to perform a full recalculation of the given xforms model. ...
...recalculate() signals the xforms processor to perform a full recalculation of the given xforms model. note: script invocation is not necessarily equivalent to performing the recalculate action handler. ...
...recalculate() signals the xforms processor to perform a full recalculation of the given xforms model. ...
Xptcall Porting Guide
theory of operation there are really two pieces of functionality: invoke and stubs... the invoke functionality requires the implementation of the following on each platform (from xptcall/public/xptcall.h): xptc_public_api(nsresult) ns_invokebyindex(nsisupports* that, pruint32 methodindex, pruint32 paramcount, nsxptcvariant* params); c...
...ach platform (from xptcall/public/xptcall.h): xptc_public_api(nsresult) ns_invokebyindex(nsisupports* that, pruint32 methodindex, pruint32 paramcount, nsxptcvariant* params); calling code is expected to supply an array of nsxptcvariant structs. these are discriminated unions describing the type and value of each parameter of the target function. the platform specific code then
builds a call frame and invokes the method indicated by the index methodindex on the xpcom interface that. here are examples of this implementation for win32 and linux x86, netbsd x86, and freebsd. these implementations use the basic strategy of: figure out how much stack space is needed for the params, make the space in a new frame, copy the params to that space, invoke the method, cleanup and return...
...ment the platform specific code for the stub methods that fill the vtbl for this class. the idea here is that the class has a vtbl full of a large number of generic stubs. all instances of this class share that vtbl and the same stubs. the stubs forward calls to a platform specific method that uses the interface information supplied by the overridden getinterfaceinfo to extract the parameters and
build an array of platform independent nsxptcminivariant structs which are in turn passed on to the overridden callmethod. the platform dependent code is responsible for doing any cleanup and returning. the stub methods are declared in xptcall/public/xptcstubsdecl.inc. these are '#included' into the declaration of nsxptcstubbase. a similar include file (xptcall/public/xptcstubsdef.inc) is expanded usin...
... involved. i put together xptcall/src/md/test as a place to evolve the basic functionality as a port is coming together. not all of the functionality is exercised, but it is a place to get started. xptcall/tests has an api level test for ns_invokebyindex, but no tests for the stubs functionality. such a test ought to be written, but this has not yet been done. a full 'test' at this point requires
building the client and running the xpconnect test called testxpc in mozilla/js/src/xpconnect/tests. getting these ports done is very important. please let me know if you are interested in doing one. i'll answer any questions as i get them. porting status original author: john bandhauer, 31 may 1999. ...
Standard OS Libraries
js-ctypes snippets that can be copied and pasted to scratchpad com see using com from js-ctypes. unix unix based operating systems are linux, *bsd, solaris, etc. there is a star/asterik ("*") before "bsd" because this means the bsd family such as freebsd, openbsd (who by the way made ssh), netbsd, etc. gtk+ and qt are graphic frameworks, the graphic stack under unix is xorg (x11/x). ...
... to be precise, x is "just" like a display machine. on top of which everybody uses "window managers" (known as "wm"s) such as fluxbox, i3, awesome, openbox, mutter (used by gnome 3), plasma (used by kde) etc. gnome and kde are "desktop environments" (known as "de"s). ...
... be precise, x is "just" like a display machine. on top of which everybody uses "window managers" (known as "wm"s) such as fluxbox, i3, awesome, openbox, mutter (used by gnome 3), plasma (used by kde) etc. gnome and kde are "desktop environments" (known as "de"s). wms on ubuntu work a little differently but we'll revisit this topic later in this article (did you know they have a *special* firefox
build for ubuntu?). so des are a stack over wms. there is also a layer known as shell, gnomeshell is the shell used in gnome 3, it is the outter shell. gtk+ is the framework used under firefox (and other mozilla applications like thunderbird). the other framework used in unix systems is qt. firefox is officially supported only for gtk+ at the moment, therefore gtk+ is required for firefox to run. att...
...lso a layer known as shell, gnomeshell is the shell used in gnome 3, it is the outter shell. gtk+ is the framework used under firefox (and other mozilla applications like thunderbird). the other framework used in unix systems is qt. firefox is officially supported only for gtk+ at the moment, therefore gtk+ is required for firefox to run. attempting to install firefox on a a non-gtk+ based linux
build such as kaosx, which is qt based (details on kaosx at the time of this writing: kdelibs version 4.1.4.3, qt version 4.8.6, 64bit) would install gtk+ libraries along with it in order to enable firefox to work on the qt system. there are rumors of a firefox qt that is in the works. on linux, libraries will be typically found as .so files. one library that linux uses, and that can be used through j...
Navigator.oscpu - Web APIs
oscpu property returns a string that identifies the current operating system. syntax oscpuinfo = navigator.oscpu value a domstring providing a string which identifies the operating system on which the browser is running. ...
... system. syntax oscpuinfo = navigator.oscpu value a domstring providing a string which identifies the operating system on which the browser is running. ...
...ifies the operating system on which the browser is running. ...
... operating system oscpuinfo string format os/2 os/2 warp x (either 3, 4 or 4.5) windows ce windowsce x.y1 windows 64-bit (64-bit
build) windows nt x.y; win64; x64 windows 64-bit (32-bit
build) windows nt x.y; wow64 windows 32-bit windows nt x.y mac os x (ppc
build) powerpc mac os x version x.y mac os x (i386/x64
build) intel mac os x or macos version x.y linux 64-bit (32-bit
build) output of uname -s plus "i686 on x86_64" linux output of uname -sm x.y refers to the version of the operating system example function osinfo() { alert(window.navigator.oscpu); } osinfo(); // alerts "windows nt 6.0" for example usage notes unless your code is privileged (chrome or at least...
Creating 3D objects using WebGL - Web APIs
oing to switch from drawing using the vertices directly by calling the gl.drawarrays() method to using the vertex array as a table, and referencing individual vertices in that table to define the positions of each face's vertices, by calling gl.drawelements(). consider: each face requires four vertices to define it, but each vertex is shared by three faces. we can pass a lot fewer data around by
building an array of all 24 vertices, then referring to each vertex by its index into that array instead of moving entire sets of coordinates around. if you wonder why we need 24 vertices, and not just 8, it is because each corner belongs to three faces of different colors, and a single vertex needs to have a single specific color; therefore we will create three copies of each vertex in three different...
...e a single specific color; therefore we will create three copies of each vertex in three different colors, one for each face. this example uses the glmatrix library to perform its matrix and vertex math. you'll need to include it if you create your own project based on this code. our sample loads a copy from a cdn in our html's <head>. define the positions of the cube's vertices first, let's
build the cube's vertex position buffer by updating the code in initbuffers(). this is pretty much the same as it was for the square plane, but somewhat longer since there are 24 vertices (4 per side): const positions = [ // front face -1.0, -1.0, 1.0, 1.0, -1.0, 1.0, 1.0, 1.0, 1.0, -1.0, 1.0, 1.0, // back face -1.0, -1.0, -1.0, -1.0, 1.0, -1.0, 1.0, 1.0, -1.0, 1.0, -1...
...out the positions from the position // buffer into the vertexposition attribute { const numcomponents = 3; ... gl.vertexattribpointer( programinfo.attriblocations.vertexposition, numcomponents, type, normalize, stride, offset); gl.enablevertexattribarray( programinfo.attriblocations.vertexposition); } define the vertices' colors we also need to
build an array of colors for each of the 24 vertices. this code starts by defining a color for each face, then uses a loop to assemble an array of all the colors for each of the vertices. const facecolors = [ [1.0, 1.0, 1.0, 1.0], // front face: white [1.0, 0.0, 0.0, 1.0], // back face: red [0.0, 1.0, 0.0, 1.0], // top face: green [0.0, 0.0, 1.0, 1.0], // bott...
... const indexbuffer = gl.createbuffer(); gl.bindbuffer(gl.element_array_buffer, indexbuffer); // this array defines each face as two triangles, using the // indices into the vertex array to specify each triangle's // position. const indices = [ 0, 1, 2, 0, 2, 3, // front 4, 5, 6, 4, 6, 7, // back 8, 9, 10, 8, 10, 11, // ...
Signaling and video calling - Web APIs
webrtc is a fully peer-to-peer technology for the real-time exchange of audio, video, and data, with one central caveat. a form of discovery and media format negotiation must take place, as discussed elsewhere, in order for two devices on different networks to locate one another. ...
...createtextnode(username)); item.addeventlistener("click", invite, false); listelem.appendchild(item); }); } after getting a reference to the <ul> which contains the list of user names into the variable listelem, we empty the list by removing each of its child elements. note: obviously, it would be more efficient to update the list by adding and removing individual users instead of re
building the whole list every time it changes, but this is good enough for the purposes of this example. then we iterate over the array of user names using foreach(). for each name, we create a new <li> element, then create a new text node containing the user name using createtextnode(). that text node is added as a child of the <li> element. next, we set a handler for the click event on the list ite...
...te that the ice layer has run out of potential configurations to suggest). the contents of candidate are what you need to transmit using your signaling server. here's our example's implementation: function handleicecandidateevent(event) { if (event.candidate) { sendtoserver({ type: "new-ice-candidate", target: targetusername, candidate: event.candidate }); } } this
builds an object containing the candidate, then sends it to the other peer using the sendtoserver() function previously described in sending messages to the signaling server. the message's properties are: type the message type: "new-ice-candidate". target the username the ice candidate needs to be delivered to. this lets the signaling server route the message. candidate the sdp representing the...
...ase, all good things must come to an end. hanging up when the user clicks the "hang up" button to end the call, the hangupcall() function is called: function hangupcall() { closevideocall(); sendtoserver({ name: myusername, target: targetusername, type: "hang-up" }); } hangupcall() executes closevideocall() to shut down and reset the connection and release resources. it then
builds a "hang-up" message and sends it to the other end of the call to tell the other peer to neatly shut itself down. ending the call the closevideocall() function, shown below, is responsible for stopping the streams, cleaning up, and disposing of the rtcpeerconnection object: function closevideocall() { var remotevideo = document.getelementbyid("received_video"); var localvideo = document.ge...
Operable - Accessibility
rely on keyboard controls can access them. success criteria how to conform to the criteria practical resource 2.1.1 keyboard (a) all functionality should be accessible using keyboard controls, unless it cannot be done using the keyboard (e.g. freehand drawing). built-in controls should be used where possible (e.g. tabbing through form controls), and you should only
build in custom functionality where needed. see ui controls and
building keyboard accessibility back in 2.1.2 no keyboard trap (a) when entering a section of functionality using the keyboard, you should be able to get out of that section again using *only* the keyboard. for example, if you press enter/return on a focused button to open an options window, you should be able to close ...
...return to the main content using the keyboard. this is very important so that keyboard users do not get trapped on specific sections of your apps. 2.1.3 keyboard — all functionality (aaa) this is a further step beyond criterion 2.1.1. to achieve aaa conformance, all functionality should be accessible using keyboard controls — with no exceptions. see ui controls and
building keyboard accessibility back in 2.1.4 character key shortcuts (a) added in 2.1 if a single character key shortcut exists, then at least one of the following is true: single character key shortcuts can be turned off, remapped or are only active when the relevant user interface component is in focus. understanding character key shortcuts note: also see the wcag description ...
... text and videos. for auto-updating information that starts automatically and is shown alongside other content, controls should be provided to pause, stop, or hide it, or to control the frequency of updates. this does not apply to auto-updating content that is essential to the experience. examples include carousels or rotating annoucements. 2.2.3 no time limits (aaa) this
builds on criteria 2.2.1, stating that content that wants to pass aaa conformance should have no time limits. 2.2.4 surpress interruptions (aaa) any interruptions such as alerts or interstitial adverts should have functionality available to suppress or postpone them, unless it is an emergency alert. 2.2.5 re-authenticating (aaa) if an authentication session expires durin...
..., etc.), but this can be overidden by css. see using native keyboard accessibility. 2.4.8 location within site (aaa) when on a page inside a complex site or set of steps, the user should be given an indicator of where they are in the site, for example a breadcrumb trail, sitemap or text such as "form page 2 of 10". 2.4.9 link purpose (link only) (aaa) this criterion
builds on 2.4.4, stating that to conform to aaa, the purpose/destination of a link should be determinable from the link text alone, even if out of context. see meaningful text labels. also note that you should minimize instances where multiple copies of the same text are linked to different places. this can cause problems for screenreader users, who will often bring up a list of the links out of con...
Creating and triggering events - Developer guides
*/ }, false); // dispatch the event. elem.dispatchevent(event); the above code example uses the eventtarget.dispatchevent() method. ...
...*/ }, false); // dispatch the event. elem.dispatchevent(event); the above code example uses the eventtarget.dispatchevent() method. ...
...rs (with internet explorer being the exception). for a more verbose approach (which works with internet explorer), see the old-fashioned way below. adding custom data – customevent() to add more data to the event object, the customevent interface exists and the detail property can be used to pass custom data. for example, the event could be created as follows: const event = new customevent('
build', { detail: elem.dataset.time }); this will then allow you to access the additional data in the event listener: function eventhandler(e) { console.log('the time is: ' + e.detail); } the old-fashioned way the older approach to creating events uses apis inspired by java. the following shows an example with document.createevent(): // create the event. const event = document.createevent('even...
... will then allow you to access the additional data in the event listener: function eventhandler(e) { console.log('the time is: ' + e.detail); } the old-fashioned way the older approach to creating events uses apis inspired by java. the following shows an example with document.createevent(): // create the event. const event = document.createevent('event'); // define that the event name is '
build'. event.initevent('
build', true, true); // listen for the event. elem.addeventlistener('
build', function (e) { // e.target matches elem }, false); // target can be any element or other eventtarget. elem.dispatchevent(event); event bubbling it is often desirable to trigger an event from a child element, and have an ancestor catch it; optionally, with data: <form> <textarea></textarea> <...
JavaScript data types and data structures - JavaScript
wherever possible, comparisons with other languages are drawn. dynamic typing javascript is a loosely typed and dynamic language. ...
...g based on an operation on the original string. for example: a substring of the original by picking individual letters or using string.substr(). a concatenation of two strings using the concatenation operator (+) or string.concat(). beware of "stringly-typing" your code! it can be tempting to use strings to represent complex data. doing this comes with short-term benefits: it is easy to
build complex strings with concatenation. strings are easy to debug (what you see printed is always what is in the string). strings are the common denominator of a lot of apis (input fields, local storage values, xmlhttprequest responses when using responsetext, etc.) and it can be tempting to only work with strings. with conventions, it is possible to represent any data structure in a string. this...
...avascript. objects in computer science, an object is a value in memory which is possibly referenced by an identifier. properties in javascript, objects can be seen as a collection of properties. with the object literal syntax, a limited set of properties are initialized; then properties can be added and removed. property values can be values of any type, including other objects, which enables
building complex data structures. properties are identified using key values. a key value is either a string or a symbol value. there are two types of object properties which have certain attributes: the data property and the accessor property. note: each property has corresponding attributes. attributes are used internally by the javascript engine, so you cannot directly access them. that's why att...
...ould set properties directly on the object, or use data-* attributes. this has the downside that the data is available to any script running in the same context. maps and weakmaps make it easy to privately bind data to an object. structured data: json json (javascript object notation) is a lightweight data-interchange format, derived from javascript, but used by many programming languages. json
builds universal data structures. see json and json for more details. more objects in the standard library javascript has a standard library of built-in objects. please have a look at the reference to find out about more objects. determining types using the typeof operator the typeof operator can help you to find the type of your variable. please read the reference page for more details and edge...
Progressive web apps (PWAs)
everything below this point is left over from the old version of this page and will be revamped as other content is overhauled. core pwa guides the following guides show you what need to do to implement a pwa, by examining a simple example and showing you how all the pieces work. introduction to progressive web apps progressive web app structure making pwas work offlin...
...ndamentals of indexeddb, explained in detail. using the web storage api — the web storage api made simple. instant loading web apps with an application shell architecture — a guide to using the app shell coding pattern to create apps that load quickly. using the push api — learn the essentials behind the web push api. using the notifications api — web notifications in a nutshell. the
building blocks of responsive design — learn the basics of responsive design, an essential topic for modern app layout. mobile first — often when creating responsive application layouts, it makes sense to create the mobile layout as the default, and
build wider layouts on top. add to home screen guide — learn how your apps can take advantage of add to home screen (a2hs). tools localforag...
...iritual successor to sw-precache with more advanced caching strategies and easy precaching. upup — a tiny script that makes sure your site is always there for your users. the service worker cookbook — a series of excellent service worker/push recipes, showing how to implement an offline app, but also much more. pwa vs code extension - a collection of all essential code snippets you need to
build progressive web apps right there in your vs code environment. progressive web apps on google developers. progressive web apps: escaping tabs without losing our soul by alex russell. progressive web apps check list. the lighthouse tool by google. tools for
building progressive web apps with angular. react pwa guide kit. offline-capable pokédex web site. hacker news readers as progres...
...ol by google. tools for
building progressive web apps with angular. react pwa guide kit. offline-capable pokédex web site. hacker news readers as progressive web apps. progressive web app: advantages in a nutshell why progressive web apps are the future of mobile web (2019 research). ...
/loader - Archive of obsolete content
odule and that of the requiring module. the function returns a string representing the resolved module id, which is then resolved to its location url using the mapping provided in the paths option. if this option is not provided, the loader will use plain path resolution. this feature may also be used to implement specific security constraints. for example, the sdk generates a manifest file at
build time representing a dependency graph of all modules used by an add-on. any attempt to load a module not listed in the manifest is unauthorized and is rejected with an exception: let { loader } = require('toolkit/loader'); let manifest = { './main': { 'requirements': { 'panel': 'sdk/panel' } }, 'sdk/panel': { 'requirements': { 'chrome': 'chrome' } } 'chrome':...
...uirer); let boostrap = require(bootstrapid); built-in modules each loader instance exposes the following built-in pseudo modules in addition to those passed via modules: chrome this pseudo module exposes everything that is typically available for js contexts with system principals under the components global. this alternative approach of providing capabilities via modules makes it possible to
build module capability graphs by analyzing require statements. these graphs can be used to reason about modules without diving into implementation details. @loader/options this pseudo module exposes all the options that were used to configure this loader. it enables you to create new loader instances identical to the current one: let { loader } = require('toolkit/loader'); let options = require('@l...
...the sdk uses this feature during test execution to create an identical environment with a different state to test how specific modules handle unloads. @loader/unload this pseudo module exposes an object that is unique per loader instance. it is used as a subject for observer notification to allow use of the observer service for defining hooks reacting on the unload of a specific loader. the sdk
builds a higher level api on top of this for handling unloads and performing cleanup: let unloadsubject = require('@loader/unload'); let observerservice = cc['@mozilla.org/observer-service;1']. getservice(ci.nsiobserverservice); let observer = { observe: function onunload(subject, topic, reason) { // if this module is unloaded then `subject.wrappedjsobject` will be // `unloa...
cfx - Archive of obsolete content
rl in the xpi called the updateurl: the host application will go here to get information about updates. at the updateurl you host a file in the update rdf format: among other things, this includes another url called updatelink which points to the updated xpi itself. the --update-link and --update-url options simplify this process. both options take a url as an argument. the --update-link option
builds an update rdf alongside the xpi, and embeds the supplied url in the update rdf as the value of updatelink. the --update-url option embeds the supplied url in the xpi file, as the value of updateurl. note that as the add-on documentation explains, you should make sure the update procedure for your add-on is secure, and this usually involves using https for the links. so if we run the following...
...et of options by referencing a named configuration. --package-path=packagepath extra directories for package search. --pkgdir=pkgdir use an add-on located in pkgdir. pkgdir may be specified as a full path or as a path relative to the current directory. --static-args=static_args pass arguments to your add-on, in json format. --update-link=update_link
build an update rdf alongside the xpi file, and embed the url supplied in update_link in it as the value of updatelink. --update-link=update_url embed the url supplied in update_url in the xpi file, as the value of updateurl. --no-strip-xpi will force the packager to include all files into the output xpi. if your extension works unpacked, but breaks after you cfx xpi it, you sho...
...configurations are listed under a key called "configs". 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. passing static arguments you can use the cfx --static-args option to pass arbitrary data to your program. this may be especially useful if you run cfx from a script. the value of --static-args must be a json string. the object encoded by the json becomes the staticargs propert...
Enhanced Extension Installation - Archive of obsolete content
ting all the extensions installed at that location. <location>/extensions.ini - an ini manifest listing the directories for all the extensions and themes at the location (used by the component manager, preferences system, chrome registry etc to locate files during the startup process). in the profile directory, the file compatibility.ini stores information about the version of the application (
build info) that last started this profile - during startup this file is checked and if the version info held by the running app disagrees with the info held by this file, a compatibility check is run on all installed items. when changes are made to the extensions datasource - new items are installed, old items uninstalled, enabled or disabled, a .autoreg file is written to the profile directory as we...
...d to the terminal window. we now check more effectively for system integrity during startup. we ask each install location if it is functioning (for a directory install location such as app-profile or app-global the location is functioning if it the directory exists. if any location is not functioning, or any of the manifests listed above does not exist, all manifests are removed and the system re
builds everything from scratch. this should prevent against random file deletions and allow developers to easily reset their state by deleting one of the required system files. since we can now install by simply detecting the presence of a {guid} folder under the app-profile and app-global install locations, we no longer need installed-extensions.txt for registration of pre-configured items such as th...
...is should prevent against random file deletions and allow developers to easily reset their state by deleting one of the required system files. since we can now install by simply detecting the presence of a {guid} folder under the app-profile and app-global install locations, we no longer need installed-extensions.txt for registration of pre-configured items such as the default theme. the firefox
build system will just create the {guid} folder for the default theme and place its install manifest inside, and on the first startup of the application it will be automatically registered. we drop support for the -lock-item/-unlock-item flags, as well as the -list-global-items flag. messages that appear in the extensions ui in response to user-actions such as install, uninstall, enable and disable a...
Install Manifests - Archive of obsolete content
will assume add-ons that have not been updated in a very long time are no longer compatible by default. targetplatform a string specifying a platform that the add-on supports. it contains either the value of os_target alone or combined with target_xpcom_abi, separated by an underscore (_). you can specify multiple targetplatform properties per manifest. if any value matches the application's
build parameters, it will be installed; if not, the user will get an appropriate error message. examples <em:targetplatform>winnt_x86-msvc</em:targetplatform> <em:targetplatform>linux</em:targetplatform> <em:targetplatform>darwin_ppc-gcc3</em:targetplatform> <em:targetplatform>sunos_sparc-sunc</em:targetplatform> usually, you would use only the os part for themes or for extensions that are not fu...
...st file, you could even mix values with and without abi. if a value for the application's os is encountered that requires any specific abi, the abi is considered important for that os and the application will refuse to install the add-on if it does not find a matching os/abi combination. this means that if all of the above examples would occur in one manifest, the add-on will install on any linux
build of the application, regardless of its abi, but not on a windows cygwin
build. there may be
builds of firefox and thunderbird which do not "know" their abi (most likely ports to rare platforms, or non-official
builds). these
builds will refuse to install any add-on that requires a specific abi for their platform. this property was added for firefox/thunderbird 1.5. previous versions of these ap...
...plication. contains at the least either userenabled or userdisabled plus any number of incompatible, blocklisted or softblocked. %app_id% the id of the current application %app_version% the version of the application to check for updates for %current_app_version% the version of the current application %app_os% the value of os_target from the firefox
build system, identifying the operating system being used. %app_abi% the value of the target_xpcom_abi value from the firefox
build system, identifying the compiler/architecture combination used to compile the current application. %app_locale% the current application's locale. %update_type% update_type_compatibility(32), update_type_newversion(64) %compatibi...
Firefox addons developer guide - Archive of obsolete content
the firefox add-ons developer guide was contributed by the mozilla japan community; it covers how to go about
building firefox extensions using xpcom and xul. these days, we recommend using the add-on sdk instead, but there are times when you need the additional control offered by a more direct approach. ...
...oper guide was contributed by the mozilla japan community; it covers how to go about
building firefox extensions using xpcom and xul. these days, we recommend using the add-on sdk instead, but there are times when you need the additional control offered by a more direct approach. ...
...bout
building firefox extensions using xpcom and xul. these days, we recommend using the add-on sdk instead, but there are times when you need the additional control offered by a more direct approach. ...
Firefox addons developer guide - Archive of obsolete content
tent, and every chapter should include the tag "firefox addons developer guide". instead of using footnotes, we should inline these notes into the body of the article. apostrophes are being done using curly apostrophes instead of straight ones as is done everywhere else in mdc. the stuff about installing the dom inspector (https://developer.mozilla.org/en/firefox_addons_developer_guide/let%27s_
build_a_firefox_extension#install_the_dom_inspector) is not accurate for firefox 3 or later, since it's no longer included in the firefox installer and must be downloaded from amo. filenames should use <code> styling. this is available from the style drop-down menu in the editor. variable and function names use <code> styling. xpi should be in all caps instead of written as ("xpi"). method and fun...
...ller and must be downloaded from amo. filenames should use <code> styling. this is available from the style drop-down menu in the editor. variable and function names use <code> styling. xpi should be in all caps instead of written as ("xpi"). method and function names should have parentheses after them. for example, here: https://developer.mozilla.org/en/firefox_addons_developer_guide/let's_
build_a_firefox_extension#init_method the text of the paragraph should begin "the <code>init()</code> method is as shown...". if you use the interface template when mentioning interfaces by name, mdc will automatically format them and generate links to their documentation, like this: nsiconsoleservice. if you prefer, you can just link to the articles directly. either way, these links should be adde...
...e original version of this guide was written as a first step guide for beginners. if we add too much topics, they possibly make learners weary. an alternative idea: writing a "next step" guide for interested people such as adding statusbar buttons, sidebar panels, and so on. (by piro) i do think this guide should cover more advanced topics as well. there already is a tutorial for beginners:
building an extension. slosd 09 april 2009 ...
DTrace - Archive of obsolete content
and can be used on solaris 10 and mac os x 10.5. dtrace has been largely supplanted by the gecko profiler and other tools, so this documentation has been archived. if you find that there are still use cases of consequence, you're welcome to file a documentation bug. the dtrace probes currently built into the codebase may be enabled by default in the future, but for now you'll need to create a
build with --enable-dtrace (on mac os x you also have to use at least the 10.5 sdk for --with-macos-sdk, unlike the common configuration that uses the 10.4 sdk). trunk nightly
builds with shark support (*-mac-shark.dmg here) are built with --enable-dtrace. documentation writing scripts a general introduction to writing d scripts and using the built-in mozilla probes. ...
...sdk). trunk nightly
builds with shark support (*-mac-shark.dmg here) are built with --enable-dtrace. documentation writing scripts a general introduction to writing d scripts and using the built-in mozilla probes. optimizing javascript with dtrace a guide on profiling javascript code using dtrace. adding probes a guide on creating probes and the
build system magic needed to add probes to your code. pounce on dtrace a guide to using dtrace on mac os x 10.5. dtrace for web developers how to use dtrace to profile your web application. view all... ...
...on creating probes and the
build system magic needed to add probes to your code. pounce on dtrace a guide to using dtrace on mac os x 10.5. dtrace for web developers how to use dtrace to profile your web application. view all... ...
Style System Overview - Archive of obsolete content
, and the global ::getstyledata is a typesafe helper that doesn't require the style struct id. this style struct is always const, and should always be declared as such (evil old-style casts often used with the non-typesafe forms sometimes hide this error), since the struct may be shared with other elements. the rule tree as we call nsrulewalker::forward on all the rules that are matched, we
build or walk along the rule tree. the rule tree is a lexicographic tree of matched rules, where each node in the tree is represented by a nsrulenode. some style data is cached on nsrulenode objects to speed up computation and reduce memory use. the rule tree rules: /* rule 1 */ doc { display: block; text-indent: 1em; } /* rule 2 */ title { display: block; font-size: 3em; } /* rule 3 */ para {...
...e changes. different hint mechanism (from rule structs, not data structs) could make attributechanged just go straight to a frame-change, instead. bugs due to failure to call nsiframe::didsetstylecontext. style sheet addition and removal handled in pres shell. presshell::reconstructstyledata calls framemanager::computestylechangefor (reresolve) and then processes the frame-change list. re
builds rule tree if stylesheet was removed to avoid dangling pointers (and perhaps aliasing that would cause problems). otherwise we'd have to walk rule tree and compare each rule node to every rule in the sheet (o(rules * rule-nodes)). when re
building rule tree, we have to clear cached style contexts from xul menus and trees. style rule changes handling of style rule changes is done in frame con...
...d in the pres shell. code should be merged. rule change applies the rule-struct hint as if the rule matched the root element. (inefficient) it does clearing of style data (through stylesetimpl::clearstyledata) by walking the rule tree and then the style context tree. (could be handled by simultaneous clearing and difference calculation of data (somewhat tricky)) rule addition and removal just re
build the entire world. we could at least do what we do for sheet addition/removal, or slightly better, by searching the rule tree (only one rule this time) instead of re
building it. lots of room for optimization here. (but beware didsetstylecontext) the style system style sheets & rules ↓ rule tree ↓ style context interface original document information author(s): david baron last up...
Mozilla Crypto FAQ - Archive of obsolete content
rsa algorithm; that code, together with code previously developed for other cryptographic algorithms, will be included in a new version 3.1 of the nss open source cryptographic and pki library. this new rsa-capable version of nss will then be included in a future version of the open source psm software, which will provide ssl support for mozilla. at that point both nss and psm will be completely
buildable using the open source code available from the mozilla.org site, and nss and psm will be included in the mozilla binary releases distributed by mozilla.org. for more information on the rsa patent see the rsa security press release announcing release of the patent into the public domain, and the rsa patent itself. for information on new us encryption export regulations, see the u.s. departmen...
...al security manager that incorporate the rsa bsafe library; the netscape psm software can be installed and used with binary mozilla versions. for the very latest information about psm, nss, and other crypto-related mozilla developments, see the mozilla.dev.tech.crypto newsgroup or the corresponding dev-tech-crypto mailing list. for more information on nss 3.1 see the nss 3.1 plan and the nss 3.1
build instructions; for more information on psm 1.3 see the psm 1.3 task list posted by david drinan. for more information on the netscape psm binaries see the netscape personal security manager for mozilla page. what is the open source license used for the mozilla crypto code? the released source code is dual-licensed under the mpl and the gpl. the mozilla ssl, s/mime, and pki source code is licen...
...ogy and privacy: the new landscape, by philip agre and marc rotenberg (ed.). a set of ten essays on various aspects of privacy and technological developments affecting it. the electronic privacy papers: documents on the battle for privacy in the age of surveillance, by bruce schneier and david banisar (ed.). a collection of public documents relating to u.s. encryption policy and related topics.
building in big brother: the cryptographic policy debate, by lance hoffman (ed.). an earlier (circa 1995) collection of essays and public documents, with a concentration on the clipper chip controversy and the digital telephony act. cryptography & liberty 2000: an international survey of encryption policy, by the electronic privacy information center. the latest in a series of annual surveys of govern...
Additional Template Attributes - Archive of obsolete content
so differ for each usage, so it is possible to use a shared template to display the same structure multiple times but with different starting nodes in each case. the generated content is always inserted into the root node, in this example the listbox, not inside the template. declaring the container and member variables normally, the container and member variables are determined by the template
builder automatically. the container or starting node variable is specified in the <content> tag inside a query, while the member variable is determined by the value of the uri attribute inside the action body. it is also possible to be explicit about the two variables by using two attributes on the <template> element. <template container="?first" member="?item"> the container and member attributes c...
...ned by the value of the uri attribute inside the action body. it is also possible to be explicit about the two variables by using two attributes on the <template> element. <template container="?first" member="?item"> the container and member attributes can be used to specify the container and member variables. this isn't particularly useful although there is a very slight optimization since the
builder does not need to scan the action body looking for the member variable when compiling the queries and rules. you might also use these attributes just to make the code clearer when using very complex queries. one possible advantage is when using the simple rdf query syntax where you don't specify variables; instead you use the special 'rdf:*' syntax for the member variable and the container is i...
... either even if you specify the member variable). this may make the code clearer as to its function. we could use the container variable ?start in the action body also. if you are using the simple syntax and want to use the container variable in the content, you must use the container attribute since there is no other way to refer to it. note also that a rule element is needed here, otherwise the
builder will think the container and member attributes are conditions to check. « previousnext » ...
Recursive Generation - Archive of obsolete content
« previousnext » in the previous example, the template
builder generated an extra set of two buttons for the second row. however, the labels on the second set of buttons are different than the first set. if you look at the graph again, you might begin to see why. in the graph, item c has a relateditem arrow pointing out of it to item d. this extra arrow which neither b or d have causes an extra set of buttons to be created. after generating content, the template
builder always repeats the generation for inner levels as far as it can go. thus, the
builder can be said to generate content from the graph recursively. after generating a result's content, the
builder starts again using a new parent and starting point. naturally, the parent will be the new result's content, rather tha...
...t.com/rdf/d"> <button label="http://www.xulplanet.com/rdf/a"/> <button label="http://www.xulplanet.com/rdf/d"/> </hbox> </vbox> for the next iteration, the insertion point will be the three <hbox> elements. however, since c is the only element that will end up having any additional content, only the second <hbox> element will have additional children added to it. for a nested item, the
builder processes the query in the same way as usual, however instead of using the ref attribute as the seed starting point, the end point or member is used instead. this will correspond to the id on the appropriate element in the generated content above. to begin, b is evaluated and seeded with the right value: (?start = http://www.xulplanet.com/rdf/b) the <triple> statement is then examined, however...
...the end point or member is used instead. this will correspond to the id on the appropriate element in the generated content above. to begin, b is evaluated and seeded with the right value: (?start = http://www.xulplanet.com/rdf/b) the <triple> statement is then examined, however, item b doesn't have a relateditem arc out of it, so the result is rejected. since there are no potential results, the
builder doesn't generate anything. a similar situation will occur for item d. however, for item c, the triple does match an item, so the data will be added to the potential result: (?start = http://www.xulplanet.com/rdf/c, ?relateditem = http://www.xulplanet.com/rdf/d) a match has occured, so the content within the action body will be created and added inside item c. since the ?start variable points ...
Simple Example - Archive of obsolete content
ldren of a container (or the reverse). first, any known variables are filled into the member statement for the current result. there's only one result so far; the member element's container attribute is set to value of the ?start variable of this result. this will result in the following: <member container="http://www.xulplanet.com/rdf/myphotos" child="?photo"/> as with processing a triple, the
builder will now try to find as many values for the ?photo variable as possible and create potential results using them. the container attribute specifies the container and the child attribute specifies the children. in the rdf data, the container 'http://www.xulplanet.com/rdf/myphotos has three children, so there are three possible values for the ?photo variable. if that node had no children or wasn't...
...myphotos, ?photo = http://www.xulplanet.com/ndeakin/images/t/palace.jpg) (?start = http://www.xulplanet.com/rdf/myphotos, ?photo = http://www.xulplanet.com/ndeakin/images/t/canal.jpg) (?start = http://www.xulplanet.com/rdf/myphotos, ?photo = http://www.xulplanet.com/ndeakin/images/t/obselisk.jpg) the triple is evaluated next, and it will be examined for each potential result found so far. ...
...in the rdf, the 'palace' resource has a value 'palace from above', so it will be added to the data network, assigned to the ?title variable. note that this value is a literal rather than a resource. ...
XUL element attributes - Archive of obsolete content
t, allows a datasource to negate an earlier assertion. collapsed type: boolean if true, then the element is collapsed and does not appear. it is equivalent to setting the css visibility property to collapse. container type: boolean set to true if the element is to act as a container which can have child elements. this would be used for folders. this will be set by the template
builder as needed. containment type: uri this attribute specifies rdf properties (an rdf predicate) that indicate that a resource is a container. when generating content from a template this is used to determine which resources from the datasource are containers and thus can have child nodes and which ones are not containers. this attribute should be placed on the same element that the dataso...
... scales, the scale's values are ordered from right to left (for horizontal scales) or from bottom to top (for vertical scales). for other elements, they are placed right to left or bottom to top. this is reverse of the order in which they appear in the xul code. empty type: boolean set to true if the element is a container that contains no children. this will be set by the template
builder as needed. equalsize type: one of the values below this attribute can be used to make the children of the element equal in size. always for a horizontally oriented element, this will make all of its children have the width of the widest child. for a vertically oriented element, this will make its children all have the height of the tallest child. never all of the children are...
... all of the children are displayed at the size required by the content or as specified by the width and height attributes or the css width and height properties. flags type: space-separated list of the values below a set of flags used for miscellaneous purposes. two flags are defined, which may be the value of this attribute. dont-test-empty: for template generated content, the
builder will not check that a container is empty. dont-
build-content: this flag may be used on a tree to indicate that content elements should not be generated. this results in a performance enhancement, but you will not be able to use the dom functions to retrieve the tree rows. flex type: string (representing an integer) indicates the flexibility of the element, which indicates how an ...
The Implementation of the Application Object Model - Archive of obsolete content
tree cannot be placed inside a dom tree, xul applications don't ever occur inside web pages. by enforcing this distinction, we can successfully defend ourselves from any claims that we were "mucking about with strange new html" when we could have been working on our standards story. forget xul and rdf? we don't need any of this complicated nonsense! just let us go off and make our widgets and
build our applications the old-fashioned way! we're still cross-platform, since we'd only have to write widgets like trees and toolbars once! i say, forget this whole thing! let's just ship a product! that would be the unwisest decision of all. why? code bloat. if nglayout's formatting objects aren't used to render the widgetry, then drawing code has to be written for each and every widget. look at t...
...t suppose that instead we could store additional information about the tree's columns, namely in which order they occur, then the act of persistently saving a column reordering would take far less time (o(1) to swap two columns, as opposed to a worst case o(n) where n is the number of cells in the tree). some of you might be saying, "wait a minute. for sorting and column reordering, you have to re
build the whole content model anyway! why do you even need to change the intermediate representation of the data?" the answer is simple: persistence. changes such as sorting and column ordering must be remembered across application sessions, and that means that these changes to the intermediate representation of data must be saved. statement #4 the intermediate representation of our data must be mor...
...t sink, known as the xul content sink, is responsible for constructing the in-memory rdf graph representation of the xul. the rdf graph represented by the xul is then aggregated with the contents of other rdf stores (like bookmarks or history) to construct a composite data source, which is aggregated data still in an rdf graph form. the resultant aggregated graph is fed into the xul content model
builder. this code is responsible for lazily presenting content nodes based on the rdf graph structure to the application that requests those nodes. since this presentation happens "on demand", no content node is instantiated until the application specifically requests it, or demands an operation that requires the instantiation of the node to successfully complete, e.g., asking for the number of childr...
treeitem - Archive of obsolete content
s | properties | methods | related ] a treeitem should be placed inside a treechildren element and should contain treerow elements. the treeitem can be clicked by the user to select the row of the tree. the treeitem contains a single row and all of what appear to the user as that row's descendants. in a template condition, you should use a treeitem instead of a content element when the dont-
build-content flag is specified. set the uri attribute to the variable name to bind to a content node during matching. more information is available in the xul tutorial. attributes container, empty, label, open, uri examples (example needed) attributes container type: boolean set to true if the element is to act as a container which can have child elements. this would be used for fold...
...i attribute to the variable name to bind to a content node during matching. more information is available in the xul tutorial. attributes container, empty, label, open, uri examples (example needed) attributes container type: boolean set to true if the element is to act as a container which can have child elements. this would be used for folders. this will be set by the template
builder as needed. empty type: boolean set to true if the element is a container that contains no children. this will be set by the template
builder as needed. label tipo: string (concatenación de caracteres) para un árbol tree con columnas simples, la etiqueta puede ser colocada directamnete sobre el elemeto "treeitem" sin la necesidad de una fila "row" y un elemento "treeitem" de...
...ed on the element where content generation should begin. thus, it should be placed on an element that is a descendant of a template. the value should be set to rdf:*. elements that appear inside the element with the attribute will be repeated for each node in the rdf datasource. elements outside will appear only once. ...
Application Update - Archive of obsolete content
this article will hopefully explain how to update your xulrunner application using the same method that firefox, thunderbird, songbird, and chatzilla use. 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. you will need to compile a unix/linux executable mar from mozilla/modules/libmar. as far as i can tell enabling the options --enable-updater and --enable-update-packaging on your configure will
build you mar. compiled versions of mar are available in the gecko sdk under the folder /host/bin for your os. in order to generate sha1 hashes i installed shash. applic...
...load no prompt if no incompatibilities // 2 download no prompt prompt // // see chart in nsupdateservice.js.in for more details // pref("app.update.mode", 1); // if set to true, the update service will present no ui for any event. pref("app.update.silent", false); // update service url: // you do not need to use all the %var% parameters. 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. pref("app.update.url.manual", "http://yourserver.net/yourpage"); // a default value for t...
...lrunner application to query. i opted for the simpler approach of not using the update php script. https is recommended but not required (yet). update.xml the format is outlined here process as best i can tell here's how the update process works. 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. if the update.xml file doesn't exist there is no update. update.xml contains only information about the update. it points to the update mar file (a mozilla archive) which contains all files which are going to be updates it also contains a sha1 hash and file size used for verification of the update. if an update file is found tha...
Using LDAP XPCOM with XULRunner - Archive of obsolete content
by default, xulrunner is built without ldap xpcom support. if you want to use ldap components in your xul application, you have two options : compile xulrunner with ldap support enabled, or add ldap xpcom directly to your xul app (in the components directory). in any case, you will have to
build ldap xpcom, by adding --enable-ldap
build option. see the
build_documentation for more information about how to
build xulrunner. ...
... xpcom support. if you want to use ldap components in your xul application, you have two options : compile xulrunner with ldap support enabled, or add ldap xpcom directly to your xul app (in the components directory). in any case, you will have to
build ldap xpcom, by adding --enable-ldap
build option. see the
build_documentation for more information about how to
build xulrunner. when configuring
build options, just add: ac_add_options --enable-ldap to your .mozconfig file. this will create two files in the components directory of the
build package: mozldap.dll (or libmozldap.so or...) mozldap.xpt and two files in the root directory of the
build package: on windows: nsldap32v50.dll nsldappr32v50.dll on linux: libldap50.so libprldap50.so those are the native ldap library. if y...
...this will create a new file in the components subdirectory of the built package, mozldap_stub.dll (on windows) or libmozldap_stub.so (on linux). copy mozldap.xpt and mozldap_stub.dll into your components xul app subdirectory. create a libraries subdirectory in your xul app directory, and copy mozldap.dll (or libmozldap.so), and the native ldap binaries into it. don't forget to clean yo...
XULRunner tips - Archive of obsolete content
useful chrome urls most of these require branding. window url window type extension manager chrome://mozapps/content/extensions/extensions.xul?type=extensions extension:manager-extensions theme manager chrome://mozapps/content/extensions/extensions.xul?type=themes extension:manager-themes javascript console chrome://global/content/c...
...there is a working stub. any better suggestion? venkman uses "chrome://communicator/skin/" as an alias for "chrome://global/skin/" and this alias was maintaine...
...alled. note: i use this method of installing extensions into all of my mozilla applications. this way i have one directory where i keep all my mozilla extensions, and each application (firefox, thunderbird) simply contains a few small, one line files pointing to the location of the extensions. (i keep them in source control to be sure i can maintain compatibility) component viewer need custom
build, first of all. what else? extension developer's extension extension developer's extension is a useful tool, featuring live xul editor and javascript shell. to install the extension into your application you'll need to hack its install.rdf (see above). you'll probably also want to create menuitems that let you open the js shell and other tools provided by the extension. branding branding is a ...
Windows and menus in XULRunner - Archive of obsolete content
last time i installed xulrunner and built a very simple, bare-bones test application. this time i want to add some of the things common to a desktop application user interface: windows and dialogs menus and toolbars os common dialogs controls or widgets windows each window or dialog should be created in its own xul file. the xul file may also contain other top-level declarations for css and dtd, which i will discuss in a moment. <window> is the basic windowing element in xul. it has attributes to set the title/caption as well as to control its width and height. ...
...nner gives your windows a default icon (top left corner on windows). you’ll most likely want to specify your own icons. you can learn how to do it in the article window icons. menus and toolbars most desktop applications are complex enough to require some sort of menu and/or toolbar to structure the application’s available commands. xul provides elements to support both menus and toolbars. ...
...st-style-image: url(chrome://basicapp/skin/open.png); -moz-box-orient: vertical; } #save { list-style-image: url(chrome://basicapp/skin/save.png); -moz-box-orient: vertical; } of course, you need to make sure the png files are included in the application. there are quite a few things xul offers for application ui. more than i can fit into a single article, so we will continue looking at
building ui in xulrunner in the next article. see also xul:windows xul tutorial:creating a window commandset command xul tutorial:commands xul tutorial:simple menu bars xul tutorial:toolbars « previousnext » original document information author: mark finkle last updated date: october 2, 2006 ...
XUL Application Packaging - Archive of obsolete content
nts. a sample application.ini file can be found in the mozilla source tree. the [app] section the app section specifies metadata about the application name specifies the application name. required name example: name=testapplication version specifies the application version number. ...
...ile can be found in the mozilla source tree. the [app] section the app section specifies metadata about the application name specifies the application name. required name example: name=testapplication version specifies the application version number. required see toolkit version format for version numbering details example: version=0.1
buildid specifies a unique
build identifier. this is typically a date identifier, and should be different for every released version of an application. required example:
buildid=20060201 id specifies the unique application id required the application id, like extension ids, can be formatted either like an email applicationname@vendor.tld or a uuid {12345678-1234-1234-1234-123456789abc}. the email format is recomm...
...n's profile, based within the user's application data directory optional example: profile=myappdata the [gecko] section the gecko section specifies what version of xulrunner is required by the application. minversion specifies the minimum xulrunner version needed by this application. if there are binary components, minversion must equal the version of the libxul sdk which is used to
build the application. required example: minversion=1.8 maxversion specify the maximum xulrunner version needed by this application. optional - default value is any xulrunner less than xulrunner 2 example: maxversion=1.8.0.* the [xre] section the xre section specifies various features of xulrunner startup that can be enabled enableextensionmanager specifies whether to enable e...
2006-10-26 - Archive of obsolete content
summary: mozilla.dev.apps.firefox - october 20, 2006 - october 26, 2006 announcements none this week. discussions should be easier to import bookmark backups user asking for thoughts about having bookmarks manager's import wizard import from backups in the bookmarkbackups folder. no repiles yet. fx 1.5.0.x (linux) not
building since 20-oct-2006 17:45 pdt? tony inquires why tinderbox is showing that the fx 1.5.0.x (linux) has failed since october 20. gavin replies that "[t]he log file shows a "no space left on device" error when trying to link the final executable." learn the traffic magic of search engine cloaking mark describes the magic of search engine cloaker. (what it is, how to use it) cross-post-and followup fx2 announcment to support-firefox request for when...
...it is, how to use it) cross-post-and followup fx2 announcment to support-firefox request for when the announcement about firefox 2's release to be posted on the mozilla.dev.apps.firefox newsgroup. firefox killer features suggestion john describes his suggestions for "killer features" for firefox. debug minefield on intel mac an inqury about how to debug minefield on an intel mac. re
build firefox after modifying source code an inqury about how to re
build the code after making a minor change - the user is unfamiliar with how to use the command prompt. bug in firefox when import passwords from seamonkey a possible bug find - perhaps a version error instead? there should be a 'changes' faq a user suggests that a faq page be made for changes, since the same two questions keep...
...rror instead? there should be a 'changes' faq a user suggests that a faq page be made for changes, since the same two questions keep coming up. nsialertsservice under linux an inqury about why nsialertsservice is not a service found in firefox 2. is this a bug in firefox? an inqury about inaccurate layout for firefox being a bug - shaver suggests its a bug with gecko instead. error
building firefox-2.0rc3 on uclinux an error was found about
building on uclinux, user googgled the error and suggests that the error found in older versions. no replies yet. ubuntu firefox ua string a user questions ubuntu 6.10 and their firefox's ua string, the zeros seem to be wrong. meetings none this week. authors sara minchella (sara) dave manley (senemanley) back to summary list ...
2006-10-27 - Archive of obsolete content
summary: mozilla.dev.apps.firefox - october 20, 2006 - october 27, 2006 announcements none this week. discussions should be easier to import bookmark backups user asking for thoughts about having bookmarks manager's import wizard import from backups in the bookmarkbackups folder. no repiles yet. fx 1.5.0.x (linux) not
building since 20-oct-2006 17:45 pdt? tony inquires why tinderbox is showing that the fx 1.5.0.x (linux) has failed since october 20. gavin replies that "[t]he log file shows a "no space left on device" error when trying to link the final executable." learn the traffic magic of search engine cloaking mark describes the magic of search engine cloaker. (what it is, how to use it) cross-post-and followup fx2 announcment to support-firefox request for when...
...it is, how to use it) cross-post-and followup fx2 announcment to support-firefox request for when the announcement about firefox 2's release to be posted on the mozilla.dev.apps.firefox newsgroup. firefox killer features suggestion john describes his suggestions for "killer features" for firefox. debug minefield on intel mac an inqury about how to debug minefield on an intel mac. re
build firefox after modifying source code an inqury about how to re
build the code after making a minor change - the user is unfamiliar with how to use the command prompt. bug in firefox when import passwords from seamonkey a possible bug find - perhaps a version error instead? there should be a 'changes' faq a user suggests that a faq page be made for changes, since the same two questions keep...
...rror instead? there should be a 'changes' faq a user suggests that a faq page be made for changes, since the same two questions keep coming up. nsialertsservice under linux an inqury about why nsialertsservice is not a service found in firefox 2. is this a bug in firefox? an inqury about inaccurate layout for firefox being a bug - shaver suggests its a bug with gecko instead. error
building firefox-2.0rc3 on uclinux an error was found about
building on uclinux, user googgled the error and suggests that the error found in older versions. no replies yet. ubuntu firefox ua string a user questions ubuntu 6.10 and their firefox's ua string, the zeros seem to be wrong. meetings none this week. authors sara minchella (sara) dave manley (senemanley) back to summary list ...
2006-10-06 - Archive of obsolete content
summary: mozilla.dev.apps.thunderbird - september 30-october 06, 2006 announcements mac user needed scott macgregor announced that .mac support and a dynamically add isp account feature has been added to the thunderbird account manager, however, testing is required before release can be issued. ...
...mac user to test out the new features by
building a mac.rdf file with all of the various .mac account properties mentioned in the document here. discussions is thunderbird using a valid w3c coding? peter lairo requested someone who are knowledgeable in w3c standards to confirm if the use of <blockquote type="cite"> is valid w3c code. q & a q: walt experienced an unusual behaviour in his
build and wanted to perform an experiment to figure out the problem, but he couldn't find the mozilla.org's config file. a: robert helmer pointed out the mozilla.org's config file could be found here and to look for -->mozconfig<---------------------------------------- -->end mozconfig<---------------------------------------- updated: developer documentation issues for thunderbird 2 eric shepherd...
...c shepherd has requested feedback for any developer documentation issues that might need dealing with for thunderbird 2. discussion highlights: ziga sancin suggests writing an introductory article for potential developers containing basic project information (history, list of main developers, project goals, roadmap and available communication channels, etc), tools needed to start developing and
building tb, documentation on source structure as well as links to help one get started on the project. david bienvenu suggests a top down architectural description of tb's data structures along with documentation about extracting them. brian king also mentions that documentation on handling message headers on the ui side would be helpful. cédric corazza recommends that the proposed documention sho...
XEmbed Extension for Mozilla Plugins - Archive of obsolete content
cent versions of mozilla include an extension for writing plugins that use xembed instead of using the old xt-based mainloop that most plugins have been using since the netscape 3.x days. the use of the xt mainloop has been a problem for modern plugin development because very few modern applications that want to take advantage of the capabilities of newer toolkits use xt. also, when included with
builds of mozilla that are based on gtk 1.2 or gtk 2.x, the xt code that hosts the plugins is at best hacky and has been the source for many minor problems including inconsistent focus behavior as well as occasional crashes. it's recommended that you have a look at the gecko plugin api reference since this document will include information that assumes that you are already familiar with the way that pl...
...e the xid of the hosting xembed window. as an implementation note, this is really the xid of a gtksocket window. in your plugin instance npp_getvalue call you need to make sure that you support the new nppvpluginneedsxembed value. more information is included on this below. hosting using gtk2.x included below are a couple of code snippits that should help you get started as well as some hints on
building a successful plugin. please use the following diagram as a reference: as you can see from the diagram above, it's pretty easy to set up a plugin using gtk2. the general idea is that you use the xid that was passed into your npp_setwindow() call and create a gtkplug to host inside of that socket. since the gtkplug is just a container, you can add your own widgets at your leisure with the packi...
...((prbool *)value) = pr_true; break; default: err = nperr_generic_error; } return err; } once you have set those variables, it should be relatively easy to set up a plugin. just create a gtkplug that is the child of the xid passed in and it's just like using a standard gtk widget. other toolkits and out of process plugins it should be possible to use this interface to
build a plugin that would run out of process as well as using other toolkits like qt to
build plugins. since xembed was designed for cross-toolkit and out of process applications, it should work. in fact, version 1.5 of the java plugin will probably use xembed out of process. the author has no specific knowledge of other instances where people are using this architecture, though. xembed sample plugin f...
Browser Detection and Cross Browser Support - Archive of obsolete content
.090401 0.9.4.2 0.090402 1.0.1 1.0001 1.0.2 1.0002 2.2.0 2.02 2.12.36 2.1236 geckogetrv() returns values which can be compared using greater than, less than, etc. geckogetrv() is not an official part of gecko however is provided as an example of approaches you can take to compare the different branch tags today and in the future.
build date navigator.productsub is specific to gecko browsers and will return a string containing the date the browser was built in the format ccyymmdd (e.g. '20020801' for august 1, 2002). if you are concerned about a specific security issue in gecko and know for example that all gecko browsers contain a fix for the issue after a certain date, you can check that the navigator.productsub value is afte...
...rowser was built in the format ccyymmdd (e.g. '20020801' for august 1, 2002). if you are concerned about a specific security issue in gecko and know for example that all gecko browsers contain a fix for the issue after a certain date, you can check that the navigator.productsub value is after that date. you can also distinquish between point releases using a combination of the branch tag and the
build date. for example, netscape 6.2.2 and netscape 6.2.3 both have branch tags 0.9.4.1, but netscape 6.2.2 has navigator.productsub == '20020314' while netscape 6.2.3 has navigator.productsub == '20020508'. vendor/version all gecko browsers report the vendor and vendor's version both in the navigator object and the user agent string. the vendor and version information is not as useful as the branch...
...ample, netscape 6.2.2 and netscape 6.2.3 both have branch tags 0.9.4.1, but netscape 6.2.2 has navigator.productsub == '20020314' while netscape 6.2.3 has navigator.productsub == '20020508'. vendor/version all gecko browsers report the vendor and vendor's version both in the navigator object and the user agent string. the vendor and version information is not as useful as the branch tag and the
build date however and we do not recommend their use. however, if you wish, you can distinguish the different types of gecko browser using these values. as we saw earlier, the vendor/version appear in the user agent string following the gecko version. mozilla/5.0 (...; rv:a.b.c) gecko/ccyymmdd vendor/version the vendor is available in the navigator object as navigator.vendor while the vendor's versi...
Implementation Status - Archive of obsolete content
ents supported 4.2.1 xforms-model-construct supported 4.2.2 xforms-model-construct-done supported 4.2.3 xforms-ready supported 4.2.4 xforms-model-destruct supported 4.3.1 xforms-re
build supported 4.3.2 xforms-recalculate supported 4.3.3 xforms-revalidate supported 4.3.4 xforms-refresh supported 4.3.5 xforms-reset supported 4.3.6 xforms-next xforms-previous ...
...datatypes section...
...recalculate won't properly mark nodes as dirty if they were changed using javascript interfaces. 332231; 349805; 10.11 revalidate partial is dispatching events inst...
Introduction to game development for the Web - Game development
es and a recent browser, it's entirely possible to make stunning, top-notch games for the web. and we're not talking about simple card games or multi-player social games that have in the olden days been done using flash®. we're talking about kick-ass 3d action shooters, rpgs, and more. thanks to massive performance improvements in javascript just-in-time compiler technology and new apis, you can
build games that run in the browser (or on html5-powered devices) without making compromises. the html5 game platform you can truly think of the web as a better target platform for your game. as we like to say, "the web is the platform." let's take a look at the core of the web platform: function technology audio web audio api graphics webgl (opengl es 2.0) ...
...game developers. here's a thorough list to give you a taste of what the web can do for you: full screen api this simple api lets your game take over the entire screen, thereby immersing the player in action. gamepad api if you want your users to be able to use gamepads or other game controllers to work your game, you'll need this api. html and css together, these two technologies let you
build, style, and lay out your game's user interface. part of html is the <canvas> element, which provides one way to do 2d graphics. html audio the <audio> element lets you easily play simple sound effects and music. if your needs are more involved, check out the web audio api for real audio processing power! indexeddb a powerful data storage api for maintaining user data on their own computer or ...
... api the pointer lock api lets you lock the mouse or other pointing device within your game's interface so that instead of absolute cursor positioning you receive coordinate deltas that give you more precise measurements of what the user is doing, and prevent the user from accidentally sending their input somewhere else, thereby missing important action. svg (scalable vector graphics) lets you
build vector graphics that scale smoothly regardless of the size or resolution of the user's display. typed arrays javascript typed arrays give you access to raw binary data from within javascript; this lets you manipulate gl textures, game data, or anything else, even if it's not in a native javascript format. web audio api this api for controlling the playback, synthesis, and manipulation of audi...
Game promotion - Game development
eveloper. continually publishing information about your games will help educate others, increase your reputation in the community, and further improve seo. a further option is to publish monthly reports that summarize all your progress — it helps you see what you've accomplished throughout the month and what's still left to do, and it keeps reminding people that your game is coming out soon —
building buzz is always good. while you can create your website from scratch, there are also tools that can help make the process easier. manakeep is a website
builder made for indie game developers and provides a great starting point to create your website. presskit() is a press kit
builder that helps you create a press page to share with the media. social media your social media presence is very...
...owever — don't think this alone will skyrocket your downloads or visits, and be prepared to deal with bad reviews as well as good ones. there are two options to get coverage from the youtubers: first is you contact them directly and send a link to your game via email or private message. the second is earned in time - if you're known enough the youtubers will contact you and ask for the link or
build of your game. this big list of youtubers is a great place to start. you can find youtube and twitch.tv influencers at gameinfluencer.com to help promote your game. events if you've gone through all the options listed above you can still find new, creative ways to promote your game — events are another good example. attending events, both local and global, gives you the ability to meet your fa...
... — at such an event you can get a booth among other devs and promote your game to all the attendees passing by. if you do so, try to be unique and original, so you easily stand from the crowd. do it the right way and everybody will be talking about you and your game. having a booth gives you the possibility to interact with your fans directly — besides the promotion part you can also test new
builds of your game on regular people and fix any bugs (or incorporate any feedback) they uncover. you can't imagine what people may come up with when playing your game, and what obvious issues you've missed while spending hours polishing it. promo codes if you're selling the game, then create the ability to distribute promo codes allowing people to access your game for free (or at least a demo or ti...
2D breakout game using Phaser - Game development
e phaser framework to implement fundamental game mechanics like rendering and moving images, collision detection, control mechanisms, framework-specific helper functions, animations and tweens, and winning and losing states. to get the most out of this series of articles you should already have basic to intermediate javascript knowledge. ...
...-specific helper functions, animations and tweens, and winning and losing states. to get the most out of this series of articles you should already have basic to intermediate javascript knowledge. after working through this tutorial, you should be able to
build your own simple web games with phaser. ...
...through this tutorial, you should be able to
build your own simple web games with phaser. lesson details all the lessons — and the different versions of the mdn breakout game we are
building together — are available on github: initialize the framework scaling load the assets and print them on screen move the ball physics bounce off the walls player paddle and controls game over
build the brickfield collision detection the score win the game extra lives animations and tweens buttons randomizing gameplay as a note on learning paths — starting with pure javascript is the best way to get a solid knowledge of web game development. if you are not already familiar with pure javascript game development, we would suggest that you first work through this series' counterpart,...
Plug-in Development Overview - Gecko Plugin API Reference
sdk. create a plug-in project. write your plug-in code and implement the appropriate plug-in api methods for basic plug-in operation. you'll find an overview of the plug-in api methods in this chapter, as well as separate chapters for all of the major functional areas of the plug-in api. also see making plug-ins scriptable for more information about making plug-ins accessible from the browser.
build the plug-in for your operating system. see "
building plug-ins". install the plug-in in the plug-in directory for your operating system. see installing plug-ins. test your plug-in and debug as necessary. create an html page and embed the plug-in object. for information about the html elements to use, see using html to display plug-ins. to see your plug-in in action, simply display the html page...
...lert("plugin not installed correctly"); </script> in the past, liveconnect and later xpconnect were used to make plug-ins scriptable. see the wikipedia article for historical information. both technologies are now obsolete for the purposes of plug-in scriptability, and the cross-browser npruntime api should be used instead. see the scripting plugins section of this reference for the details.
building plug-ins once you have added the special code and additional files to make your plug-in scriptable as described in the previous section, the
build process is quite straightforward. in addition to the dll that goes in the plugins folder, you must also place a type library and an extra header file in the appropriate places in your application directory. this section describes those extra script...
... installing plug-ins plug-ins should not be installed into the firefox directory. ...
CSS and JavaScript accessibility best practices - Learn web development
e, the key considerations are: good semantics: using the right element for the right job. for example, making sure you use headings and paragraphs, and <button> and <a> elements making sure content is available as text, either directly as text content, good text labels for form elements, or text alternatives, e.g. alt text for images. we also looked at an example of how to use javascript to
build in functionality where it is missing — see
building keyboard accessibility back in. this is not ideal — really you should just use the right element for the right job — but it shows that it is possible in situations where for some reason you can't control the markup that is used. another way to improve accessibility for non-semantic javascript-powered widgets is to use wai-aria to provide e...
...do. think carefully about whether you need a complex non-standard form widget, or whether a text input would do. and don't generate all your html content using javascript if at all possible. keeping it unobtrusive you should keep unobtrusive javascript in mind when creating your content. the idea of unobtrusive javascript is that it should be used wherever possible to enhance functionality, not
build it in entirely — basic functions should ideally work without javascript, although it is appreciated that this is not always an option. but again, a large part of it is using built-in browser functionality where possible. good example uses of unobtrusive javascript include: providing client-side form validation, which alerts users to problems with their form entries quickly, without having t...
...mouse-dependent, but most browsers will activate onclick event handlers after enter/return is pressed on a link or form element that has focus, or when such an element is tapped on a touchscreen device. this doesn't work by default however when you allow a non-default-focusable event to have focus using tabindex — in such cases you need to detect specifically when that exact key is pressed (see
building keyboard accessibility back in). test your skills! you've reached the end of this article, but can you remember the most important information? you can find some further tests to verify that you've retained this information before you move on — see test your skills: css and javascript accessibility. summary we hope this article has given you a good amount of detail and understanding abou...
Organizing your CSS - Learn web development
in this article we will take a brief look at some best practices for writing your css to make it easily maintainable, and some of the solutions you will find in use by others to help improve maintainability. ...
...k, itcss from harry roberts, and atomic css (acss), originally created by yahoo!. if you come across a project that uses one of these approaches then the advantage is that you will be able to search and find many articles and guides to help you understand how to code in the same style. the disadvantage of using such a system is that they can seem overly complex, especially for smaller projects.
build systems for css another way to organise css is to take advantage of some of the tooling that is available for front-end developers, which allows you to take a slightly more programmatic approach to writing css. there are a number of tools which we refer to as pre-processors and post-processors. a pre-processor runs over your raw files and turns them into a stylesheet, whereas a post-processor ta...
... your exploration of css can continue from this point. to learn more about layout in css, see the learn css layout section. you should also now have the skills to explore the rest of the mdn css material. you can look up properties and values, explore our css cookbook for patterns to use, and read more in some of the specific guides such as our guide to css grid layout. ...
Type, class, and ID selectors - Learn web development
prerequisites: basic computer literacy, basic software installed, basic knowledge of working with files, html basics (study introduction to html), and an idea of how css works (study css first steps.) objective: to learn about the different css selectors we can use to apply css to a document. type selectors a type selector is sometimes referred to as a tag name selector or element selector, because it selects an html tag/element in your document. in the example below we have used the span, em and strong selectors. ...
...only apply to that particular element & class combination; so you would need to add another selector if you decided the rule should apply to other elements too. target an element if it has more than one class applied you can apply multiple classes to an element and target them individually, or only select the element when all of the classes in the selector are present. this can be helpful when
building up components that can be combined in different ways on your site. in the example below we have a <div> that contains a note. the grey border is applied when the box has a class of notebox. if it also has a class of warning or danger, we change the border-color. we can tell the browser that we only want to match the element if it has two classes applied by chaining them together with no whit...
...an make them difficult to deal with. in most cases it is preferable to add a class to the element rather than use an id, however if using the id is the only way to target the element — perhaps because you do not have access to the markup and so cannot edit it — this will work. in the next article we'll continue exploring selectors by looking at attribute selectors. ...
What is a URL? - Learn web development
audio document, the browser will try to go to the time the anchor represents. it is worth noting that the part after the #, also known as the fragment identifier, is never sent to the server with the request. note: there are some extra parts and some extra rules regarding urls, but they are not relevant for regular users or web developers. ...
......
...ps://developer.mozilla.org/docs/learn/../css/display, which can be simplified to: https://developer.mozilla.org/docs/css/display semantic urls despite their very technical flavor, urls represent a human-readable entry point for a web site. they can be memorized, and anyone can enter them into a browser's address bar. people are at the core of the web, and so it is considered best practice to
build what is called semantic urls. semantic urls use words with inherent meaning that can be understood by anyone, regardless of their technical know-how. linguistic semantics are of course irrelevant to computers. you've probably often seen urls that look like mashups of random characters. but there are many advantages to creating human-readable urls: it is easier for you to manipulate them. it ...
What is a web server? - Learn web development
ing downtime and systems troubles, a dedicated web server is always connected to the internet. a dedicated web server can have the same ip address all the time. this is known as a dedicated ip address. (not all isps provide a fixed ip address for home lines) a dedicated web server is typically maintained by a third-party. for all these reasons, finding a good hosting provider is a key part of
building your website. examine the various services companies offer. choose one that fits your needs and budget. (services range from free to thousands of dollars per month.) you can find more details in this article. once you have web hosting service, you must upload your files to your web server. communicating through http second, a web server provides support for http (hypertext transfer protocol...
...vide the file's url. the web server must answer every http request, at least with an error message. on a web server, the http server is responsible for processing and answering incoming requests. upon receiving a request, an http server first checks if the requested url matches an existing file. if so, the web server sends the file content back to the browser. if not, an application server
builds the necessary file. if neither process is possible, the web server returns an error message to the browser, most commonly 404 not found. (the 404 error is so common that some web designers devote considerable time and effort to designing 404 error pages.) static vs. dynamic content roughly speaking, a server can serve either static or dynamic content. remember that the term static means "ser...
...namic content. remember that the term static means "served as-is". static websites are the easiest to set up, so we suggest you make your first site a static site. the term dynamic means that the server processes the content or even generates it on the fly from a database. this approach provides more flexibility, but the technical stack is more complex, making it dramatically more challenging to
build a website. there are so many application servers that it's difficult to suggest a particular one. some application servers cater to specific website categories like blogs, wikis, or ecommerce; others, called cmss (content management systems), are more generic. if you're
building a dynamic website, take the time to choose technology that fits your needs. unless you want to learn web server progra...
Introduction to events - Learn web development
for example, if the user selects a button on a webpage, you might want to respond to that action by displaying an information box. in this article, we discuss some important concepts surrounding events, and look at how they work in browsers. this won't be an exhaustive study; just what you need to know at this stage. prerequisites: basic computer literacy, a basic understanding of html and css, javascript first steps. ...
...vents are not unique to javascript — most programming languages have some kind of event model, and the way the model works often differs from javascript's way. in fact, the event model in javascript for web pages differs from the event model for javascript as it is used in other environments. for example, node.js is a very popular javascript runtime that enables developers to use javascript to
build network and server-side applications. the node.js event model relies on listeners to listen for events and emitters to emit events periodically — it doesn't sound that different, but the code is quite different, making use of functions like on() to register an event listener, and once() to register an event listener that unregisters after it has run once. the http connect event docs provide a g...
...nclick property is the event handler property being used in this situation. it is essentially a property like any other available on the button (e.g. btn.textcontent, or btn.style), but it is a special type — when you set it to be equal to some code, that code is run when the event fires on the button. you could also set the handler property to be equal to a named function name (like we saw in
build your own function). the following works just the same: const btn = document.queryselector('button'); function bgchange() { const rndcol = 'rgb(' + random(255) + ',' + random(255) + ',' + random(255) + ')'; document.body.style.backgroundcolor = rndcol; } btn.onclick = bgchange; there are many different event handler properties available. let's experiment. first, make a local copy of rando...
Functions — reusable blocks of code - Learn web development
in this article we'll explore fundamental concepts behind functions such as basic syntax, how to invoke and define them, scope, and parameters. prerequisites: basic computer literacy, a basic understanding of html and css, javascript first steps. objective: to understand the fundamental concepts behind javascript functions. where do i find functions? in javascript, you'll find functions everywhere. ...
...or execute) a built in browser function couldn't be written in javascript — many of these functions are calling parts of the background browser code, which is written largely in low-level system languages like c++, not web languages like javascript. bear in mind that some built-in browser functions are not part of the core javascript language — some are defined as part of browser apis, which
build on top of the default language to provide even more functionality (refer to this early section of our course for more descriptions). we'll look at using browser apis in more detail in a later module. functions versus methods programmers call functions that are part of objects methods. you don't need to learn about the inner workings of structured javascript objects yet — you can wait until ou...
... ...
Image gallery - Learn web development
prerequisites: before attempting this assessment you should have already worked through all the articles in this module. objective: to test comprehension of javascript loops, functions, conditionals, and events. 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. ...
...p, or want an assessment. a link to the example you want assessed or need help with, in an online shareable editor (as mentioned in step 1 above). ...
...ep 1 above). this is a good practice to get into — it's very hard to help someone with a coding problem if you can't see their code. a link to the actual task or assessment page, so we can find the question you want help with. ...
Making decisions in your code — conditionals - Learn web development
for example, in a game, if the player's number of lives is 0, then it's game over. in a weather app, if it is being looked at in the morning, show a sunrise graphic; show stars and a moon if it is nighttime. in this article, we'll explore how so-called conditional statements work in javascript. prerequisites: basic computer literacy, a basic understanding of html and css, javascript first steps. objective: to understand how to use conditional structures in javascript. ...
...d sunny outside today. wear shorts! go to the beach, or the park, and get an ice cream.'; } else if (choice === 'rainy') { para.textcontent = 'rain is falling outside; take a rain coat and an umbrella, and don\'t stay out for too long.'; } else if (choice === 'snowing') { para.textcontent = 'the snow is coming down — it is freezing! best to stay in with a cup of hot chocolate, or go
build a snowman.'; } else if (choice === 'overcast') { para.textcontent = 'it isn\'t raining, but the sky is grey and gloomy; it could turn any minute, so take a rain coat just in case.'; } else { para.textcontent = ''; } } here we've got an html <select> element allowing us to make different weather choices, and a simple paragraph. in the javascript, we are storing a reference to...
...e and sunny outside today. ...
Client-side storage - Learn web development
umber of ways for web sites to store data on the user's computer — with the user's permission — then retrieve it when necessary. this lets you persist data for long-term storage, save sites or documents for offline use, retain user-specific settings for your site, and more. this article explains the very basics of how these work. prerequisites: javascript basics (see first steps,
building blocks, javascript objects), the basics of client-side apis objective: to learn how to use client-side storage apis to store application data. client-side storage? elsewhere in the mdn learning area we talked about the difference between static sites and dynamic sites. most major modern web sites are dynamic — they store data on the server using some kind of database (ser...
...ge can be used. our example will allow you enter a name, after which the page will update to give you a personalized greeting. this state will also persist across page/browser reloads, because the name is stored in web storage. you can find the example html at personal-greeting.html — this contains a simple website with a header, content, and footer, and a form for entering your name. let's
build up the example, so you can understand how it works. first, make a local copy of our personal-greeting.html file in a new directory on your computer. next, note how our html references a javascript file called index.js (see line 40). we need to create this and write our javascript code into it. create an index.js file in the same directory as your html file. we'll start off by c...
...this does come at a cost: indexeddb is much more complex to use than the web storage api. in this section, we'll really only scratch the surface of what it is capable of, but we will give you enough to get started. working through a note storage example here we'll run you through an example that allows you to store notes in your browser and view and delete them whenever you like, getting you to
build it up for yourself and explaining the most fundamental parts of idb as we go along. the app looks something like this: each note has a title and some body text, each individually editable. the javascript code we'll go through below has detailed comments to help you understand what's going on. getting started first of all, make local copies of our index.html, style.css, and index-start.js ...
Drawing graphics - Learn web development
overview: client-side web apis next the browser contains some very powerful graphics programming tools, from the scalable vector graphics (svg) language, to apis for drawing on html <canvas> elements, (see the canvas api and webgl). this article provides an introduction to canvas, and further resources to allow you to learn more. prerequisites: javascript basics (see first steps,
building blocks, javascript objects), the basics of client-side apis objective: to learn the basics of drawing on <canvas> elements using javascript. graphics on the web as we talked about in our html multimedia and embedding module, the web was originally just text, which was very boring, so images were introduced — first via the <img> element and later via css properties such as...
...er of canvas unless you update or animate it in some way. after all, canvas does provide scriptable images! if you aren't going to change anything, then you might as well just use static images and save yourself all the work. creating a loop playing with loops in canvas is rather fun — you can run canvas commands inside a for (or other type of) loop just like any other javascript code. let's
build a simple example. make another fresh copy of our canvas template (1_canvas_template.html) and open it in your code editor. add the following line to the bottom of your javascript. this contains a new method, translate(), which moves the origin point of the canvas: ctx.translate(width/2, height/2); this causes the coordinate origin (0, 0) to be moved to the center of the canvas, ...
... that's it! the final example should look like so: note: the finished code is available on github as 7_canvas_walking_animation.html. a simple drawing application as a final animation example, we'd like to show you a very simple drawing application, to illustrate how the animation loop can be combined with user input (like mouse movement, in this case). we won't get you to walk through and
build this one; we'll just explore the most interesting parts of the code. the example can be found on github as 8_canvas_drawing_app.html, and you can play with it live below: let's look at the most interesting parts. first of all, we keep track of the mouse's x and y coordinates and whether it is being clicked or not with three variables: curx, cury, and pressed. when the mouse moves, we fire a f...
JavaScript First Steps - Learn web development
looking to become a front-end web developer? we have put together a course that includes all the essential information you need to work towards your goal. ...
...t from a high level, answering questions such as "what is it?", and "what is it doing?", and making sure you are comfortable with javascript's purpose. a first splash into javascript now you've learned something about the theory of javascript, and what you can do with it, we are going to give you a crash course in the basic features of javascript via a completely practical tutorial. here you'll
build up a simple "guess the number" game, step by step. what went wrong? troubleshooting javascript when you built up the "guess the number" game in the previous article, you may have found that it didn't work. never fear — this article aims to save you from tearing your hair out over such problems by providing you with some simple tips on how to find and fix errors in javascript programs. storin...
...find and fix errors in javascript programs. storing the information you need — variables after reading the last couple of articles you should now know what javascript is, what it can do for you, how you use it alongside other web technologies, and what its main features look like from a high level. in this article we will get down to the real basics, looking at how to work with the most basic
building blocks of javascript — variables. basic math in javascript — numbers and operators at this point in the course we discuss maths in javascript — how we can combine operators and other features to successfully manipulate numbers to do our bidding. handling text — strings in javascript next we'll turn our attention to strings — this is what pieces of text are called in programming. ...
Handling common accessibility problems - Learn web development
ted, whether they are using mouse or keyboard: a:hover, input:hover, button:hover, select:hover, a:focus, input:focus, button:focus, select:focus { font-weight: bold; } note: if you do decide to remove the default focus styling using css, make sure you replace it with something else that fits in with your design better — it is a very valuable accessiblity tool, and should not be removed.
building in keyboard accessibility sometimes it is not possible to avoid losing keyboard accessibility. you might have inherited a site where the semantics are not very good (perhaps you've ended up with a horrible cms that generates buttons made with <div>s), or you are using a complex control that does not have keyboard accessibility built in, like the html5 <video> element (amazingly, opera is the ...
...s the keycode that matches return/enter, we run the function stored in the button's onclick handler using document.activeelement.onclick(). activeelement gives us the element that is currently focused on the page. note: this technique will only work if you set your original event handlers via event handler properties (e.g. onclick). addeventlistener won't work. this is a lot of extra hassle to
build the functionality back in. and there's bound to be other problems with it. better to just use the right element for the right job in the first place. text alternatives text alternatives are very important for accessibility — if a person has a visual or hearing impairment that stops them being able to see or hear some content, then this is a problem. the simplest text alternative available is...
...it is available, for example use links and buttons as appropriate. don't use <div> elements with javascript code to fake functionality if at all possible — it is error prone, and more work than using the free functionality html gives you. simple functionality generally simple functionality should work with just the html in place — javascript should only be used to enhance functionality, not
build it in entirely. good uses of javascript include: providing client-side form validation, which alerts users to problems with their form entries quickly, without having to wait for the server to check the data. if it isn't available, the form will still work, but validation might be slower. providing custom controls for html5 <video>s that are accessible to keyboard-only users (as we said earli...
Handling common HTML and CSS problems - Learn web development
g the notation outlined in autoprefixer options; also see browserslist queries, which this is based on, for more detail. as an example, the following query will select the last 2 versions of all major browsers and versions of ie above 9. last 2 versions, ie > 9 autoprefixer can also be used in other, more convenient ways — see autoprefixer usage. for example, you can use it with a task runner/
build tool such as gulp or webpack to automatically add prefixes once development has been done. (explaining how these work is somewhat beyond the scope of this article.) you can also use a plugin for a text editor such as atom or sublime text. for example, in atom: you can install it by going to preferences > install, searching for autoprefixer, then hitting install. you can set a browser query b...
...h removed all the default browser styling applied to html, and then applied their own styles for everything over the top — this was done to make styling on a project more consistent, and reduce possible cross browser issues, especially for things like layout. however, it has more recently been seen as overkill. the best equivalent we have in modern times is normalize.css, a neat bit of css that
builds slightly on the default browser styling to make things more consistent and fix some layout issues. you are advised to apply normalize.css to all your html pages. note: when trying to track down a tricky layout issue, a good technique is to add a brightly colored outline to the offending element, or all the elements nearby. this makes it a lot easier to see where everything is placed. see deb...
...hange to suit different device form factors — for example, different screen widths, orientations (portrait or landscape), or resolutions. a desktop layout for example will look terrible when viewed on a mobile device, so you need to provide a suitable mobile layout using media queries, and make sure it is applied correctly using viewport. you can find a detailed account of such practices in the
building blocks of responsive design. resolution is a big issue too — for example, mobile devices are less likely to need big heavy images than desktop computers, and are more likely to have slower internet connections and possibly even expensive data plans that make wasted bandwidth more of a problem. in addition, different devices can have a range of different resolutions, meaning that smaller ima...
Introduction to cross browser testing - Learn web development
get all of the implementation done. we will look at the different parts of the testing process in much greater detail in subsequent articles, but for now let's just summarize what may occur in each step. initial planning in the initial planning phase, you will probably have several planning meetings with the site owner/client (this might be your boss, or someone from an external company you are
building a web site for), in which you determine exactly what the web site should be — what content and functionality should it have, what should it look like, etc. at this point you'll also want to know how much time you have to develop the site — what is their deadline, and how much are they going to pay you for your work? we won't go into much detail about this, but cross-browser issues can have...
...ve, what should it look like, etc. at this point you'll also want to know how much time you have to develop the site — what is their deadline, and how much are they going to pay you for your work? we won't go into much detail about this, but cross-browser issues can have a serious effect on such planning. once you've got an idea of the required featureset, and what technologies you will likely
build these features with, you should start exploring the target audience — what browsers, devices, etc. will the target audience for this site be using? the client might already have data about this from previous research they've done, e.g. from other web sites they own, or from previous versions of the web site you are now working on. if not, you will be able to get a good idea by looking at other ...
...he client might already have data about this from previous research they've done, e.g. from other web sites they own, or from previous versions of the web site you are now working on. if not, you will be able to get a good idea by looking at other sources, such as usage stats for competitors, or countries the site will be serving. you can also use a bit of intuition. so for example, you might be
building an e-commerce site that serves customers in north america. the site should work entirely in the last few versions of the most popular desktop and mobile (ios, android, windows phone) browsers — this should include chrome (and opera as it is based on the same rendering engine as chrome), firefox, ie/edge, and safari. it should also provide an acceptable experience on ie 8 and 9, and be access...
Handling common JavaScript problems - Learn web development
ine uses — you can install these tools as command line utilities (available via the cli — command line interface) using npm (node package manager — you'll have to install nodejs first). for example, the following command installs jshint: npm install -g jshint you can then point these tools at javascript files you want to lint, for example: you can also use these tools with a task runner/
build tool such as gulp or webpack to automatically lint your javascript during development. (see using a task runner to automate testing tools in a later article.) see eslint integrations for eslint options; jshint is supported out of the box by grunt, and also has other integrations available, e.g. jshint loader for webpack. note: eslint takes a bit more setup and configuration than jshint, but it ...
...o. javascript libraries tend to come in a few main varieties (some libraries will serve more than one of these purposes): utility libraries: provide a bunch of functions to make mundane tasks easier and less boring to manage. jquery for example provides its own fully-featured selectors and dom manipuation libraries, to allow css-selector type selecting of elements in javascript and easier dom
building. it is not so important now we have modern features like document.queryselector()/document.queryselectorall()/node methods available across browsers, but it can still be useful when older browsers need supporting. convenience libraries: make difficult things easier to do. for example, the webgl api is really complex and challenging to use when you write it directly, so the three.js library (a...
...of complete solutions for developing complex web applications. polyfills polyfills also consist of 3rd party javascript files that you can drop into your project, but they differ from libraries — whereas libraries tend to enhance existing functionality and make things easier, polyfills provide functionality that doesn't exist at all. polyfills use javascript or other technologies entirely to
build in support for a feature that a browser doesn't support natively. for example, you might use a polyfill like es6-promise to make promises work in browsers where they are not supported natively. modernizr's list of html5 cross browser polyfills is a useful place to find polyfills for different purposes. again, you should research them before you use them — make sure they work and are maintained...
Strategies for carrying out testing - Learn web development
u can test on every combination of browser and device your users might use to view your site — there are just too many, and new ones appear all the time. instead, you should try to make sure your site works on the most important target browsers and devices, and then code defensively to give your site the widest support reach it can be expected to have. by coding defensively, we mean trying to
build in intelligent fallbacks so that if a feature or style doesn't work in a browser, the site will be able to downgrade to something less exciting that still provides an acceptable user experience — the core information is still accessible, for example, even if it doesn't look quite as nice. the aim is to
build up a chart of browsers/devices you can refer to as you test. you can make this as simp...
...ll support. b grade: older/less capable browsers — known not to be capable. test, and provide a more basic experience that gives full access to core information and services. c grade: rare/unknown browsers — don't test, but assume they are capable. serve the full site, which should work, at least with the fallbacks provided by our defensive coding. throughout the following sections, we'll
build up a support chart in this format. note: yahoo first made this approach popular, with their graded browser support approach. educated guesses you could call these "assumptions", or "gut feelings". this is not an accurate, scientific approach, but as someone who has experience with the web industry you'll have a pretty good idea of at least some of the browsers you should test. this can form ...
...nstallation just like you would any real installation — for example, as well as installing the browsers you want to test, install an anti-virus program to protect it from viruses. having multiple virtual machines is very useful, particularly for windows ie/edge testing — on windows, you are not able to have multiple versions of the default browser installed side by side, so you might want to
build up a library of virtual machines to handle different tests as required, e.g.: windows 10 with edge 14 windows 10 with edge 13 windows 8.1 with ie11 windows 8 with ie10 windows 7 with ie9 windows xp with ie8 windows xp with ie7 windows xp with ie6 note: another good thing about virtual machines is that the virtual disk images are fairly self-contained. if you are working on a team, yo...
Gecko info for Windows accessibility vendors
ble user-interface language the xml-based language used by firefox and mozilla to develop the ui. similar to html in that it can be combined with css and javascript to make powerful applications. contains more desktop-style widgets than html and follows a box layout model, rather than being text-flow based. ajax: asynchronous javascript and xml ajax is a method of
building interactive web applications that process user requests, user actions immediately in real time, unlike an http request, during which users must wait for a whole page to reload or for a new page to load. data is therefore stored and retrieved dynamically much faster. roles, states and events: please read the msaa documentation on msdn if you are unfamiliar with these. in g...
...l content, as well as for menus, dialogs and the entire user interface via an xml language called xul (extensible user-interface language). none of the user interface contains standard windows controls -- not even the menus! this is done to ensure a common look and feel across all supported platforms, and to allow for different skins (appearances). firefox (please use version 1.1 alpha
builds or later) thunderbird (please use version 1.1 alpha
builds or later) mozilla seamonkey (please use 1.8 alpha
builds or later) how to find the content window and load the document screen readers need to find the content window so that they know where to start grabbing the msaa tree, in order to load the current document into a buffer in their own process. the content windo...
...ly support role_system_row, although internet explorer doesn't either, and the reason seems apparent. it is not obvious where the role_system_row should exist in the tree when the html rowspan attribute is used to combine to cells in different rows. there are currently two techniques for parsing tables: 1) use acclocation() to get the coordinates for each cell and feed that into an algorithm that
builds up your own table data structure, or 2) use isimpledomnode and parse the table see below for the complete list of roles and notes about what we support intentional differences with internet explorer for the most part, where we support an msaa feature, we have tried to duplicate internet explorer's use of it. please let us know if you find any differences not listed here: accessible ...
Windows SDK versions
quick start follow the instructions for whichever version of visual c++ you're using. visual studio professional 2013 this comes with the windows 8.1 sdk included. visual studio express 2013 for windows desktop this comes with the windows 8.1 sdk included. visual studio professional 2012 this comes with the windows 8.0 sdk included. visual studio 2012 express for windows desktop this comes with the windows 8.0 sdk included. ...
...dk included. visual studio 2012 express for windows desktop this comes with the windows 8.0 sdk included. visual c++ 10 (vs2010) professional this comes with the windows 7 sdk, so you should be all set out of the box. visual c++ 10 (vs2010) express download and install the windows 7 sdk. older versions some of the older version are no longer supported, further information is available at obsolete
build caveats and tips [en-us] under the windows sdk article. windows 8 sdk (official) features that depend on this sdk include: metro firefox front end gamepad api support you can download the sdk from the microsoft download center [web setup]. windows 7 sdk features that depend on this sdk include: windows 7 taskbar previews windows 7 download taskbar progress windows 7 jump lists you can do...
...4 bit windows 7 on a late 2008 macbook pro.) warning: due to a bug in windows 7 sdk, if you get "sdksetup encountered an error: expecting path %systemroot% to represent a valid system volume" error you may require to set environmental variable %windir% to something like "c:\windows" instead of "%systemroot%". older sdks these are no longer supported, further information is available at obsolete
build caveats and tips [en-us] under the windows sdk article. troubleshooting help! i know i have the correct sdk, but configure.in's still failing! try the following things in order: run the windows sdk configuration tool (if available) and make sure the right sdk is selected. restart the msys console. delete your entire object directory and start over. ...
Gecko Logging
some other mostly-useless information on logging can be found on the nspr logging page. logging framework declaring a log module lazylogmodule defers the creation the backing logmodule in a thread-safe manner and is the preferred method to declare a log module. multiple lazylogmodules with the same name can be declared, all will share the same backing logmodule. this makes it much simpler to share a log module across multiple translation units. ...
...ven level enabled. module - the log module to use. level - the output level of the message. log level numeric value purpose mozilla logging levels disabled 0 indicates logging is disabled. this should not be used directly in code. error 1 an error occurred, generally something you would consider asserting in a debug
build. warning 2 a warning often indicates an unexpected state. info 3 an informational message, often indicates the current program state. debug 4 a debug message, useful for debugging but too verbose to be turned on normally. verbose 5 a message that will be printed a lot, useful for debugging program flow and will probably impact performanc...
...e rust logging levels error designates very serious errors. warn designates hazardous situations. info designates useful information. debug designates lower priority information. trace designates very low priority, often extremely verbose, information. it is common for debug and trace to be disabled at compile time in release
builds, so you may need a debug
build if you want logs from those levels. check the env_logger docs for more details on logging options. child processes / e10s sometimes it can be useful to only log child processes and ignore the parent process. in firefox 57 and later, you can use rust_log_child to specify log settings that will only apply to child processes. ...
Developer guide
there are lots of ways to contribute to the mozilla project: coding, testing, improving the
build process and tools, or contributing to the documentation. this guide provides information that will not only help you get started as a mozilla contributor, but that you'll find useful to refer to even if you are already an experienced contributor. documentation topics getting started a step-by-step beginner's guide to getting involved with mozilla. for new mozilla developers a directory of articles which are particularly helpful for new mozilla developers. working with mozilla source code a code overview, how to get the code, and the coding style guide.
build instructions how to
build firefox, thunderbird, seamonkey, or other mozilla applications. development process overvie...
...s. adding apis to the navigator object how to augment the window.navigator object with additional apis. interface compatibility guidelines for modifying scriptable and binary apis in mozilla. customizing firefox information about creating customized versions of firefox. task-graph generation what controls the jobs that run on a push to version control? how can you change that? obsolete
build caveats and tips a place to put
build tips which are no longer relevant to
building the latest version of the code from main but are relevant when
building old codebases. firefox source docs web-hosted documentation built from the mozilla-central source code. tools bugzilla the bugzilla database used to track issues for mozilla projects. dxr next generation of searching mozilla's sou...
...refox source docs web-hosted documentation built from the mozilla-central source code. tools bugzilla the bugzilla database used to track issues for mozilla projects. dxr next generation of searching mozilla's source code. in active development. searchfox another option for mozilla code searching. indexes js as well as c++, includes blame capabilities. in active development. mozilla
build vm a virtualbox compatible virtual machine configured with all the software needed to
build and work on firefox. taskcluster taskcluster is the task execution framework that supports mozilla's continuous integration and release processes. treeherder treeherder shows the status of the tree (whether or not it currently
builds successfully). check this before checking in and out, to be sure yo...
Firefox and the "about" protocol
isplays preferences and settings that can be inspected and changed. available about: urls depend on your specific firefox version. ...
...ged. available about: urls depend on your specific firefox version. ...
...isplayed when firefox is installed about:welcomeback information page displayed after firefox is reset these urls are defined in docshell/base/nsaboutredirector.cpp within the kredirmap array. the array maps most of the urls, like config to urls in the chrome: pseudo protocol, such as chrome://global/content/config.xul. the about location information is duplicated in docshell/
build/nsdocshellmodule.cpp. note: you must access about: protocol pages by typing them into the address bar. attempts to navigate through window.location will throw — error: access to 'about:addons' from script denied. ...
Roll your own browser: An embedding how-to
warning: this document is out of date. you should instead
build xulrunner and use it for all new embedding. you should not need to, and should not, use embedding/config. what bits do i need? one of the requirements of
building a sdk is the ability to identify and package up required files. like that isn't totally obvious, nonetheless it has to be done. here is that effort. i have created a directory under embedding called config. contained within this directory are a couple of makefiles: basebrowser-unix basebrowser-win the xpinstall packager follows the same format. however in our case, we only have one named xpi package. after the
build is done, you can change directory into mozilla/embedding/config, and do a make. this will produce a directory in dist named embed. it should ...
...ation (gtkembed or winembed). what initializations do i have to do? somewhere during the start of your application, you must initialize xpcom. you will also want to shut this down when you quit. other initialization must be done to start up event queues and load some string bundles. all of this is somewhat generic and has been isolated into a static library that you can simply call on. if you
build mozilla/embedding/base/, a static library (on windows) called baseembed_s.lib is built. just link this library to your application. there are two functions that are needed: nsresult ns_initembedding(const char *apath); nsresult ns_termembedding(); pretty self-explanatory. the apath parameter will be passed to ns_initxpcom. ns_initembedding() must be called from the main thread of your applicat...
...trol of the menus and "hotkeys". implemented with mozilla embedding apis. (screenshots) neoplanet browser: a gecko add-on for the neoplanet browser. activestate's komodo: development environment, based on mozilla's xul. (screenshot) macromedia homesite html editor: internal browser for the homesite studio application is implemented by embedding mozilla. (mozilla blurb) bradsoft's topstyle css
builder: implements an internal browser using mozilla activex embedding control.obsolete since gecko 7.0 nxzilla: a set of libraries that allow mozilla to be used with a nanox server. activex control: an activex control allowing for embedding the gecko layout engine.obsolete since gecko 7.0 llmozlib & ubrowser: a static library that allows you to embed gecko and render pages to memory. includes test...
Hacking with Bonsai
ms. many times, code checked in would compile or run on a handful of platforms. also, with as many as 100 engineers, it was very difficult to determine what happened in the tree that caused the instability. bonsai was created to solve these problems. the process everyone who checks into the tree, joins a group called "the hook" at 8:00 am pst every weekday morning, the source tree is closed. the
build team will then pull the 8:00 am tree, and
build it on a subset of the platforms, linux, win32 & macppc. at 10:00 am, everyone who is on the hook is available in case the
build breaks eventually, the tree
builds, and it is re-opened. there is a web page, which records if the tree is open or closed what the date stamp of the last known good tree is who is on the hook for the current tree before ...
...0 am, everyone who is on the hook is available in case the
build breaks eventually, the tree
builds, and it is re-opened. there is a web page, which records if the tree is open or closed what the date stamp of the last known good tree is who is on the hook for the current tree before the tree is opened, the list of checkins that happened when the tree was closed is reviewed to insure that only
build related checkins took place. before the tree is opened, there is a car pool lane where people who have been off on a branch and need a stable tip to merge in can pull the tip for their merge. these people, when they check in, will be "on the hook" for the next day's
build. the car pool lane is only available to those who arrange access ahead of time with the release team. when the tree is re-open...
... those who arrange access ahead of time with the release team. when the tree is re-opened, the web page is updated and the hook is cleared. use the bonsai query tool to see what's been checked in to the tree lately and to look at differences between versions. read the introduction to bonsai for more information about queries. the rules no checkins when the tree is closed unless you are fixing a
build problem at the request of a
build person. if you are on the hook, your top priority is to be available to the
build team to fix bustages. if you are on the hook, you are findable. you are either at your desk, or pageable, checking e-mail constantly, or on irc so that you can be found immediately and can respond to any problems in your code. helpful attitudes the
build team are your friends. the...
How to implement a custom autocomplete search component
ox_(firefox_autocomplete) for more details. the toolkit mechanism has built-in support for several autocomplete sources, including: history: search the browser's url history (firefox: 1.0+; seamonkey: 1.1+) form-history: search the values that the user has entered into form fields. (firefox: 1.0+; seamonkey: 2.0+) file: search file names (firefox: 2.0+; thunderbird: 2.0+; seamonkey: 1.1+; gtk
builds only). the component uses the autocompletesearchparam attribute or searchparam property to allow the developer to define the default directory otherwise only paths beginning with / or ~/ will be autocompleted.
building your custom autocomplete search components sometimes, you may want to
build your own autocomplete source. to do so you need the following: create an xpcom component that implem...
...owing: create an xpcom component that implements the nsiautocompletesearch interface. make sure the contract id of your xpcom component follows the following form: "@mozilla.org/autocomplete/search;1?name=xxx", where "xxx" is the name of your autocomplete source. implement the list of matched strings using the nsiautocompleteresult interface. ...
...ke sure the contract id of your xpcom component follows the following form: "@mozilla.org/autocomplete/search;1?name=xxx", where "xxx" is the name of your autocomplete source. implement the list of matched strings using the nsiautocompleteresult interface. the simplest way to make an xpcom component is to
build an xpcom javascript component (this cannot be done with a javascript module). how to
build an xpcom component in javascript will step you through the process. because creating an xpcom component in order to
build a custom autocomplete source can be enough to discourage some developers, below is an example javascript xpcom component called "simple-autocomplete" that implements the necessary interfaces. note: when copying the examples below, change the uuid that uniquely identifies the...
OS.File for the main thread
pend: false to open the file in regular mode. optionsoptional platform-specific options for opening the file. for advanced users only. most users will never have need of these options. to specify options, pass an object that may contain some of the following flags: unixflags (ignored under non-unix platforms) if specified, file opening flags, as per libc function open. if unspecified,
build these flags from the contents of mode. you can
build these flags from values os.constants.libc.o_*. unixmode (ignored under non-unix platforms) if specified, file creation mode, as per libc function open. if unspecified, files are created with a default mode of 0600 (file is private to the user, the user can read and write). you can
build this mode from values os.constants.libc.s_i*. winsha...
... winsecurity (ignored under non-windows platforms) if specified, a security policy, as per windows function createfile. if unspecified, no security attributes. winaccess (ignored under non-windows platforms) if specified, access mode, as per windows function createfile. ...
...isting is specified as false, it will not fail due to pre-existence of directories, because the from option tells makedir to make the folders if not found. unixmode (ignored under non-unix platforms) if specified, file creation mode, as per libc function mkdir. if unspecified, directories are created with a default mode of 0600 (file is private to the user, the user can read and write). you can
build this mode from values os.constants.libc.s_i*. winsecurity (ignored under non-windows platforms) if specified, a security policy, as per windows function createdirectory. if unspecified, no security attributes. from if specified, the call to makedir creates all the ancestors of path that are descendents of from. note that from and its existing descendents must be user-writeable and that path m...
Bootstrapping a new locale
the history of commits with hg log. after doing hg commit, you still need to send the changes to bitbucket. this is why you need to do hg push, which sends the already made commits to the remote repository (http://bitbucket.org/mozillal10n/ab-cd/ in the example above). after you have committed and pushed your initial translation, email the l10n-drivers team to let us know it's ready. set up for
building the next step is to create a .mozconfig file with the compile options for the localized
build of firefox, and to set up the object directory for the localized
build. cd mozilla-1.9.1 echo "mk_add_options moz_objdir=@topsrcdir@/../fx-ab-dc" > .mozconfig echo "ac_add_options --with-l10n-base=../" >> .mozconfig echo "ac_add_options --disable-compile-environment" >> .mozconfig echo "ac_add_optio...
...p the object directory for the localized
build. cd mozilla-1.9.1 echo "mk_add_options moz_objdir=@topsrcdir@/../fx-ab-dc" > .mozconfig echo "ac_add_options --with-l10n-base=../" >> .mozconfig echo "ac_add_options --disable-compile-environment" >> .mozconfig echo "ac_add_options --enable-application=browser" >> .mozconfig make -f client.mk configure create a language pack first, we'll create a
build directory. this sounds worse than it is, you won't need to actually
build, but we'll need to setup something that looks like it. you're still in the l10n directory, right? we'll create
build right next to it. the name of that directory doesn't really matter, so no reason to change it. mkdir ../
build cd ../
build now we'll set up a not-so-compile environment by calling configure. if you just che...
...if you're downloading a new release of firefox from cvs, you might want to run configure again, too. now we can actually create the language pack, make -c browser/locales langpack-en-x-dude you should find your newly created language pack in dist/install. ...
Index
t 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. this is only necessary once. 3 bootstrapping a new locale localization, mercurial, translate, bit bucket (see also https://developer.mozilla.org/en/create_a_new_localization) 4 encodings for localization files internationalization, localization when creating a localization for mozilla products, it’s important to be aware of the encoding of...
...cluding 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 is an established format for those, which is described in this document. 11 localization prerequisites internationalization, localization, delete to work on localization, you need a subset of the mozilla
build prerequisites. on mac and linux, you should be just fine, and on windows, mozilla
build should get you everything you need. 12 localization quick start guide guide, translation this guide is filled with all of the basic, technical information you need to get involved in the mozilla l10n program. 13 initial setup localization as a pre-requisite to contribut...
...ata describes the extension, and doesn't necessarily change with each revision (but it can). the localizable data fields of an extension are: 23 localizing with koala 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. 24 localizing with mercurial
build documentation, internationalization, localization 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, thund...
Localizing with Mercurial
ou see a message about the version of mercurial (e.g. mercurial distributed scm (version 1.3.1)), you have installed mercurial successfully! more details for more details on installing hg on linux systems, refer to the instructions on mercurial's download page. mercurial on windows with windows, you have a couple of install options: for a command line interface, download and install mozilla
build package. this will not only install hg, but also all the tools required to
build mozilla products on windows. trust us, you'll want this eventually. for a graphical interface, you may want to install tortoisehg, which integrates with your windows explorer shell. it also installs the command line utility. part of the command line hg install for windows involves making sure the hg executable is ...
...s, you'll want this eventually. for a graphical interface, you may want to install tortoisehg, which integrates with your windows explorer shell. it also installs the command line utility. part of the command line hg install for windows involves making sure the hg executable is in the system's %path% variable (tortoisehg doesn't need this step). use the add_path.exe utility found in c:\mozilla-
build\hg to do this. ps c:\users\your_id> cd c:\mozilla-
build\hg ps c:\mozilla-
build\hg> .\add_path.exe /result . note the dot (".") at the end of the second command, which means the current directory. if the utility modified your %path% successfully, a dialog will open saying, "%path% has been updated correctly." alternatively, you can edit the %path% variable manually. in order to do so, right-cl...
...] username = your real name <user@example.com> merge = internal:merge [defaults] commit = -v [diff] git = 1 showfunc = 1 unified = 8 to configure hg, follow these steps: create a new file in your favorite text editor. copy the settings above and paste them into your new file. save the file as either .hgrc (unix systems) or mercurial.ini (windows) and save it in either $home/ or c:\mozilla-
build\hg\ or c:\program files\mercurial\. now that you've installed and configured mercurial, here are a few tasks you can do without hg commit access priviledges. cloning and updating repositories there are a couple of repostiories that contain en-us source files that most locales will want to deal with. mozilla-central contains the files for firefox nightly. comm-central contains the files fo...
Initial setup
s to official release. it will also notify us when you're having problems unique to your localization team's work. add a request about creating your locale's bugzilla component to the new locales newsgroup. local environment tools similar to accounts, there is a number of environment tools that you should install on your personal computer. these tools will help you to store your contributions,
build mozilla applications and language packs, and test your work. hg (mercurial) as noted above, we use mercurial for maintaining mozilla source code and localized code. not only will you need a localization repository to store your localizations, but you need to have it installed and configured on your personal computer as well. you can find everything you need to know about installing and config...
...re-locales is a python script that helps you check your work without needing to run firefox or another application. install intructions are located here. l10n checks l10n checks is another python script that helps you check your work without running an application. install instructions are located here. autoconf 2.13 autoconf is a utility that is vital to manually creating mozilla application
builds and language packs. we use version 2.13 and higher for these
builds. you can find the source files and install instructions here. wget wget is a command-line utility that allows you to retrieve files using internet protocols. we use it for retrieving files from repositories. you can find the source files and install instructions here. perl perl is a programming language that will help you cr...
...you can find the source files and install instructions here. python python is a programming language in which many of our l10n testing scripts are written. you can find the source files and install instructions here. ...
MathML In Action
now that you are well-equipped, you should be able to see this inline equation with varying accents: x ^ + xy ^ + xyz ^ . ...
...now that you are well-equipped, you should be able to see this inline equation with varying accents: x ^ + xy ^ + xyz ^ . ...
...now, what next? as you try out mathml in mozilla, what to do with those few things that appear to you not to work as per the mathml spec? or what about those things that just seem itchy, and that you wish could be done just a little better? or what about those things that were working before and are not working anymore (a.
Mozilla MathML Project
mailing list newsgroup rss feed irc channel wiki used by contributors - check out the latest developments and help us improving mathml in mozilla. ...
... mailing list newsgroup rss feed irc channel wiki used by contributors - check out the latest developments and help us improving mathml in mozilla. ...
..., chinese, hebrew, thai) mathml basics - document tailored to display correctly with just the symbol font that is pre-installed by default on most os configurations. mathml torture test - comparative testing of mathml rendering against tex. demo of some mathml tags: mfrac, mo, mtable, mspace, mmultiscripts, msqrt-mroot. mathml extras - technology demonstration of some interesting upshots from
building natively upon the browser environment. various mathml tests - these pages were imported from layout/mathml/tests/. blog with comments that include mathml. create mathml documents authoring mathml editors converters stylesheets original document information author(s): roger b. sidje other contributors: frédéric wang last updated date: april 4, 2010 copyright information: po...
Automated performance testing and sheriffing
we have several test harnesses that test firefox for various performance characteristics (page load time, startup time, etc.). we also generate some metrics as part of the
build process (like installer size) that are interesting to track over time. currently we aggregate this information in the perfherder web application where performance sheriffs watch for significant regressions, filing bugs as appropriate. ...
...ike installer size) that are interesting to track over time. ...
...ntly we aggregate this information in the perfherder web application where performance sheriffs watch for significant regressions, filing bugs as appropriate. ...
TraceMalloc
tracemalloc has been superseded by dmd and removed from the codebase. this documentation is only relevant to older versions of the codebase that still contain it. tracemalloc captures stack traces of all malloc, calloc , realloc, and free calls (this currently covers all operator new and delete calls in mozilla, too). to enable tracemalloc in your
build, configure with --enable-trace-malloc. the built mozilla application will support the following additional command-line options: --trace-malloc filename the application will log allocation and deallocation events with stack traces in a binary format to the given file. if filename is -, nothing is written to a file, but tracemalloc will be active and will track live allocations and their stack traces. --shutdown-leaks=filename on ...
...l for finding memory leaks. the shutdown log contains the stack trace of every allocation that has not been deallocated by shutdown. some of these are false positives, allocations that are truly needed until shutdown. ideally, these would be freed explicitly, to make it easier to find real leaks using the shutdown log. ...
...or analyzing the shutdown log, taken from the tinderbox leak
builds. this example is for macos; small modifications are needed for other platforms. # run application with shutdown logging # note: tinderbox leak tests use: python leaktest.py -- --trace-malloc malloc.log --shutdown-leaks=sdleak.log # note 2: it appears that the shutdown log is not recorded if --trace-malloc is given the - argument. ...
Leak And Bloat Tests
provide reasonable coverage for the normal activities that a user performs. ...
...provide reasonable coverage for the normal activities that a user performs. ...
...ture improvements will be discussed on the discussion page of the mozilla wiki. results printed on tinderbox output, these consist of: mail rlk reference count leaks mail lk total bytes malloc'ed and not free'd mail mh maximum heap size mail a allocations - number of calls to malloc and friends. there are currently no graphs for these results. manually running tests setting up
build set up
build thunderbird or seamonkey with your standard mozconfig file, but with the following options set: ac_add_options --enable-debug ac_add_options --enable-trace-malloc running the tests in your <objdir> run the following command: make mailbloat this will run the tests and produce some result files. see debugging memory leaks for more information on what to do with this data. todo: add ...
NSS FAQ
form development of security-enabled client applications. the psm binary provides a client module that performs cryptographic operations on behalf of applications. netscape personal security manager ships with netscape 6 and the gateway connected touch pad with instant aol, and is also available for use with communicator 4.7x. where can i get the source? for instructions on how to check out and
build the nss source code, see
build instructions for nss. how much does it cost? nss source code and binaries (when they become available) are completely free. no license fees, no royalty fees, no subscription fees. developer questions what hardware accelerators are supported? nss supports the pkcs #11 interface for hardware acceleration. since leading accelerator vendors such as chrysalis-it, nc...
...sion, server authentication, and client authentication) to help jump start the integration process. however, there is little or no documentation currently available for the rest of the nss api. if your application requires sophisticated certificate management, smart card support, or hardware acceleration, your integration effort will be more extensive. where can i download the nss tools? binary
builds of nss for several platforms including the command-line tools can be downloaded from http://ftp.mozilla.org/pub/mozilla.o...y/nss/releases/. nspr, which you will need as well, can be downloaded from http://ftp.mozilla.org/pub/mozilla.org/nspr/releases/. how can i learn more about tls? see https://developer.mozilla.org/docs/glossary/tls. licensing questions how is nss licensed? nss is availa...
...eleases/. nspr, which you will need as well, can be downloaded from http://ftp.mozilla.org/pub/mozilla.org/nspr/releases/. how can i learn more about tls? see https://developer.mozilla.org/docs/glossary/tls. licensing questions how is nss licensed? nss is available under the mozilla public license, version 2. is nss available outside the united states? this section is out of date yes; see
build instructions for nss 3.1. and ftp://ftp.mozilla.org/pub/mozilla.org/security/. however, nss source code is subject to the u.s. export administration regulations and other u.s. law, and may not be exported or re-exported to certain countries (cuba, iran, iraq, libya, north korea, serbia, sudan, syria, and taleban-controlled areas of afghanistan as of january 2000) or to persons or entities prohibi...
Getting Started With NSS
ing forward to your contributions! we have a large list of tasks waiting for attention, and we are happy to assist you in identifying areas that match your interest or skills. you can find us on mozilla irc in channel #nss or you could ask your questions on the mozilla.dev.tech.crypto newsgroup. the nss library and its supporting command line tools are written in the c programming language. its
build system and the automated tests are based on makefiles and bash scripts. over time, many documents have been produced that describe various aspects of nss. you can start with: the current primary nss documentation page from which we link to other documentation. a general overview of the applications that use nss and the features it provides. a high level introduction to the internals of nss.
...ed on makefiles and bash scripts. over time, many documents have been produced that describe various aspects of nss. you can start with: the current primary nss documentation page from which we link to other documentation. a general overview of the applications that use nss and the features it provides. a high level introduction to the internals of nss. learn about getting the nss sources,
building, and testing. old documentation that is on the archived mozilla.org website. (unfortunately the nss project doesn't have a technical writer at this time, so our documentation is not as organized as we would like it to be. you could contribute by organizing it in a better way.) nss sample code a good place to start learning how to write nss applications are the command line tools that are ...
...to contribute ... (this section is still under construction, but there are many contribution opportunities) start by opening a bugzilla account at bugzilla.mozilla.org if you don't have one. nss :: libraries component for issues you'd like to work on. we maintain a list of nss bugs marked with a keyword "good-first-bug" that you can view. creating your patch seee our section on nss sources,
building, and testing to get started making your patch. when you're satisfied with it, you'll need code review. code review http://phabricator.services.mozilla.com/ is our code review tool, which uses your bugzilla account. use our phabricator user instructions to upload patches for review. some items that will be evaluated during code review are listed in checklist form on github. after passing re...
NSS_3.12.1_release_notes.html
ty feedback introduction network security services (nss) 3.12.1 is a patch release for nss 3.12. the bug fixes in nss 3.12.1 are described in the "bugs fixed" section below. nss 3.12.1 is tri-licensed under the mpl 1.1/gpl 2.0/lgpl 2.1. distribution information the cvs tag for the nss 3.12.1 release is nss_3_12_1_rtm. nss 3.12.1 requires nspr 4.7.1. see the documentation section for the
build instructions. nss 3.12.1 source and binary distributions are also available on ftp.mozilla.org for secure https download: source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/nss_3_12_1_rtm/src/. binary distributions: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/nss_3_12_1_rtm/. both debug and optimized
builds are provided. go to the subdirectory...
...: crash [[@ cert_decodecertpackage] sometimes with this testcase bug 415167: memory leak in certutil bug 417399: arena allocation results are not checked in pkix_pl_infoaccess_parselocation bug 420644: improve ssl tracing of key derivation bug 426886: use const char* in pk11_importcertforkey bug 428103: cert_encodesubjectkeyid is not defined in any public header file bug 429716: debug
builds of libpkix unconditionally dump socket traffic to stdout bug 430368: vfychain -t option is undocumented bug 430369: vfychain -o succeeds even if -pp is not specified bug 430399: vfychain -pp crashes bug 430405: error log is not produced by cert_pkixverifycert bug 430743: update ssltap to understand the tls session ticket extension bug 430859: pkix: policy mapping fails verification w...
...ns incorrect error code on request with invalid signing cert bug 449146: remove dead libsec function declarations bug 453227: installation of pem-encoded certificate without trailing newline fails documentation for a list of the primary nss documentation pages on mozilla.org, see nss documentation. new and revised documents available since the release of nss 3.11 include the following:
build instructions for nss 3.11.4 and above nss shared db compatibility nss 3.12.1 shared libraries are backward compatible with all older nss 3.x shared libraries. a program linked with older nss 3.x shared libraries will work with nss 3.12.1 shared libraries without recompiling or relinking. furthermore, applications that restrict their use of nss apis to the functions listed in nss public func...
NSS_3.12.2_release_notes.html
ty feedback introduction network security services (nss) 3.12.2 is a patch release for nss 3.12. the bug fixes in nss 3.12.2 are described in the "bugs fixed" section below. nss 3.12.2 is tri-licensed under the mpl 1.1/gpl 2.0/lgpl 2.1. distribution information the cvs tag for the nss 3.12.2 release is nss_3_12_2_rtm. nss 3.12.2 requires nspr 4.7.1. see the documentation section for the
build instructions. nss 3.12.2 source and binary distributions are also available on ftp.mozilla.org for secure https download: source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/nss_3_12_2_rtm/src/. binary distributions: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/nss_3_12_2_rtm/. both debug and optimized
builds are provided. go to the subdirectory...
...(shell whoami). bug 455424: nssilckt.h defines the enumeration constant 'lock' bug 456036: stubs for deprecated functions in lib/certdb/stanpcertdb.c should set the pr_not_implemented_error error. bug 456854: cert_decodecertpackage does not set nspr error code upon error bug 457980: hundreds of kilobytes of useless strings in libpkix bug 457984: enable pkcs11 module logging in optimized
builds bug 458905: memory leaks in pkix bridge certificates. bug 459231: memory leak in cert fetching - aia extension. bug 459248: support intel aes extensions. bug 459359: forward
builderstate object is leaked when aia path incorrect bug 459481: nss
build problem with gcc 3.4.6 on os/2 documentation for a list of the primary nss documentation pages on mozilla.org, see nss documentation. ne...
...a program linked with older nss 3.x shared libraries will work with nss 3.12.2 shared libraries without recompiling or relinking. ...
NSS 3.12.5 release_notes
the bug fixes in nss 3.12.5 are described in the "bugs fixed" section below. nss 3.12.5 is tri-licensed under the mpl 1.1/gpl 2.0/lgpl 2.1. distribution information the cvs tag for the nss 3.12.5 release is nss_3_12_5_rtm. nss 3.12.5 requires nspr 4.8. you can check out the source from cvs by cvs co -r nspr_4_8_rtm nspr cvs co -r nss_3_12_5_rtm nss see the documentation section for the
build instructions. nss 3.12.5 source is also available on ftp.mozilla.org for secure https download: source tarball: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/nss_3_12_5_rtm/src/. new in nss 3.12.5 ssl3 & tls renegotiation vulnerability see cve-2009-3555 and us-cert vu#120541 for more information about this security vulnerability. all ssl/tls renegotiation is disabled...
...est, pr_false) or port_free(dest->data) call. environment variables nss_fips will start nss in fips mode. nss_ssl_enable_renegotiation nss_ssl_require_safe_negotiation see ssl3 & tls renegotiation vulnerability. bugs fixed the following bugs have been fixed in nss 3.12.5. ...
...c.h bug 522580: nss uses port_memcmp for comparing secret data. bug 525056: timing attack against ssl3ext.c:ssl3_serverhandlesessionticketxtn() bug 526689: ssl3 & tls renegotiation vulnerability documentation for a list of the primary nss documentation pages on mozilla.org, see nss documentation. new and revised documents available since the release of nss 3.11 include the following:
build instructions nss shared db compatibility nss 3.12.5 shared libraries are backward compatible with all older nss 3.x shared libraries. a program linked with older nss 3.x shared libraries will work with nss 3.12.5 shared libraries without recompiling or relinking. furthermore, applications that restrict their use of nss apis to the functions listed in nss public functions will remain comp...
NSS 3.28 release notes
(bug 1252745). key exporters for tls 1.3 are supported (bug 1310610). this includes the early key exporter, which can be used if 0-rtt is enabled. note that there is a difference between tls 1.3 and key exporters in older versions of tls. tls 1.3 does not distinguish between an empty context and no context. the tls 1.3 (draft) protocol can be enabled, by defining nss_enable_tls_1_3=1 when
building nss. nss includes support for the x25519 key exchange algorithm (bug 957105), which is supported and enabled by default in all versions of tls. new functions in ssl.h ssl_exportearlykeyingmaterial implements a key exporter based on the tls 1.3 early exporter secret. this api is equivalent in function to ssl_exportkeyingmaterial, but it can only succeed if 0-rtt w...
...hose schemes. ssl_signatureschemeprefget allows an application to learn the currently supported and enabled signature schemes for a socket. request to test and prepare for tls 1.3 this release contains improved support for tls 1.3, however, the code that supports tls 1.3 is still disabled by default (not built). for the future nss 3.29 release, it is planned that standard
builds of nss will support the tls 1.3 protocol (although the maximum tls protocol version enabled by default will remain at tls 1.2). we know that some applications which use nss, query nss for the supported range of ssl/tls protocols, and will enable the maximum enabled protocol version. in nss 3.29, those applications will therefore enable support for the tls 1.3 protocol. in order to prepare for ...
...by default will remain at tls 1.2). we know that some applications which use nss, query nss for the supported range of ssl/tls protocols, and will enable the maximum enabled protocol version. in nss 3.29, those applications will therefore enable support for the tls 1.3 protocol. in order to prepare for this future change, we'd like to encourage all users of nss to override the standard nss 3.28
build configuration, by defining nss_enable_tls_1_3=1 at
build time. this will enable support for tls 1.3. please give feedback to the nss developers for any compatibility issues that you encounter in your tests. notable changes in nss 3.28 nss can no longer be compiled with support for additional elliptic curves (the nss_ecc_more_than_suite_b option, bug 1253912). this was previously possible by...
NSS 3.37 release notes
g callbacks to select a protocol. nss supports opening sql databases in read-only mode. nss now requires the sqlite apis of version 3.5.0 or newer. starting with nss version 3.31, an alternative implementation for rng seeding on the linux/unix platform was available (bug 1346735), which performed seeding exclusively based on /dev/urandom. ...
... the ca certificates list was updated to version 2.24. ...
... the ca certificates list was updated to version 2.24. ...
NSS 3.56 release notes
hg tag is nss_3_56_rtm. nss 3.56 requires nspr 4.28 or newer. nss 3.56 source distributions are available on ftp.mozilla.org for secure https download: source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/nss_3_56_rtm/src/ other releases are available in nss releases. notable changes in nss 3.56 nspr dependency updated to 4.28. ...
... bug 1625791 - fix deadlock issue in nssslot_istokenpresent. ...
... fixed in bug 1653975. bugs fixed in nss 3.56 bug 1650702 - support sha-1 hw acceleration on armv8 bug 1656981 - use mpi comba and mulq optimizations on x86-64 macos. bug 1654142 - add cpu feature detection for intel sha extension. bug 1648822 - add stricter validation of dh keys in fips mode. bug 1656986 - properly detect arm64 during gyp
build architecture detection. bug 1652729 - add
build flag to disable rc2 and relocate to lib/freebl/deprecated. bug 1656429 - correct rtt estimate used in 0-rtt anti-replay. bug 1588941 - send empty certificate message when scheme selection fails. bug 1652032 - fix failure to
build in windows arm64 makefile cross-compilation. bug 1625791 - fix deadlock issue in nssslot_istokenpresent. bug 1653975 - fix 3.53 regression by setting "all" as the d...
nss tech note6
if your application modifies nss binaries for any reason after they were built, then : the fips 140 mode of operation will no longer work, because the chk files will no longer match the softoken and freebl shared libraries . the softoken and freebl binaries won't match any nss binaries that may have been submitted to nist for validation, and thus may not be verified as being the actual ...
...reebl binaries won't match any nss binaries that may have been submitted to nist for validation, and thus may not be verified as being the actual fips 140 validated cryptographic module . the only way to meet this requirement is for your application never to modify the nss binaries. any offer of binary support that may have been previously made to you by nss developers is null and void. if your
build process modifies nss libraries in any way (for example, to strip the symbols), it should consider not doing so for the reasons cited above. if you still decide to make unsupported changes, you can allow the softoken to come up in fips 140 mode of operation by regenerating the .chk files yourself. the tool to do that is called shlibsign. it is released as part of the nss binary distributions. i...
...s modifies nss libraries in any way (for example, to strip the symbols), it should consider not doing so for the reasons cited above. if you still decide to make unsupported changes, you can allow the softoken to come up in fips 140 mode of operation by regenerating the .chk files yourself. the tool to do that is called shlibsign. it is released as part of the nss binary distributions. if your
build process does not modify nss shared libraries, you can just use the .chk files in the nss binary distributions. so you have two options. 1. do not modify nss libraries in your
build process. specifically, do not modify libsoftokn3.so, libsoftokn3.sl, softokn3.dll, libfreebl_pure32_3.so, libfreebl_pure32_3.sl, libfreebl_hybrid_3.so, libfreebl_hybrid_3.sl, libfreebl3.so, libfreebl3.sl, freeb...
Small Footprint
with various changes js.jar size can be reduced to 204,689 bytes corresponding to 424,774 bytes of uncompressed classes. tools most embeddings won't need any of the classes in org.mozilla.javascript.tools or any of its sub-packages. ...
...ular expressions the package org.mozilla.javascript.regexp can be removed. rhino will continue to run, although it will not be able to execute any regular expression matches. this change saves 47,984 bytes of class files. debug information debug information in rhino classes consumes about 25% of code size and if you can live without that, you can recompile rhino to remove it. ...
...bug information debug information in rhino classes consumes about 25% of code size and if you can live without that, you can recompile rhino to remove it. smalljs.jar ant
build script in rhino supports smalljar target that will generate smalljs.jar that does not include tools, optimizer, javaadapter and class generation library, regular expressions, e4x implementataion and deprecated files. to
build such minimalist jar without debug information, run the following command from the top directory of rhino distribution: ant clean ant -ddebug=off -dno-regexp=true -dno-e4x=true smalljar if you omit -dno-regexp=true, then the resulting smalljs.jar will include regular expression support. similarly omitting -dno-e4x=true results in smalljs.jar that includes runtime support for e4x. ...
Getting SpiderMonkey source code
getting the latest spidermonkey source code from mercurial the mercurial repository at https://hg.mozilla.org/mozilla-central/ hosts the latest spidermonkey sources. mercurial is also known as hg. the following command line downloads the entire mozilla repository, including the full change history and a lot of gecko and firefox source code that isn't part of spidermonkey. it also c...
...c if you want a faster (about 5 times as of january 2015) download, try doing a shallow clone (no version control history). git clone --depth 1 https://github.com/mozilla/gecko-dev.git if you have any problems check the https://wiki.mozilla.org/github page. getting older spidermonkey sources from cvs note: you will need to explicitly fetch the javascript shell sources even if you currently
build another mozilla project, as there are files specific to the shell that are not normally found in a mozilla source tree. just like when you're fetching any other mozilla project from cvs, you need to log into the cvs server first. to do this, cd into the base directory you'd like to check out the code into, then enter the following command at your command line: cvs -d :pserver:anonymous@cvs-mirr...
...vs -d :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot login when prompted, enter the password anonymous. once you've logged in, cd into the root of your cvs tree and enter the following command: cvs -d :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot co -l mozilla/js/src mozilla/js/src/config mozilla/js/src/editline mozilla/js/src/fdlibm this checks out all the files needed in order to
build the javascript shell. if you also want the regression tests, add this command: cvs -d :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot co mozilla/js/tests getting older branch versions of spidermonkey if you want to experiment with a specific branch's version of spidermonkey, you need to check out js/src from branch but check out editline and config from trunk: cvs -d :pserver:anonymous@c...
JSAPI User Guide
as array.push. it also makes it easy for each application to expose some of its own objects and functions to javascript code. browsers expose dom objects. your application will expose objects that are relevant for the kind of scripts you want to write. it is up to the application developer to decide what objects and methods are exposed to scripts. hello world using the spidermonkey library to
build spidermonkey from source, see spidermonkey
build documentation. some systems (such as debian) provide spidermonkey as a prebuilt package.
build it from source instead. your program will be easier to debug. c++ code accesses spidermonkey via the jsapi, by including the header "jsapi.h". an overview of jsapi functionality follows. for more details, see the jsapi reference. the spidermonkey unive...
...slots instead. or store the values in private data and implement jsclass.mark. 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. to keep a value alive permanently, store it in a gc root. still, gc bugs do occur. these two functions, both available only in debug
builds, are especially useful for debugging gc-related crashes: use js_setgczeal to enable extra garbage collection. gc zeal usually causes a gc-related crash to occur much sooner (closer to its cause) and more reliably. it's for development and debugging only, because the extra garbage collection makes js very slow. use js_dumpheap to dump the spidermonkey heap or specific interesting parts of ...
...vascript function is about to be called, or has finished executing: void functransition(const jsfunction *func, const jsscript *scr, const jscontext *const_cx, jsbool entering) { jscontext *cx = const_cast<jscontext*>(const_cx); jsstring *name = js_getfunctionid((jsfunction*)func); const char *entexit; const char *namestr; /*
build a c string for the function's name */ if (!name) { namestr = "unnamed function"; } else { namestr = js_encodestring(cx, name); } /*
build a string for whether we're entering or exiting */ if (entering) { entexit = "entering"; } else { entexit = "exiting"; } /* output information about the trace */ printf("%s javascript function: %s at time: %ld", entexit, na...
JS_InitClass
ent_proto, const jsclass *clasp, jsnative constructor, unsigned nargs, const jspropertyspec *ps, const jsfunctionspec *fs, const jspropertyspec *static_ps, const jsfunctionspec *static_fs); name type description cx jscontext * pointer to a js context from which to derive runtime information. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. obj js::handleobject pointer to the "globals" object to use for initializing the class. this must not be null. once js_initclass creates the new class's constructor, it stores the constructor as a property in this object. so, for example, if this object is js_getglobalobject(cx), then javascript code will be able to see the new cl...
...uctor parameter, then a constructor is not built, and you cannot specify static properties and functions for the class. note: starting with spidermonkey 1.8, the prototype and constructor are set up with stub getter and setter operations instead of class operations. if you provide a constructor for the class, then you should also pass an object to parent_proto. js_initclass uses parent_proto to
build a prototype object for the class. the prototype object inherits properties and methods from the parent_proto object you provide. once the constructor or prototype is created, js_initclass defines a property on obj. the name of the property is clasp->name. its value is the constructor function if constructor is non-null, and the prototype object otherwise. the property has the stub getter and sett...
... name of the property is clasp->name. its value is the constructor function if constructor is non-null, and the prototype object otherwise. the property has the stub getter and setter and no property attributes. (if your constructor function requires property attributes, such as jsprop_enumerate, use js_setpropertyattributes to modify the attributes of the property created by js_initclass.) after
building the constructor and prototype, js_initclass adds properties and methods. ordinary properties and methods are added to the prototype. static properties and methods are added to the constructor. the properties are defined as though by calling js_defineproperties, and the methods as though by calling js_definefunctions. note: by default js_initclass creates a prototype object but does not invo...
Profiling SpiderMonkey
instructions 1.) get yourself an optimized libxul
build of firefox, with debugger info. for the mac, you'll want to read up on profiling javascript with shark. here's a sample mozconfig: mk_add_options moz_objdir=@topsrcdir@/ff-opt-libxul mk_add_options moz_make_flags=-j3 ac_add_options --enable-optimize ac_add_options --enable-libxul ac_add_options --enable-shark ac_add_options --enable-debugger-info-modules ac_add_options --enable-application=browser 2.) you'll want to run shark on both the browser and [xpcshell], since the host environments differ. ...
...-optimize ac_add_options --enable-libxul ac_add_options --enable-shark ac_add_options --enable-debugger-info-modules ac_add_options --enable-application=browser 2.) you'll want to run shark on both the browser and [xpcshell], since the host environments differ. here are some instrumented tests to work from: media:profiling-ammo.zip 3.) once you have some changes you'd like to try, you can just re
build the js/src directory, since it produces its own shared library, even in libxul and static
builds. make -c my-obj-dir/js/src other ways to profile for linux, there are global jprof functions available. see the documentation on the --enable-jprof mozconfig option. we're working to add support for other profilers, such as oprofile, intel vtune, and callgrind. when we have js scriptable profiling op...
...ms, we'll look at adding global start/stop profiling functions. if you'd like to profile something at a higher level of detail than the js shark functions allow, there are corresponding c functions available at the bottom of jsdbgapi.h. costs of thread safety currently, threadsafe spidermonkey costs us 10-15% on some benchmarks vs. a non-threadsafe js shell. if you're looking to investigate that,
build a standalone copy of spidermonkey and compare it with xpcshell. ...
SpiderMonkey: The Mozilla JavaScript runtime
using spidermonkey introduction to the javascript shell documentation of the command-line javascript shell, js. ...
... using spidermonkey introduction to the javascript shell documentation of the command-line javascript shell, js. ...
... using spidermonkey introduction to the javascript shell documentation of the command-line javascript shell, js. ...
XML Extras
the xml extras module contains several features that allow developers to treat xml as data i.e. not as just another document format. the module is structured as a drop-in component and exposes its xml-as-data features both to javascript and c++/xpcom users. the xml extras module is built by default on all platforms, and is included in the browser installers so it is available in the nightly
builds. feature status feature status xmlserializer available xmlhttprequest available domparser (string and stream input source) available web services with soap and wsdl no longer available from gecko 1.9/firefox 3. xml persistence fixptr and xpointer available since 1.4alpha in the core mozilla. moved to xml extr...
...mlhttprequest documentation, with some caveats: all functions and property names begin with a lower case letter and the object creation is different. some properties are not implemented. thad hoffman has written a document that shows how you can mimic xml data islands in mozilla. edmond woychowsky has also written articles on xml data islands in mozilla: "make xml data islands work in mozilla", "
build cross-browser xml paging code" and "implement a flexible shopping cart with xml and asp". the mozilla developer center has several pages for xmlhttprequest. below are some key differencies in "xml extras" between mozilla and microsoft software: difference microsoft mozilla member names case insensitive? begins with lower case letter xmlhttprequest creation...
...n "xml extras" between mozilla and microsoft software: difference microsoft mozilla member names case insensitive? begins with lower case letter xmlhttprequest creation new activexobject("msxml2.xmlhttp") new xmlhttprequest() xmlhttprequest.send("some string") ok ok starting with milestone 0.9.7 (actually nightly 2001-11-28). with older
builds, passing strings to send() works only in chrome, see post.html sample. the "workaround" is to use domparser object's parsefromstring() method to create a document from string, and pass the temporary document into send(). xmlhttprequest.open("ahost") ok file:// documents can access http:// documents but you need to enable universalbrowserread privilege in your scripts - see the jav...
XPCOM glue
mglue_s.lib xpcom.lib nspr4.lib for recent versions of the firefox sdk (at least version 42, but possibly earlier versions as well): -libpath:c/path/to/sdk/lib xpcomglue_s.lib xul.lib nss3.lib mozcrt.lib -libpath:c:/path/to/sdk/lib xpcomglue.lib mac -l/path/to/sdk/lib -l/path/to/sdk/bin -wl,-executable-path,/path/to/sdk/bin -lxpcomglue_s -lxpcom -lnspr4 when
building against a xulrunner derived sdk, use: -l/path/to/sdk/lib -l/path/to/xulrunner-bin -wl,-executable_path,/path/to/xulrunner-bin -lxpcomglue_s -lxpcom -lnspr4 where 'xulrunner-bin' is either /library/frameworks/xul.framework/versions/current/ or /path/to/xulrunner-
build/[platform]/dist/bin -l/path/to/sdk/lib -lxpcomglue linux -l/path/to/sdk/lib -l/path/to/sdk/bin...
...1.7 or earlier, you must define mozilla_strict_api when using any form of the glue. linux and mac: make sure the gecko libraries are listed after your object (.o) files on the link line. linux and mac: write the linker options exactly as stated (just replacing the /path/to/sdk/), otherwise you get an undefined symbol: ...ns_tabledrivenqi...qitableentry... at runtime (not compile time) (in debug
builds) or your module just won't load (in optimized
builds). in principle, #include "mozilla-config.h" should also work, if it's the first #include in .cpp, but preprocessor option is how it's usually included. for xulrunner 2.0, you also need to link against mozalloc. this is not a backwards-compatible change with 1.9.x and earlier. on linux and mac, add "-lmozalloc" exactly after "-lnspr4" in y...
...t xpcom using recent versions of the firefox sdk (at least version 42, but possibly earlier versions as well), you need to link against xul (libxul/xul.lib). to link against nspr using recent versions of the firefox sdk (at least version 42, but possibly earlier versions as well), you need to link against nss, libnss3/nss3.lib in particular. this is because nspr is now merged into nss during the
build process. to link against libxpcomglue_s/xpcomglue_s.lib using recent versions of the firefox sdk (at least version 42, but possibly earlier versions as well), you also need to link against libmozcrt/mozcrt.lib. see also using the gecko sdk migrating from internal linkage to frozen linkage ...
Creating XPCOM components
g 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 uniform resource locators checking the white list creating nsiuri objects
building the weblock ui user interface package list client code overview xul the xul document the locking ui site adding ui weblock.xul overlaying new user interface in...
...this material may be distributed only subject to the terms...
...this material may be distributed only subject to the terms and conditions set forth in the open publication license, v1.02 or later. distribution of substantively modified versi...
Development
bugs all javaxpcom bugs are tracked in bugzilla, using the "core" product and "java to xpcom bridge" component. ...
... bugs all javaxpcom bugs are tracked in bugzilla, using the "core" product and "java to xpcom bridge" component. ...
... bugs all javaxpcom bugs are tracked in bugzilla, using the "core" product and "java to xpcom bridge" component. ...
getFile
c constant string value notes ns_win_windows_dir "wind" ns_win_program_files_dir "progf" ns_win_home_dir ns_os_home_dir ns_win_desktop_dir "deskv" virtual folder at the root of the namespace ns_win_programs_dir "progs" user start menu programs directory! ns_win_controls_dir "...
...deprecated these locations have been deprecated and should no longer be used. c constant string value notes ...
...rinthood "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. deprecated these locations have been deprecated and should no longer be used. c constant string value notes ns_os_drive_dir "drvd" ...
nsIWinTaskbar
erlayiconcontroller(). this method is currently known to crash if used under certain conditions. see bug 744992 for details and to track progress on a fix. implemented by: @mozilla.org/windows-taskbar;1. ...
... this method is currently known to crash if used under certain conditions. see bug 744992 for details and to track progress on a fix. implemented by: @mozilla.org/windows-taskbar;1. ...
...groupid attribute is configured using application.ini settings, and is of the format "vendor.application.version". for example, if the vendor is configured to "foobar systems", the application's name is "squashweb", and the application's version is 1.0, the defaultgroupid attribute would be "foobar systems.squashweb.1.0". see xul application packaging for additional details. methods createjumplist
builder() retrieve a taskbar jump list
builder. fails if a jump list
build operation has already been initiated, developers should make use of a single instance of nsijumplist
builder for
building lists within an application. nsijumplist
builder createjumplist
builder(); parameters none. return value an nsijumplist
builder. createtaskbartabpreview() creates a taskbar tab preview, given an nsidocshell refe...
Troubleshooting XPCOM components registration
components, try adding calls to components.utils.reporterror("debug me!"); in nsgetmodule() and other functions to try and find any errors. general hints you may need to delete compreg.dat in your profile folder to force re-registration. this should not occur if you uninstalled/installed your extension via the extension manager. when adding a component to a xulrunner application, change the
buildid in application.ini. if your component requires any external libraries, you may need to read using dependent libraries in extension components make sure you are compiling against the right version. if you are testing with a release from mozilla.org, use the gecko sdk (and not your own compile of trunk firefox, etc.). if you are compiling your own firefox (or xulrunner, etc.), use the ...
...ponent requires any external libraries, you may need to read using dependent libraries in extension components make sure you are compiling against the right version. if you are testing with a release from mozilla.org, use the gecko sdk (and not your own compile of trunk firefox, etc.). if you are compiling your own firefox (or xulrunner, etc.), use the artifacts from that compilation to
build your component. if you are testing a
build from your linux distribution (or other vendor-supplied
build), look for -dev packages from them. remember to check that the directory the component is in is named correctly i.e. $profile/extensions/$plugindirectory/components! double check your guids in your install.rdf with your sourcecode, and then check them again. windows-specific hin...
...please refer to msdn for details. if you have the option, you can manually copy these dependencies to firefox.exe's directory, to windows\system32, or to any directory is the system's path. a google groups thread on the matter is located here. the dllmain code that msvc 8 (and probably earlier versions too) generates for you doesn't need to be there, you can remove it. you may be able
build your component using use_static_libs=1 in order to remove c runtime library dependencies. linux-specific hints check if you have missing dependent libraries: from your firefox (/xulrunner) install directory, run "./run-mozilla.sh `which ldd` -r path/to/your/component.so". there should be no "not found" entries and no undefined symbols. (the -r switch from gnu ldd lists function re...
Reference Manual
the basics design an nscomptr is designed to be a complete replacement for raw xpcom interface pointers where they are used as owning references. almost any place you could use a raw xpcom interface pointer, you should be able to use an nscomptr. ...
... does exactly the work you would have done, if you always remembered to do the right thing. safety features type safeguards it is an invariant of nscomptr that it holds the xpcom-correct interface pointer for it's underlying type. for example, an nscomptr<nsifoo> will always hold the pointer that would be returned by queryinterface, when querying an xpcom object for its nsifoo interface. in debug
builds, if you subvert this invariant with one of the assignment forms that doesn't call queryinterface, nscomptr will assert at runtime in the bad assignment. // given two un-related interfaces |nsifoo| and |nsibar|... nsibar* bar = ...; // ... nscomptr<nsifoo> foo = bar; // ns_assertion: "queryinterface needed" // ...even assuming you can get the line to compile // (...
...this, we are trying to make the first form, above, illegal by making operator& private. see bug 59414. implementation details and debugging machinery although it is a class, nscomptr has no virtual methods, and therefore, no vtable or vptr. because a few key routines are factored out into a common non-template base class, the actual underlying pointer is stored as an nsisupports* (except in debug
builds where nscap_feature_debug_ptr_types is turned on). it is because of these factored routines that nscomptr users must link with the xpcom library. when nscap_feature_debug_ptr_types is turned on, instead of holding its underlying pointer in a variable of type nsisupports*, the nscomptr holds it in a pointer matching the underlying type. this allows source level debuggers to more easily "follow" t...
XPCOM tasks
overlaps them significantly, but goes beyond them in capabilities. xpcom sits above the standard libraries. its role is to extend them with facilities tailored to xpcom development in general, and specifically the needs of mozilla. like the standard libraries, xpcom must be a fairly self-contained library, so as not to encumber clients with any unnecessary external dependencies. changes to the
build hierarchy there are things in xpcom that don't belong there. there is likely to be code outside of xpcom that should be in it. there is code above xpcom that should be below it. p3 i/o functionality (except for the filespec facility) probably doesn't belong in xpcom; perhaps it should be moved to netwerk p3 the `twips' units routines (or perhaps all routines) in "nsunitconversion.h" probably ...
...d algorithms to our containers. this is probably best done with a c wrapper around an xpcom enumerator. p2 do we still require our own version of quicksort? and if so, can we narrow it to only those platforms that need it? p3 we need to check for aggregation in createinstance(). see bug 16763 p3 improve the performance of the registry. explore the idea of using a separate registry. 5.1 if the
build hierarchy were fixed, the registry could exploit expat and dbm. it could avoid implementing its own file format and io; and in many cases, possibly avoid calling into components for registration. in any case, the process of registration can, i think, be simplified. 5.1 should we provide type-safe templatized containers, e.g., over nsisupportsarray? 5.1 we want to provide some mechanism for user...
...e shutdown issues that complicate life for embedding applications. things we need to evangelize we need to keep up-to-date documentation, samples, and have brown-bags to keep people informed. we've been doing this, but it should be in the plan. general xpcom guidelines. see, e.g., xpcom code faq, idl author's guide, and implementing queryinterface. writing and using components and modules.
building ownership models that work (see xpcom ownership guidelines), using raw pointers, nscomptr (see the nscomptr user's manual), nsiweakreference (see nsiweakreference), nscweakreference, and (across threads) proxies (see nsisupports proxies). original document information author(s): unknown last updated date: may 8, 2003 copyright information: portions of this content are © 1998–2007 by ...
The Valgrind Test Job
add the following lines to your mozconfig file. ac_add_options --enable-valgrind ac_add_options --disable-jemalloc running to run the valgrind test job locally, run the following command. mach valgrind-test see also the general instructions for using valgrind with mozilla code. ...
... add the following lines to your mozconfig file. ac_add_options --enable-valgrind ac_add_options --disable-jemalloc running to run the valgrind test job locally, run the following command. mach valgrind-test see also the general instructions for using valgrind with mozilla code. ...
... add the following lines to your mozconfig file. ac_add_options --enable-valgrind ac_add_options --disable-jemalloc running to run the valgrind test job locally, run the following command. mach valgrind-test see also the general instructions for using valgrind with mozilla code. ...
Testing Mozilla code
testing your code is important! before you can even get your code committed into the source tree, you have to test it, and larger patches have to have automated tests. these articles will help you master (and continue to excel at) testing mozilla code. ...
... mozilla code. asan nightly projectthe asan nightly project involves
building a firefox nightly browser with the popular addresssanitizer tool and enhancing it with remote crash reporting capabilities for any errors detected.clang static analysisthis document is split in two parts. the first part will focus on the modern and robust way of static-analysis and the second part will present the
build-time static-analysis.debugging mozilla with valgrindthis page describes how to use valgrind (specifically, its memcheck tool) to find memory errors.firefox and address sanitizeraddress sanitizer (asan) is a fast memory error detector that detects use-after-free and out-of-bound bugs in c/c++ programs. it uses a compile-time instrumentation to check all reads and writes during the execution. in ad...
... how often certain lines are hit, branches taken or conditions met in a program, given some test that you run on it. there are different types of coverage metrics (see also the wikipedia entry), but when we speak of code coverage here, we usually mean line and branch coverage. this type of coverage is only concerned with hit counts for lines and branches.the valgrind test jobthe valgrind test job
builds the browser and runs it under valgrind, which can detect various common memory-related errors. this job only runs on linux64, which is the platform best suited to running valgrind. ...
customDBHeaders Preference
really new, so please try to be understanding if some of these things change tomorrow (or have changed already). while i was going through the creating a custom column guide, i built and used thunderbird-2.0b1 checked-out from cvs with the thunderbird_2_0b1_release tag. there is a high probability that your experience will be different should you use an earlier release. getting started to
build upon the reply-to column tutorial, i'll describe the process i went through in developing a custom column to display a 'superfluous' column within thunderbird's main view. the data will come from a custom header labeled x-superfluous. setting the preferences although there are various ways to set preferences, i tend to just navigate to the directory where my profile is stored and edit the user.
... will have the corresponding string property set on the msghdr. if the .msf file is rebuilt, all the msghdrs should have the string property set correctly. the attaching of the column handler through the observerservice object is some pretty new stuff, so i was using the addeventlistener("select"...) stuff as a backup. depending on the release you use one, both, or none of the methods may work. ...
... tbird as target --> <em:id>{3550f703-e582-4d05-9a08-453d09bdfdc6}</em:id> <em:minversion>2*</em:minversion> <em:maxversion>3.0.0.*</em:maxversion> </description> </em:targetapplication> <em:name>superfluous</em:name> <em:description>test superfluous extension</em:description> <em:creator>garrett comeaux</em:creator> </description> </rdf>
build process: [gcomeaux@kyle tbird-ext]$ cd superfluous/ [gcomeaux@kyle superfluous]$ make zip superfluous.xpi chrome/ chrome.manifest chrome/content/ chrome/content/superfluous.js chrome/content/superfluous_overlay.xul install.rdf adding: chrome/ (stored 0%) adding: chrome.manifest (deflated 44%) adding: chrome/content/ (stored 0%) adding: chrome/content/superfluous.js (deflated 57%) add...
Using the Mozilla symbol server
the mozilla project runs a symbol server for trunk firefox nightly and release
builds on windows. symbols are available for at least 30 previous days worth of nightly
builds, and firefox releases from 2.0.0.4. this allows debugging of those
builds without forcing all users to download large debugging files. the server functions like microsoft's symbol server so the documentation there can be useful. note that because mozilla release
builds are heavily optimized, debugging is not always easy. the debugger will not be able to show you the content of all variables and the execution path can seem strange because of inlining, tail calls, and other compiler optimizations. the only workaround is to
build an unoptimized local
build. the official symbol server url for firefox is https://symbol...
...n script to download symbols from the mozilla symbol server for gdb, shark and other software that uses symbols. note that the symbol file for the xul library is very large and takes some time to download. this may make it appear as if the script has gotten stuck, but it will continue. ...
...en stuck, but it will continue. symbol indices are named like so: symbols.mozilla.org/{lowercased:name}/{lowercased:name}-{version}-{platform}-{
buildid}-symbols.txt. the platform is either 'darwin' (for mac) or 'linux'. the rest of values are based on the contents of the application.ini file under the [app] heading: for example, the thunderbird 3.1b2 release with name=thunderbird, version=3.1b2,
buildid=20100430125415 would have a filename of "thunderbird-3.1b2-linux-20100430125415-symbols.txt" under the thunderbird directory at symbols.mozilla.org. its contents are a list of paths to files, all relative to the directory the blah-symbols.txt file is found in. the source server in addition to symbols, mozilla also has a source server, letting you do source-level debugging and inspection on d...
Add to iPhoto
qual': ctypes.voidptr_t} ]); having done this, we can then import the kcftypearraycallbacks structure. this is done using the js-ctypes library object's declare() method, just like importing a function: this.kcftypearraycallbacks = this.lib.declare("kcftypearraycallbacks", this.cfarraycallbacks); note: for the record, this is the part that requires a nightly
build of firefox 3.7a5pre dated april 16, 2010 or later; this capability was introduced in that
build. cfmutablearray one thing about core foundation types that is interesting is the use of regular and mutable versions of the same data types. for example, the cfarray type describes an array, but cfarray objects can't be changed once they've been created. however, obviously there are cases in which y...
...efromfilesystemrepresentation(). conveniently, we can simply pass in the javascript string, filepath, as the string and filepath.length as its length. the array is then built by using cfarrayappendvalue() to add the new cfurl to the array. doing this causes the array to retain the url object, so we can use cfrelease() to release it now. calling launch services to launch iphoto next, we need to
build the parameters for the lsopenurlswithrole() function, then call it to start up iphoto. the first step here is to create a new fsref object to contain the reference to the iphoto application itself, since lsopenurlswithrole() uses an fsref to specify the application to launch. then we
build the lsapplicationparameters structure describing the application to launch. let's take a closer look at th...
... cfurl object and the array, then shutting down the three libraries we used. 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. ...
Plug-in Development Overview - Plugins
sdk. create a plug-in project. write your plug-in code and implement the appropriate plug-in api methods for basic plug-in operation. you'll find an overview of the plug-in api methods in this chapter, as well as separate chapters for all of the major functional areas of the plug-in api. also see making plug-ins scriptable for more information about making plug-ins accessible from the browser.
build the plug-in for your operating system. see "
building plug-ins". install the plug-in in the plug-in directory for your operating system. see installing plug-ins. test your plug-in and debug as necessary. create an html page and embed the plug-in object. for information about the html elements to use, see using html to display plug-ins. to see your plug-in in action, simply display the html page...
...lert("plugin not installed correctly"); </script> in the past, liveconnect and later xpconnect were used to make plug-ins scriptable. see the wikipedia article for historical information. both technologies are now obsolete for the purposes of plug-in scriptability, and the cross-browser npruntime api should be used instead. see the scripting plugins section of this reference for the details.
building plug-ins once you have added the special code and additional files to make your plug-in scriptable as described in the previous section, the
build process is quite straightforward. in addition to the dll that goes in the plugins folder, you must also place a type library and an extra header file in the appropriate places in your application directory. this section describes those extra script...
... installing plug-ins plug-ins should not be installed into the firefox directory. ...
Using FormData Objects - Web APIs
le a set of key/value pairs to send using xmlhttprequest. it is primarily intended for use in sending form data, but can be used independently from forms in order to transmit keyed data. the transmitted data is in the same format that the form's submit() method would use to send the data if the form's encoding type were set to multipart/form-data. ...
...post", "http://foo.com/submitform.php"); request.send(formdata); note: the fields "userfile" and "webmasterfile" both contain a file. the number assigned to the field "accountnum" is immediately converted into a string by the formdata.append() method (the field's value can be a blob, file, or a string: if the value is neither a blob nor a file, the value is converted to a string). this example
builds a formdata instance containing values for fields named "username", "accountnum", "userfile" and "webmasterfile", then uses the xmlhttprequest method send() to send the form's data. the field "webmasterfile" is a blob. a blob object represents a file-like object of immutable, raw data. blobs represent data that isn't necessarily in a javascript-native format. the file interface is based on blob, ...
..."webmasterfile", then uses the xmlhttprequest method send() to send the form's data. the field "webmasterfile" is a blob. a blob object represents a file-like object of immutable, raw data. blobs represent data that isn't necessarily in a javascript-native format. the file interface is based on blob, inheriting blob functionality and expanding it to support files on the user's system. in order to
build a blob you can invoke the blob() constructor. retrieving a formdata object from an html form to construct a formdata object that contains the data from an existing <form>, specify that form element when creating the formdata object: note: formdata will only use input fields that use the name attribute. var formdata = new formdata(someformelement); for example: var formelement = document.
compareVersion - Web APIs
extension. compareversion compares the version of a file or package with the version of an existing file or package. method of installtrigger object syntax int compareversion ( string registryname, installversion version); int compareversion ( string registryname, string version); int compareversion ( string registryname, int major, int minor, int release, int
build); parameters the compareversion method has the following parameters: registryname the pathname in the client version registry for the component whose version is to be compared. this parameter can be an absolute pathname, such as /royalairways/royalsw or a relative pathname, such as plugsin/royalairway/royalsw. note that the registry pathname is not the location of the software on the compu...
...an absolute pathname, such as /royalairways/royalsw or a relative pathname, such as plugsin/royalairway/royalsw. note that the registry pathname is not the location of the software on the computer; it is the location of information about the software inside the client version registry. version an installversion object containing version information or a string in the format major.minor.release.
build, where major, minor, release, and
build are integer values representing version information. returns if the versions are the same or if software installation is not enabled, this method returns 0. if the version of registryname is smaller (earlier) than version, this method returns a negative number. otherwise, this method returns a positive number. in particular, this method returns one of th...
...is method returns a positive number. in particular, this method returns one of the following values: -5 component not present or not registered. -4 registryname has a smaller (earlier) major number than version. -3 registryname has a smaller (earlier) minor number than version. -2 registryname has a smaller (earlier) release number than version. -1 registryname has a smaller (earlier)
build number than version. 0 the version numbers are the same; both objects represent the same version. 1 registryname has a larger (newer)
build number than version. 2 registryname has a larger (newer) release number than version. 3 registryname has a larger (newer) minor number than version. 4 registryname has a larger (newer) major number than version. the following constants can be used...
PaymentRequest.canMakePayment() - Web APIs
ser agent supports any of the payment methods supplied when instantiating the request using the paymentrequest constructor. if the payment can't be processed, the promise receives a value of false. note: if you call this too often, the browser may reject the returned promise with a domexception. parameters none examples in the following example, is excerpted from a demo that asynchronously
builds a paymentrequest object for both apple pay and credit cards. it wraps the call to canmakepayment() in feature detection, and calls an appropriate callback depending on the resolution of the promise. async function initpaymentrquest() { const details = { total: { label: "total", amount: { currency: "usd", value: "0.00", }, }, }; const supportsapp...
...to change preferences in firefox, visit about:config.ie no support noopera no support nosafari full support 11.1webview android ...
...to change preferences in firefox, visit about:config.opera android no support nosafari ios full support 11.3samsung internet android full support ...
WebGL: 2D and 3D graphics for the web - Web APIs
he use of plug-ins. webgl does so by introducing an api that closely conforms to opengl es 2.0 that can be used in html5 <canvas> elements. this conformance makes it possible for the api to take advantage of hardware graphics acceleration provided by the user's device. support for webgl is present in firefox 4+, google chrome 9+, opera 12+, safari 5.1+, internet explorer 11+, and microsoft edge
build 10240+; however, the user's device must also have hardware that supports these features. the webgl 2 api introduces support for much of the opengl es 3.0 feature set; it's provided through the webgl2renderingcontext interface. the <canvas> element is also used by the canvas api to do 2d graphics on web pages. reference standard interfaces webglrenderingcontext webgl2renderingcontext web...
...ebgl content. using extensions a guide to using webgl extensions. tutorials webgl tutorial a beginner's guide to webgl core concepts. a good place to start if you don't have previous webgl experience. examples a basic 2d webgl animation example this example demonstrates the simple animation of a one-color shape. topics examined are adapting to aspect ratio differences, a function to
build shader programs from sets of multiple shaders, and the basics of drawing in webgl. webgl by example a series of live samples with short explanations that showcase webgl concepts and capabilities. the examples are sorted according to topic and level of difficulty, covering the webgl rendering context, shader programming, textures, geometry, user interaction, and more. advanced tutorials web...
...aser is a fast, free and fun open source framework for canvas and webgl powered browser games. redgl is an open-source 3d webgl library. vtk.js is a javascript library for scientific visualization in your browser. specifications specification status comment opengl es 3.0 standard opengl es 2.0 standard webgl 2.0 editor's draft
builds on top of webgl 1. based on opengl es 3.0. webgl 1.0 recommendation initial definition. based on opengl es 2.0 ...
Using DTMF with WebRTC - Web APIs
by generating both peers in one code stream, rather than having each be a truly separate entity.</p> <audio id="audio" autoplay controls></audio><br/> <button name="dial" id="dial">dial</button> <div class="log"></div> javascript let's take a look at the javascript code next. keep in mind that the process of establishing the connection is somewhat contrived here; you normally don't
build both ends of the connection in the same document. global variables first, we establish global variables. let dialstring = "12024561111"; let callerpc = null; let receiverpc = null; let dtmfsender = null; let hasaddtrack = false; let mediaconstraints = { audio: true, video: false }; let offeroptions = { offertoreceiveaudio: 1, offertoreceivevideo: 0 }; let dialbutton = null; let lo...
...t clicking it calls the connectanddial() function to begin the connection process. window.addeventlistener("load", function() { logelement = document.queryselector(".log"); dialbutton = document.queryselector("#dial"); dialbutton.addeventlistener("click", connectanddial, false); }); starting the connection process when the dial button is clicked, connectanddial() is called. this starts
building the webrtc connection in preparation for sending the dtmf codes. function connectanddial() { callerpc = new rtcpeerconnection(); hasaddtrack = (callerpc.addtrack !== undefined); callerpc.onicecandidate = handlecallericeevent; callerpc.onnegotiationneeded = handlecallernegotiationneeded; callerpc.oniceconnectionstatechange = handlecallericeconnectionstatechange; callerpc.onsignal...
...nd addstream events are sent when media is added to the connection. finally, we call getusermedia() to obtain access to the caller's microphone. if successful, the function gotstream() is called, otherwise we log the error because calling has failed. adding the audio to the connection as mentioned above, when the audio input from the microphone is obtained, gotstream() is called. its job is to
build the stream being sent to the receiver, so the actual process of starting to transmit can begin. it also gets access to the rtcdtmfsender we'll use to issue dtmf on the connection. function gotstream(stream) { log("got access to the microphone."); let audiotracks = stream.getaudiotracks(); if (hasaddtrack) { if (audiotracks.length > 0) { audiotracks.foreach(track => callerpc.add...
Example and tutorial: Simple synth keyboard - Web APIs
xtent an example for that as well. the video keyboard html there are three primary components to the display for our virtual keyboard. the first is the musical keyboard itself. we draw this in a pair of nested <div> elements so that we can make the keyboard horizontally scrollable if all the keys don't fit on the screen, without having them wrap around. the keyboard first, we create space to
build the keyboard into. we will be programmatically constructing the keyboard, because doing so gives us the flexibility to configure each key as we determine the appropriate data for the corresponding note. in our case, we get each key's frequency from a table, but it could be calculated algorithmically as well. <div class="container"> <div class="keyboard"></div> </div> the <div> named "contain...
... frequency, in hertz, of the note's tone. customwaveform will be set up as a periodicwave describing the waveform to use when the user selects "custom" from the waveform picker. sineterms and cosineterms will be used to store the data for generating the waveform; each will contain an array that's generated when the user chooses "custom". creating the note table the createnotetable() function
builds the array notefreq to contain an array of objects representing each octave. each octave, in turn, has one named property for each note in that octave; the property's name is the note's name (such as "c#" to represent c-sharp), and the value is the frequency, in hertz, of that note. function createnotetable() { let notefreq = []; for (let i=0; i< 9; i++) { notefreq[i] = []; } notefr...
... notefreq[1]["g#"] and get the value 51.9 as a result. the values in the example table above have been rounded to two decimal places. this polyfill stands in when object.entries() doesn't exist. if (!object.entries) { object.entries = function entries(o) { return reduce(keys(o), (e, k) => concat(e, typeof k === 'string' && isenumerable(o, k) ? [[k, o[k]]] : []), []); }; }
building the keyboard the setup() function is responsible for
building the keyboard and preparing the app to play music. function setup() { notefreq = createnotetable(); volumecontrol.addeventlistener("change", changevolume, false); mastergainnode = audiocontext.creategain(); mastergainnode.connect(audiocontext.destination); mastergainnode.gain.value = volumecontrol.value; // create th...
Web Audio API - Web APIs
e concepts the api is built upon. learning coding is like playing cards — you learn the rules, then you play, then you go back and learn the rules again, then you play again. ...
...extends the first one to help you practise what you've learnt, and apply some more advanced techniques to
build up a step sequencer. we also have other tutorials and comprehensive reference material available that covers all features of the api. see the sidebar on this page for more. ...
... learnt, and apply some more advanced techniques to
build up a step sequencer. we also have other tutorials and comprehensive reference material available that covers all features of the api. see the sidebar on this page for more. ...
XSL Transformations in Mozilla FAQ - Web APIs
s. the only use cases we have seen are bad xml or bad xslt. and rss feeds. the latter is pretty much the only issue to us, and we're sorry that we can't support it. but mixing parsing with xslt is brittle and we rather not support d-o-e than either crash or be even slower. what about document.write? just like for xhtml, document.write is not supported during xslt transformations. sadly, current
builds don't error, but just give unexpected results, like crashes (bug 202765). in most cases, there is no need to actually use it, though. if you need platform dependent code or stylesheets, just do <xsl:if test="system-property('xsl:vendor')='transformiix'"> <!-- mozilla specific markup --> </xsl:if> <xsl:if test="system-property('xsl:vendor')='microsoft'"> <!-- ie...
... as closely to what you see as possible. this includes stuff like text entered into textfields and other dynamic changes. this is achieved by printing the current dom tree. having xslt stylesheet specific to particular media would require to retransform the original xml source, which counteracts the expectations of the user. thus, using media in <?xml-stylesheet ?> is strongly discouraged. future
builds might only load an xslt stylesheet if media is not specified, or if the specified media include screen. this does not affect css stylesheets loaded from the generated dom, those honor media just like in pages without xslt. how do i do transformnode? there is transformtodocument and transformtofragment starting with mozilla 1.2 final, see using the mozilla javascript interface to xsl transform...
...illa javascript interface to xsl transformations. why does internet explorer require a different xslt namespace than mozilla? ie up to version 6 required a deprecated namespace of a xslt working draft, please update to mozilla ;-), ie6+ or msxml3+, as it is fixed there. as the differences between xslt1.0 and the ie implementation of that wd are significant, we offer no legacy support. how do i
build the standalone version of transformiix? see the
building transformiix standalone page. original document information author(s): axel hecht last updated date: february 2, 2005 copyright information: portions of this content are © 1998–2006 by individual mozilla.org contributors; content available under a creative commons license ...
Understandable - Accessibility
confuse or disorientate the user. this is a matter of sensible design — people don't want interfaces to surprise them; they want things to be intuitive and behave as expected. for example, focusing a navigation menu option should not change the displayed page — it should be activated before the display changes. globaleventhandlers.onfocus contains some useful information. also see
building keyboard accessibility back in for some useful implementation ideas. 3.2.2 on input (a) when data is inputted into a control, or a setting is changed, context should not be changed unexpectedly. the user should be warned/advised of the impending change before it occurs. again, sensible design should be implemented. for example, if pressing a button causes the application ...
...such as buying a product), the user should be shown a confirmation screen where they can review their inputs and correct anything that doesn't look right. this pattern is commonly used on e-commerce sites like amazon. 3.3.5 context-sensitive help is available (aaa) provide instructions and other appropriate cues in context to aid form completion and submission. ...
... again, see 3.3.4. note: also see the wcag description for guideline 3.3 input assistance: help users avoid and correct mistakes. ...
Syntax - CSS: Cascading Style Sheets
the value which describe how the feature must be handled by the engine. each property has a set of valid values, defined by a formal grammar, as well as a semantic meaning, implemented by the browser engine. ...
...s is a kind of shorthand replacing rulesets with a single selector each, this doesn't apply to the validity of the ruleset itself. this leads to an important consequence: if one single basic selector is invalid, like when using an unknown pseudo-element or pseudo-class, the whole selector is invalid and therefore the entire rule is ignored (as invalid too). ...
... there are two kinds of statements: rulesets (or rules) that, as seen, associate a collection of css declarations to a condition described by a selector. ...
Applying color to HTML elements using CSS - HTML: Hypertext Markup Language
ng colors can be that often what looks like a solid color is actually a surprisingly varied number of related colors all used in concert, blending to create a desired effect. picking just one of these pixels can result in getting a color that on its own looks very out of place. fleshing out the palette once you have decided on your base color, there are plenty of online tools that can help you
build out a palette of appropriate colors to use along with your base color by applying color theory to your base color to determine appropriate added colors. many of these tools also support viewing the colors filtered so you can see what they would look like to people with various forms of color blindness. see color and accessibility for a brief explanation of why this matters. a few examples (all f...
..., see the following articles: medline plus: color blindness (united states national institute of health) american academy of ophthamology: what is color blindness? color blindness & web design (usability.gov: united states department of health and human services) palette design example let's consider a quick example of selecting an appropriate color palette for a site. imagine that you're
building a website for a new game that takes place on the planet mars. so let's do a google search for photos of mars. lots of good examples of martian coloration there. we carefully avoid the mockups and the photos from movies. and we decide to use a photo taken by one of the mars landers humanity has parked on the surface over the last few decades, since the game takes place on the planet's surface. ...
...ace over the last few decades, since the game takes place on the planet's surface. we use a color picker tool to select a sample of the color we choose. using an eyedropper tool, we identify a color we like and determine that the color in question is #d79c7a, which is an appropriate rusty orange-red color that's so stereotypical of the martian surface. having selected our base color, we need to
build out our palette. we decide to use paletton to come up with the other colors we need. upon opening paletton, we see: next, we enter our color's hex code (d79c7a) into the "base rgb" box at the bottom-left corner of the tool: we now see a monochromatic palette based on the color we picked from the mars photo. if you need a lot of related colors for some reason, those are likely to be good one...
Evolution of HTTP - HTTP
91, http has seen many changes, keeping most of the simplicity and further shaping its flexibility. http has evolved from an early protocol to exchange files in a semi-trusted laboratory environment, to the modern maze of the internet, now carrying images, videos in high resolution and 3d. invention of the world wide web in 1989, while he was working at cern, tim berners-lee wrote a proposal to
build a hypertext system over the internet. initially calling it the mesh, it was later renamed to world wide web during its implementation in 1990. built over the existing tcp and ip protocols, it consisted of 4
building blocks: a textual format to represent hypertext documents, the hypertext markup language (html). a simple protocol to exchange these documents, the hyperttext transfer protocol (h...
...on august 6th 1991, tim berners-lee's post on the public alt.hypertext newsgroup is now considered as the official start of the world wide web as a public project. ...
...nly consisted of the file itself. <html> a very simple html page </html> unlike subsequent evolutions, there were no http headers, meaning that only html files could be transmitted, but no other type of documents. there were no status or error codes: in case of a problem, a specific html file was send back with the description of the problem contained in it, for human consumption. ...
Critical rendering path - Web Performance
to pixels on the screen. optimizing the critical render path improves render performance.the critical rendering path includes the document object model (dom), css object model (cssom), render tree and layout. the document object model is created as the html is parsed. the html may request javascript, which may, in turn, alter the dom. the html includes or makes requests for styles, which in turn
builds the css object model. the browser engine combines the two to create the render tree. layout determines the size and location of everything on the page. once layout is determined, pixels are painted to the screen. optimizing the critical rendering path improves the time to first render. understanding and optimizing the critical rendering path is important to ensure reflows and repaints can happe...
...then begins parsing the html, converting the received bytes to the dom tree. the browser initiates requests every time it finds links to external resources, be they stylesheets, scripts, or embedded image references. some requests are blocking, which means the parsing of the rest of the html is halted until the imported asset is handled. the browser continues to parse the html making requests and
building the dom, until it gets to the end, at which point it constructs the css object model. with the dom and cssom complete, the browser
builds the render tree, computing the styles for all the visible content. after the render tree is complete, layout occurs, defining the location and size of all the render tree elements. once complete, the page is rendered, or 'painted' on the screen. document ob...
... of rules for identifying valid tokens. remember the c in css stands for 'cascade'. css rules cascade down. as the parser converts tokens to nodes, with descendants of nodes inheriting styles. the incremental processing features don't apply to css like they do with html, because subsequent rules may override previous ones. the css object model gets built as the css is parsed, but can't be used to
build the render tree until it is completely parsed because styles that are going to be overwritten with later parsing should not be rendered to the screen. in terms of selector performance, less specific selectors are faster than more specific ones. for example, .foo {} is faster than .bar .foo {} because when the browser finds .foo, in the second scenario, it has to walk up the dom to check if .foo ...
Introduction to progressive web apps - Progressive web apps (PWAs)
and users love tapping their icons to easily access their favorite apps, rather than navigating to it using a browser. pwas give us the ability to create web apps that can enjoy these same advantages. it's not a brand new concept—such ideas have been revisited many times on the web platform with various approaches in the past. progressive enhancement and responsive design already allow us to
build mobile friendly websites. pwas, however, provide all this and more without losing any of the existing features that make the web great. what makes an app a pwa? as we hinted at above, pwas are not created with a single technology. they represent a new philosophy for
building web apps, involving some specific patterns, apis, and other features. it's not that obvious if a web app is a pwa or not...
...can help small as well as big companies to (re-)engage users more effectively. you can check the list at pwa.rocks for more examples. particularly worth mentioning is the hnpwa.com page—this lists an example implementation of the hacker news website (instead of the usual todomvc app), in which you can see the use of various front-end frameworks. you can even generate pwas online using the pwa
builder website. for service worker and push specific information, be sure to check the service worker cookbook, a collection of recipes using service workers in modern sites. it's well worth trying out a pwa approach, so you can see for yourself if it works for your app. advantages of web applications a fully-capable progressive web application should provide all of the following advantages to the...
...browsers support all these features. above all you should follow the progressive enhancement rule: use technologies that enhance the appearance and utility of your app when they're available, but still offer the basic functionality of your app when those features are unavailable. presenting a trusted website with a good performance is a consequence of using these enhancements; this in turn means
building web apps which follow better practices. this way everybody will be able to use the app, but those with modern browsers will benefit from pwa features even more. an example application in this series of articles we will examine the source code of a super simple website that lists information about games submitted to the a-frame category in the js13kgames 2017 competition. you don't have to th...
Mobile first - Progressive web apps (PWAs)
ointless, as we are more used to dealing with desktop sites, and we surely need to consider the full gamut of features for the overall experience across desktop, mobile, etc., before then paring it down to a mobile experience that is simpler, more streamlined, or whatever. this rings true, yes, but in our experience mobile first is more about having the mobile implementation as a default layer to
build on. we consider the overall experience during the planning stage, look at what subset of features will be available on mobile, desktop, etc. in tandem and how they will be implemented. then at implementation stage, we present the mobile layout and functionality as the default configuration provided, before additional information is loaded on top of that, whenever appropriate. this means that mob...
... i then created my sample project using volo create myapp mozilla/mortar-app-stub this creates a sample project inside a directory called myapp. the app's code files are inside the www folder. 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. volo
build:
builds a minified code version of your app, ready for production deployment, in a www-built folder. volo
build base=www-built: runs the built version through the server instead of the development version. built-in features of the mortar template mortar templates contain a number of built-in features. in this sample app, i have used a couple of the built-in features to: include an install ...
...cting everything is a good start), but really it is much better to use a dedicated existing solution, such as modernizr. modernizr is a good choice as it not only includes a feature detect for just about everything (css, html5, some other bits besides), it is also fairly reliable, and you can create your own custom version with only the feature detects you need in it, using the modernizr download
builder. the full uncompressed modernizr library is 42kb, but the version we are using in this demo is only 8kb. i put modernizr inside my js/lib directory, then included it by putting the following construct inside my html file: <script type="text/javascript" src="js/lib/modernizr.js"></script> with modernizr in place, we can now use the following js block to test whether media queries are supporte...
2015 MDN Fellowship Program - Archive of obsolete content
fellowship intends to accelerate the involvement of highly-skilled and experienced web developers with the open web. who web and mobile developers with an established track record of contributions and expertise in a specific web technology, function or domain who wish to increase the effectiveness of their teaching and communications. what seven weeks of partnering closely with mozilla to (1)
build curriculum, code, or likely both; and (2) receive coaching, training and best practices for effectively communicating and educating with technical information. we expect this to be between 5-10 hours of your time per week. specific projects (we encourage you to target one of these in your application): testthewebforward brief project description mozilla participates in an important w3c open...
...web developer with expertise in javascript, css, html and/or other key technologies. proficient in written and spoken english. mentor information chris mills, senior technology writer, mozilla developer network. github: chrisdavidmills twitter: @chrisdavidmills why increase the reach and impact of your expertise grow your skills beyond coding and managing to educating and communicating
build something used by hundreds of thousands (or more) developers worldwide directly impact and grow the value of the open web when application deadline: april 1, 2015 orientation: early june (dates tbd) graduation: august 11-12, 2015 where orientation: a mozilla location (tbd). core program: conducted at your normal workspace. the fine print mozilla will provide coaching, direction and tra...
Module structure of the SDK - Archive of obsolete content
a commonjs module is a piece of reusable javascript: it exports certain objects which are thus made available to dependent code. commonjs defines: an object called exports which contains all the objects which a commonjs module wants to make available to other modules a function called require which a module can use to import the exports object of another module. ...
... require("sdk/tabs"); // load the low-level "uuid" module var uuid = require('sdk/util/uuid'); the path to specify for a low-level module is given along with the module name itself in the title of the module's documentation page (for example, system/environment). although the sdk repository in github includes copies of these modules, they are built into firefox and by default, when you run or
build an add-on using jpm run or jpm xpi, it is the versions of the modules in firefox that are used. if you need to use a different version of the modules, you can do this by checking out the version of the sdk that you need and passing the -o or --overload option to jpm run or jpm xpi. local modules at a minimum, an sdk-based add-on consists of a single module named main.js, but you can factor your...
Testing the Add-on SDK - Archive of obsolete content
, we can run the first test suite which was produced for the add-on sdk. this includes: cfx testcfx: a suite of python tests which test cfx itself (which is written in python). this suite basically tests cfx xpi's ability to produce the xpi files that we expect it to. cfx testex --filter <addon_example_folder_name>: a suite of tests which run test code for some example add-ons. this suite
builds the example code, then runs these example add-on's test code. cfx testaddons --filter <addon_folder_name>: a suite of tests which run add-ons, which are themseleves tests. this suite
builds add-ons which are tests (ie: their main.js script's merely run tests and close firefox when their tests are done), and runs them as cfx run would. cfx testpkgs --filter <file_name>:<test_name>: a suite of ...
... the majority of the tests run here are module unit tests, but there are various other tests included here as well. ...
jpm - Archive of obsolete content
sion of firefox you want to run. when you invoke jpm run or jpm test without the -b option, jpm first checks jpm_firefox_binary, and use this as the path if it is set. using .jpmignore to ignore files using .jpmignore is similar to using .gitignore with git, .hgignore with mercurial, or .npmignore with npm. by using this file, you can let jpm know which files you would like it to ignore when
building a .xpi file with jpm xpi. here is an example: # ignore .ds_store files created by mac .ds_store # ignore any zip or xpi files *.zip *.xpi a .jpmignore file with the above contents would ignore all zip files and .ds_store files from the xpi generated by jpm xpi. using profiles by default, jpm run uses a new profile each time it is executed. this means that any profile-specific data enter...
...it points to your update manifest. the updateurl value may be https. if it is not, then you'll also need to sign the update manifest, and then include the public key using the updatekey field in package.json. see securing updates for more on this. updatelink: this url is included in the update manifest file. it points to the xpi, and must be an https url. if you include updateurl and updat...
jpmignore - Archive of obsolete content
here is an example: # ignore .ds_store files created by mac .ds_store # ignore any zip or xpi files *.zip *.xpi # ignore specific directory # you can start patterns with a forward slash (/) to avoid recursivity. # you can end patterns with a forward slash (/) to specify a directory. ...
... here is an example: # ignore .ds_store files created by mac .ds_store # ignore any zip or xpi files *.zip *.xpi # ignore specific directory # you can start patterns with a forward slash (/) to avoid recursivity. # you can end patterns with a forward slash (/) to specify a directory. ...
Forms related code snippets - Archive of obsolete content
othiscal.writedays(); return false; } function ondayclick () { const othiscal = ainstances[this.id.replace(rbgnandend, "")]; othiscal.target.value = (this.innerhtml / 100).tofixed(2).substr(-2) + "\/" + (othiscal.current.getmonth() + 1) + "\/" + othiscal.current.getfullyear(); othiscal.container.parentnode.removechild(othiscal.container); return false; } function
buildcalendars () { const afields = document.getelementsbyclassname(sdpclass), nlen = afields.length; for (var nitem = 0; nitem < nlen; new datepicker(afields[nitem++])); } const /* customizable by user */ sprefs = "zdp"; sdpclass = "date-picker", smonthsnames = ["jan", "feb", "mar", "apr", "may", "jun", "jul", "aug", "sep", "oct", "nov", "dec"], sdays = ["m", "t", "w"...
... sdays = ["m", "t", "w", "t", "f", "s", "s"], bzeroismonday = true, /* internal usage */ ainstances = [], amonthlengths = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], rbgnnan = /^\d+/, rbgnandend = /^\d+|\d+\d+$/g, rmonth = /\-month\-/, rdecrease = /\-decr\-/; var /* customizable by user */ nzindex = 1000; window.addeventlistener ? addeventlistener("load",
buildcalendars, false) : window.attachevent ? attachevent("onload",
buildcalendars) : (onload =
buildcalendars); document.addeventlistener ? document.addeventlistener("mousedown", ondocclick, false) : document.attachevent ? document.attachevent("onmousedown", ondocclick) : (document.onmousedown = ondocclick); })(); </script> <style type="text/css"> table.zdp-calendar { border: 1px solid #666666;...
Communication between HTML and your extension - Archive of obsolete content
what i wanted to do was have an extension "look" for something on an html page and if it found that something perform some operation on the found thing and then update the status bar with the results of the operation. ...
...what i wanted to do was have an extension "look" for something on an html page and if it found that something perform some operation on the found thing and then update the status bar with the results of the operation. ...
Extension Versioning, Update and Compatibility - Archive of obsolete content
the toolkit version format supports the firefox version format but allows greater flexibility. ...
... setting new value to updatehash:sha256:78fc1d2887eda35b4ad2e3a0b60120ca271ce6e64ad2e3a0b60120ca271ce6e6 when a hash is specified the downloaded file is compared with the hash and an error shown if it does not match. there are quite a few tools you may use to generate hashes: various unix flavors include sha1sum, sha256sum and so on. windows users should consider hashtab for interactive (non-
build-script) use. there are also gnu ports for win (besides usual suspects like cygwin), which are good for non-interactive use: sha256sum file there is also md5deep, which is cross platform: sha256deep file openssl also generates hashes for you: openssl sha256 file if you're on windows, hashtab is a shell extension... simple right-click gives you hash values for any file. there is also an e...
Getting Started with Firefox Extensions - Archive of obsolete content
r, firebug). these are very advanced and complex extensions, and you'll learn most of what it takes to create extensions like these. extensions now exist in 3 different forms: add-ons sdk extensions (also known as jetpacks), bootstrapped extensions and traditional extensions. if you're only getting started developing add-ons, the add-ons sdk provides a great way to quickly create simple ones and
build on them. this tutorial focuses on traditional extensions, which are created differently. bootstrapped extensions are a step above traditional ones in complexity, so you should go through this tutorial before giving them a try. we'll begin the tutorial by analyzing a very simple extension. the hello world extension our sample extensions and this tutorial in general are meant for modern versions...
...hould see another pop-up telling you that you are installing an unverified add-on. click "install". after the extension is installed, you'll be asked to restart firefox. installing, uninstalling, enabling and disabling add-ons require a restart to complete, with the exception of npapi plugins, add-ons sdk extensions and bootstrapped extensions. this is an important point to keep in mind if you're
building an extension that manipulates other extensions or themes. after installing, look at the main firefox window and see if you notice anything different. did you see it? there's a new menu on the main menu, labeled "hello world!". if you open the menu and then the menu item below, you'll see a nice alert message (for some definitions of 'nice'). click on the ok button to close it. that's a...
XPCOM Objects - Archive of obsolete content
, and the xpt file, which is a compiled version of your idl file. you won't need the idl or xpt files if your components only use pre-existing firefox interfaces. in this case you may also find it easier to implement your component using jsm and the xpcomutils module. download this version of the hello world project with xpcom to see how xpcom files are structured in the project and built. (your
build will probably break, we'll cover this later on.) in the components directory, the file xsihellocounter.idl has the following contents: #include "nsisupports.idl" /** * counter for the hello world extension. keeps track of how many times the * hello world message has been shown. */ [scriptable, uuid(bd46f689-6c1d-47d0-bc07-bb52b546b8b5)] interface xsihellocounter : nsisupports { /* the m...
... c++ xpcom components c++ xpcom components are no longer supported in firefox extensions. they are only available to code built into firefox itself. if you are writing an extension and need to interact with 3rd-party binary code, the best way to do that is to use the system/child_process ipc layer from the addon sdk. ...
Add-ons - Archive of obsolete content
, which you can use to create add-ons and tools for creating, running, testing, and packaging add-ons. bookmarks.export() exports bookmarks to an html bookmark file. bookmarks.import() imports bookmarks from an html bookmark file. bootstrapped extensions browser.bookmarks.export( function() {...} // optional function ) code snippets … creating custom firefox extensions with the mozilla
build system there is a wealth of material on creating extensions for firefox. all of these documents currently assume, however, that you are developing your extension using xul and javascript only. for complex extensions, it may be necessary to create components in c++ that provide additional functionality. extension etiquette this article describes best practices when making extensions, including ...
...ll of these documents currently assume, however, that you are developing your extension using xul and javascript only. for complex extensions, it may be necessary to create components in c++ that provide additional functionality. extension etiquette this article describes best practices when making extensions, including how to be kind to your users. it assumes that you are already familiar with
building an extension. extension packaging extensions are packaged in a form of installable bundle which can be downloaded and installed by a user, or provided pre-packaged with an application or by an external program. extensions use a directory structure which can provide chrome, components, and other files to extend the functionality of an xul program. extensions support in seamonkey 2 starting ...
Adding preferences to an extension - Archive of obsolete content
l; var fullurl = "http://quote.yahoo.com/d/quotes.csv?f=sl1d1t1c1ohgv&e=.csv&s=" + symbol; function inforeceived() { var samplepanel = document.getelementbyid('stockwatcher2'); var output = httprequest.responsetext; if (output.length) { // remove any whitespace from the end of the string output = output.replace(/\w*$/, ""); //
build the tooltip string var fieldarray = output.split(","); samplepanel.label = symbol + ": " + fieldarray[1]; samplepanel.tooltiptext = "chg: " + fieldarray[4] + " | " + "open: " + fieldarray[5] + " | " + "low: " + fieldarray[6] + " | " + "high: " + fieldarray[7] + " | " + "vol: " + fieldarray[8]; } } var...
...to do is to install the event listeners needed to run the startup() and shutdown() routines automatically when the browser window is loaded and unloaded. window.addeventlistener("load", function(e) { stockwatcher.startup(); }, false); window.addeventlistener("unload", function(e) { stockwatcher.shutdown(); }, false); design the preference dialog now that we've written all the code, we need to
build the xul file for the options dialog. <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <prefwindow id="stockwatcher2-prefs" title="stockwatcher 2 options" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <prefpane id="sw2-stock-pane" label="stock settings"> <preferences> <preference id="pref_symbol" name="extensions.stoc...
An Interview With Douglas Bowman of Wired News - Archive of obsolete content
ed the links to normal screen media files. this allows us to temporarily display on screen the same formatting to be used for printing that page. ...
...idate our markup. we don't make any claims about past archived content, but we've taken many efforts to make sure even stories from a few years ago are as valid as possible. while conversion to xhtml and css definitely shaved off development time that would have normally been spent manipulating the code, it didn't come entirely easy or without cost. our engineer, aaron jones, actually ended up re
building the majority of our vignette templates from scratch. i ran into a steep learning curve, not with the web standards themselves, but with the quirky rendering behaviors and inconsistencies in various browsers. our writers and editors must get used to some new rules when generating the day's stories. our management also has to accept the fact that some older or smaller browsers may be getting an ...
Creating a dynamic status bar extension - Archive of obsolete content
specifically, this sample displays a stock quote in the status bar, and, when you mouse over it, displays a tooltip containing more detailed information about the stock. concepts covered in the previous sample won't be reiterated here; instead, refer to the downloadable sample code or to the previous sample for further details. download the sample you can download a copy of this sample to look over, or to use as the basis for your own extension. ...
...his value would not match, so we couldn't get at the same variables and functions that way. ...
Source Navigator - Archive of obsolete content
note: this document is still in the draft state. i hope i can finish it within one day or two if i have more time. ;) --kennykaiyinyu 19:04, 10 june 2008 (pdt) what is source-navigator? (quoted from the internet) source-navigator is a source code analysis tool which lets users to edit, browse and
build their projects. with it, you can edit your source code, display relationships between classes and functions and members, and display call trees. you can also
build your projects, either with your own makefile, or by using source-navigator's
build system to automatically generate a makefile. source-navigator works with the insight gui interface for gdb. more information can be found here --> http://sourcenav.sourceforge.net/ why worth a try? it's quite fast as compared to mxr. (i think.
...e project. (you can always include more by pressing the "more" button.) in my case, i inputted the followings: project file: <tt>~/snav-mozilla</tt> add directory (where your source files reside in -- i understand that the label here is not so self-explanatory...): <tt>~/moz1.9/mozilla</tt> (because i saved my source at ~/moz1.9/mozilla.) remember to ensure that "include subdirectories" and "
build cross-reference database" are checked. then click "ok". the snavigator then begins to scan your source directories. this takes a few minutes. now you can enjoy searching the mozilla code in a faster speed. using source navigator (more later) opening a project open a terminal. type <tt>snavigator</tt> followed by striking enter. this shows the "source-navigator projects" dialog. choose the pr...
ActiveX Control for Hosting Netscape Plug-ins in IE - Archive of obsolete content
emented in a dll called pluginhostctrl.dll which is standalone from the rest of the mozilla project. if you're wondering how microsoft used to support the np api, look for a file called plugin.ocx in your windows system directory. this 100k activex control contains the entire np api implementation and probably worked much like pluginhostctrl.dll does now. the sections below tell you how to fetch,
build and use the pluginhostctrl.dll . get the source you need cvs to get the source code. assuming you have cvs somewhere in your path, type this from a command prompt: c:\> set cvsroot=:pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot c:\> set home=\temp c:\> cvs login (logging in to anonymous@cvs-mirror.mozilla.org) cvs password: anonymous c:\> cvs -z3 co mozilla/embedding/browser/activex/src/plu...
... a command prompt: c:\> set cvsroot=:pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot c:\> set home=\temp c:\> cvs login (logging in to anonymous@cvs-mirror.mozilla.org) cvs password: anonymous c:\> cvs -z3 co mozilla/embedding/browser/activex/src/pluginhostctrl this fetches the source for the control into mozilla\embedding\browser\activex\src\pluginhostctrl. you can also see the code online.
build it it is quite simple to
build the control locate the pluginhostctrl directory: open pluginhostctrl.dsp
build "win32 debug" or another target open some of the test files under pluginhostctrl\tests in internet explorer to verify the control has built and registered correctly. the control currently reads plug-ins from your most current netscape 4.x and ie installations. there is no support fo...
Compiling The npruntime Sample Plugin in Visual Studio - Archive of obsolete content
atedly) mimetype reflects the data type handled by the plugin. this is how webpages invoke your plugin. should either be like "application/x-vnd-yourorganization-yourfiletype" or be officially registered with iana (unlikely) or be a standard type (e.g. if you want to play mpeg files). file extension reflects the data type handled by the plugin, esp. when loaded from local disk on windows.
build create a new project in visual studio for a win32 gui library (dll) (in .net 2003: win32 template, then switch to dll in application settings in the following dialog, export symbols too?)(in visual studio 2008, it is visualc++|win32|win32 project, then check dll in the wizard). if a wizard gives you a checkbox to create an empty project, then check it. otherwise you'll delete files later. ag...
...her the full path or the path relative to the project directory. optional: open the above .def file and change "nprt" to the filename of your dll as vs sees it (without "np", if you decided to rename later) optional: edit the .rc file and and the top of npp_gate.cpp for the description, mimetype, file extension etc. to reflect your plugin remove the function npp_getjavaclass from npp_gate.cpp
build rename the resulting dll so that the filename starts with "np" and ends with ".dll" (or "32.dll"? 8.3?) and copy it in mozilla's "plugins" folder start mozilla and open about:plugins to verify the plugin is detected open the file "test.html" and begin testing. make sure the mimetypes of your html embed tags match the mimetype specified in your nprt.rc file and the top of your npp_gate.cpp file...
Creating a Firefox sidebar extension - Archive of obsolete content
ion and registration in the destination application. first a simple xul page is created. then the registration files are made and finally the sidebar is packed into an installable xpi file. pre-requisites this article is a quick start, it won't explain all elements of xul, packaging and xpi's. it's preferable you have some basic knowledge of how xul works and how firefox handles extensions. see
building an extension for more detailed information about structuring, packaging, and deploying extensions. packages extensions to firefox are installed with packages ("bundles"). an extension package usually contains a "content" provider, which contains the xul code and application logic. optionally locales and skins can be included. most additions are provided with a default tree structure, althoug...
...r.xpi install.rdf chrome.manifest chrome/emptysidebar.jar open firefox and browse to the folder containing emptysidebar.xpi. click on the file and the extension installation window pops up. after a restart of firefox, the sidebar is installed. you can download the empty sidebar project to use as a basis for your own sidebars. the emptysidebar extension resources code snippets:sidebar
building an extension creating applications with mozilla packaging firefox/thunderbird extensions creating a firefox 1 sidebar original document information author: j.c. wesdorp <jcwesdorp . at . occidopagus.nl> - may 30, 2005. updated for firefox 2 - dec 12, 2006. permission granted to migrate in jan 2006, including permission to relicense under the cc:by-sa. original source: http://occido...
Creating a Microsummary - Archive of obsolete content
microsummary"> elements in their <head> elements. generators can also be independently downloaded and installed by users if they include a list of pages to which they apply. in this tutorial we're going to create a microsummary generator for the spread firefox home page that displays the current firefox download count along with the label fx downloads; for example: 174475447 fx downloads. we'll
build the xslt transform sheet that converts that page into its microsummary, learn how to specify that the generator applies to that page, and find out how to make the generator available for download and installation. in each step of revising the transform sheet and other code in this tutorial, new material added will be shown in boldface so you can follow along more easily. note: if you are a web ...
..., it uses the generator to generate the microsummary for the page. otherwise, if the url returns plain text content (or html content that can be converted to plain text), firefox uses the content as the microsummary for the page. beginnings generators are expressed as xml documents whose root element is the <generator> element in the http://www.mozilla.org/microsummaries/0.1 namespace. to begin
building the generator, create a new empty text file and add an xml declaration and empty <generator> tag to it: <?xml version="1.0" encoding="utf-8"?> <generator xmlns="http://www.mozilla.org/microsummaries/0.1"> </generator> giving it a name generators should have name attributes which are arbitrary descriptions of the microsummaries the generator creates. names should be descriptive enough to gi...
Creating a Release Tag - Archive of obsolete content
warning: the content of this article may be out of date. it has not been updated for usage of mercurial. here are directions for creating a release from a linux system. note that there are a couple of extra files for win32 and macintosh that aren't pulled by the normal script and need to be pulled by hand. the mini-branch is created so you can check in the
build scripts with the necessary changes without touching the original branch. check out mozilla from the branch you want to tag. remember to also check out extra mac and win32 files that aren't normally checked out on linux or the tag won't
build on those platforms. cvs co -r netscape_6_2_release mozilla/client.mk cd mozilla gmake -f client.mk checkout create a mini branch for the pull scripts on all three platf...
...checked out on linux or the tag won't
build on those platforms. cvs co -r netscape_6_2_release mozilla/client.mk cd mozilla gmake -f client.mk checkout create a mini branch for the pull scripts on all three platforms so we can change them without changing anything on the original branch. cd .. cvs tag -b mozilla_0_9_4_1_release_mini_branch mozilla/client.mk delete the existing
build scripts and repull them from the mini-branch you just created. rm mozilla/client.mk cvs co -r mozilla_0_9_4_1_release_mini_branch mozilla/client.mk in each of the
build scripts find the variables defining the branch and change it from the branch you originally pulled from to the new tag you are creating. mozilla/client.mk check the
build scripts back in to the mini-branch. ...
jspage - Archive of obsolete content
var mootools={version:"1.2.4",
build:"0d9113241a90b9cd5643b926795852a2026710d4"};var native=function(k){k=k||{};var a=k.name;var i=k.legacy;var b=k.protect; var c=k.implement;var h=k.generics;var f=k.initialize;var g=k.afterimplement||function(){};var d=f||i;h=h!==false;d.constructor=native;d.$family={name:"native"}; if(i&&f){d.prototype=i.prototype;}d.prototype.constructor=d;if(a){var e=a.tolowercase();d.prototype.$family={name:e};native.typize(d,e);}var j=function(n,l,o,m){if(!b||m||!n.prototype[l]){n.prototype[l]=o; }if(h){native.genericize(n,l,b);}g.call(n,l,o);return n;};d.alias=function(n,l,p){if(typeof n=="string"){var o=this.prototype[n];if((n=o)){return j(this,l,n,p); }}for(var m in n){this.alias(m,n[m],l);}return this;};d.implement=function(m,l,o){if(typeof m=="string"){return ...
...mlhttp"); },function(){return new activexobject("microsoft.xmlhttp");});};browser.features.xhr=!!(browser.request());browser.plugins.flash=(function(){var a=($try(function(){return navigator.plugins["shockwave flash"].description; },function(){return new activexobject("shockwaveflash.shockwaveflash").getvariable("$version");})||"0 r0").match(/\d+/g);return{version:parseint(a[0]||0+"."+a[1],10)||0,
build:parseint(a[2],10)||0}; })();function $exec(b){if(!b){return b;}if(window.execscript){window.execscript(b);}else{var a=document.createelement("script");a.setattribute("type","text/javascript"); a[(browser.engine.webkit&&browser.engine.version<420)?"innertext":"text"]=b;document.head.appendchild(a);document.head.removechild(a);}return b;}native.uid=1; var $uid=(browser.engine.trident)?function(a){r...
Modularization techniques - Archive of obsolete content
ocument is provide all the information you need to create a new mozilla module or break existing code into a module. the mechanism we're using is based on the principles laid down by com, so pretty much anything you know about com can be applied here, and any reference on com can provide you with more interesting and complex examples than the ones provided here. the basics interfaces the basic
building blocks of modules are c++ pure virtual interfaces. a pure virtual interface is simply a class where every method is defined as pure virtual, that is: virtual int foo(int bar) = 0; pure virtual interfaces provide an easy mechanism for passing function tables between modules that may reside in separate, possibly dynamically loaded, libraries. each interface is assigned a unique interface iden...
...se() decrements it. if a call to release() causes the reference count to hit zero, the object will generally free itself. a successful queryinterface() will call addref() on the requested interface before returning. both addref() and release() return the resulting reference count. the convenience macros ns_addref() and ns_release() are preferred over calling addref and release directly. in debug
builds, these macros provide useful reference counting logs. use them wherever possible. /* * the nsisupports interface */ class nsisupports { public: ns_imethod queryinterface(const nsiid &aiid, void **aresult) = 0; ns_imethod_(nsrefcnt) addref(void) = 0; ns_imethod_(nsrefcnt) release(void) = 0; }; the ns_imethod and ns_imethod_(type) macros are basicall...
Monitoring downloads - Archive of obsolete content
is.logtransfercompleted(adownload); break; } }, we're interested in four states. if the download's state, indicated by the adownload.state field, is components.interfaces.nsidownloadmanager.download_downloading, the file has begun to download. the adownload object is an nsidownload object. in that case, we create a new row in our database for the new file by opening the database and
building a replace into sqlite command. the first three rows are set to the values of the source uri, file size, and start time fields from the download object. the remaining rows are set to zeroes since that's not information we have at the moment. if the download's state indicates that the download is finished, canceled, or failed, we call our logtransfercompleted routine to update the log to indica...
...by looking for a record with both the same uri and start time, we properly support the case where the user downloads the same file multiple times. displaying the download log the download log window's code is encapsulated in an obj...
Mozilla Application Framework in Detail - Archive of obsolete content
nsumer devices. because it is small, gecko can be embedded on devices with limited footprints and it minimizes download size for desktop browsers. speed: gecko has been designed for speed and is several times faster than previous versions of internet browsing software. standards support: gecko is the first browser technology to fully implement the latest w3c standards and enables developers to
build rich, dynamic web pages and web-based applications that look and run as intended across a variety of platforms and devices. this saves developers time and money while allowing them to deliver state-of-the-art content and web applications. gecko features full support for open internet standards such as css1, html 4.0, dom1, rdf, xml and javascript. modular, embeddable: gecko's modular architectur...
...nt of thousands of developers worldwide, mozilla.org has accelerated internet software development and increased the quality of the final product, delivering unmatched support for web standards. in addition, independent software developers and corporate information technology departments now have complete access to the modular source code and freedom to freely license the source, make changes and
build customized versions to accommodate their individual needs. free: gecko is free of charge. there is no charge for using the gecko browser engine or gecko technologies, including distributing gecko inside another product. furthermore, when embedding gecko, developers are free to choose what modules to include. there is no requirement for distribution of any other software. the necko network libra...
Porting NSPR to Unix Platforms - Archive of obsolete content
therefore i write this article to document the more mechanical part of the unix porting task. for certain more "standard" unix platforms, this may be all you have to do. on other platforms, you may need to do extra work to deal with their idiosyncrasies. ...
...>uname -s</tt> on the platform, plus the file suffix <tt>.mk</tt>. if the return value of <tt>uname -s</tt> is too long or ambiguous, you can modify it in <tt>mozilla/nsprpub/config/arch.mk</tt> (the makefile variable <tt>os_arch</tt>). <tt>mozilla/nsprpub/pr/include/md/_netbsd.cfg</tt> we have a program <tt>mozilla/nsprpub/pr/include/gencfg.c</tt> to help you generate partof this file. you can
build the <tt>gencfg</tt> tool as follows: cd mozilla/nsprpub/pr/include gmake gencfg gencfg > foo.bar then you use the macro values in <tt>foo.bar</tt> as a basis for the <tt>_xxxos.cfg</tt> file. <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. in particular, you need to figu...
The life of an HTML HTTP request - Archive of obsolete content
in the contentsink. the parser typically gets data from the stream in 8kb blocks and parses these blocks, block by block. after every parsed block it passes the parsed data as nsiparsernodes to the contentsink unless the parser has been temporarily blocked, in wich case it waits until it gets unblocked before parsing the cached data it has receieved while being blocked. ...
...ts until it gets unblocked before parsing the cached data it has receieved while being blocked. (6) the contentsink then
builds up nsicontent nodes that describe the document. these content nodes are created by calling functions like ns_newhtmlxxxxelement(). these element nodes implement the nsihtmlcontent interface as well as their respective dom interfaces. nsicontent::appendchild() is used to
build the content tree but appendchild takes a "anotify" argument that marks if it should notify the document about the content model changes or not. this argument is always pr_false when the content sink calls appendchild. the content sink tells the document about content model changes (notifybody()) in places like nshtmlcontentsink::willinterrupt() and nshtmlcontentsink::did
buildmodel(). willinterrup...
Treehydra - Archive of obsolete content
of treehydra is generated by dehydra. a dehydra script walks the gcc tree node structure using the gty attributes present in gcc. treehydra is included in dehydra source, and is built when a plugin-enabled cxx is detected. for description of node types used in treehydra see tree.def and cp-tree.def in the gcc sources. ...
...cript walks the gcc tree node structure using the gty attributes present in gcc. treehydra is included in dehydra source, and is built when a plugin-enabled cxx is detected. for description of node types used in treehydra see tree.def and cp-tree.def in the gcc sources. ...
Video presentations - Archive of obsolete content
s presentation talks about the mozilla community and how you can get involved smoothly. (as quicktime; 170 mb and 80 mb) mozilla-seneca projects q&a with mike shaver (part 1, part 2) mike shaver answers questions about the mozilla project. (as quicktime; 138 mb and 132 mb) developing mozilla these presentations cover various aspects of the process of working on the mozilla project, including
building, testing, and debugging. how the
build works (part 1, part 2, part 2; second camera, slides) this presentation covers how the mozilla
build system works, how to configure the
build system, and how to
build mozilla projects. (as quicktime; 127 mb, 50 mb, and 68 mb) the life cycle of a bug (part 1, part 2) mike connor describes how a bug goes from bug report to patch to implemented fix. le...
...o configure the
build system, and how to
build mozilla projects. (as quicktime; 127 mb, 50 mb, and 68 mb) the life cycle of a bug (part 1, part 2) mike connor describes how a bug goes from bug report to patch to implemented fix. learn how to properly file a good bug report, how the bug reports are handled, and how to submit and get reviews for patches. (as quicktime; 122 mb and 110 mb) release
builds - from source tree to exe (part 1, part 2) learn how release
builds of firefox are created. (as quicktime; 105 mb and 34 mb) other videos (might be obsolete) mozilla video presentations (2001-2002) seamonkey brownbag training series (2000) ...
Windows stub installer - Archive of obsolete content
where does the windows stub installer code reside? the windows stub installer project resides at: <http://lxr.mozilla.org/seamonkey/sou...windows/setup/> how do we get setup to debug the windows stub installer?
build your entire mozilla tree, which should
build the stub installer in the setup directory as well. (if you need to re
build stub installer, got to /mozilla/xpinstall/wizard/windows/setup and type "nmake /f makefile.win") go to mozilla/xpinstall/wizard/windows/
builder on the shell prompt type "perl
build.pl". now you will find an installer *and* the xpcom.xpi and other debug xpis delivered to mozilla/dist/win32_d.obj/install. run the stub installer setup.exe from the install directory. if you need to use vc++ to debug the installer: under project | settings | debug...
.../config.it>. then add the component <component> into the appropriate setup types so the installer module installs it when users select the setup types you choose it to be in. finally add <component> to the component list array @gcomponentlist at: <http://lxr.mozilla.org/seamonkey/sou...makeall.pl#125> you can test it by changing your current working directory to mozilla/xpinstall/wizard/windows/
builder and running "perl
build.pl" on the shell prompt. the resulting stub installer and packages will be delivered to "mozilla/dist/win32obj_d/installer". run setup.exe there to launch the stub installer. original document information author(s): samir gehani other contributors: curt patrick last updated date: march 12, 2003 copyright information: copyright (c) samir gehani, curt patrick ...
compareTo - Archive of obsolete content
compareto compares the version information specified in this object to the version information specified in the version parameter. method of installversion object syntax compareto ( installversion version); compareto ( string version); compareto ( int major, int minor, int release, int
build); parameters the compareto method has the following parameters: maj the major version number. min minor version number. rev revision number. bld
build number. version an installversion object or a string representing version information in the format "4.1.2.1234". returns if the versions are the same, this method returns 0. if this version object represents a smaller (earlier) version than that represented by the version para...
...er. in particular, this method returns one of the following values: -4 this version object has a smaller (earlier) major number than version. -3 this version object has a smaller (earlier) minor number than version. -2 this version object has a smaller (earlier) release number than version. -1 this version object has a smaller (earlier)
build number than version. 0 the version numbers are the same; both objects represent the same version. 1 this version object has a larger (newer)
build number than version. 2 this version object has a larger (newer) release number than version. 3 this version object has a larger (newer) minor number than version. 4 this version...
Attribute Substitution - Archive of obsolete content
late contained: <description><textnode value="?description"/></description> the resulting generated content might be: <description>view from the top of the tower looking east of the doges palace</description> note that the textnode has been replaced with the substituted value attribute. note that in firefox 2 and earlier, a bug can make this appear to not work at times. recall that the template
builder doesn't load the datasource before processing a template. as the datasource loads, the query and rules are examined with the new data as it arrives. this causes rules to create matches as the data loads. however, variables determined from a binding are evaluated using a much simpler process. the bug is that this code path for bindings doesn't handle the textnode element properly. thus, if you u...
...mined with the new data as it arrives. this causes rules to create matches as the data loads. however, variables determined from a binding are evaluated using a much simpler process. the bug is that this code path for bindings doesn't handle the textnode element properly. thus, if you use a variable set in a binding, you must ensure the datasource is loaded before the template is built, or just re
build the template. another possibilty is to rearrange the rdf such that the values, in this example, the descriptions, are specified before the containers. this issue is fixed in firefox 3 (mozilla 1.9) and later. « previousnext » ...
Containment Properties - Archive of obsolete content
ref="http://www.xulplanet.com/rdf/a" containment="http://www.xulplanet.com/rdf/relateditem"> <template> <rule> <label uri="rdf:*" value="rdf:*"/> </rule> </template> </vbox> instead of iterating over a container, this example iterates over a specific predicate. this attribute is useful when the rdf data is structured in such a way that an rdf container isn't used. the
builder treats the predicate in the containment attribute as an indicator that an element is a container. if the starting node (or ref) has that predicate as one of its triples in the rdf data, the
builder will use it in addition to checking if it is a container. note the distinction here. the containment attribute doesn't replace the existing container checking. if the resource 'http://www.xulplanet.c...
... « previousnext » ...
SQLite Templates - Archive of obsolete content
within the action body. for sqlite queries it will almost always be on the outermost node. note also that the query statement has a where clause which restricts the rows to those with an age greater or equal to 30. query parameters sometimes, you will want to adjust the query depending on certain criteria. one possibility is to simply use methods to adjust the text within the query element and re
build the template. however, this can become unweidly for more complex queries, and would be more error prone if values were not escaped properly to ensure that extraneous quotes, semicolons and other characters didn't appear in the values. this is especially important when you are taking values that were entered by the user. the solution is to use query parameters, using the param element. <query> ...
...int64 for 64-bit integers. you can also use the value double for double precision floating point values. if no type is specified, a string is assumed. we could later change the age to use in the query with a short script: function adjustage(min, max) { document.getelementbyid("minage").textcontent = min; document.getelementbyid("maxage").textcontent = max; document.getelementbyid("friends").
builder.re
build(); } this function takes two arguments, the minimum and maximum values to use. we retrieve the param elements and set their textcontent properties to the desired value. finally, we re
build the entire template. « previousnext » ...
Template Logging - Archive of obsolete content
and seeing whether any results or content is generated. remember to use the logging flag as described above to see whether any results are being generated. unfortunately, detecting network or parsing errors with the data itself can be difficult. naturally, semantic errors in the data in the datasource can't be easily detected automatically. ...
...data in the datasource can't be easily detected automatically. however, for xml datasources, you can at least check the
builder's datasource to see whether the xml data was loaded and parsed correctly. if null, then the datasource could not be loaded, or hasn't yet been loaded. if the datasource load and parsing was successful, the datasource will be set to the xml document. for example: if (root.
builder.datasource instanceof xmldocument) alert("xml datasource loaded ok"); be careful, as the datasource will only be set once the document has finished loading and has been parsed, so don't check this property too early. you may also get an error if you manipulate or analyze the template while the datasource is loading. you could iterate and wait using a timer. future versions may include other ...
SeaMonkey - making custom toolbar (SM ver. 1.x) - Archive of obsolete content
age if all you really want is a button for some special purpose. you can also use this page to learn about extensions, and as a starting point if you plan to write a more complex extension. note that this extension is very simplified. use other tutorials and articles to find out more—the main extensions page here is a good starting point. in particular, the articles creating toolbar buttons and
building an extension explain the process in more detail. supported applications you can use the steps on this page only with seamonkey 1.x versions. seamonkey 2 is being reworked to support the same process as firefox, thunderbird and others. this tutorial adds a customizable button to all seamonkey's toolbars. it adds a menu choice to chatzilla's menu bar (because chatzilla has no toolbar). note: ...
...ate button. the console displays the location of seamonkey's chrome directory. explanation: the chrome directory contains program files that are part of seamonkey itself, together with other files that are provided by extensions. your toolbar button will be an extension. 2. delete these two files: chrome.rdf overlays.rdf explanation: seamonkey automatically re
builds these files the next time it starts. when it re
builds them, it will include your new extension. 3. edit the file: installed-chrome.txt at the end of the file, add the following line. copy and paste the line from here, to avoid typing errors: content,install,url,resource:/chrome/custombutton/ explanation: this line registers your custom toolbar button extension, lin...
Accesskey display rules - Archive of obsolete content
ext is inserted before them. i.e., when an accesskey of "open…" is 'a', the generated label will be "open (a)…". and also when an accesskey of "your name:" is 'b', the generated label will be "your name (b):". this document calls the appended text "accesskey text". 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. e.g., when an accesskey of "ok" is 'o' and an accesskey of "キャンセル" (means "cancel") is 'c', the labels will be "ok(o)" and "キャンセル(c)" on japanese localized b...
...dtd, e.g., when you need to generate some uis dynamically, you can use .properties file or something. then, you should provide a way for specifying accesskeys which are independent from their labels. note that using '&' in label text is bad way. because japanese localizers "&cancel" need to localize to "キャンセル(&c)". this label will be displayed as "キャンセル(c)(c)" on the localized
build. so, "(c)" will be doubled. for this issue, we recommend the following format if you use .properties: <command-name>.label=cancel <command-name>.accesskey=c note that apis of nsipromptservice are using the bad way. because the apis are already frozen. therefore, xul toolkit removes accesskey text before setting the label to the buttons. however, xul application developers should not make same mi...
XUL Template Primer - Bindings - Archive of obsolete content
to create additional,optional variable bindings, in addition to those that are specified in a rule's <conditions>. this is different from the variables specified in the rule's conditions, where a value must be found for each variable for the rule to match. if a <binding> can't be matched, the rule will still fire. example to illustrate how <bindings> work, we'll examine this xul document, which
builds a simple content model an rdf/xml file. <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin" type="text/css"?> <window xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" align="vertical"> <vbox datasources="friends.rdf" ref="urn:root"> <template> <rule> <conditions> <content uri="?uri"/> ...
...ent that's built for lumpy's <hbox>, the second <label>'s value attribute (which should contain the value of ?street) is just left blank. related documents xul template primer xul template basics. xul template primer - multiple rules illustrates how to write templates with multiple <rule> elements. xul template primer - nested content illustrates how a template can be used recursively to
build nested content. xul template primer - outliner illustrates how a template can be used as a view for a xul outliner. xul template reference describes the simple xul template syntax in detail. notes 1. as of this writing, it is necessary to order <binding> elements carefully. specifically, if a binding depends on a variable in another binding, it must appear after the binding it depends on. ...
XML - Archive of obsolete content
html parsers, which use the markup to format the document in its presentational form in web browsers. like html and memoml, xul is an xml-based language. where in html the elements are used to describe the look of text, in xul the elements are used to define the elements of an interface and some rules for putting them together. collectively, the xul elements provide all of the pieces you need to
build rich interfaces. they are a toolkit whose tools are as simple as html tags but as powerful as visual gui
builder tools. in the context of the interface being assembled, these xul elements are referred to as widgets -- and sometimes collectively as the xptoolkit. as a set of interface-defining tags, xulis the widgets its tags describe. xul is little beyond the set of tags used to define interface...
...as widgets -- and sometimes collectively as the xptoolkit. as a set of interface-defining tags, xulis the widgets its tags describe. xul is little beyond the set of tags used to define interface widgets, the relationship between them, or grammar, and some built-in flexibility for using extra resources like images, html elements, and other standards-based technologies. but this is all you need to
build any interface. xul is timely. only quite recently have the standards out of which xul was fashioned matured to a level where they might really be powerful and flexible enough to support the sort of development that xul provides for. as the figure below indicates, xul is an amalgam of these different standards: css for styling or "skinning", dom for the object model and scriptable access, javascr...
content - Archive of obsolete content
attributes | properties | methods | related ] Éste elemento debería pertenecer a query ("consulta"). la pregunta en una regla debería enlazar a sólo a un elemento del contenido. los contenidos deberían tener al atributo uri . Ésto se utiliza para vincular una variable a un nodo de contenido cuando se emparejan. cuando use un árbol con los atributos flags ("banderas"), establezca dont-
build-content, ("no almacenar contenido"), use treeitem en su lugar. para más información, se encuentra disponible el tutorial xul. propiedades tag, uri ejemplos (no son necesarios) atributos inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsi...
... 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 propiedades tag type: tag name this may be set to a tag name. if set, the conditions will only match if the template
builder is parsing content for an element directly inside this tag. for example, by using a value of treechildren, the condition will only match when placing elements directly inside a treechildren tag. thus, nested elements will not match because they are directly inside a treeitem. this attribute is useful to provide different rules for outer and inner elements. uri type: ? us...
Creating a Windows Inno Setup installer for XULRunner applications - Archive of obsolete content
[setup] appname=my app appvername=my app 1.0 apppublisher=mark finkle apppublisherurl=http://developer.mozilla.org/en/docs/getting_started_with_xulrunner appsupporturl=http://developer.mozilla.org/en/docs/getting_started_with_xulrunner appupdatesurl=http://developer.mozilla.org/en/docs/getting_started_with_xulrunner defaultdirname={pf}\my app defaultgroupname=my app allownoicons=yes outputdir=..\
build\output outputbasefilename=myapp-1.0-win32 ; setupiconfile= compression=lzma solidcompression=yes [languages] name: english; messagesfile: compiler:default.isl [components] name: main; description: my app; types: full compact custom; flags: fixed name: runtime; description: xul runner runtime; types: full custom [tasks] name: desktopicon; description: {cm:createdesktopicon}; groupdescription: {...
...this will create the compiler, which you need to test by actually trying to install your xulrunner application. don't forget to then test the installed application to be sure the installation did indeed work correctly, since if you accidentally omitted resources from the script, they'l...
Dialogs in XULRunner - Archive of obsolete content
ialogs and standard operating system dialogs. dialogs are pretty fundamental to a desktop application. certain types of dialogs are used so frequently that the os can provide a default implementation. file open and save dialogs are good examples of these. whenever possible, it is a good idea to reuse these "native" dialogs so users get a consistent experience across applications. custom dialogs
building dialogs in xul is very similar to creating windows. each dialog is described in its own xul file. xul provides a dialog element to act as the container for the dialog. dialog xul files can have dtd, css, and javascript, just like windows. here is an example xul dialog: <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <dialog id="mydialog" title="my dialog...
...ogaccept javascript to execute if the accept button is pressed; similar attributes exist for the other button types. xul has a wide range of input controls you can use in a dialog. in the future, i will try to go into more detail on some of the existing and planned xul input controls. not too sure if i’ll use the <dialogheader>, but if i did, the single element would be a big time saver over
building the header from scratch. common dialogs some of the most frequently used common dialogs are for opening and saving files. for instance, windows has supported built-in file open and file save dialogs for many years, and the macintosh has always had them. it makes creating an application easier for developers; in addition, the consistent user experience also makes applications easier to use. x...
XULRunner - Archive of obsolete content
bedding of mozilla technologies in other projects and products. releases until version 41, xulrunner could be downloaded from ftp.mozilla.org. firefox (from version 3) ships with a private xulrunner package, which can run any compatible xulrunner application using the -app switch: firefox -app application.ini is equivalent to xulrunner -app application.ini older
builds are also available. overview development plan what xulrunner provides xulrunner faq nightly
builds: unstable-trunk documentation getting started with xulrunner short tutorial on
building desktop applications with xulrunner. xul tutorial once you have a working xulrunner application, use the xul tutorial to expand it into a f...
... xul tutorial once you have a working xulrunner application, use the xul tutorial to expand it into a fantastic xul application. xulrunner tips a collection of tips for working with xulrunner. deploying xulrunner an introduction on how to package your application with xulrunner. xulrunner hall of fame tracks all available applications based on xulrunner.
build documentation learn how to get the source and
build it. debug documentation steps to configure venkman to debug your app xulrunner guide a fairly complete, but outdated, introduction and tutorial for xulrunner which collates much of the documentation found here. view all... community view mozilla forums... mailing list newsgroup r...
mozilla.dev.platform FAQ - Archive of obsolete content
faq for questions asked on mozilla.dev.platform xulrunner q: xulrunner on mac os x a: instead of using /path/to/xulrunner-bin.ini, applications on a mac must be in an application bundle (foo.app). then unpack the xul app into the mac structure with xulrunner -install-app q: can you
build xulrunner with newer (>1.5) features, such as storage? a: xulrunner trunk and 1.8 (but not 1.8.0)
build storage by default, and anything can be built with storage if you put in you <tt>mozconfig --enable-storage</tt> q: program received signal exc_bad_instruction, illegal instruction/operand. 0x00016b50 in xre_createappdata () a: when you <tt>--disable-libxul</tt>, the xpcom glue doesn't have information about how to load all the dependent libraries like <tt>libgfx.dylib</tt>. in order to use xr s...
...ppdata () a: when you <tt>--disable-libxul</tt>, the xpcom glue doesn't have information about how to load all the dependent libraries like <tt>libgfx.dylib</tt>. in order to use xr successfully in <tt>--disable-libxul</tt> mode, you have to setup dyld_library_path to include <tt>/library/frameworks/xul.framework/versions/1.9a1</tt> - benjamin smedberg, fri, oct 20 2006 9:12 am q: when i try to
build a completely standalone xul app on os x (10.4.8). took an foo.app directory created with xulrunner-bin --install-app and tried to copy (using rsync -rl) the xul.framework directory into a frameworks directory in the .app bundle and then deleting the xul.framework directory from /library/frameworks, my running my app fails silently. it works fine when the xul.framework is installed in /library/fra...
2006-09-29 - Archive of obsolete content
nick thomas, who's irc nickname is (cf), responded to peter's question. the solutions are listed in the posting. announcements there were no announcements this week. discussions there were no discussions this week. meetings there were no meetings this week. ...
... nick thomas, who's irc nickname is (cf), responded to peter's question. the solutions are listed in the posting. announcements there were no announcements this week. discussions there were no discussions this week. meetings there were no meetings this week. ...
2006-10-06 - Archive of obsolete content
summary: mozilla.dev.
builds - september 30th to october 6th 2006 tb mozilla_1_8_branch
build problem on mac os x (10.4.7, universal
build) ludwig hügelschäfer stated that he has been encountering an error when he executes a "make export" operation on thunderbird (part of the mozilla_1_8_branch) since september 15th. ../../dist/host/bin/host_xpidl -m header -w -i~mozilla/xpcom/base -i../../dist/idl -o _xpidlgen/nsiconsolelistener ~/mozilla/xpcom/base/nsiconsolelistener.idl gmake[2]: *** [_xpidlgen/nsiconsolelistener.h] bus error gmake[2]: *** deleting file `_xpidlgen/nsiconsolelistener.h' gmake[1]: *** [export] error 2 make: *** [all] error 2:: on octorber 4th ludwig hügelschäfer responded to his original post with the solution to his own problem. he found out th...
...** deleting file `_xpidlgen/nsiconsolelistener.h' gmake[1]: *** [export] error 2 make: *** [all] error 2:: on octorber 4th ludwig hügelschäfer responded to his original post with the solution to his own problem. he found out that a broken host_xpidl was the source of the problem. in order to fix this he deleted the tree part where host_xpidl was located. he then was able to successfully
build thunderbird. ludwig hügelschäfer response to the posting. announcements new svg
build dependency coming on october 2nd t rowley announced that: soon svg on the trunk will be switching to use thebes directly (instead of the current choice of direct cairo or punching a hole through thebes to cairo). once completed you will need to
build cairo gfx in order to
build svg. https://bugzill...
2006-12-01 - Archive of obsolete content
meetings there were no meetings this week. ...
...lse seeing this? november 27th: rinaldi j. montessi posted a link to a bug that he himself added to bugzilla. announcements automatic configure updated back on november 27th j. paul reed announced that: the server which performs the automatic autoconf/configure generation is back online. j. paul reed has also requested that if any problems are encountered he should be contacted via irc in #
build @ irc.mozilla.org. meetings there were no meetings this week. summarized by: vanessa miranda & mohammad tirtashi ...
2006-12-01 - Archive of obsolete content
details in the thread. thunderbird options dialog string changes a lot of string changes to the thunderbird options dialog was landed. ...
...details in the thread. thunderbird options dialog string changes a lot of string changes to the thunderbird options dialog was landed. ...
2006-10-06 - Archive of obsolete content
announcements firefox 2 release candidate 2 is now available for download beltzner announced ff2 rc2 is availabe for all 3 major platforms in some 40 langauges. rc2 testing update tim riley announced minimum tests for rc2 have been run and that rc2 is go for the final staging of the release. preed followed up and said that the checker was run and "
build is go for launch". re: sunbird and lightning 0.3rc1 available sunbird and lightning 0.3rc1 is announced. this launches a (misguided?) discussion and comparison of sunbird and lightning to outlook. extension compatibility for firefox 2 chris hofmann reminds about the push to have extensions work with ff2. also invites people to file bugs about extensions that don't work. also invites people to help extension developers test for c...
...bird 2 - beta/rc? johannes koch asks where is the thunderbird roadmap? ziga sancin replies with a link and regrets about it being a bit out of date. firefox 1.5.0.8 andrew schultz asks about the gecko 1.8.0.8 schedule. dbaron and chris ilias respond with relative dates but still no schedule. rc2 status schrep asks for any final things standing in the way of rc2. rc2 starts spinning and en-us
builds are annoucned. beltzner says that (as per bon echo status meeting) that rc2 is going to be re-spun to fix some final bugs that were regressed and patches that were just landed. reminder - ff2 rc2 code freeze 9/29/2006 at 9am pdt schrep started a discussion of bugs that need to be fixed for the ff2 rc2 code freeze to go ahead. meetings weekly status meeting - 10/02/2006 - (last meeting notes) ...
2006-12-01 - Archive of obsolete content
1 update - we need help! jay patael calls for help getting the next update ff 1.5.x and 2.x. he requests blocker bug owners get their patches in asap and since check approval will be granted daily that they be ready to check their patches in as soon as they are approved. automatic configure updated back preed announces that the machine that does the automatic autoconf/configure generation (egg.
build.mozilla.org) is back up. gecko 1.9a1 triage meetings vlad announced that the gecko devs will be taking over the ff2 triage meetings until gecko 1.9a1 ships (nov 28th). watch #grandparadiso for updates. discussion november 29th gecko 1.9/gran paradiso status meeting other than annoucing the meeting, this thread discusses where else can info about what happens at the meetings be found (since t...
...es where else can info about what happens at the meetings be found (since the agenda often seems bare). m.d.planning and dev news blog are suggested. bon echo project status: remaining "to-do" items beltzner starts a discussion on when to offer 1.5.0.8+ users the chance to upgrade to ff2.x (now or when ff2.0.0.1 is released). also discussed is the the mozilla_1_8_branch's npotb (not part of the
build) checkin policy. this newsgroup or "governance"? mitchell baker asks where should topics about organization and governance, moz.dev.planning or moz.governance? mozilla.org staff, project drivers, and technical oversight mike connor starts a discussion about the need for a "buck stops here" group and the replacement of drivers@mozilla.org. three replacement groups (with sample makeup) are prop...
2006-09-06 - Archive of obsolete content
summary: mozilla.dev.tech.xpcom - oct 06-13, 2006 announcements none during this week. discussions windows gecko-sdk and g++ components discussion on the problems and possible solutions running cygwin/g++ compiled xpcom components with windows-based gecko-sdk/xulrunner dll/exes. threading in xpcom rules on threading in xpcom or to firefox extensions. ...
...xpcom - oct 06-13, 2006 announcements none during this week. discussions windows gecko-sdk and g++ components discussion on the problems and possible solutions running cygwin/g++ compiled xpcom components with windows-based gecko-sdk/xulrunner dll/exes. threading in xpcom rules on threading in xpcom or to firefox extensions. how to
build xpcom component on mac os x a tutorial on how to
build xpcom component on mac os x firefox crashes when calling a function provided by a .so library a solution to the problem loading a shared library when using xpcom firefoxes crashes while getting url in xpcom solutions to resolve the problem of the firefox crash when trying to get the path and the prepath of the url of the current page in xpcom meetings none during this week. ...
External resources for plugin creation - Archive of obsolete content
ure highlights include thread safety checks, unicode support (with std::wstring), activex support, built-in drawing model negotiation for mac, automatic type conversion (including javascript arrays and objects), advanced security features, and more. supported development environments are visual studio on windows, xcode on mac, and gcc on linux. all platforms rely on cmake for easy cross-platform
builds. project: nixysa project home page description (from the home page): nixysa is a framework written in python to automatically generate glue code for npapi plugins (plugins for browsers such as google chrome or firefox), letting you easily expose c++ classes to javascript from a simple idl representation. nixysa was originally conceived for the needs of o3d, but is flexible enough to support a wi...
...he qtbrowserplugin solution makes it easy to write browser plugins that can be used in mozilla firefox, safari, opera, google chrome, qtwebkit and any other web browser that supports the "netscape plugin api", npapi articles, information, and tutorials npapi has been around a very long time, and there have been many attempts to distill down useful information on creating them: colonelpanic.net
building a firefox plugin - part one: discusses the difference between npapi and npruntime and summarizes the basic apis needed to create a plugin
building a firefox plugin - part two: discusses the basic lifecycle of a npapi plugin
building a firefox plugin - part three: discusses npobjects and how to use them memory management in npapi: discusses how memory is managed in a npapi plugin browser plugin...
The First Install Problem - Archive of obsolete content
mes the software may need administrator privileges. thus, some installers may need to write to the hkey_current_user key; this doesn't require administrator privileges. traditionally, hkey_current_user is a copy of everything in hkey_local_machine. at present plugins registered using the hkey_current_user\software\mozillaplugins\ tree are ignored by firefox (bug 293062) but this is fixed in trunk
builds (bug 293062). add the following values to the newly created key -- some are string values (reg_sz), and some are actually subkeys. string values take the form stringvalue=valuedata, and subkeys contain their own string values and value data. "path" -- string value -- this would be the absolute path to the plugin module. this is the path to the actual dll. (note that the file name mu...
...cation,version=5.01] xptpath=c:\mycompany\myapplication\netscape\npmyapp.xpt "geckoversion" -- this is the optional mention of the minimal gecko version that the browser is compatible with. example: [hkey_local_machine\software\mozillaplugins\@mycompany.com/myapplication,version=5.01] geckoversion=0.9.4.2 suggesting compliance with compuserve's deployment of a
build of gecko known as 0.9.4.2. note that this means that at a minimum, the plugin vendor is ensuring compatibility with 0.9.4.2 browsers. "productname" -- this is the string value name of the actual product. example: [hkey_local_machine\software\mozillaplugins\@mycompany.com/myapplication,version=5.01] productname=myapplication player 5 "version" -- this is the vers...
Sunbird Theme Tutorial - Archive of obsolete content
same as sunbird's classic theme. modifying your theme to modify your theme, change the css and image files in any way you like. for testing purposes, go to the <tt>calendar</tt> directory that you have just pasted. edit the file <tt>calendar.css</tt> there. add this line at the end: label {color: red;} save the file. fixing bug 320823 if you are using the sunbird 0.3a1 release, or a test
build before 2005-12-21, then you must apply a fix for bug 320823 to allow sunbird to use themes. go to sunbird's program directory, then to the <tt>defaults</tt> directory there. in the <tt>pref</tt> directory, edit the file <tt>sunbird.js</tt> and search for the <tt>pref("extensions</tt> entries. add the line: pref("extensions.dss.enabled", false); save the file. using your theme to use your the...
...terface, go to sunbird's program directory, then to the <tt>chrome/content/calendar</tt> directory there. examine the files there to understand how sunbird's user interface is constructed. the basic interface is written in xul, but some parts are constructed using xbl or javascript. to discover details of the interface, you can also use the dom inspector tool in firefox. install a compatible test
build of the calendar extension in firefox 1.5, and examine its interface. the details are mostly the same as in sunbird. note: sunbird's views changed at the end of december 2005. so do not waste time styling the old views. work with a recent test
build so that your theme will be compatible with the next release. testing further changes when you make further changes to your theme, test them by res...
Using Firebug and jQuery (Screencast) - Archive of obsolete content
note: this screencast is originally from: http://ejohn.org/blog/hacking-digg-w...ug-and-jquery/ this is an adaptation of a presentation that i gave while at mashup camp boston. we're going to take an introductory look at the firebug firefox extension and the jquery javascript library - combining the two to
build a reusable bookmarklet that can manipulate digg posts and comments. click the video link to begin (14:39 minutes long, 59mb): http://developer.mozilla.org/presentations/screencasts/jresig-digg-firebug-jquery.mp4 download: right-click this link and select save as... in order to download a copy of your own. (59mb) bookmarklets: in the presentation, i refer to a bookmarklet that you can use to introduce jquery into a web page. drag these bookmarklets found on this page in...
...your browser, in order to use them. related links: firebug firefox extension jquery javascript library jquery selector documentation digg learning jquery: jquerify bookmarklet if you wish to use greasemonkey instead of a bookmarklet, then by all means, please do so. you can use the ability to quickly analyze and inspect a page that firebug and jquery affords you, using the results to
build a greasemonkey script, instead of a simple bookmarklet. i only really intended this to be a quick introduction to the subject, so please feel free to explore it more! more tips: here are some more jquery selectors that you can use on a digg post: $("li.c-bury > div").remove(); - remove all buried comments, but none of the direct replies. $("div.c-body").show(); - show all comments, even o...
Developing Mozilla XForms - Archive of obsolete content
then open your form that causes problems and have a look on the console. often you'll find the first starting points here or in the error console. schema validation problems the schema-validation extension contains a logging facility that can show some internals on the schema processing. ...
...s and have a look on the console. often you'll find the first starting points here or in the error console. schema validation problems the schema-validation extension contains a logging facility that can show some internals on the schema processing. to activate this logging output, set the nspr_log_modules environment variable: export nspr_log_modules=schemavalidation:5 this only works on a debug
build as described above. ...
Mozilla XForms User Interface - Archive of obsolete content
firefox. later we have plans to support xforms hosted by svg. the xforms specs define two kinds of xforms ui elements, called 'form controls' and 'xforms user interface'. elements from the "form controls" group allows users to interact with instance data. the set of "xforms user interface" elements exist to aid form authors in combining host language markup and xforms markup together in order to
build user interfaces. some of the 'form controls' can have multiple appearances and thus may be rendered in multiple ways. we use the data type of the instance node that the form control is bound to as a clue when making a rendering decision. the form author can also use the 'appearance' attribute on the form control to give us another clue. for example, a xforms input control may appear as a text fie...
...similarly, if you see xhtml only or xul only, then it means the control is available only in that host language. attribute sets this section describes attributes that are often used on xforms elements. these attributes are combined into following logical groups. ui common the ui common attribute set (see the spec) contains the attributes that are available for the xforms elements that are used to
build the user interface presentation in a form. appearance - the value provided by the form author gives a hint to the processor as to which widget to use to represent the xforms control. three possible values are available to the author: minimal, compact and full. generally speaking, the main purpose for these values is to reflect how much space (screen real estate) the displayed widget will take.
Windows Media in Netscape - Archive of obsolete content
netscape 7.1 will work with both the windows media player 6.4 activex control as well as versions 7 through 9. this article explains how to embed the windows media player activex control in web pages to support netscape 7.1, how to control the windows media player activex control using javascript and provides working examples. ...
...media. controls such as windows media player also interact closely with the scripts in a web page. netscape 7.1 is the first netscape gecko™ browser to support the windows media player as an activex control -- previous netscape browsers did not support any activex controls, and thus detecting which versions of netscape support the windows media activex control is an important first step towards
building multimedia experiences using html, javascript, and the windows media activex control. the windows media 9 series sdk documentation for netscape browsers says that versions of netscape (including 6.2 and 7.0) support the embedding of the windows media player control using a java applet. while that approach works with browsers older than netscape 7.1, this section introduces the use of the objec...
Obsolete: XPCOM-based scripting for NPAPI plugins - Archive of obsolete content
cases for the above mentioned new variables should be added to the plugin implementation of npp_getvalue (see example 3). how to call plugin native methods the following html code will do the job:</p> this should be changed, we shouldn't advocate embed <embed type="application/plugin-mimetype"> <script language="javascript"> var embed = document.embeds[0]; embed.nativemethod(); </script> how to
build and install having the built mozilla tree is probably not necessary, but
building the plugin with a scriptable instance interface will require mozilla headers and the xpcom compatible idl compiler -- xpidl.exe. ms devstudio midl must not be used. (let's assume 'testplugin' as a plugin name-place holder.) compile nsitestplugin.idl with the idl compiler. this will generate nsitestplugin.h and nsit...
...put nptestplugin.dll to the plugins folder. related sources the full sample plugin code can be found in the mozilla source tree under modules/plugin/samples/4x-scriptable/ ibm developer works has published a good article on xpcom. examples example 1. ...
Game monetization - Game development
if your work is a serious endeavour on the path to becoming an independent game developer able to make a living, read on and see what your options are. the technology is mature enough; now it's just about chosing the right approach. paid games the first, most obvious choice that may come to your mind might be selling the games the way it is done for huge aaa titles — with a fixed, up front price. ...
...the client, sometimes implementing them as they instruct you. as an example if you've got a game where a player taps items of food, you could change the food to the client's products to give them advertising. prices in this model vary greatly depending on the brand, client, and amount of work you put in. other non-game focused monetization strategies there are other ways you can earn money when
building html5 games, and it doesn't even have to be game-related. selling resources if you're a graphic designer, you can sell the assets from the games you've created, or something brand new exclusively for that purpose at online shops like envato market. it's not much, but if you're a known designer it can be an extra passive stream of income. writing articles and tutorials it is possible to wri...
GLSL Shaders - Game development
rs fragment (or texture) shaders define rgba (red, blue, green, alpha) colors for each pixel being processed — a single fragment shader is called once per pixel. the purpose of the fragment shader is to set up the gl_fragcolor variable. gl_fragcolor is a built-in glsl variable like gl_position. the calculations result in a variable containing the information about the rgba color. demo let's
build a simple demo to explain those shaders in action. be sure to read three.js tutorial first to grasp the concept of the scene, its objects, and materials. note: remember that you don't have to use three.js or any other library to write your shaders — pure webgl (web graphics library) is more than enough. we've used three.js here to make the background code a lot simpler and clearer to understan...
...one will contain the fragment shader. the third one will contain the actual javascript code generating the scene. before reading on, copy this code to a new text file and save it in your working directory as index.html. we'll create a scene featuring a simple cube in this file to explain how the shaders work. the cube's source code instead of creating everything from scratch we can reuse the
building up a basic demo with three.js source code of the cube. most of the components like the renderer, camera, and lights will stay the same, but instead of the basic material we will set the cube's color and position using shaders. go to the cube.html file on github, copy all the javascript code from inside the second <script> element, and paste it into the third <script> element of the current ex...
WebVR — Virtual Reality for the Web - Game development
nd converting that into useful data you can use in your games and other applications. note: there are of course other apis useful for creating games, for example the gamepad api for control inputs, and the device orientation api for handling display orientation on mobile. browser support and spec status currently browser support for the webvr api is still experimental — it works in nightly
builds of firefox and experimental
builds of chrome (mozilla and google teamed up to work on the implementation together), but sooner rather than later we'll see it in regular
builds. the webvr spec is in editor's draft status which means it is still subject to change. the development is led by vladimir vukicevic from mozilla and brandon jones from google. for more info be sure to visit the mozvr.com ...
...ll deliver a unique and valuable experience across all of them. it's like responsive design, but applied to the vr world — write once and run in any vr headset ... or without it. you can check the webvr boilerplate sources — it's a good example to start learning webvr from, and a starting point for any web-based vr experience. there's also a markup framework called a-frame that offers simple
building blocks for webvr, so you can rapidly
build and experiment with vr websites and games: read the
building up a basic demo with a-frame tutorial for more details. immersion is more important than gameplay or graphics - you have to feel you're "inside" the experience. it's not easy to achieve, but it doesn't require realistic images. quite the contrary as having a basic shapes flying around in hi...
Audio for Web games - Game development
osions to be accompanied by a thundering boom, not followed by one, after all. background music with the web audio api although we can use the <audio> element to deliver linear background music that doesn't change in reaction to the game environment, the web audio api is ideal for implementing a more dynamic musical experience. you may want music to change depending on whether you are trying to
build suspense or encourage the player in some way. music is an important part of the gaming experience and depending on the type of game you are making you may wish to invest significant effort into getting it right. element to deliver linear background music that doesn't change in reaction to the game environment, the web audio api is ideal for implementing a more dynamic musical experience. you ma...
...ortant part of the gaming experience and depending on the type of game you are making you may wish to invest significant effort into getting it right. element to deliver linear background music that doesn't change in reaction to the game environment, the web audio api is ideal for implementing a more dynamic musical experience. you may want music to change depending on whether you are trying to
build suspense or encourage the player in some way. music is an important part of the gaming experience and depending on the type of game you are making you may wish to invest significant effort into getting it right. one way you can make your music soundtrack more dynamic is by splitting it up into component loops or tracks. this is often the way that musicians compose music anyway, and the web audi...
Unconventional controls - Game development
, which can be used to control your games if you know how. the earliest demo of captain rogers: battle at andromeda was adjusted to work on a huge tv. interestingly enough, the first captain rogers game (asteroid belt of sirius) was optimized for low-end, small-screen, cheap smartphones running firefox os, so you can see the difference three years can make — you can read the whole story in our
building games for firefox os tv hacks post. using a tv remote to control the game ended up being surprisingly easy, because the events fired by the controller are emulating conventional keyboard keys. captain rogers had the keyboard controls implemented already: this.cursors = this.input.keyboard.createcursorkeys(); //... if(this.cursors.right.isdown) { // move player right } it works out of ...
...erything with only your hands, but it's totally doable for the simple captain roger's gameplay — steering the ship and shooting the bullets. there's good hello world and getting started javascript tutorials available on the leap motion documentation pages, which will get you through the basics. you can also check out the tutorial about using leap motion plugin for kiwi.js, or the case study of
building a web game with leap motion and pixi.js. be sure to visit the leapjs repository on github to learn about the javascript client for the leap motion controller and read the documentation there. if all else fails, there's also a gallery of working examples you can look at. to get the leap motion working on your computer you have to first install it by following the steps at leapmotion.com/setup.
Implementing game control mechanisms - Game development
one of html5's main advantages as a game development platform is the ability to run on various platforms and devices. streamlining cross device differences creates multiple challenges, not least when providing appropriate controls for different contexts. in this series of articles we will show you how you can approach
building a game that can be played using touchscreen smartphones, mouse and keyboard, and also less common mechanisms such as gamepads. ...
...een smartphones, mouse and keyboard, and also less common mechanisms such as gamepads. case study we'll be using the captain rogers: battle at andromeda demo as an example. captain rogers was created using the phaser framework, the most popular tool for simple 2d game development in javascript right now, but it should be fairly easy to reuse the knowledge contained within these articles when
building games in pure javascript or any other framework. if you're looking for a good introduction to phaser, then check the 2d breakout game using phaser tutorial. in the following articles we will show how to implement various different control mechanisms for captain rogers to support different platforms — from touch on mobile, through keyboard/mouse/gamepad on desktop, to more unconventional one...
Tiles and tilemaps overview - Game development
this results in performance and memory usage gains — big image files containing entire level maps are not needed, as they are constructed by small images or image fragments multiple times. ...
...hat could appear on top of several terrain types (like grass, sand or brick) could be included on it's own separate tile which is then rendered on a new layer, instead of several rock tiles, each with a different background terrain. if characters or other game sprites are drawn in the middle of the layer stack, this allows for interesting effects such as having characters walking behind trees or
buildings. the following screenshot shows an example of both points: a character appearing behind a tile (the knight appearing behind the top of a tree) and a tile (the bush) being rendered over different terrain types. the logic grid since tilemaps are an actual grid of visual tiles, it is common to create a mapping between this visual grid and a logic grid. the most common case is to use this lo...
2D breakout game using pure JavaScript - Game development
tages should look like. you will learn the basics of using the <canvas> element to implement fundamental game mechanics like rendering and moving images, collision detection, control mechanisms, and winning and losing states. to get the most out of this series of articles you should already have basic to intermediate javascript knowledge. ...
...ing and moving images, collision detection, control mechanisms, and winning and losing states. to get the most out of this series of articles you should already have basic to intermediate javascript knowledge. after working through this tutorial you should be able to
build your own simple web games. lesson details all the lessons — and the different versions of the mdn breakout game we are
building together — are available on github: create the canvas and draw on it move the ball bounce off the walls paddle and keyboard controls game over
build the brick field collision detection track the score and win mouse controls finishing up starting with pure javascript is the best way to get a solid knowledge of web game development. after that, you can pick any framework you like...
HTML: A good basis for accessibility - Learn web development
s is from the first button">click me!</div> <div data-message="this is from the second button">click me too!</div> <div data-message="this is from the third button">and me!</div> but using such code is not advised — you immediately lose the native keyboard accessibility you would have had if you'd just used <button> elements, plus you don't get any of the default css styling that buttons get.
building keyboard accessibility back in adding such advantages back in takes a bit of work (you can see an example in our fake-div-buttons.html example — also see the source code). here we've given our fake <div> buttons the ability to be focused (including via tab) by giving each one the attribute tabindex="0": <div data-message="this is from the first button" tabindex="0">click me!</div> <div dat...
...t object to detect when a button has been pressed on the keyboard. we check what button was pressed via the event object's keycode property; if it is the keycode that matches return/enter, we run the function stored in the button's onclick handler using document.activeelement.click(). activeelement which gives us the element that is currently focused on the page. this is a lot of extra hassle to
build the functionality back in. and there's bound to be other problems with it. better to just use the right element for the right job in the first place. meaningful text labels ui control text labels are very useful to all users, but getting them right is particularly important to users with disabilities. you should make sure that your button and link text labels are understandable and distinctive...
HTML: A good basis for accessibility - Learn web development
s is from the first button">click me!</div> <div data-message="this is from the second button">click me too!</div> <div data-message="this is from the third button">and me!</div> but using such code is not advised — you immediately lose the native keyboard accessibility you would have had if you'd just used <button> elements, plus you don't get any of the default css styling that buttons get.
building keyboard accessibility back in adding such advantages back in takes a bit of work (you can see an example in our fake-div-buttons.html example — also see the source code). here we've given our fake <div> buttons the ability to be focused (including via tab) by giving each one the attribute tabindex="0": <div data-message="this is from the first button" tabindex="0">click me!</div> <div dat...
...t object to detect when a button has been pressed on the keyboard. we check what button was pressed via the event object's keycode property; if it is the keycode that matches return/enter, we run the function stored in the button's onclick handler using document.activeelement.click(). activeelement which gives us the element that is currently focused on the page. this is a lot of extra hassle to
build the functionality back in. and there's bound to be other problems with it. better to just use the right element for the right job in the first place. meaningful text labels ui control text labels are very useful to all users, but getting them right is particularly important to users with disabilities. you should make sure that your button and link text labels are understandable and distinctive...
WAI-ARIA basics - Learn web development
trols, and occasionally other controls as needed (for example the up and down cursor to move between options in a <select> box). however, sometimes you will end up having to write code that either uses non-semantic elements as buttons (or other types of control), or uses focusable controls for not quite the right purpose. you might be trying to fix some bad code you've inherited, or you might be
building some kind of complex widget that requires it. in terms of making non-focusable code focusable, wai-aria extends the tabindex attribute with some new values: tabindex="0" — as indicated above, this value allows elements that are not normally tabbable to become tabbable. this is the most useful value of tabindex. tabindex="-1" — this allows not normally tabbable elements to receive focu...
...dicated above, this value allows elements that are not normally tabbable to become tabbable. this is the most useful value of tabindex. tabindex="-1" — this allows not normally tabbable elements to receive focus programmatically, e.g. via javascript, or as the target of links. we discussed this in more detail and showed a typical implementation back in our html accessibility article — see
building keyboard accessibility back in. accessibility of non-semantic controls this follows on from the previous section — when a series of nested <div>s along with css/javascript is used to create a complex ui-feature, or a native control is greatly enhanced/changed via javascript, not only can keyboard accessibility suffer, but screenreader users will find it difficult to work out what the featu...
What is accessibility? - Learn web development
is as being about people with disabilities, but the practice of making sites accessible also benefits other groups such as those using mobile devices, or those with slow network connections. you might also think of accessibility as treating everyone the same, and giving them equal opportunities, no matter what their ability or circumstances. just as it is wrong to exclude someone from a physical
building because they are in a wheelchair (modern public
buildings generally have wheelchair ramps or elevators), it is also not right to exclude someone from a website because they have a visual impairment. we are all different, but we are all human, and therefore have the same human rights. accessibility is the right thing to do. providing accessible sites is part of the law in some countries, which...
...also not right to exclude someone from a website because they have a visual impairment. we are all different, but we are all human, and therefore have the same human rights. accessibility is the right thing to do. providing accessible sites is part of the law in some countries, which can open up some significant markets that otherwise would not be able to use your services or buy your products.
building accessible sites benefit everyone: semantic html, which improves accessibility, also improves seo, making your site more findable. caring about accessibility demonstrates good ethics and morals, which improves your public image. other good practices that improve accessibility also make your site more usable by other groups, such as mobile phone users or those on low network speed. in fact...
Backgrounds and borders - Learn web development
from adding gradients, background images, and rounded corners, backgrounds and borders are the answer to a lot of styling questions in css. prerequisites: basic computer literacy, basic software installed, basic knowledge of working with files, html basics (study introduction to html), and an idea of how css works (study css first steps.) objective: to learn how to style the background and border of boxes. styling backgrounds in css the css background property is a shorthand for a number of background longhand properties that we will meet in this lesson. ...
... box. do explore the different property pages if you want to find out more about any of the features we have discussed. each page on mdn has more examples of usage for you to play with and enhance your knowledge. in the next lesson, we will find out how the writing mode of your document interacts with your css. ...
Cascade and inheritance - Learn web development
while working through this lesson may seem less immediately relevant and a little more academic than some other parts of the course, an understanding of these things will save you much pain later on! we encourage you to work through this section carefully, and check that you understand the concepts before moving on. ...
...t complicated thing we've covered so far in the course, and is something that even professional web developers sometimes find tricky. we'd advise that you return to this article a few times as you continue through the course, and keep thinking about it. refer back here if you start to come across strange issues with styles not applying as expected. it could be a specificity issue. ...
Debugging CSS - Learn web development
perhaps you believe that a certain selector should match an element, but nothing happens, or a box is a different size than you expected. this article will give you guidance on how to go about debugging a css problem, and show you how the devtools included in all modern browsers can help you to find out what is going on. ...
...g. on mozilla's bugzilla site). as you become more experienced with css, you will find that you get faster at figuring out issues. however even the most experienced of us sometimes find ourselves wondering what on earth is going on. taking a methodical approach, making a reduced test case, and explaining the issue to someone else will usually result in a fix being found. ...
Handling different text directions - Learn web development
we create borders on the top, right, bottom, and left of a box, for example. these physical dimensions map very neatly to content that is viewed horizontally, and by default the web tends to support left-to-right languages (e.g. english or french) better than right-to-left languages (such as arabic). in recent years however, css has evolved in order to better support different directionality of content, including right-to-left but also top-to-bottom content (such as japanese) — these different directionalities are called writing modes. ...
...this lesson are becoming increasingly important in css. an understanding of the block and inline direction — and how text flow changes with a change in writing mode — will be very useful going forward. it will help you in understanding css even if you never use a writing mode other than a horizontal one. in the next module we will take a good look at overflow in css. ...
Images, media, and form elements - Learn web development
images, other media, and form elements behave a little differently in terms of your ability to style them with css than regular boxes. understanding what is and isn't possible can save some frustration, and this lesson will highlight some of the main things that you need to know. prerequisites: basic computer literacy, basic software installed, basic knowledge of working with files, html basics (study introduction to html), and an idea of how css works (study css first steps.) objective: to understand the way that some elements behave unusually when styled with css. ...
...ests to verify that you've retained this information before you move on — see test your skills: images and form elements. summary this lesson has highlighted some of the differences you will encounter when working with images, media, and other unusual elements in css. in the next article we'll look over a few tips you'll find useful when you have to style html tables. ...
Overflowing content - Learn web development
in this guide you will learn what overflow is and how to manage it. prerequisites: basic computer literacy, basic software installed, basic knowledge of working with files, html basics (study introduction to html), and an idea of how css works (study css first steps.) objective: to understand overflow and how to manage it. what is overflow? everything in css is a box. you can constrain the size of these boxes by assigning values of width and height (or inline-size and block-size). overflow happens when there is too much content to fit in a box. css provides various tools to manage overflow. ...
...ormation? to check your understanding, see test your skills: overflow. summary this lesson introduced the concept of overflow. you should understand that default css avoids making overflowing content invisible. you have discovered that you can manage potential overflow, and also, that you should test work to make sure it does not accidentally cause problematic overflow. ...
Attribute selectors - Learn web development
in css you can use attribute selectors to target elements with certain attributes. this lesson will show you how to use these very useful selectors. prerequisites: basic computer literacy, basic software installed, basic knowledge of working with files, html basics (study introduction to html), and an idea of how css works (study css first steps.) objective: to learn what attribute selectors are and how to use them. ...
...: there is also a newer value s, which will force case-sensitive matching in contexts where matching is normally case-insensitive, however this is less well supported in browsers and isn't very useful in an html context. next steps now we are done with attribute selectors, you can continue on to the next article and read about pseudo-class and pseudo-element selectors. ...
Combinators - Learn web development
prerequisites: basic computer literacy, basic software installed, basic knowledge of working with files, html basics (study introduction to html), and an idea of how css works (study css first steps.) objective: to learn about the different combinator selectors that can be used in css. ...
...s! we have covered a lot in this article, but can you remember the most important information? you can find some further tests to verify that you've retained this information before you move on — see test your skills: selectors. moving on this is the last section in our lessons on selectors. next we will move on to another important part of css — the css box model. ...
Pseudo-classes and pseudo-elements - Learn web development
there are a large number of these, and they often serve quite specific purposes. once you know how to use them, you can look at the list to see if there is something which works for the task you are trying to achieve. once again the relevant mdn page for each selector is helpful in explaining browser support. prerequisites: basic computer literacy, basic software installed, basic knowledge of working with files, html basics (study introduction to html), and an idea of how css works (study css first steps.) objective: to learn about the pseudo-class and pseudo-element selectors. ...
...ocument containing a grammar error as flagged by the browser. ::marker matches the marker box of a list item, which typically contains a bullet or number. ::selection matches the portion of the document that has been selected. ::spelling-error matches a portion of the document containing a spelling error as flagged by the browser. ...
CSS selectors - Learn web development
there are a wide variety of css selectors available, allowing for fine-grained precision when selecting elements to style. in this article and its sub-articles we'll run through the different types in great detail, seeing how they work. prerequisites: basic computer literacy, basic software installed, basic knowledge of working with files, html basics (study introduction to html), and an idea of how css works (study css first steps.) objective: to learn how css selectors work in detail. what is a selector? you have met selectors already. ...
... selects paragraphs that are direct children of <article> elements using the child combinator (>): article > p { } next steps you can take a look at the reference table of selectors below for direct links to the various types of selectors in this learn section or on mdn in general, or continue on to start your journey by finding out about type, class, and id selectors. previous overview:
building blocks next reference table of selectors the below table gives you an overview of the selectors you have available to use, along with links to the pages in this guide which will show you how to use each type of selector. i have also included a link to the mdn page for each selector where you can check browser support information. you can use this as a reference to come back to when you ne...
Sizing items in CSS - Learn web development
understanding how big the different features in your design will be is important, and in this lesson we will summarize the various ways elements get a size via css and define a few terms around sizing that will help you in the future. prerequisites: basic computer literacy, basic software installed, basic knowledge of working with files, html basics (study introduction to html), and an idea of how css works (study css first steps.) objective: to understand the different ways we can size things in css. ...
...ve retained this information before you move on — see test your skills: sizing. summary this lesson has given you a rundown of some key issues that you might run into when sizing things on the web. when you move onto css layout, sizing will become very important in mastering the different layout methods, so it is worth understanding the concepts here before moving on. ...
Styling tables - Learn web development
this article provides a guide to making html tables look good, with some specific table styling techniques highlighted. prerequisites: html basics (study introduction to html), knowledge of html tables, and an idea of how css works (study css first steps.) objective: to learn how to effectively style html tables. a typical html table let's start by looking at a typical html table. well, i say typical — most html table examples are about shoes, or the weather, or employees; we decided to make things more interesting by making it about famous punk bands from the uk. ...
......
The box model - Learn web development
prerequisites: basic computer literacy, basic software installed, basic knowledge of working with files, html basics (study introduction to html), and an idea of how css works (study css first steps.) objective: to learn about the css box model, what makes up the box model and how to switch to the alternate model. ...
... — see test your skills: the box model. summary that's most of what you need to understand about the box model. you may want to return to this lesson in the future if you ever find yourself confused about how big boxes are in your layout. in the next lesson, we will take a look at how backgrounds and borders can be used to make your plain boxes look more interesting. ...
CSS values and units - Learn web development
in this lesson we will take a look at some of the most common values and units in use. prerequisites: basic computer literacy, basic software installed, basic knowledge of working with files, html basics (study introduction to html), and an idea of how css works (study css first steps.) objective: to learn about the different types of values and units used in css properties. ...
...as you work through these lessons. the key thing to remember is that each property has a defined list of allowed values, and each value has a definition explaining what the sub-values are. you can then look up the specifics here on mdn. ...
create fancy boxes - Learn web development
making them nice looking is both fun and challenging. it's fun because it's all about turning a design idea into working code; it's challenging because of annoying constraints and crazy freedom in the use of css. let's do some fancy boxes. before we start getting into the practical side of it, make sure you are familiar with the css box model. it's also a good idea, but not a prerequisite, to be familiar with some css layout basics. on the technical side, creating fancy boxes are all about mastering css border and background properties and how to apply them to a given box. but beyond the technics its also all about unleashing your creativity. ...
...ancy::after { /* this is the size of the clouds left ear */ width : 100px; height : 100px; /* we sligthly move it to the right */ right : -60px; /* to make sure that the bottom of the cloud remains flat, we must make the bottom left corner of the right ear square. */ border-bottom-left-radius: 0; } blockquote a more practical example of using pseudo-elements is to
build a nice formatting for html <blockquote> elements. 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. <i>isaac asimov</i></blockquote> <blockquote lang="fr">l'intelligence, c'est comme les parachutes, quand on n...
Styling links - Learn web development
cs (study introduction to html), css basics (study introduction to css), css text and font fundamentals. objective: to learn how to style link states, and how to use links effectively in common ui features like navigation menus. let's look at some links we looked at how links are implemented in your html according to best practices in creating hyperlinks. in this article we'll
build on this knowledge, showing you best practices for styling links. link states the first thing to understand is the concept of link states — different states that links can exist in, which can be styled using different pseudo-classes: link (unvisited): the default state that a link resides in, when it isn't in any other state. this can be specifically styled using the :link pseudo class. vi...
...le your links — you are free to use any properties you like. just try not to go too crazy! styling some links now we've looked at the default states in some detail, let's look at a typical set of link styles. to start off with, we'll write out our empty rulesets: a { } a:link { } a:visited { } a:focus { } a:hover { } a:active { } this order is important because the link styles
build on one another, for example the styles in the first rule will apply to all the subsequent ones, and when a link is being activated, it is also being hovered over. if you put these in the wrong order, things won't work properly. to remember the order, you could try using a mnemonic like love fears hate. now let's add some more information to get this styled properly: body { width: 300px; mar...
Basic native form controls - Learn web development
pairs: the x value key is the value of the name attribute followed by the string ".x". the y value key is the value of the name attribute followed by the string ".y". so for example when you click on the image at coordinate (123, 456) and it submits via the get method, you'll see the values appended to the url as follows: http://foo.com?pos.x=123&pos.y=456 this is a very convenient way to
build a "hot map". how these values are sent and retrieved is detailed in the sending form data article. file picker there is one last <input> type that came to us in early html: the file input type. forms are able to send files to a server (this specific action is also detailed in the sending form data article). the file picker widget can be used to choose one or more files to send. to create a fil...
..., we'll take a look at the newer values of the type attribute that were added in html5. ...
The HTML5 input types - Learn web development
. note: most of the features discussed in this article have wide support across browsers. we'll note any exceptions. if you want more detail on browser support, you should consult our html forms element reference, and in particular our extensive <input> types reference. because html form control appearance may be quite different from a designer's specifications, web developers sometimes
build their own custom form controls. we cover this in an advanced tutorial: how to
build custom form widgets. e-mail address field this type of field is set using the value email for the type attribute: <input type="email" id="email" name="email"> when this type is used, the user is required to type a valid email address into the field. any other content causes the browser to display an error when...
...viors, but which are still essential to know about. we cover those in the next article. ...
Test your skills: Advanced styling - Learn web development
asks. if you get stuck, then ask us for help — see the assessment or further help section at the bottom of this page. advanced form styling 1 in our first advanced styling tasks, we want you to handle making a search input as consistent as possible across browsers — a trickier task than with standard text inputs, even on modern browsers. we've already provided you with a basic reset to
build upon. first of all, try giving the search box a consistent width, height, padding, and border color across browsers. you'll find that some browsers will not behave in terms of the form element's height. this is due to native os styling being used in some cases. how can you remove this native styling? once you've removed the native styling, you'll need to add back one of the features it was p...
... search box, and be lined up vertically as well? try updating the live code below to recreate the finished example: download the starting point for this task to work in your own editor or in an online editor. advanced form styling 2 in our next task we provide you with a set of three radio buttons. we want you to give them custom styling. we've already provided you with a basic reset to
build upon. first of all, get rid of their default styling. next, give the radio buttons a reasonable base style — the style they have when the page first loads. this can be anything you like, but you probably want to set a width and height (of somewhere between about 18 and 24 pixels), and a subtle border and/or background color. now give the radio buttons a different style for when they are se...
Front-end web developer - Learn web development
that you have basic html knowledge before starting to learn css. you should at least study introduction to html first. how will i know i'm ready to move on? the assessments in each module are designed to test your knowledge of the subject matter. completing the assessments confirms that you are ready to move on to the next module. modules css first steps (10–15 hour read/exercises) css
building blocks (35–45 hour read/exercises) styling text (15–20 hour read/exercises) css layout (30–40 hour read/exercises) additional resources css layout cookbook interactivity with javascript time to complete: 135–185 hours prerequisites it is recommended that you have basic html knowledge before starting to learn javascript. you should at least study introduction to html first. ...
...html knowledge before starting to learn javascript. you should at least study introduction to html first. how will i know i'm ready to move on? the assessments in each module are designed to test your knowledge of the subject matter. completing the assessments confirms that you are ready to move on to the next module. modules javascript first steps (30–40 hour read/exercises) javascript
building blocks (25–35 hour read/exercises) introducing javascript objects (25–35 hour read/exercises) client-side web apis (30–40 hour read/exercises) asynchronous javascript (25–35 hour read/exercises) web forms — working with user data time to complete: 40–50 hours prerequisites forms require html, css, and javascript knowledge. given the complexity of working with forms, it is a...
Getting started with the Web - Learn web development
getting started with the web is a concise series introducing you to the practicalities of web development. you'll set up the tools you need to construct a simple webpage and publish your own simple code. the story of your first website it's a lot of work to create a professional website, so if you're new to web development, we encourage you to start small. you won't
build another facebook right away, but it's not hard to get your own simple website online, so we'll start there. by working through the articles listed below in order, you will go from nothing to getting your first webpage online. let's begin our journey! installing basic software when it comes to tools for
building a website, there's a lot to pick from. if you're just starting out, you might be confused by the array of cod...
... before you start writing the code for your website, you should plan it first. what information are you showcasing? what fonts and colors are you using? what will your website look like? we outline a simple method you can follow to plan out your site's content and design. dealing with files a website consists of many files: text content, code, stylesheets, media content, and so on. when you're
building a website, you need to assemble these files into a sensible structure and make sure they can talk to one another. dealing with files explains how to set up a sensible file structure for your website and what issues you should be aware of. html basics hypertext markup language (html) is the code that you use to structure your web content and give it meaning and purpose. for example, is my con...
Define terms with HTML - Learn web development
html provides several ways to convey description semantics, whether inline or as structured glossaries. in this article, we'll cover how to properly mark up keywords when you're defining them. prerequisites: you need to be familiar with how to create a basic html document. objective: learn how to introduce new keywords and how to
build description lists. when you need a term defined, you probably go straight to a dictionary or glossary. dictionaries and glossaries formally associate keywords with one or more descriptions, as in this case: blue (adjective) of a color like the sky in a sunny day. the clear blue sky of a subtle sadness, melancholy. i'm feeling blue but we're constantly defining keywords informally, as here: firefox is the web...
...y the mozilla foundation. </span> you can download it at <a href="http://www.mozilla.org">mozilla.org</a> </p> assistive technology can often use this attribute to find a text alternative to a given term. you can use aria-describedby on any tag enclosing a keyword to be defined (not just the <dfn> element). aria-describedby references the id of the element containing the description. how to
build a description list description lists are just what they claim to be: a list of terms and their matching descriptions (e.g., definition lists, dictionary entries, faqs, and key-value pairs). description lists are not suitable for marking up dialogue, because conversation does not directly describe the speakers. here are recommendations for marking up dialogue. the terms described go inside <d...
Cooperative asynchronous JavaScript: Timeouts and intervals - Learn web development
blems with setinterval(), which for example doesn't run at a frame rate optimized for the device, sometimes drops frames, continues to run even if the tab is not the active tab or the animation is scrolled off the page, etc. (read more about this on creativejs.) note: you can find examples of using requestanimationframe() elsewhere in the course — see for example drawing graphics, and object
building practice. the method takes as an argument a callback to be invoked before the repaint. this is the general pattern you'll see it used in: function draw() { // drawing code goes here requestanimationframe(draw); } draw(); the idea is to define a function in which your animation is updated (e.g. your sprites are moved, score is updated, data is refreshed, or whatever). then, you call ...
...n current time requestanimationframe(draw); } draw(); browser support requestanimationframe() is supported in more recent browsers than setinterval()/settimeout(). interestingly, it is available in internet explorer 10 and above. so, unless you need to support older versions of ie, there is little reason to not use requestanimationframe(). a simple example enough with the theory! let's
build your own personal requestanimationframe() example. you're going to create a simple "spinner animation"—the kind you might see displayed in an app when it is busy connecting to the server, etc. note: in a real world example, you should probably use css animations to run this kind of simple animation. however, this kind of example is very useful to demonstrate requestanimationframe() usage, and...
Fetching data from the server - Learn web development
idual data items from the server to update sections of a webpage without having to load an entire new page. this seemingly small detail has had a huge impact on the performance and behavior of sites, so in this article, we'll explain the concept and look at technologies that make it possible, such as xmlhttprequest and the fetch api. prerequisites: javascript basics (see first steps,
building blocks, javascript objects), the basics of client-side apis objective: to learn how to fetch data from the server and use it to update the contents of a web page. what is the problem here? originally page loading on the web was simple — you'd send a request for a website to a server, and as long as nothing went wrong, the assets that made the web page would be downloaded ...
...y, read website security). to get around this, we need to test the example by running it through a local web server. to find out how to do this, read how do you set up a local testing server? fetch the fetch api is basically a modern replacement for xhr; it was introduced in browsers recently to make asynchronous http requests easier to do in javascript, both for developers and other apis that
build on top of fetch. let's convert the last example to use fetch instead. make a copy of your previous finished example directory. (if you didn't work through the previous exercise, create a new directory and inside it make copies of xhr-basic.html and the four text files — verse1.txt, verse2.txt, verse3.txt, and verse4.txt.) inside the updatedisplay() function, find the xhr code: l...
Introduction to web APIs - Learn web development
pis next first up, we'll start by looking at apis from a high level — what are they, how do they work, how to use them in your code, and how are they structured? we'll also take a look at what the different main classes of apis are, and what kind of uses they have. prerequisites: basic computer literacy, a basic understanding of html and css, javascript basics (see first steps,
building blocks, javascript objects). objective: to gain familiarity with apis, what they can do, and how you can use them in your code. what are apis? application programming interfaces (apis) are constructs made available in programming languages to allow developers to create complex functionality more easily. they abstract more complex code away from you, providing some easier sy...
...us parts of the facebook ecosystem to benefit your app, for example by providing app login using facebook login, accepting in-app payments, rolling out targetted ad campaigns, etc. the telegram apis allows you to embed content from telegram channels on your website, in addition to providing support for bots. the youtube api, which allows you to embed youtube videos on your site, search youtube,
build playlists, and more. the pinterest api provides tools to manage pinterest boards and pins to include them in your website. the twilio api, which provides a framework for
building voice and video call functionality into your app, sending sms/mms from your apps, and more. the mastodon api enables you to manipulate features of the mastodon social network programmatically. note: you can find i...
Manipulating documents - Learn web development
moving and removing elements there may be times when you want to move nodes, or delete them from the dom altogether. this is perfectly possible. if we wanted to move the paragraph with the link inside it to the bottom of the section, we could simply do this: sect.appendchild(linkpara); this moves the paragraph down to the bottom of t...
...to the paragraph, but this time by giving it a class that is selected by our css rule, not as inline css styles. which method you choose is up to you; both have their advantages and disadvantages. the first method takes less setup and is good for simple uses, whereas the second method is more purist (no mixing css and javascript, no inline styles, which are seen as a bad practice). as you start
building larger and more involved apps, you will probably start using the second method more, but it is really up to you. at this point, we haven't really done anything useful! there is no point using javascript to create static content — you might as well just write it into your html and not use javascript. it is more complex than html, and creating your content with javascript also has other issue...
Third-party APIs - Learn web development
oogle maps, twitter, facebook, paypal, etc. provide apis allowing developers to make use of their data (e.g. displaying your twitter stream on your blog) or services (e.g. using facebook login to log in your users). this article looks at the difference between browser apis and 3rd party apis and shows some typical uses of the latter. prerequisites: javascript basics (see first steps,
building blocks, javascript objects), the basics of client-side apis objective: to learn how third-party apis work, and how to use them to enhance your websites. what are third party apis? third party apis are apis provided by third parties — generally companies such as facebook, twitter, or google — to allow you to access their functionality via javascript and use it on your si...
...mple for you to study and learn from — see our youtube video search example. this uses two related apis: the youtube data api to search for youtube videos and return results. the youtube iframe player api to display the returned video examples inside iframe video players so you can watch them. this example is interesting because it shows two related third-party apis being used together to
build an app. the first one is a restful api, while the second one works more like mapquest (with api-specific methods, etc.). it is worth noting however that both of the apis require a javascript library to be applied to the page. the restful api has functions available to handle making the http requests and returning the results. we are not going to say too much more about this example in the arti...
Adding features to our bouncing balls demo - Learn web development
d carefully. it might be a good idea to save a separate copy of the demo after you get each stage working, so you can refer back to it if you find yourself in trouble later on. project brief our bouncy ball demo is fun, but now we want to make it a little bit more interactive by adding a user-controlled evil circle, which will eat the balls if it catches them. we also want to test your object-
building skills by creating a generic shape() object that our balls and evil circle can inherit from. finally, we want to add a score counter to track the number of balls left to capture. the following screenshot gives you an idea of what the finished program should look like: to give you more of an idea, have a look at the finished example (no peeking at the source code!) steps to complete th...
...od practice to get into — it's very hard to help someone with a coding problem if you can't see their code. a link to the actual task or assessment page, so we can find the question you want help with. previous overview: objects in this module object basics object-oriented javascript for beginners object prototypes inheritance in javascript working with json data object
building practice adding features to our bouncing balls demo ...
JavaScript object basics - Learn web development
cts next in this article, we'll look at fundamental javascript object syntax, and revisit some javascript features that we've already seen earlier in the course, reiterating the fact that many of the features you've already dealt with are objects. prerequisites: basic computer literacy, a basic understanding of html and css, familiarity with javascript basics (see first steps and
building blocks). objective: to understand the basic theory behind object-oriented programming, how this relates to javascript ("most things are objects"), and how to start working with javascript objects. object basics an object is a collection of related data and/or functionality (which usually consists of several variables and functions — which are called properties and methods...
...ep the information safely locked away in their own package, out of harm's way. ...
Object-oriented JavaScript for beginners - Learn web development
e'll now focus on object-oriented javascript (oojs) — this article presents a basic view of object-oriented programming (oop) theory, then explores how javascript emulates object classes via constructor functions, and how to create object instances. prerequisites: basic computer literacy, a basic understanding of html and css, familiarity with javascript basics (see first steps and
building blocks) and oojs basics (see introduction to objects). objective: to understand the basic theory behind object-oriented programming, how this relates to javascript ("everything is an object"), and how to create constructors and object instances. object-oriented programming — the basics to start with, let's give you a simplistic, high-level view of what object-oriented pro...
... gives you an idea of what we are dealing with here. ...
Introducing JavaScript objects - Learn web development
sites before starting this module, you should have some familiarity with html and css. you are advised to work through the introduction to html and introduction to css modules before starting on javascript. you should also have some familiarity with javascript basics before looking at javascript objects in detail. before attempting this module, work through javascript first steps and javascript
building blocks. note: if you are working on a computer/tablet/other devices where you don't have the ability to create your own files, you could try out (most of) the code examples in an online coding program such as jsbin or glitch. guides object basics in the first article looking at javascript objects, we'll look at fundamental javascript object syntax, and revisit some javascript features ...
...bject syntax, which is commonly used for representing and transmitting data on web sites (i.e. sending some data from the server to the client, so it can be displayed on a web page). you'll come across it quite often, so in this article, we give you all you need to work with json using javascript, including parsing the json so you can access data items within it and writing your own json. object
building practice in previous articles we looked at all the essential javascript object theory and syntax details, giving you a solid base to start from. in this article we dive into a practical exercise, giving you some more practice in
building custom javascript objects, which produce something fun and colorful — some colored bouncing balls. assessments adding features to our bouncing balls d...
Web performance - Learn web development
part of good user experience is ensuring the content is quick to load and responsive to user interaction. this is known as web performance, and in this module you'll focus on the fundamentals of how to create performant websites. the rest of our beginner's learning material tried to stick to web best practices such as performance and accessibility as much as possible, however, it is good to focus specifically on such topics too, and make sure you are familiar with them. ...
...s. the rest of our beginner's learning material tried to stick to web best practices such as performance and accessibility as much as possible, however, it is good to focus specifically on such topics too, and make sure you are familiar with them. learning pathway while knowing html, css, and javascript is needed for implementing many web performance improvement recommendations, knowing how to
build applications is not a necessary pre-condition for understanding and measuring web performance. we do however recommend that before you work through this module, you at least get a basic idea of web development by working through our getting started with the web module. it would also be helpful to go a bit deeper into these topics, with modules such as: introduction to html css first steps j...
Learning area release notes - Learn web development
e articles. april 2020 our new understanding client-side web development tools module has been released! learn the essentials of web development tooling, including what kind of tools exist, the command line, package managers, and how to assemble your own functioning tool chain. ...
...t-side web development tools module has been released! learn the essentials of web development tooling, including what kind of tools exist, the command line, package managers, and how to assemble your own functioning tool chain. march 2020 you'll now find "test your skills" assessments accompanying the articles in the following modules: css
building blocks javascript first steps javascript
building blocks introducing javascript objects january 2020 the html forms module has been significantly updated: it has been retitled web forms, and moved out of the html topic area to recognise that it covers more than just html form elements — it also covers styling, validation, the basics of how to send data and process it on the server, and more besides. it has new examples available and...
Server-side web frameworks - Learn web development
rful dependency injection container. multiple back-ends for session and cache storage. expressive, intuitive database orm. database agnostic schema migrations. robust background job processing. real-time event broadcasting. laravel is accessible, yet powerful, providing tools needed for large, robust applications. asp.net asp.net is an open source web framework developed by microsoft for
building modern web applications and services. with asp.net you can quickly create web sites based on html, css, and javascript, scale them for use by millions of users and easily add more complex capabilities like web apis, forms over data, or real time communications. one of the differentiators for asp.net is that it is built on the common language runtime (clr), allowing programmers to write asp.ne...
...doing server-side web development using java. although definitely not the only framework based on java it is easy to use to create stand-alone, production-grade spring-based applications that you can "just run". it is an opinionated view of the spring platform and third-party libraries but allows to start with minimum fuss and configuration. it can be used for small problems but its strength is
building larger scale applications that use a cloud approach. usually multiple applications run in parallel talking to each other, with some providing user interaction and others doing back end work (e.g. accessing databases or other services). load balancers help to ensure redundancy and reliability or allow geolocated handling of user requests to ensure responsiveness. summary this article has sho...
Ember resources and troubleshooting - Learn web development
template more structural rather than having them filled with bespoke logic. see also: reactiveconf 2017: secrets of the glimmer vm what is the state of the mut helper? mut was not covered in this tutorial and is really baggage from a transitional time when ember was moving from two-way bound data to the more common and easier-to-reason-about one-way bound data flow. it could be thought of as a
build-time transform that wraps its argument with a setter function. more concretely, using mut allows for template-only settings functions to be declared: <checkbox @value={{this.somedata}} @ontoggle={{fn (mut this.somedata) (not this.somedata)}} /> whereas, without mut, a component class would be needed: import component from '@glimmer/component'; import { tracked } from '@glimmer/tracking'; ...
...eness of using mut, it may be desireable to reach for it. however, mut has unnatural semantics and has caused much confusion over the term of its existence. there have been a coupleof new ideas put together into the form of addons that use the public apis, ember-set-helper and ember-box. both of these try to solve the problems of mut by introducing more obvious / "less magic" concepts, avoiding
build-time transforms and implicit glimmer vm behavior. with ember-set-helper: <checkbox @value={{this.somedata}} @ontoggle={{set this "somedata" (not this.somedata)}} /> with ember-box: {{#let (box this.somedata) as |somedata|}} <checkbox @value={{unwrap somedata}} @ontoggle={{update somedata (not this.somedata)}} /> {{/let}} note that none of these solutions are particularly com...
Accessibility in React - Learn web development
on our list heading if we have fewer tasks now than we did before. the dependencies passed into this hook ensure it will only try to re-run when either of those values (the number of current tasks, or the number of previous tasks) changes. now, when you delete a task in your browser, you will see our dotted focus outline appear around the heading above the list. finished! you've just finished
building a react app from the ground up! congratulations! the skills you’ve learned here will be a great foundation to
build on as you continue working with react. most of the time, you can be an effective contributor to a react project even if all you do is think carefully about components and their state and props. remember to always write the best html you can. useref() and useeffect() are somew...
...nities to practice them more, because doing so will allow you to create inclusive experiences for users. remember: our app would have been inaccessible to keyboard users without them! note: if you need to check your code against our version, you can find a finished version of the sample react app code in our todo-react repository. for a running live version, see https://mdn.github.io/todo-react-
build/. in the very last article we'll present you with a list of react resources that you can use to go further in your learning. previous overview: client-side javascript frameworks next in this module introduction to client-side frameworks framework main features react getting started with react beginning our react todo list componentizing our react app react interact...
TypeScript support in Svelte - Learn web development
with typescript files. finally we will go over our app and see what modifications we have to make to fully take advantage of typescript features. prerequisites: at minimum, it is recommended that you are familiar with the core html, css, and javascript languages, and have knowledge of the terminal/command line. you'll need a terminal with node + npm installed to compile and
build your app. objective: learn how to configure and use typescript when developing svelte applications. note that our application is fully functional and porting it to typescript is completely optional. there are different opinions about it, and in this chapter we will talk briefly about the pros and cons of using typescript. even if you are not planning to adopt it, this artic...
...is: <hr /> <todo todo={ { name: 'a new task with no id!', completed: false } } /> <!-- moreactions --> <moreactions {todos} add the lang='ts' to the <script> tag of the todos.svelte component, so that it knows to use the type checking we have specified. we will get the following error: by now you should get an idea about the kind of assistance we can get from typescript when
building svelte projects. now we will undo these changes in order to start porting our application to typescript, so we won't be bothered with all the validate warnings. remove the flawed todo and the lang='ts' attribute from the todos.svelte file. also remove the import of todotype and the lang='ts' from todo.svelte. we'll take care of them propertly, later on. porting our to-do list app to ty...
Working with Svelte stores - Learn web development
ores are global global data repositories that hold values. components can subscribe to stores and receive notifications when their values change. prerequisites: at minimum, it is recommended that you are familiar with the core html, css, and javascript languages, and have knowledge of the terminal/command line. you'll need a terminal with node + npm installed to compile and
build your app. objective: learn how to use svelte stores using stores we will create an alert component that shows notifications on screen, which can receive messages from any component. in this case, the alert component is independent from the rest — it is not a parent or child of any other — so the messages don't fit into the component hierarchy. we will also see how to d...
... not special svelte syntax. it's just a literal javascript object being passed as a parameter to the fly transition. try your app out again — you'll see that the notifications now look a bit more appealing. note: being a compiler allows svelte to optimize the size of our bundle by excluding features that are not used. in this case, if we compile our app for production with npm run
build, our public/
build/bundle.js file will weight a little less than 22kb. if we remove the transitions:fly directive svelte is smart enough to realize the fly function is not being used and the bundle.js file size will drop down to just 18kb. this is just the tip of the iceberg. svelte has lots of options for dealing with animations and transitions. svelte also supports specifying different transit...
Implementing feature detection - Learn web development
ure detection tests using techniques like the ones detailed above. you might as well use a dedicated feature detection library however, as it makes things much easier. the mother of all feature detection libraries is modernizr, and it can detect just about everything you'll ever need. let's look at how to use it now. when you are experimenting with modernizr you might as well use the development
build, which includes every possible feature detection test. download this now by: clicking on the development
build link. clicking the big pink
build button on the page that comes up. clicking the top download link in the dialog box that appears. save it somewhere sensible, like the directory you've been creating your other examples for in this article. when you are using modernizr in producti...
...e page that comes up. clicking the top download link in the dialog box that appears. save it somewhere sensible, like the directory you've been creating your other examples for in this article. when you are using modernizr in production, you can go to the download page you've already visited and click the plus buttons for only the features you need feature detects for. then when you click the
build button, you'll download a custom
build containing only those feature detects, making for a much smaller file size. css let's have a look at how modernizr works in terms of selectively applying css. first, make a copy of supports-feature-detect.html and supports-styling.css. save them as modernizr-css.html and modernizr-css.css. update your <link> element in your html so it points to the cor...
Embedding API for Accessibility
100%, or normal zoom. for double-sized text, use nsidomwindow::settextzoom(2.0); using accessibility preferences there are a number of prefs related to accessibility. for the most part, an automatic reframe is performed when one of these prefs is changed. a reframe fixes the appearance of the page to match the new prefs, without reloading the document over the network. ...
...d files to go with each type of content. the audio file could be a clip of a human voice saying "you've got video" or even a simple beep. how we expose this through the user interface is another matter. accepting special content on an instance basis after being notified of special content, the user needs to be able to select specific unloaded content for loading. one way of doing this is to
build up the nsiwebbrowseraccessible interface, so that there is a method to force loading each type of content just for the current page in the current session. open issue: accessibility settings per url a powerful possibility is that we design an interface for setting certain preferences based on the url. if we can find a clean way to present it to the user, this would be extremely useful. for ex...
Multiprocess on Windows
re as follows: ensure that you generate typelibs for all of your com interfaces; ensure that those interfaces are registered; register any outparams that consist of arrays of interfaces. we will now further detail each of these items: generating typelibs for all com interfaces you first need to include a library statement in your idl. when midl processes your idl, it generates c code for
building a proxy dll, containing the oicf metadata. it also will output a file with the .tlb extension. this file contains the typelib metadata. both metadata types must be shipped with firefox. the oicf metadata is shipped via the proxy dll. to include the typelib metadata, embed it in the proxy dll's resources. both types of metadata are then made available from within the same dll. this is achieved ...
...data. it also will output a file with the .tlb extension. this file contains the typelib metadata. both metadata types must be shipped with firefox. the oicf metadata is shipped via the proxy dll. to include the typelib metadata, embed it in the proxy dll's resources. both types of metadata are then made available from within the same dll. this is achieved by specifying rcinclude in the dll's moz.
build, and then specifying the resources in an .rc file. you should always embed your typelib with its resource id set to 1. we embed typelib metadata in accessiblemarshal.dll and ia2marshal.dll. use their moz.
build and .rc files as examples. ensuring typelib registration for interceptors to be able to use the typelibs, they must be registered. any typelibs that are already registered in the system ...
Adding a new event
internalevent)) { return ns_error_unexpected; } dosomethingwith(internalevent->mbar); aevent->preventdefault(); return ns_ok; } implement dom event class generate dom event implementation if it's possible if you're creating simple dom event class, it might be generated automatically. if it's possible, you just need to add an entry to generated_events_webidl_files in dom/webidl/moz.
build. define and create dom event class manually otherwise, you need to implement a dom event class yourself. the best place to create fooevent.h and fooevent.cpp is in dom/events/. otherwise, you need to specify the path to the header file in dom/bindings/bindings.conf. when you create a dom event class, its name should be same as the name defined in its standard specification. and it should be in...
... you create a dom event class, its name should be same as the name defined in its standard specification. and it should be in mozilla::dom namespace. for example, keyboardevent which is defined in dom level 3 events should be implemented as mozilla::dom::keyboardevent. and the header file should be exported as "mozilla/dom/fooevent.h". add the header file to exports.mozilla.dom in dom/events/moz.
build. you probably need to implement a lot of methods to the event class, but this document doesn't explain all of them. please refer existing dom event implementation for example. however, there are some hints: set meventisinternal in the constructor of the most descendant class because each constructor creates dummy internal event instance at calling constructors of its super class. therefore, ...
Adding a new word to the en-US dictionary
occasionally bugs are filed pointing out situations where perfectly legitimate words are missing from the english spell check dictionary in firefox. this article describes the process for adding a word to the dictionary. the process is pretty straight-forward: get a clone of uxp, if you don't already have one, and make sure you can
build it successfully. 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. the script only works if you have the environment variable editor set to the executable of an editor program; if you don't have it set, you can do editor=vim sh edit-dictionary to edit using vim (or you can substitute some other editor), or you can just ...
... ...
Browser chrome tests
the browser chrome test suite is an automated testing framework designed to allow testing of application chrome windows using javascript. it currently allows you to run javascript code in the same scope as the main firefox browser window and report results using the same functions as the mochitest test framework. as all tests, they won't work in a
build with tests disabled (--disable-tests). running the browser chrome tests to run mochitest, first
build mozilla with your changes; then run ./mach mochitest -f browser this will launch your
build and open a "browser chrome tests" window, and report the results in the ui and to stdout. it is possible to run specific groups of tests. as with mochitest, the path given as an argument is the path to a test or directory within the mozilla s...
...er chrome test to the tree, add it to the browser.ini file in the same folder as the test. also remember that the test file's name must begin with "browser_" for the test to be recognized as a browser chrome test. if you are adding the first tests in a directory, make sure to also include any head.js you added to support-files, and additionally, ensure that your browser.ini is referenced by a moz.
build file somewhere, such as: browser_chrome_manifests += [ 'test/functional/mochitest/browser.ini' ] support-files once added to support-file section of browser.ini support files may be referenced as https://example.com/browser/[path_to_file] or chrome://mochitests/content/browser/[path_to_file]. <tmui style="top:1px; right:1px;"></tmui> ...
What to do and what not to do in Bugzilla
ople. in general you can resolve a bug as wfm if: three or more people with a similar/the same setup can't reproduce the bug and the bug is only seen by the bug reporter. in this case you shouldn't just mark it wfm instantly, but ask the reporter for more details first. when marking it wfm you should tell the bug reporter that they should reopen the bug if they can still see it with a recent
build. the
build the bug is reported against is more than one stable release old and the bug can't be reproduced with a current
build. the bug reporter has not responded to questions for one month and the bug can't be reproduced with a current
build. the bug reporter reports that they can no longer see the bug and no other people report that they are still seeing the bug. resolving bugs as incompl...
...er severity should be used very seldomly, because only a fraction of the hundreds of thousands bugs really block the development of mozilla and these are normally fixed very quickly. as a result, bugs which are unconfirmed for more than a few days do not qualify for the blocker severity. the exceptions to this rule are platform-specific or compiler-specific bugs. basically, anything that prevents
builds from
building, running, or being used for dogfood (able to use bugzilla, tinderbox, lxr, etc.) is a blocker. bug reports about crashes, hangs, data-loss, or severe security exploits (e.g. remote execution of arbitrary code) get the critical severity. priority/target milestone as stated in the bugzilla etiquette, you must not change the target milestone and priority fields. these fields are re...
Creating reftest-based unit tests
hmem_surfaces=1 make -c $(objdir) reftest-ipc note: right now, automation currently only runs layout/reftests/reftest-sanity/reftest.list! if you try to run the full suite, you may experience stalls or other issues. creating reftest-based unit tests your first reftest it is a silly example, but this will step you through creating your first reftest. step 1 for now you must check out and
build the browser in order to run the tests. see the
build documentation for details on doing that. sorry about this, but the released
builds and the nightly
builds are built with the "--disable-tests" option and reftest will not work - see bug 369809. step 2 open a terminal window. create a directory (inside firefox's source code tree) and make that your current directory (i.e. move to that director...
...in order to use preferences that are not listed in the browser's built-in preferences files such as all.js (in other words, preferences that will not show up in about:config) it is necessary to add the preference to testing/profiles/reftest/user.js. reftests and elevated privileges in general, reftests that you intend to check-in must not rely on behaviour that requires elevated privileges. the
build process runs reftests in a profile that does not automatically grant elevated privileges: requesting them will cause the standard security alert to display, which will likely cause the machine running the test to hang or timeout. any tests that require such privileges to work correctly should be testing chrome only pieces of ui. you can accomplish this by either: rewrite them as mochitests. t...
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. ...
...ically. this flushes out each call, essentially turning opengl into a synchronous api. this makes debugging crashes caused by an opengl call much easier, since the stack you see will match where the call was issued, rather than some time in the future when it happens to run and crash. if an opengl error occurred when executing the call, an error message is output. note: you can download debug
builds from mozilla taskcluster — click an appropriate platform's debug
build on the left, e.g. linux64-debug, then find the
build link on the right hand side (this would be target.tar.bz2 for linux, target.dmg for macos, and target.zip for windows). if you need more verbose debug output, you can enable the verbose debug mode by defining the environment variable moz_gl_debug_verbose. with this enab...
Makefiles - Best practices and suggestions
hardcoded values - avoid them like the plague. use variable assignments, autogen paths and dynamic file gathering. platform specific - avoid this logic whenever possible. code as little platform specific logic within a makefile as possible, a conditional and compiler flags at most should be needed. ...
... if a unit test is platform specific write your makefile so it can be used on all platforms but only do work on the specific hardware or class of hardware. for classes of hardware (unix/windows) place your makefile in a subdirectory, unix/makefile.in always include dependencies when creating a target initial make call should always be the workhorse:
build, generate, deploy, install, etc. all subsequent make calls must become a nop unless sources or dependencies change or have been removed. incorrect dependencies will contribute to wasted cycles and can contribute to circular dependencies. directory dependencies do not use directories as a dependency for generated targets, ever. any activity within a directory will...
Updating NSPR or NSS in mozilla-central
apply the patches. if merging is required, update the patch file. if a patch is no longer needed, remove the patch from the ...
...hes/ for patches that need to be applied to nss. apply the patches. if merging is required, update the patch file. if a patch is no longer needed, remove the patch from the directory and update the readme file. check for new or removed files $ hg addremove -n review the output to make sure it looks correct update the minimum required system nss version in old-configure.in. this is for
builds with --with-system-nss. for example, in the following, "3.16.1" would be replaced with the new nss version. moz_arg_with_bool(system-nss, [ --with-system-nss use system installed nss], _use_system_nss=1 ) if test -n "$_use_system_nss"; then am_path_nss(3.16.1, [moz_native_nss=1], [ac_msg_error([you don't have nss installed or your version is too old])]) fi commit the updat...
Reviewer Checklist
icated. the patch does not add duplicates of existing code ('almost duplicates' could mean a refactor is needed). commonly this results in "part 0" of a bug, which is "tidy things up to make the fix easier to write and review". if qa needs to verify the fix, you should provide steps to reproduce (str). quality if you can unit-test it, you should unit-test it. if it's js, try to design and
build so that xpcshell can exercise most functionality. it's quicker. make sure the patch doesn't create any unused code (e.g., remove strings when removing a feature) all caught exceptions should be logged at the appropriate level, bearing in mind personally identifiable information, but also considering the expense of computing and recording log output. [fennec: checking for log levels is expensive...
...since froyo should be guarded by a version check. preffability if the feature being worked on is covered by prefs, make sure they are hooked up. if working on a new feature, consider adding prefs to control the behavior. consider adding prefs to disable the feature entirely in case bugs are found later in the release cycle. [fennec: "prefs" can be gecko prefs, sharedpreferences values, or
build-time flags. which one you choose depends on how the feature is implemented: a pure java service can't easily check gecko prefs, for example.] strings there should be no string changes in patches that will be uplifted (including string removals). rev entity names for string changes. when making ui changes, be aware of the fact that strings will be different lengths in different locales. d...
Working with Mozilla source code
the articles below will help you get your hands on the mozilla source code, learn to navigate the code, and how to get the changes you propose checked into the tree. getting a pre-configured mozilla
build system virtual machine this is the easiest way to get started: use a virtualbox virtual machine which is already configured with a complete
build environment for you to use. just boot the vm and
build! viewing and searching mozilla source code online learn how to use searchfox, mozilla's online search and browsing tool for accessing the source code. this isn't a good way to download the code, but is a great way to search it. navigating the mozilla source code learn about the various folders in the mozilla source tree, and how to find what you're looking for. bugs for newcom...
...terface development guide guidelines and documentation for how to create and update xpcom interfaces. the firefox codebase: css guidelines this document contains guidelines defining how css inside the firefox codebase should be written, it is notably relevant for firefox front-end engineers. svg cleanup guide guidelines and best practices for shipping new svgs. try servers mozilla products
build on at least three platforms. if you don't have access to them all, you can use the try servers to test your patches and make sure the tests pass. creating a patch once you've made a change to the mozilla code, the next step (after making sure it works) is to create a patch and submit it for review. this article needs to be updated fully for mercurial. getting commit access to the source code ...
Experimental features in Firefox
this page lists features that are in nightly versions of firefox along with information on how to activate them, if necessary. you can test your web sites and applications before these features get released and ensure everything will still work with the latest web technology capabilities. ...
...r more details. release channel version added enabled by default? nightly 77 no developer edition 77 no beta 77 no release 77 no preference name image.avif.enabled av1 support for firefox on android this feature allows firefox on android to use av1 format media. this feature is available in nightly
builds effective in firefox for android 81 or later. it is enabled by default. release channel version added enabled by default? nightly 81 yes developer edition — — beta — — release — — preference name — security and privacy block plain text requests from flash on encrypted pages in order...
Index
found 172 pages: # page tags and summary 1 firefox firefox, landing, mozilla here you can learn about how to contribute to the firefox project and you will also find links to information about the construction of firefox add-ons, using the developer tools in firefox, and other topics. 3
building firefox with rust code
build documentation, gecko,
build, rust in may 2015 the rust programming language reached its 1.0 stability milestone, and various experiments with writing parts of gecko in rust began. rust code first shipped in august 2016 with the release of firefox 48. it became a requirement for
building gecko in february 2017 with firefox 54. 8 experimental features in firefox experimental, firefox, preferences, featur...
...ion about firefox hidden away behind the about: url protocol. the most useful is the url about:config, which displays preferences and settings that can be inspected and changed. 141 index firefox, index, mozilla found 168 pages: 142 linux compatibility matrix the following table lists the available library versions for the mozilla.org-distributed firefox
builds dependencies, and/or to
build firefox. 143 multiple firefox profiles beginner, firefox, guide, intro, profiles, qa a profile in firefox is the collection of settings, customizations, add-ons, and other personalizations that a user has made or installed into their copy of firefox. you can find details about profiles on mozilla's end-user support site. 168 performan...
Firefox
velopers and end users. firefox is an open source project; much of the code is contributed by our huge community of volunteers. here you can learn about how to contribute to the firefox project and you will also find links to information about the construction of firefox add-ons, using the developer tools in firefox, and other topics. learn how to create add-ons for firefox, how to develop and
build firefox itself, and how the internals of firefox and its subprojects work. project documentation get detailed information about the internals of firefox and its
build system, so you can find your way around in the code. developer guide our developer guide provides details on how to get and compile the firefox source code, how to find your way around, and how to contribute to the projec...
...or a site to manage in some way. one example is the new tab page, which includes a "top sites" section showing sites you visit that firefox thinks you're likely to want to visit again, as well as potentially some sites that have been pinned to always appear in that space. linux compatibility matrixthe following table lists the available library versions for the mozilla.org-distributed firefox
builds dependencies, and/or to
build firefox.multiple firefox profilesa profile in firefox is the collection of settings, customizations, add-ons, and other personalizations that a user has made or installed into their copy of firefox. you can find details about profiles on mozilla's end-user support site.performance best practices for firefox front-end engineersthis guide will help firefox developers ...
Geckoview-Junit Tests
e the existing @test annotation. for example: import org.junit.ignore ... @runwith(testrunner.class) public class testsomethings { @ignore @test public void testsomething() { ... tests can also be conditionally skipped using junit's assume or assumethat methods. for example: import org.junit.assume.assumethat ... ...
... @test public void testsomething() { ... tests can also be conditionally skipped using junit's assume or assumethat methods. for example: import org.junit.assume.assumethat ... @test fun contentcrashignored() { // cannot test x86 debug
builds due to gecko's "ah_crap_handler" // that waits for debugger to attach during a sigsegv. assumethat(sessionrule.env.isdebug
build && sessionrule.env.cpuarch == "x86", equalto(false)) running tests on try to run these tests on try, use something like: mach try fuzzy -q geckoview-junit --artifact or mach try -b do -p android-x86_64 -u geckoview-junit --artifact currently, geckoview-junit is only run on android-x86_64. contact information geckoview-junit tests are maintained by :snorp and :gbrown. bu...
How to Report a Hung Firefox
instead of crashing firefox, more advanced developers who know how to use a debugger can try attaching to the firefox process and debugging in place. this is only useful if you have firefox debug symbols, which are available on windows ...
...tils.import("resource://gre/modules/ctypes.jsm");var zero = new ctypes.intptr_t(8);var badptr = ctypes.cast(zero, ctypes.pointertype(ctypes.int32_t));var crash = badptr.contents;}', true); } other techniques on os x if you use a nightly
build (>= firefox 16), you can use activity monitor's "sample process" feature to generate a sample. this won't produce useful results on a regular release/beta
build. instead of crashing firefox, more advanced developers who know how to use a debugger can try attaching to the firefox process and debugging in place. this is only useful if you have firefox debug symbols, which are available on windows from the mozilla symbol server. ...
Implementing QueryInterface
a reference implementation of queryinterface ns_imethodimp nsmyimplementation::queryinterface( refnsiid aiid, void** ainstanceptr ) { ns_assertion(ainstanceptr, "queryinterface requires a non-null destination!"); // it's a logic error, not a runtime error, to call me without any place to put my answer! // ...but that won't matter when someone calls me wrongly in a non-debug
build. if ( !ainstanceptr ) return ns_error_null_pointer; nsisupports* foundinterface; if ( aiid.equals(nscomtypeinfo<nsix>::getiid()) ) foundinterface = ns_static_cast(nsix*, this); else if ( aiid.equals(nscomtypeinfo<nsiy>::getiid()) ) foundinterface = ns_static_cast(nsiy*, this); // ...as many cases as needed... else if ( aiid.equals(nscomtypeinfo<nsisup...
...ich detects errors when you can't really get to the desired interface. it avoids repeated uses of and assignments to *ainstanceptr, which compilers have trouble optimizing. it clears the result, *ainstanceptr, when returning an error. it generates less code than the typical implementation of queryinterface. it tests for bad input with an ns_assertion, to find logic errors immediately in debug
builds. some alternatives the ns_impl_query_interface[012] macros the sample above implements two xpcom interfaces in addition to nsisupports. the ns_impl_query_interface2 macro can write this function for you (though it pains me to recommend macros), e.g., ns_impl_query_interface2(nsmyimplementation, nsix, nsiy) // implements |nsmyimplementation::queryi...
CustomizableUI.jsm
is not. the same caveats as for iswidgetremovable apply, however, if no windows are open. getlocalizedproperty() get a localized property off a (widget) object. nb: this is unlikely to be useful unless you're in firefox code, because this code uses the builtin widget stringbundle, and can't be told to use add-on-provided strings. it's mainly here as convenience for custom builtin widgets that
build their own dom but use the same stringbundle as the other builtin widgets. 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 ...
...your need see the example above createwidget - button type. note: the dom node you construct should have the same id as the id property described above, so that customizableui can find the node again later. ...
Application Translation with Mercurial
dy been translated. either translate a different product now or contact the person responsible for localization from the team's page (see above) so he can notify you by mail when the next strings for translation become available. if it is a red text consisting of a number and the word 'missing', then there are untranslated texts and you can move on with this guide. required tools
build pre-requisites first, get the required programs to compile mozilla applications like firefox and thunderbird from
build instructions. this is only necessary once. mozilla
build must be installed into an absolute file path without whitespaces, else it will break. file comparison program for the translation, it is recommend to use file comparison program to compare the english file (containing...
...download the comm-<branch>.hg file (e.g. comm-aurora.hg) from https://ftp.mozilla.org/pub/mozilla.org/thunderbird/bundles/ in the next step, we will unpack the source code: open an input shell, e.g. by pressing the windows key and r on the keyboard or by calling the "run..." command from the windows "start" button, and then typing cmd and pressing the enter key. launch the installed mozilla
build toolset by launching it with its path, e.g. c:\mozilla\coding\
buildtools\mozilla
build\start-shell-msvc2010.bat you can autocomplete the file path after typing a few characters and then pressing the tabulator key. if you launch the start-shell-l10n.bat, compiling features will be disabled. you can create translation patches, but creating language packs for the application, binary repacks of the ...
Localizing without a specialized tool
te a testable package to see his or her work as they progress to a final version. if you choose to localize mozilla with nothing more than a text editing application and not a specialized tool, this document (along with create a new localization) will enable you to learn just what needs to be done. before we start, did you make sure to install mercurial and confirm that you have set up the proper
build environment on your local machine? you cannot begin localizing mozilla file by file without a specialized tool without going through the create a new localization page. what we will translate we will translate a small piece of the ui found in the search bar. the search bar is next to the right of the location bar, and by default points to the google search. if you click on the highlighted arrow ...
...zilla-1.9.2/browser/locales/chrome/browser/search.properties l10n-mozilla-1.9.2/x-testing/browser/chrome/browser/ open that file and translate the strings that follow the "=". for instance, enter the proper translation for the line "add %s" cmd_addfoundengine=add "%s" with these two string examples translated, you can now test your work to see immediately where you have translated. refer to the
building and testing section of the create a new localization page. going one-by-one with your compare-locales output open for review, we will start with the first file with "// add and localize this file" note. you should see // add and localize this file aboutcerterror.dtd notice from the compare-locales output that this file is located in the directory /browser/chrome/browser. you will w...
Localization prerequisites
tools a recent posix shell python 2.5 or newer. perl 5.6 or higher older perl versions may work if you upgrade file::spec to version 0.8 gnu make 3.79.1 or higher. other varieties of "make" will not work. autoconf-2.13 - autoconf 2.5x will not work. zip 2.3 (or higher) mercurial 1.2 or higher recommended. needed for development of firefox 3.5/seamonkey 2.0/thunderbird 3.0 and later. a text editor. you can try one of these: notepad++ or notepad2 on windows, vim, gedit or kate on gnu/linux, bbedit on mac os x. ...
...rial 1.2 or higher recommended. needed for development of firefox 3.5/seamonkey 2.0/thunderbird 3.0 and later. a text editor. you can try one of these: notepad++ or notepad2 on windows, vim, gedit or kate on gnu/linux, bbedit on mac os x. to verify that they work, open a shell. linux users should know, on the mac, you find terminal in applications/utilities. on windows, mozilla
build offers a start-shell-l10n.bat in c:\mozilla-
build. let’s try our entry points: $ hg --version mercurial distributed scm (version 1.3.1) copyright (c) 2005-2009 matt mackall <mpm@selenic.com> and others this is free software; see the source for copying conditions. there is no warranty; not even for merchantability or fitness for a particular purpose great, hg works. $ make –version gnu ma...
Localization technical reviews
w each l10n team is performing their localization work. allows us to discover potential bugs within l10n tools. overview you've completed most, if not all, of your localization work. the merge date for migrating from one product release channel to the next (e.g., aurora to beta, or beta to release) is rapidly approaching. you need to make sure that your work can effectively be compiled into a
build for the next release channel. here is a detailed overview of what a technical review is and who it's meant for: a technical review: is performed as a qa measure on a revision pushed to a new locale's l10n aurora repo in mercurial. is very comprehensive and covers the entire product. focusses on technical accuracy and completion of l10n work, not translation quality. is only performed on th...
...bugzilla. once they are fixed, push your fix to your repo, attach it to the corresponding bug using the same mercurial revision number as before, and then request another review. the process is then repeated until the bug is fixed to satisfaction. these bugs are also pulled into the dashboards, which track your revision's progress. in order to ultimately have your revision included as an official
build, your dashboards must be at 100% green. to the right, you'll see the current dashboard page for a german localization. revisions are approved using the buttons in the furthest column to the right. as your work is approved, you'll see a green circle in the furthest column to the right as well as a measure of percentage in the middle column. first round approved! once your work is entirely appr...
Writing localizable code
on developers. 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. guidelines thus, there are a few guidelines you should follow to make localization of your code easier: choose good key names the names chosen for your keys (regardless of whether that's a dtd or a properties file) should be descriptive. think of them as long variable names. if you change the semantics of a localized string, change the key. this will more likely be a good k...
...tors "room to move". an example of a well used composite string is firefox's setting for visited pages: the translator can (implicitly) position the text field as he sees fit. don't use preprocessor macros the use of #if #else #endif or #expand is strongly discouraged. there are few exceptions to this rule, but in general, the localized file should comply with standards and should not require
build tools to be transformed. if you want to add
build processing to localized files, be sure to request feedback from l10n@. in most cases, you can just as well put the processing into the content code and reference different key-value pairs in l10n. use a good source directory structure be sure to put the localizable files in the right place. the addition of new top-level directories is a compro...
Mozilla DOM Hacking Guide
lassinfo_map_begin(domimplementation, nsidomdomimplementation) the next line specifies that the domimplementation object implements the nsidomdomimplementation interface. add the new interface to the domclassinfo definition. for us, it is: 1225 dom_classinfo_map_entry(nsidomhtmldomimplementation) add the new interface to the makefiles, manifests, etc. recompile. nuke components.reg if you
build optimized. wonder at the beauty of domclassinfo. how to expose a new dom object to javascript let's now go a step further. not only do we want to add a new interface to an object, but we also want to expose a completely new object to javascript. domclassinfo does almost everything for you, from prototypes to implementing a default tostring() method on your object. we will again take the exa...
...ject, the lines would be: dom_classinfo_map_begin(domimplementation, nsidomdomimplementation) dom_classinfo_map_entry(nsidomdomimplementation) dom_classinfo_map_end the interface1, interface2, ... arguments are the name of the interfaces implemented by the dom object and exposed to javascript. the internal interfaces should not be a part of this list. #include the relevant files to make it
build, tweak the makefiles, etc. make sure it
builds on all platforms! :-p if you used an already existing scriptable helper class, then all you need to do is
build, nuke components.reg (if you
build optimized) and run. everything should work well. if you want to use a new scriptable helper class, you will have to implement it as well. how to override the default behavior of xpconnect on dom object...
Mozilla Development Tools
mozilla source code (mercurial and cvs) "trunk" development for gecko 1.9.1/firefox 3.5 and beyond uses the mercurial source code version control system. earlier releases and other products use the cvs version control system. ...
...u cross-reference function and variable names. bonsai bonsai is tree control (get it?). it is our home-grown web-based tool for watching the up-to-the-minute goings-on in our cvs repository (viewing checkins and log messages, reading diffs, etc.) tinderbox tinderbox is for knowing when the tree is in flames. it is our home-grown web-based tool for watching the progress of the continuous
builds that we run on multiple platforms. it is how we are able to tell when a checkin has broken the
build on some platform, and how we know which person needs to be viciously flogged. bugzilla bugzilla is where developers can report bugs in the mozilla source releases, and browse an online database of already-reported bugs. doctor doctor is a web interface to cvs. it lets developers and oth...
BloatView
how to run with bloatview the are two environment variables that can be used. xpcom_mem_bloat_log if set, this causes a bloat log to be printed on program exit, and each time nstracerefcnt::dumpstatistics is called. this log contains data on leaks and bloat (a.k.a. usage). ...
...arily the amount of memory consumed at any given time, it does give an indication of how much memory we're consuming. the more memory in general, the worse the performance and footprint. the percentage 99999.99% will show up indicating an "infinite" amount of leakage. this happens when something that didn't leak before is now leaking. bloatview and continuous integration bloatview runs on debug
builds for many of the test suites mozilla has running under continuous integration. if a new leak occurs, it will trigger a test job failure. bloatview's output file can also show you where the leaked objects are allocated. to do so, the xpcom_mem_log_classes environment variable should be set to the name of the class from the bloatview table: xpcom_mem_log_classes=myclass mach mochitest [options] ...
GC and CC logs
cle collector (cc) logs give information about why various js and c++ objects are alive in the heap. garbage collector logs and cycle collector logs can be analyzed in various ways. in particular, cc logs can be used to understand why the cycle collector is keeping an object alive. these logs can either be manually or automatically generated, and they can be generated in both debug and non-debug
builds. this logs the contents of the javascript heap to a file named gc-edges-nnnn.log. it also creates a file named cc-edges-nnnn.log to which it dumps the parts of the heap visible to the cycle collector, which includes native c++ objects that participate in cycle collection, as well as js objects being held alive by those c++ objects. generating logs from within firefox to manually generate gc ...
...variables appropriately to generate cc logs. the way to set environment variables depends on the test harness, or you can modify the code in nscyclecollector to set that directly. to find the cc logs once the try run has finished, click on the particular job, then click on "job details" in the bottom pane in treeherder, and you should see download links. to set the environment variable, find the
buildbrowserenv method in the python file for the test suite you are interested in, and add something like this code to the file: browserenv["moz_cc_log_directory"] = os.environ["moz_upload_dir"] browserenv["moz_cc_log_shutdown"] = "1" analyzing gc and cc logs there are numerous scripts that analyze gc and cc logs on github. to find out why an object is being kept alive, the relevant scripts are fi...
Gecko Profiler FAQ
own cpu to increase the profiler resolution? it depends on what you are trying to profile to some extent. usually you should be really careful when changing the characteristics of the environment that you are trying to measure to avoid measuring the wrong thing. if the issue you are trying to avoid is not profiling on fast machines that mozilla developers typically use to
build firefox on, a better solution may be using a less high-end machine that actually has lower spec’d hardware instead of artificially slowing down just the cpu. another approach to get more precision is also raising the sampling frequency to sub-millisecond ranges (it won’t work on windows.) high frequency sampling may also be an area where native profilers are a useful alternative ...
...w you that we spend a lot of time in gc / cc. in that case, the gecko profiler is the wrong tool to debug this. even about:memory would be more useful. 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? the current setup requires each thread that you want to profile to notify the profiler about its existence. we have this hooked up for nsthreads, and as of very recently also for rayon threads (used in stylo). we have not attempted to register other threads with the profiler. bug 1341811 suggest...
Profile Manager
ings and data in special folders, called profiles. firefox provides a built-in applet to manage these profiles, but it will eventually be going away (see bug 214675), so a new standalone profile manager application has been created, which works with any xulrunner application, and has many features not found in firefox's built-in version. downloading binaries you can download profile manager
builds from https://ftp.mozilla.org/pub/mozilla.org/utilities/profilemanager/1.0/ note: there is no installer; just extract the files from the archive. system requirements: mac: an intel processor, i386 or x86_64 linux: any version capable of running firefox 4.0 windows: xp or later source code you can download the source as well: hg clone http://hg.mozilla.org/automation/profilemanager/ i...
...tp.mozilla.org/pub/mozilla.org/utilities/profilemanager/1.0/ note: there is no installer; just extract the files from the archive. system requirements: mac: an intel processor, i386 or x86_64 linux: any version capable of running firefox 4.0 windows: xp or later source code you can download the source as well: hg clone http://hg.mozilla.org/automation/profilemanager/ instructions for
building can be found in
build.txt. reporting bugs profile manager bugs should be reported in bugzilla, under testing -> profilemanager. starting profile manager to start profile manager, just launch profilemanager.exe (on windows) or profilemanager-bin (on linux and mac). by default, profile manager will manage firefox profiles, but you can also use it to work with profiles of other xulrunner app...
NSPR release procedure
ry distributions published on ftp.mozilla.org. as the name of the shell script implies, repackage.sh merely repackages binary distributions in a different format. before you run repackage.sh, you need to have built the binary distributions using the "gmake release" makefile target. these binary distributions are jar files, which are really zip files, and they are published in the directory /share/
builds/components. this design comes from the netscape days. the repackage.sh script repackages the jar files into the form most commonly used on that platform. so on unix it repackages the jar files into gzipped tar files, and on windows it repackages the jar files into zip files. edit the repackage.sh script to customize it for your environment. after you have run repackage.sh, follow the instruction...
...ironment. after you have run repackage.sh, follow the instructions in to upload the files to ftp.mozilla.org's staging server, so that they eventually show up on ftp.mozilla.org. the host ftp.mozilla.org can be accessed via the ftp, http, and https protocols. we recommend using https://ftp.mozilla.org/. note: for nss, the script equivalent to nspr's repackage.sh is /u/robobld/bin/sbsinit/nss/push/
buildbindist.sh in the "sv
build" source tree. ...
NSPR
i for system level and libc-like functions. the api is used in the mozilla clients, many of red hat's and oracle's server applications, and other software offerings. documentation about nspr this topic describes, in general terms, the goals of nspr and a bit about how it does it. nspr api reference the reference describes each api public macro, structure and function in the nspr api. nspr
build instructions how to checkout and
build from source. nspr release process how to prepare an nspr release. legacy nspr content older nspr content is available in svn for browsing and/or migration to this site getting nspr nspr is available in various source and binary packages, depending on your platform: windows:
build the source package, using the nspr
build instructions. mac: install...
...package via apt-get. opensuse linux: install one or more of the following via yast or zypper : mozilla-nspr : binary libraries for your platform mozilla-nspr-32bit : binary libraries needed to run 32-bit programs on a 64-bit os mozilla-nspr-devel : files needed (in addition to the above libraries) to compile programs using nspr mozilla-nspr-debuginfo : debug information (including
build symbols) for package mozilla-nspr mozilla-nspr-debuginfo-32bit : debug information (including
build symbols) for package mozilla-nspr-32bit mozilla-nspr-debugsource : debug sources for all of the above community view mozilla forums... mailing list newsgroup rss feed related topics necko, nss ...
An overview of NSS Internals
to the pkcs#12 file format. if you require it in pem format, you could use the openssl pkcs12 command (that's not nss) to convert the pkcs#12 file to pem. this line is a placeholder for how to prepare a database, how to dump a cert, and how to convert data. you might have been motivated to work with nss because it is used by the mozilla applications such as firefox, thunderbird, etc. if you
build the mozilla application, it will automatically
build the nss library, too. however, if you want to work with the nss command line tools, you will have to follow the standalone nss
build instructions, and
build nss outside of the mozilla application sources. the key database file will contain at least one symmetric key, which nss will automatically create on demand, and which will be used to pr...
...sed to protect your secret (private) keys. the symmetric key can be protected with pbe by setting a master password on the database. as soon as you set a master password, an attacker stealing your key database will no longer be able to get access to your private key, unless the attacker would also succeed in stealing the master password. now you might be interest in how to get the nss sources,
building and testing nss. ...
4.3.1 Release Notes
e generatersakeypairwithopflags see generatedsakeypairwithopflags distribution information jss is checked into mozilla/security/jss/. the cvs tag for the jss 4.3.1 release is jss_4_3_1_rtm. source tarballs are available from ftp://ftp.mozilla.org/pub/mozilla.or...-4.3.1.tar.bz2 binary releases are no longer available on mozilla. ...
...source may be viewed with a browser (via the mxr tool) at http://mxr.mozilla.org/mozilla/source/security/jss/ the run time behavior of jss can be affected by the nss environment variables. ...
4.3 Release Notes
ecdh_anon_with_aes_256_cbc_sha distribution information jss is checked into mozilla/security/jss/. the cvs tag for the jss 4.3 release is jss_4_3_rtm. source tarballs are available from https://archive.mozilla.org/pub/security/jss/releases/jss_4_3_rtm/src/jss-4.3.tar.bz2 binary releases are no longer available on mozilla. ...
... source may be viewed with a browser (via the mxr tool) at http://mxr.mozilla.org/mozilla/source/security/jss/ the run time behavior of jss can be affected by the nss environment variables. ...
JSS FAQ
tic policy used by default? yes, domestic is the default because we call nss_setdomesticpolicy() during cryptomanager.initialize(). setcipherpolicy does not need to be called by a jss app unless that app wants to limit itself to export-allowed cipher suites. my ssl connection is hanging on windows? nspr makes use of nt vs. windows distinction and provides different nt and windows
builds. many netscape products, including nss, have nt and windows
builds that are essentially the same except one difference: one is linked with the nt version of nspr and the other is linked with the windows version of nspr. the nt fiber problem affects applications that call blocking system calls from the primordial thread. either use the win 95 version of nspr/nss/jss components (essentially all no...
...netscape products, including nss, have nt and windows
builds that are essentially the same except one difference: one is linked with the nt version of nspr and the other is linked with the windows version of nspr. the nt fiber problem affects applications that call blocking system calls from the primordial thread. either use the win 95 version of nspr/nss/jss components (essentially all non-fiber
builds) or set the environment variable nspr_native_threads_only=1. you can find more information in bugzilla bug 102251 ssl session cache locking issue with nt fibers how can i tell which ssl/tls ciphers jss supports? check http://lxr.mozilla.org/mozilla/source/security/jss/org/mozilla/jss/ssl/sslsocket.java#730 how can i debug my ssl connection? by using the nss tool...
JSS Provider Notes
cryptotoken supported classes what's not supported signed jar file jss 3.2 implements several jce (java cryptography extension) algorithms. these algorithms have at various times been export-controlled by the us government. sun therefore requires that jar files implementing jce algorithms be digitally signed by an approved organization. ...
...this means you will not be able to use the jss provider for jce algorithms. you have two choices. use the binary release of jss from mozilla.org. ...
Mozilla-JSS JCA Provider notes
what's not supported signed jar file jss implements several jce (java cryptography extension) algorithms. these algorithms have at various times been export-controlled by the us government. jre therefore requires that jar files implementing jce algorithms be digitally signed by an approved organization. ...
...this means you will not be able to use the jss provider for jce algorithms. you have two choices. use the binary release of jss from mozilla.org. ...
Using JSS
freebl_* processor-specific optimized big-number arithmetic library. not present on all platforms. more information... fort fortezza support. optional swft pkcs #11 module implementing fortezza in software. optional. if you built jss from source, you have these libraries in the mozilla/dist/<platform>/lib directory of your
build tree. if you are downloading binaries, get them from the binary release locations in the above table. you need to select the right version of the components, based on the version of jss you are using. generally, it is safe to use a later version of a component than what jss was tested with. for example, although jss 4.2 was tested with nss 3.11. component versions ...
...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 . if you are downloading binaries, get jss42.jar from http://ftp.mozilla.org/pub/mozilla.org/security/jss/releases/. setup your runtime environment you need to set some environment variables before
building and running java applications with jss. classpath include the path containing the jss classes you built, or the path to jss42.jar. (the path to jss34.jar ends with the string "/jss42.jar". it is not just the directory that contains jss42.jar.) ld_library_path (unix) / path (windows) include the path to the nspr, nss, and jss shared libraries. initialize js...
NSS_3.11.10_release_notes.html
information bugs fixed documentation compatibility feedback introduction network security services (nss) 3.11.10 is a patch release for nss 3.11. the bug fixes in nss 3.11.10 are described in the "bugs fixed" section below. distribution information the cvs tag for the nss 3.11.10 release is nss_3_11_10_rtm. nss 3.11.10 requires nspr 4.7.1. see the documentation section for the
build instructions. nss 3.11.10 source and binary distributions are also available on ftp.mozilla.org for secure https download: source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/nss_3_11_10_rtm/src/. binary distributions: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/nss_3_11_10_rtm/. both debug and optimized
builds are provided. go to the subdirect...
...fix pk11_generatekeypair for ecc keys on the 3.11 branch bug 444850: nss misbehaves badly in the presence of a disabled pkcs#11 slot bug 462948: lint warnings for source files that include keythi.h documentation for a list of the primary nss documentation pages on mozilla.org, see nss documentation. new and revised documents available since the release of nss 3.9 include the following:
build instructions for nss 3.11.4 and above compatibility nss 3.11.10 shared libraries are backward compatible with all older nss 3.x shared libraries. a program linked with older nss 3.x shared libraries will work with nss 3.11.10 shared libraries without recompiling or relinking. furthermore, applications that restrict their use of nss apis to the functions listed in nss public functions will rem...
NSS 3.12.9 release notes
center> introduction network security services (nss) 3.12.9 is a patch release for nss 3.12. the bug fixes in nss 3.12.9 are described in the "bugs fixed" section below. nss 3.12.9 is tri-licensed under the mpl 1.1/gpl 2.0/lgpl 2.1. distribution information the cvs tag for the nss 3.12.9 release is nss_3.12.9_rtm. nss 3.12.9 requires nspr 4.8.7. see the documentation section for the
build instructions. nss 3.12.9 source distribution is also available on ftp.mozilla.org for secure https download: source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/nss_3.12.9_rtm/src/. you also need to download the nspr 4.8.7 binary distributions to get the nspr 4.8.7 header files and shared libraries, which nss 3.12.9 requires. nspr 4.8.7 binary distributions are ...
..._findcertbynicknameoremailaddrbyusage bug 592939: expired cas in certdata.txt documentation <for a="" class="new " documentation="" href="/en/index.html#documentation" list="" nss="" of="" pages="" primary="" rel="internal" see="" the="" title="en/index.html#documentation">nss documentation. new and revised documents available since the release of nss 3.11 include the following:</for>
build instructions for nss 3.11.4 and above nss shared db compatibility nss 3.12.9 shared libraries are backward compatible with all older nss 3.x shared libraries. a program linked with older nss 3.x shared libraries will work with nss 3.12.9 shared libraries without recompiling or relinking. furthermore, applications that restrict their use of nss apis to the functions listed in nss public f...
NSS 3.14.2 release notes
hat enterprise linux 5.x systems, install the binutils220 package and add /usr/libexec/binutils220 to the beginning of your path environment variable. initial manual pages for some nss command line tools have been added. they are still under review, and contributions are welcome. the documentation is in the docbook format and can be rendered as html and unix-style manual pages using an optional
build target. new types: in certt.h cert_pi_useonlytrustanchors in secoidt.h sec_oid_ms_ext_key_usage_ctl_signing notable changes in nss 3.14.2 bug 805604 - support for aes-ni and avx accelerated aes-gcm was contributed by shay gueron of intel. if compiled on linux systems in 64-bit mode, nss will include runtime detection to check if the platform support...
...ore the patch (https://bugzilla.mozilla.org/show_bug.cgi?id=805604 and https://crypto.stanford.edu/realworldcrypto/slides/gueron.pdf). support for other platforms, such as windows, will follow in a future nss release. (https://bugzilla.mozilla.org/show_bug.cgi?id=540986) sqlite has been updated to 3.7.15. note: please apply the patch in https://bugzilla.mozilla.org/show_bug.cgi?id=837799 if you
build nss with the system sqlite library and your system sqlite library is older than 3.7.15. bug 816853 - when using libpkix for certificate validation, applications may now supply additional application-defined trust anchors to be used in addition to those from loaded security tokens, rather than as an alternative to. (https://bugzilla.mozilla.org/show_bug.cgi?id=816853) bug 772144 - basic suppor...
NSS 3.16 release notes
s a minor release. distribution information the hg tag is nss_3_16_rtm. nss 3.16 requires nspr 4.10.3 or newer. nss 3.16 source distributions are available on ftp.mozilla.org for secure https download: source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/nss_3_16_rtm/src/ new in nss 3.16 new functionality supports the linux x32 abi. (this requires nspr 4.10.4.) to
build for the linux x32 target, set the environment variable use_x32=1 when
building nss. new functions in cms.h nss_cmssignerinfo_verify - verify the signature of a single signerinfo. it just verifies the signature, assuming that the certificate has been verified already. new macros in sslproto.h tls_rsa_with_rc4_128_sha, tls_rsa_with_3des_ede_cbc_sha, etc. - cipher suites that ...
...rsa_with_3des_ede_cbc_sha, etc. - cipher suites that were first defined in ssl 3.0 can now be referred to with their official iana names in tls, with the tls_ prefix. previously, they had to be referred to with their names in ssl 3.0, with the ssl_ prefix. notable changes in nss 3.16 ecc is enabled by default. it is no longer necessary to set the environment variable nss_enable_ecc=1 when
building nss. to disable ecc, set the environment variable nss_disable_ecc=1 when
building nss. bug 903885: (cve-2014-1492) in a wildcard certificate, the wildcard character should not be embedded within the u-label of an internationalized domain name. see the last bullet point in rfc 6125, section 7.2. bug 962760: libpkix should not include the common name of ca as dns names when evaluating name con...
NSS 3.24 release notes
ary arenas. new functionality nss softoken has been updated with the latest national institute of standards and technology (nist) guidance (as of 2015): software integrity checks and post functions are executed on shared library load. these checks have been disabled by default, as they can cause a performance regression. to enable these checks, you must define symbol nss_force_fips when
building nss. counter mode and galois/counter mode (gcm) have checks to prevent counter overflow. additional csps are zeroed in the code. nss softoken uses new guidance for how many rabin-miller tests are needed to verify a prime based on prime size. nss softoken has also been updated to allow nss to run in fips level 1 (no password). this mode is triggered by setting the database passwo...
..._auth_rsa_decrypt. add a shared library (libfreeblpriv3) on linux platforms that define freebl_lowhash. remove most code related to ssl v2, including the ability to actively send a sslv2-compatible client hello. however, the server-side implementation of the ssl/tls protocol still supports processing of received v2-compatible client hello messages. disable (by default) nss support in optimized
builds for logging ssl/tls key material to a logfile if the sslkeylogfile environment variable is set. to enable the functionality in optimized
builds, you must define the symbol nss_allow_sslkeylogfile when
building nss. update nss to protect it against the cachebleed attack. disable support for dtls compression. improve support for tls 1.3. this includes support for dtls 1.3. note that tls 1.3 sup...
NSS 3.44.1 release notes
a program linke...
...on't unnecessarily strip leading 0's from key material during pkcs11 import (cve-2019-11719) 1515236 - add a sslkeylogfile enable/disable flag at
build.sh 1473806 - fix seckey_converttopublickey handling of non-rsa keys 1546477 - updates to testing for fips validation 1552208 - prohibit use of rsassa-pkcs1-v1_5 algorithms in tls 1.3 (cve-2019-11727) 1551041 - unbreak
build on gcc < 4.3 big-endian compatibility nss 3.44.1 shared libraries are backward compatible with all older nss 3.x shared libraries. a program linked with older nss 3.x shared libraries will work with nss 3.44.1 shared libraries without recompiling or relinking. furthermore, applications that restrict their use of nss apis to the functions listed in nss public functions will remain compatible ...
NSS 3.45 release notes
ng bug 1515011 - fix a mistake with chacha20-poly1305 test code where tags could be faked. ...
...y relevant for clients that might have copied the unit test code verbatim bug 1550022 - ensure nssutil3 gets built on android bug 1528174 - chacha20poly1305 should no longer modify output length on failure bug 1549382 - don't leak in pkcs#11 modules if c_getslotinfo() returns error bug 1551041 - fix
builds using gcc < 4.3 on big-endian architectures bug 1554659 - add versioning to openbsd
builds to fix link time errors using nss bug 1553443 - send session ticket only after handshake is marked as finished bug 1550708 - fix gyp scripts on solaris sparc so that libfreebl_64fpu_3.so
builds bug 1554336 - optimize away unneeded loop in mpi.c bug 1559906 - fipstest: use ckm_tls12_master_key_derive instead of vendor specific mechanism bug 1558126 - tls_aes_256_gcm_sha384 should be marked...
NSS 3.55 release notes
e university. pk11_findcertinslot is added. with this function, a given slot can be queried with a der-encoded certificate, providing performance and usability improvements over other mechanisms. see bug 1649633 for more details. dtls 1.3 implementation is updated to draft-38. see bug 1647752 for details. nspr dependency updated to 4.27. known issues on some platforms, using the makefile
builds fails to locate seccomon.h; ensure you are using make all rather than just make. another potential workaround is to use the gyp-based
build.sh script. if this affects you, please help us narrow down the cause in bug 1653975. bugs fixed in nss 3.55 bug 1631583 (cve-2020-6829, cve-2020-12400) - replace p384 and p521 with new, verifiable implementations from fiat-crypto and ecckiila. bug 164...
...chacha20 (which was not functioning correctly) and more strictly enforce tag length. bug 1649648 - don't memcpy zero bytes (sanitizer fix). bug 1649316 - don't memcpy zero bytes (sanitizer fix). bug 1649322 - don't memcpy zero bytes (sanitizer fix). bug 1653202 - fix initialization bug in blapitest when compiled with nss_disable_deprecated_seed. bug 1646594 - fix avx2 detection in makefile
builds. bug 1649633 - add pk11_findcertinslot to search a given slot for a der-encoded certificate. bug 1651520 - fix slotlock race in nsc_gettokeninfo. bug 1647752 - update dtls 1.3 implementation to draft-38. bug 1649190 - run cipher, sdr, and ocsp tests under standard test cycle in ci. bug 1649226 - add wycheproof ecdsa tests. bug 1637222 - consistently enforce iv requirements for des and 3...
nss tech note2
module. for example, to log the softoken, use: nss_debug_pkcs11_module="nss internal pkcs #11 module" note: in the command prompt on windows, do not quote the name of the target module, otherwise the quotes are considered part of the name. for example, to log the softoken on windows, use: set nss_debug_pkcs11_module=nss internal pkcs #11 module the logger is available by default in debug
builds. for optimized
builds, nss must be built with the variable debug_pkcs11 set. modes of operation the logger has several modes of operation: 1. only display the sequence of pkcs #11 calls. to enable this mode, set: nspr_log_modules=nss_mod_log:1 nspr_log_file=<logfile> the output format is: osthreadid[nsprthreadid]: c_xxx osthreadid[nsprthreadid]: rv = 0xyyyyyyyy for example, 1024[805ef10]: c_...
...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. collect performance data. this mode is most useful in optimized
builds. the number of calls to each pkcs #11 function will be counted, and the time spent in each function as well. a summary of performance data is dumped during nss shutdown. no additional environment variables are required for this mode. if the environment variable nss_output_file is set, its value will be used as the path name of the file to which the final output will be written. otherwise, the ou...
gtstd.html
migration, your help would be very much appreciated. upgraded documentation may be found in the current nss reference getting started with ssl chapter 2 getting started with ssl this chapter describes how to set up your environment, including certificate and key databases. ssl, pkcs #11, and the default security databases setting up the certificate and key databases
building nss programs ssl, pkcs #11, and the default security databases the basic relationships among the nss libraries are described in introduction to network security services. before running the sample programs, it's important to understand the relationships between the ssl interface, the pkcs #11 interface, pkcs #11 modules, and the default netscape security databases. a pkcs #11 module (als...
...able to authenticate to the server. verifying the server and client certificates when you have finished setting up the server and client certificate databases, verify that the client and server certificates are valid, as follows: >certutil -v -d server_db -u v -n myco.mcom.org certutil: certificate is valid >certutil -v -d client_db -u c -n "joe client" certutil: certificate is valid
building nss programs on unix, use the gnu utility gmake to run the makefile. on windows nt, use the nmake utility that comes with visual c++. if you create your own makefiles, be sure to include the libraries in the same order that they are listed in the sample makefiles. in addition, you must use the following compiler flags: solaris flags: -c -o -kpic -dsvr4 -dsysv -d__svr4 -d__svr4__ -dsolaris...
Network Security Services
ains the basic concepts of public-key cryptography that underlie nss. introduction to ssl introduces the ssl protocol, including information about cryptographic ciphers supported by ssl and the steps involved in the ssl handshake. getting started nss releases this page contains information about the current and past releases of nss. get the source code and
build it instructions on how to
build nss on the different supported platforms. nss apis introduction to network security services provides an overview of the nss libraries and what you need to know to use them. nss ssl public functions summarizes the ssl apis exported by the nss shared libraries. nss ssl reference api used to invoke ssl operations. ...
...plains how the libraries and code are organized, and guidelines for developing code (naming conventions, error handling, thread safety, etc.) nss technical notes links to nss technical notes, which provide latest information about new nss features and supplementary documentation for advanced topics in programming with nss. tools, testing, and other technical details
build instructions for nss describe how to check out and
build nss releases. nss developer tutorial how to make changes in nss. coding style, maintaining abi compatibility. nss tools tools for developing, debugging, and managing applications that use nss. sample code demonstrates how nss can be used for cryptographic operations, certificate handl...
Renaming With Pork
these notes are based on tools pork refactoring toolchain [required]. see installing pork. filterdiff from patchutils renaming a class 1. make two copies of the source(analysis and test). this isn't strictly required, but will save time. 2. ...
...these notes are based on tools pork refactoring toolchain [required]. see installing pork. filterdiff from patchutils renaming a class 1. make two copies of the source(analysis and test). this isn't strictly required, but will save time. 2. ...
Bytecode Descriptions
ame for the next loop iteration, or magicvalue(js_no_iter_value) if there are no more enumerable properties to iterate over. the magic value must be used only by jsop::isnoiter and jsop::enditer. isnoiter stack: val ⇒ val, done test whether the value on top of the stack is magicvalue(js_no_iter_value) and push the boolean result. iternext stack: val ⇒ val no-op instruction to hint to ion
builder that the value on top of the stack is the string key in a for-in loop. enditer stack: iter, iterval ⇒ exit a for-in loop, closing the iterator. iter must be a propertyiteratorobject pushed by jsop::iter. iteration checkisobj operands: (checkisobjectkind kind) stack: result ⇒ result check that the top value on the stack is an object, and throw a typeerror if not. kind is used only to...
... simply as "result.value". forceinterpreter no-op instruction only emitted in some self-hosted functions. not handled by the jits or baseline interpreter so the script always runs in the c++ interpreter. debugcheckselfhosted stack: checkval ⇒ checkval examine the top stack value, asserting that it's either a self-hosted function or a self-hosted intrinsic. this does nothing in a non-debug
build. instrumentationactive stack: ⇒ val push a boolean indicating if instrumentation is active. instrumentationcallback stack: ⇒ val push the instrumentation callback for the current realm. instrumentationscriptid stack: ⇒ val push the current script's instrumentation id. debugger break in the debugger, if one is attached. otherwise this is a no-op. the debugger api offers a way to ...
Tracing JIT
monkey or any other part of the mozilla codebase. the jstracer component consists of a monitor and a recorder. the monitor watches the executing spidermonkey interpreter. when the monitor determines that the interpreter has entered a region of code that would benefit from native compilation, the monitor activates the recorder. the recorder records the activity of the interpreter, using nanojit to
build an efficient, native representation of the execution called a fragment. the monitor then calls into the native code stored in the fragment. a schematic diagram of the components of the tracing jit follows: generic low level component: nanojit/* the files in the nanojit directory define the nanojit component. nanojit/lir.* the nanojit/lir.cpp and nanojit/lir.h files define the intermediate...
...is required in a register a new one is assigned from the list of free registers. when all registers are in use, the least-often-used register currently in use is spilled. nanojit/native*.* the files nativei386.h, nativei386.cpp, nativearm.h, nativearm.cpp, etc. each define architecture-specific methods within the assembler class. only one architecture-specific variant is included into any given
build of the assembler; the architecture is selected and fixed when the
build is configured. the architecture-specific methods found in these files are the only functions within nanojit or tracemonkey that emit raw bytes of machine-code into memory. spidermonkey-specific high level component: jstracer.* the files jstracer.cpp and jstracer.h contain a the mechanisms of monitoring and recording the ac...
Self-hosted builtins in SpiderMonkey
an't be modified by application code. the selfhostingdefines.h header contains adding self-hosted functions to host objects first, the code has to be embedded into spidermonkey. the easiest way to accomplish that is to add the code to a pre-existing .js file in builtin/. if it doesn't fit into any of those, create a new .js file in that directory and add it to the selfhosted.inputs list in moz.
build. to add a self-hosted function as a method to a host object, add it to that host object's jsfunctionspec array using the js_self_hosted_fn macro. example: js_self_hosted_fn("foreach", "arrayforeach", 1,0) this causes the self-hosted function arrayforeach to be installed as the host object's method foreach. making jsnatives available to self-hosted code for a jsnative to be available ...
... ...
JSObjectOps.dropProperty
parameter. description the following contract governs jsobjectops callers and implementations: whenever jsobjectops.lookupproperty returns a jsproperty pointer, the property is locked. while the property is locked, the caller may access it using other jsobjectops callbacks. it may not otherwise call into the jsapi in ways that might trigger other property accesses. (in a js_threadsafe
build, that would risk deadlock.) when finished with a locked property, the caller must release it by calling the dropproperty callback. the lifetime of the jsproperty * extends from the successful defineproperty or lookupproperty call to the dropproperty call. as a spidermonkey implementation detail, what is actually locked here (under the native implementation of jsobjectops) is not the property ...
...does not happen because each thread accesses only one property at a time. a single, built-in jsobjectops implementation is used for most spidermonkey objects that are exposed to scripts. custom jsobjectops implementations can either retain the spidermonkey property storage and locking scheme (by copying all or most of the built-in jsobjectops) or replace it entirely. threads. in a js_threadsafe
build, any consistency observed by multiple threads operating on the same data is provided solely by the property locking scheme described above. in spidermonkey 1.8 and earlier, the main built-in jsobjectops implementation serialized all accesses to a given object's properties. (that is, for each object, all property accesses happened in some order, and what each thread observed was consistent with th...
JSPropertyOp
js::mutablehandlevalue vp); typedef bool (* jsstrictpropertyop)(jscontext *cx, js::handleobject obj, js::handleid id, bool strict, js::mutablehandlevalue vp); // added in spidermonkey 1.9.3 name type description cx jscontext * the context in which the property access is taking place. provides request. in js_threadsafe
builds, the javascript engine calls this callback only from within an active request on cx. the callback does not need to call js_beginrequest()). obj js::handleobject the object whose properties are being accessed. id js::handleid the name or index of the property being accessed. this is either a string (unicode property identifier) or an integer (element index). ...
...t. this happens when a program sets a property that isn't already an own property of the target object. it also happens in jsapi functions such as js_defineproperty. on entry, *vp contains the value provided by the code defining or setting the property. the callback may modify *vp. on success, the post-callback value of *vp becomes the initial stored value of the new property. in js_threadsafe
builds, this callback is called with obj locked. it is therefore dangerous for the callback to call jsapi functions, particularly if obj may have been visible to more than one thread. jsclass.getproperty is the default getter for new properties. see the section on getters and setters above. jsclass.getproperty is also called when a program attempts to get a property that does not exist on obj ...
JS_ClearPendingException
description js_clearpendingexception cancels the currently pending exception in cx, if any. ...
...exception in cx has not yet been caught or cleared.) when any jsapi call fails with an exception, the caller must either use js_clearpendingexception to catch the exception; or return false to allow the exception to propagate to the caller. note that a jsapi failure does not necessarily indicate that an exception is pending. many jsapi functions can simply report an error and return false without
building and throwing an exception object. use js_isexceptionpending or js_getpendingexception to check for a pending exception. see examples in the jsapi phrasebook. see also mxr id search for js_clearpendingexception js_getpendingexception js_isexceptionpending js_reportpendingexception js_setpendingexception ...
JS_ForgetLocalRoot
may still work in some browsers, its use is discouraged since it could be removed at any time. try to avoid using it. 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. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. thing void * pointer to the value to be unrooted. this must point to a jsobject, jsstring, jsfunction, or jsdouble. it must not be null. description this function is used to interact with scoped local root management. see js_enterlocalrootscope for more on this topic. in case a native hook allocates many objects or other gc-...
...oot works on any gc-thing allocated in the current local root scope, but it's more time-efficient when called on references to more recently created gc-things. calling it successively on other than the most recently allocated gc-thing will tend to average the time inefficiency, and may risk o(n2) growth rate, but in any event, you shouldn't allocate too many local roots if you can root as you go (
build a tree of objects from the top down, forgetting each latest-allocated gc-thing immediately upon linking it to its parent). if the caller is not in any local root scope, js_forgetlocalroot has no effect. see also bug 519949 bug 803907 ...
JS_GET_CLASS
e #define js_get_class(cx,obj) js_getclass(obj) #endif parameter type description cx jscontext * any context associated with the runtime in which obj exists. obj jsobject * object to get the class from. note: in spidermonkey versions prior to spidermonkey 1.8.8, js_getclass took both a jscontext* and a jsobject* as arguments in thread-safe
builds, and in non-thread-safe
builds it took only a jsobject*. the js_get_class(cx, obj) macro abstracted away this detail. newer versions have removed the context argument, so that the same signature is used regardless whether or not the
build is thread-safe. description js_get_class returns a pointer to the jsclass associated with a specified js object, obj. the application must treat the jsclass ...
...s_get_class returns a pointer to the jsclass associated with a specified js object, obj. the application must treat the jsclass as read-only. to check the type of an object, use js_hasinstance instead. for a stricter, exact-match-only check, use js_instanceof or js_getinstanceprivate. the js_get_class abstracted away signature differences in the js_getclass method in threadsafe and non-threadsafe
builds. as of spidermonkey 1.8.8 it no longer exists, because js_getclass's signature is the same in all
build environments. see also bug 723517 ...
JS_NewObjectForConstructor
d in jsapi 32 jsobject * js_newobjectforconstructor(jscontext *cx, jsclass *clasp, const jsval *vp); // added in jsapi 14, obsolete since jsapi 32 jsobject * js_newobjectforconstructor(jscontext *cx, const jsval *vp); // obsolete since jsapi 14 name type description cx jscontext * the context in which to create the new object. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. clasp const jsclass * the class of the object to create. added in spidermonkey 17 vp jsval * pointer to a constructor. this must be an object that has a prototype property. args js::callargs & call argument to get a constructor as callee. added in spidermonkey 38 description js_newobjectforc...
...js::callargs & call argument to get a constructor as callee. added in spidermonkey 38 description js_newobjectforconstructor creates a new object exactly as the given constructor would if invoked with new. this function does not run the code of the constructor function--it just creates the object. if the constructor argument is not an object jsval, this function will assert (in debug
builds). if the constructor does not have a prototype property, this function will return null and set an exception on cx. the standard object creation api, js_newobject, takes explicit arguments for the class, prototype, and parent of the new object. with js_newobjectforconstructor, the prototype and parent are determined by the constructor, and class is still determined by the caller. the prototype i...
JS_ReportError
is function can also raise a javascript exception which a currently executing script can catch. syntax void js_reporterror(jscontext *cx, const char *format, ...); bool js_reportwarning(jscontext *cx, const char *format, ...); name type description cx jscontext * pointer to a js context from which to derive runtime information. requires request. ...
...the resulting error message is passed to the context's jserrorreporter callback, if any. ...
JS_SetGCCallback
at the moment. some quirky behavior follows from this: the javascript engine can call the gc callback reentrantly on a single thread. for example, if the jsgc_mark_end callback does something that triggers gc, a jsgc_begin callback might happen. but the javascript engine will then detect that gc is already happening and will not actually do a nested gc cycle in this case. ...
...tually do a nested gc cycle in this case. in a js_threadsafe
build, a jsgc_begin callback may happen on any thread, any time that thread triggers garbage collection (from almost any jsapi call). the gc callback may be called on multiple threads at the same time (e.g. if a thread that is not in an active request calls js_gc while gc is already happening on another thread). in a js_threadsafe
build, a jsgc_begin callback can happen on one thread before or while a jsgc_end callback for the previous gc cycle runs on another thread. in a js_threadsafe
build, the jsgc_end callback is called after each stop-the-world rendezvous during which one or more garbage collection cycles finished. the callback executes on the same thread that performed gc, after the gc lock has been released. other threa...
JS_SuspendRequest
jsrefcount js_suspendrequest(jscontext *cx); void js_resumerequest(jscontext *cx, jsrefcount savedepth); name type description cx jscontext * the context whose current request is to be suspended or resumed. savedepth jsrefcount (only in js_resumerequest) the valued returned by the matching js_suspendrequest call. description in js_threadsafe
builds, when a multi-threaded application is in a request but needs to block or perform lengthy computation that can race safely with the garbage collector, it should call js_suspendrequest before the time-consuming operation and js_resumerequest after. for more information about thread safety and requests, see js_threadsafe. js_suspendrequest suspends any currently active requests associated with the...
... were suspended. it may be 0. js_resumerequest resumes the previously suspended requests. the savedepth argument must be the value returned by the matching js_suspendrequest call. if savedepth is nonzero and garbage collection is underway, js_resumerequest blocks until the garbage collector is done. jsapi 1.7 and earlier js_suspendrequest and js_resumerequest are available only in js_threadsafe
builds. in spidermonkey 1.8 and later, these functions will be present, but will do nothing, in non-js_threadsafe
builds. mxr id search for js_suspendrequest mxr id search for js_resumerequest ...
JS_YieldRequest
ince it could be removed at any time. try to avoid using it. momentarily suspend the current jsapi request, allowing garbage collection to run if another thread has requested it. syntax void js_yieldrequest(jscontext *cx); name type description cx jscontext * the jscontext that is currently in a request on the calling thread. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. description for more information about thread safety and requests, see js_threadsafe. js_yieldrequest momentarily suspends the current request. a program can call this function periodically to ensure that a long-running request does not block garbage collection indefinitely. the effect is the same as a call to js_suspendrequest immed...
...lection indefinitely. the effect is the same as a call to js_suspendrequest immediately followed by a call to js_resumerequest. jsapi 1.7 and earlier js_yieldrequest did not cause cx to relinquish objects it created to other threads that are blocked waiting for them. this bug (bug 402898) will be fixed in spidermonkey 1.8. jsapi 1.7 and earlier js_yieldrequest is available only in js_threadsafe
builds. in spidermonkey 1.8 and later, this function will be present, but will do nothing, in non-js_threadsafe
builds. mxr id search for js_yieldrequest ...
JSAPI reference
runtimesecuritycallbacks obsolete since jsapi 13 js_setruntimesecuritycallbacks obsolete since jsapi 13 threading the following functions support the spidermonkey threading model. note: js_threadsafe is now permanently on and the jsruntime is single-threaded. to execute more than one js script at once, use multiple jsruntimes. jsapi 1.7 and earlier they are only available in js_threadsafe
builds. added in spidermonkey 1.8 these functions are always available, but in non-js_threadsafe
builds, they do nothing. js_beginrequest js_endrequest js_yieldrequest obsolete since jsapi 18 js_suspendrequest obsolete since jsapi 18 js_resumerequest obsolete since jsapi 18 js_getcontextthread obsolete since jsapi 8 js_setcontextthread obsolete since jsapi 8 js_clearcontextthread obsolete si...
...eadsafe
builds, they do nothing. ...
SpiderMonkey 1.8.8
ave a type change on their arguments to jshandleobject, jshandleid, jshandlemutableobject etc. atleast for the c api this wraps an extra pointer around these objects, so you would cast the argument to jsobject**, in the callback function. removal of jscontext* parameters to many methods the js_getclass method now takes only a jsobject*, where previously it also required a jscontext* in threadsafe
builds. (the js_get_class macro abstracting away this difference has accordingly been removed.) javascript shell changes detail added/removed methods here... known issues detail any known issues here... future direction include-followup-on-experimental-library-versioning-scheme-here spidermonkey embedders should also be aware that mozilla has no plans to keep the jsapi, nor the jsdbgapi stable for e...
...lowup-on-experimental-library-versioning-scheme-here spidermonkey embedders should also be aware that mozilla has no plans to keep the jsapi, nor the jsdbgapi stable for embedders. we have chosen to concentrate on performance and correctness as primary concerns instead. the team is considering the removal of tinyids js_threadsafe is going away, with future versions supporting only thread-safe
builds a new debugging api is on the way to replace jsd. release notes errata this is a list of changes which need to be made to the release notes asap. feel free to fix any problems you spot -- this is a wiki! don't add anything here -- this is for after the release notes are completed. :-) ...
SpiderMonkey 17
ave a type change on their arguments to jshandleobject, jshandleid, jshandlemutableobject etc. atleast for the c api this wraps an extra pointer around these objects, so you would cast the argument to jsobject**, in the callback function. removal of jscontext* parameters to many methods the js_getclass method now takes only a jsobject*, where previously it also required a jscontext* in threadsafe
builds. (the js_get_class macro abstracting away this difference has accordingly been removed.) garbage collection functions now take runtime argument most garbage collection functions now take a runtime argument instead of a context. the one exception to this is js_maybegc which still takes a context as argument. javascript shell changes detail added/removed methods here... known issues detail any kn...
...lowup-on-experimental-library-versioning-scheme-here spidermonkey embedders should also be aware that mozilla has no plans to keep the jsapi, nor the jsdbgapi stable for embedders. we have chosen to concentrate on performance and correctness as primary concerns instead. the team is considering the removal of tinyids js_threadsafe is going away, with future versions supporting only thread-safe
builds a new debugging api is on the way to replace jsd. in the future every api is going to take handles instead of raw pointers. exact stack rooting is requirement for a (moving) generational garbage collector. release notes errata this is a list of changes which need to be made to the release notes asap. feel free to fix any problems you spot -- this is a wiki! don't add anything here -- this i...
SpiderMonkey 31
usual. once all jsapi operation has completed, the corresponding js_shutdown method uninitializes spidermonkey, cleaning up memory and allocations performed by js_init. it is not required to call js_shutdown at present, but it is strongly recommended: calling it may be required in a future spidermonkey release. javascript shell changes detail added/removed methods here... on posix platforms,
building a threadsafe shell no longer requires nspr. embedders still need to
build with nspr, as the new wrappers require using spidermonkey internal functions which are not exposed to the public api. known issues detail any known issues here... future direction ...insert details on future plans... spidermonkey embedders should be aware that mozilla has no plans to keep the jsapi, nor the jsdbg...
... known issues detail any known issues here... future direction ...insert details on future plans... spidermonkey embedders should be aware that mozilla has no plans to keep the jsapi, nor the jsdbgapi stable for embedders. we have chosen to concentrate on performance and correctness as primary concerns instead. js_threadsafe is going away, with future versions supporting only thread-safe
builds a new debugging api is on the way to replace jsd. release notes errata this is a list of changes which need to be made to the release notes asap. feel free to fix any problems you spot -- this is a wiki! don't add anything here -- this is for after the release notes are completed. :-) ...
Web Replay
e recording to the end. the developer tools can be used to interact with this tab in the same way as a recording tab, though playing forward to the end will pause the tab instead of allowing further recording. save recording and replay on a different machine (partially implemented) recordings can be replayed on a different machine from the one which recorded them. this requires using the same
build of firefox and a reasonably similar version of the operating system; otherwise the tab will probably crash. this feature has had little testing or polishing and there is not yet a good definition of 'reasonably similar'. time travel features this section describes extensions to the developer tools that use time travel to help debug a recording/replaying tab. step back when paused, the revers...
...ize the places where other parts of gecko need to know about it or interact with it. there are, however, areas where gecko development is impacted by replay. this section describes the main areas where ongoing development can break replay and cause its tests to fail. needinfo? :bhackett on bugzilla with any questions or concerns. on treeherder, web replay tests currently only run on macos opt
builds, and are prefixed with browser_dbg_rr. calls to new library functions most non-deterministic behaviors in a recorded/replayed process are captured by redirecting the system library functions which the process calls into — rewriting their machine code so they invoke a record/replay specific function with the same signature, which records any results of the function and then replays those resu...
compare-locales
installation compare-locales needs to be installed, and it requires that you have python 2.7 or 3.5+ installed on your machine. the easiest way is to just run $ pip install -u compare-locales running it compare-locales gathers the directories to compare from a toml file, usually found in $app/locales/l10n.toml. ...
...mpare. ...
Using RAII classes in Mozilla
k to be released at the end of the statement. we have two techniques for avoiding this problem: static analysis and runtime assertions. ...
... 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. ...
AT APIs Support
lications: firefox - web-browser thunderbird - email client seamonkey - web-browser, advanced e-mail and newsgroup client, irc chat client, and html editing made simple sunbird - cross-platform calendar application kompozer - a complete web authoring system for linux desktop, microsoft windows and macintosh users to rival programs like frontpage and dreamweaver. open komodo - platform for
building developer environments miro - a free, open source internet tv and video player any xulrunner application (songbird media player, etc.) extensions to other xul apps (e.g. firefox extensions) gecko version for firefox and all other gecko-based products: this documentation applies to up-to-date product
builds based on gecko 1.9.2 -- currently not available on official releases. however most...
...edia player, etc.) extensions to other xul apps (e.g. firefox extensions) gecko version for firefox and all other gecko-based products: this documentation applies to up-to-date product
builds based on gecko 1.9.2 -- currently not available on official releases. however most of described features are supported starting from gecko 1.9.0 (firefox 3.0). however it's preferable to grab the current
build of firefox or any other gecko-based product to be up to dated: firefox recent
builds thunderbird recent
builds seamonkey recent
builds determining if accessibility is enabled in a firefox accessibility is enabled on windows and linux platforms by default. as well you might find helpful the about:accessibilityenabled firefox extension. supported at apis at apis terms microsoft active ...
Embedded Dialog API
e new browser windows and new simple, empty windows. gecko can use the latter to pose dialogs built from xul. xul dialogs are part of the gecko package; they are the default dialog posing mechanism. many embedding applications will find them entirely sufficient. however while xul dialogs are very configurable, they will not behave and probably not look precisely like dialogs which the application
builds for itself, independently of gecko. applications which implement merely the simplest, base gecko windowing api will then have a mixture of xul and native windows. applications concerned with presenting a consistent dialog appearance have the option of implementing the complete dialog posing api. responsibilities of the embedding application basic windowing api to be able to respond to script re...
...alogs posed by the embedding app ("down calls") some components will not pose dialogs directly, but maintain a database of information an embedding app may wish to display as a dialog. preferences are the canonical example. in this case, we must be sure to have an api which an embedding app can use to populate its own dialog, should it decide to eschew mozilla's xul version. these components need
build no dialog posing interface. guidelines a few restrictions on each component's ui interface... most if not all of these dialogs will need to be child/dependent/transient windows, so each method responsible for actually opening a window must take an nsidomwindow *aparent parameter, and use that window as the dialog's parent, if non-null. to make our embedding api as consistent as possible, we'd li...
History Service Design
asynchronous statements, so that the inserts will be queued-up by mozstorage itself in a separate thread. sql queries are built with performance in mind, and constantly tested against large databases. database indexes are quite important, and a good query can make the difference between minutes or seconds. many queries are especially optimized, for example limited history queries, often used to
build menus, allowing for good performances even in presence of a really large history. storing pages and visits pages (intended as uris) are stored into a table shared by both history and bookmarks, every url is unique in this table and is associated with a place id, commonly used as the foreign key on other tables. this table has common attributes for a page like typed, hidden and frecency. certai...
...ry options object (nsinavhistoryqueryoptions) that defines the constraints results must obey to. these objects can be directly instantiated and built, setting their attributes, but places allows a more readable and manageable form for queries: place query uris. query uris (for example place:querytype=0&sort=8&maxresults=10) can be easily built and read by users (through a built-in advanced search
builder ui) and can be bookmarked, creating a so called smart bookmark. a smart bookmark can update itself automatically when bookmarks or visits change, providing a sort of saved search. once places receives a place: uri or a query object an internal query
builder checks for the requested options and make up a real sql query that is executed with storage apis. many queries can be executed and combine...
An Overview of XPCOM
t xpconnect. when a component is accessible from a language other than c++, such as javascript, its interface is said to be "reflected" into that language. every reflected interface must have a corresponding type library. ...
... see resources for more information about python and other languages for which support has been added in xpcom. all of the public interfaces in xpcom are defined using the xpidl syntax. ...
XPCOM guide
these articles provide tutorials and usage documentation for xpcom, including how to use it in your own projects and how to
build xpcom components for your firefox add-ons and the like. avoiding leaks in javascript xpcom componentsprogrammers writing and reviewing javascript code in mozilla should understand how code using xpcom in javascript can leak so that they can avoid leaks. ...
...ode in mozilla should understand how code using xpcom in javascript can leak so that they can avoid leaks. ...
PyXPCOM
vascript-xpcom bridge). mozilla defines many external interfaces available to embeddors and component developers. pyxpcom provides access to these interfaces as python interfaces. pyxpcom also contains several classes that provide access to functions for initializing and shutting down xpcom and gecko from python, as well as some xpcom helper functions. documentation
building pyxpcom the instructions for
building pyxpcom. creating a python xpcom component an example of how to create a simple xpcom component with python. getting to know pyxpcom pyxpcom is a bridging technology between xpcom and python. this article gives you a head start to pyxpcom. note: the links to part ii an...
...m and python. this article gives you a head start to pyxpcom. note: the links to part ii and iii of this series are broken and i cannot find them on the ibm site. please update this page if/when the links can be found. history pyxpcom was initially developed by activestate tool corporation, and came out of their komodo project. current releases are now integrated with the mozilla
build system. other resources pythonext - extension that provides pyxpcom samples - demo applications using pyxpcom community python-xpcom bindings mailing list (activestate) #pyxpcom on irc.mozilla.org source code the pyxpcom code is available here: http://hg.mozilla.org/pyxpcom/ to
build pyxpcom, see
building pyxpcom. rela...
xpcshell
running xpcshell ./run-mozilla.sh ./xpcshell xpcshell is almost always in the same directory as run-mozilla.sh. ...
...ozilla.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. (however, it might not be there if you have a non-debug version of firefox, mozilla, thunderbird, etc.) $ cd /opt/mozilla $ ./run-mozilla.sh ./xpcshell js> execute xpcshell from window the built xpcshell.exe can't be executed under the mozilla
build shell(bash). it should be executed under the window command prompt source_directory/obj-xxxxx/dist/bin> xpcshell.exe using the latest version of javascript at present, xpcshell doesn't use the latest version of javascript, so newer language features, such as the let statement introduced in javascript 1.7, are not available. to rectify this, run xpcshell with the -v 180 command-line option, whi...
mozIRegistry
implementations: one based solely on libreg (for "compatibility") and a fancier rdf-based one. open issues we have identified two open issues, neither of which appear to be so hard that it we won't be able to solve them in a timely fashion: if and when we remove what is currently a static binding of clsids, there will be the risk that required clsids won't be present. a corollary is that the
build/install process will require updates to user "registry" to enable new class implementations to be accessible. our current
build/install process doesn't quite step up to these problems as of yet. there are some bootstrapping issues related to using the service manager to access the moziregistry interface. currently, nsiservicemanager requires a clsid to access a service which hardcodes the implem...
...ilities will not be utilized by nsrepository. it is envisioned that there will be multiple flavors of underlying rdf data sources corresponding to the libreg .reg file(s), the shared libraries installed, additional components accessible via the 'net, etc. the contents of this rdf data base will be stored in a plain-text rdf/xml file so that it can easily be viewed edited. it will also facilitate
building a browser-based application that will allow people to display and edit its contents. original document information author: bill law last updated date: january 21, 1999 copyright information: portions of this content are © 1998–2007 by individual mozilla.org contributors; content available under a creative commons license | details. ...
nsIDOMXULElement
e element's allowevents attribute is the string "true", otherwise false. removes the attribute if you set it to false. boxobject nsiboxobject read only. gets or creates a box object for the element; browser, editor, iframe, listbox, menu, menupopup, scrollbox, tooltip and tree elements receive specialized box objects allowing access to additional properties not normally available from script.
builder nsixultemplate
builder read only. retrives the element's template
builder, if it has a template. classname domstring gets/sets the value of the element's class attribute. collapsed boolean true if the element's collapsed attribute is the string "true", otherwise false. removes the attribute if you set it to false. contextmenu domstring gets/sets the value of the element's contextmenu attri...
...g "true", otherwise false. removes the attribute if you set it to false. contextmenu domstring gets/sets the value of the element's contextmenu attribute. controllers nsicontrollers read only. returns an nsicontrollers object that additional controllers may be appended to so as to provide focus-specific actions for commands. database nsirdfcompositedatasource read only. returns the template
builder's database, if it is an rdf template. datasources domstring gets/sets the value of the element's datasources attribute. dir domstring gets/sets the value of the element's dir attribute. flex domstring gets/sets the value of the element's flex attribute. flexgroup domstring gets/sets the value of the element's flexgroup attribute. height domstring gets/sets the value of the element's h...
nsIHTMLEditor
offset, in boolean adeleteselection); void insertlinkaroundselection(in nsidomelement aanchorelement); boolean isanonymouselement(in nsidomelement aelement); void makeorchangelist(in astring alisttype, in boolean entirelist, in astring abullettype); boolean nodeisblock(in nsidomnode node); void pastenoformatting(in long aselectiontype); void re
builddocumentfromsource(in astring asourcestring); void removealldefaultproperties(); void removeallinlineproperties(); void removedefaultproperty(in nsiatom aproperty, in astring aattribute, in astring avalue); void removeinlineproperty(in nsiatom aproperty, in astring aattribute); void removeinsertionlistener(in nsicontentfilter infilter); void re...
... dtd. this does not consider css effect on display type. boolean nodeisblock( in nsidomnode node ); parameters node return value pastenoformatting() paste the text in the os clipboard at the cursor position, replacing the selected text (if any), but strip out any html styles and formatting. void pastenoformatting( in long aselectiontype ); parameters aselectiontype re
builddocumentfromsource() re
build the entire document from source html needed to be able to edit head and other outside-of-body content. void re
builddocumentfromsource( in astring asourcestring ); parameters asourcestring html source string of the entire new document. removealldefaultproperties() unregisters all default style properties with the editor. void removealldefaultproperties(); ...
nsINavHistoryQueryResultNode
ributes attribute type description folderitemid long long for both simple folder nodes and simple-folder-query nodes, this is set to the concrete itemid of the folder. otherwise, this is set to -1. read only. queryoptions nsinavhistoryqueryoptions the options that group the node's children; only valid for result_type_query nodes. read only. ...
...there are querycount elements in the array. ...
nsIXULAppInfo
n.ini. implemented by: @mozilla.org/xre/app-info;1. to create an instance, use: var xulappinfo = components.classes["@mozilla.org/xre/app-info;1"] .getservice(components.interfaces.nsixulappinfo); the nsixulruntime interface is also implemented by "xre/app-info". it contains advanced information on the xul runtime. attributes attribute type description app
buildid acstring the application's
build id/date, for example "2004051604". for xulrunner applications, this will be different than the
build id of the platform. be careful about which one you want. read only. id acstring the xul application's uuid. can be an empty string, if id is not set. has to be defined for advanced application features such as the extension manager and u...
...eeeeeeeeee}" but for new applications a more readable form is encouraged: "appname@vendor.tld". only the following characters are allowed: a-z a-z 0-9 - . @ _ { } * read only. name acstring the name of the application. this must be ascii, and is normally mixed-case, for example "firefox", "thunderbird" or "seamonkey". must not be null or an empty string. read only. platform
buildid acstring the
build id/date of gecko and the xulrunner platform. read only. platformversion acstring the version of gecko or xulrunner platform, for example "1.8.1.19" or "1.9.3pre". in "firefox 3.7 alpha 1" the application version is "3.7a1pre" while the platform version is "1.9.3pre" read only. vendor acstring the name of the application vendor. this must be...
nsIXULTemplateResult
nt created for this result, if any, will have its id attribute set to this value. the id must be unique for a query. iscontainer boolean true if the result represents a container. read only. isempty boolean true if the result represents an empty container. read only. mayprocesschildren boolean true if the template
builder may use this result as the reference point for additional recursive processing of the template. the template
builder will reprocess the template using this result as the reference point and generate output content that is expected to be inserted as children of the output generated for this result. if false, child content is not processed. this property identifies only the default handling and m...
...null value for the same variable. this method is provided as a convenience when sorting results. nsisupports getbindingobjectfor( in nsiatom avar ); parameters avar the variable to look up. return value the value for the variable or null if it has no value. hasbeenremoved() indicate that the output for a result has been removed and that the result is no longer being used by the
builder. void hasbeenremoved(); parameters none. rulematched() indicate that a particular rule of a query has matched and that output will be generated for it. both the query as compiled by the query processor's nsixultemplatequeryprocessor.compilequery() method and the xul <rule> element are supplied. the query must always be one that was compiled by the query processor that created this result. the ...
XPCOM Interface Reference
sihttpactivityobservernsihttpchannelnsihttpchannelinternalnsihttpheadervisitornsihttpservernsihttpupgradelistenernsiidnservicensiiframeboxobjectnsiiniparsernsiiniparserfactorynsiiniparserwriternsiioservicensiidleservicensiinprocesscontentframemessagemanagernsiinputstreamnsiinputstreamcallbacknsiinstalllocationnsiinterfacerequestornsijscidnsijsidnsijsiidnsijsonnsijetpacknsijetpackservicensijumplist
buildernsijumplistitemnsilivemarkservicensiloadgroupnsilocalfilensilocalfilemacnsilocalensilocaleservicensilogininfonsiloginmanagernsiloginmanagercryptonsiloginmanageriemigrationhelpernsiloginmanagerprompternsiloginmanagerstoragensiloginmetainfonsimimeinputstreamnsimacdocksupportnsimarkupdocumentviewernsimemorynsimemorymultireporternsimemorymultireportercallbacknsimemoryreporternsimemoryreportermanager...
...ctorynsiworkerglobalscopensiworkermessageeventnsiworkermessageportnsiworkerscopensiwritablepropertybagnsiwritablepropertybag2nsixformsmodelelementnsixformsnsinstanceelementnsixformsnsmodelelementnsixmlhttprequestnsixmlhttprequesteventtargetnsixmlhttprequestuploadnsixpcexceptionnsixpcscriptablensixpconnectnsixsltexceptionnsixsltprocessornsixsltprocessorobsoletensixulappinfonsixulbrowserwindownsixul
builderlistenernsixulruntimensixulsortservicensixultemplate
buildernsixultemplatequeryprocessornsixultemplateresultnsixulwindownsixmlrpcclientnsixmlrpcfaultnsizipentrynsizipreadernsizipreadercachensizipwriternsmsgfilterfileattribvaluensmsgfolderflagtypensmsgjunkstatusnsmsgkeynsmsglabelvaluensmsgpriorityvaluensmsgruleactiontypensmsgsearchattribnsmsgsearchopnsmsgsearchscopensmsgsearchtermnsmsgsearchtypeva...
Frequently Asked Questions
it's not in your code, or it's not on your platform, but there's an nscomptr on the line where the error is and you're suspicious. ...
...al. this faq usually just refers back directly to the appropriate answer, there. if you're looking here just to learn about nscomptrs, you'll get a better introduction in the getting started guide. the faq is divided into sections to help you find what you're looking for faster. in most cases, the answer will just refer back into the reference manual, above. no need to explain things twice :-).
buildtime errors the
build just broke. it's not in your code, or it's not on your platform, but there's an nscomptr on the line where the error is and you're suspicious. you're looking in the right place. comparing an nscomptr to a raw xpcom interface pointer declaring an nscomptr to a forward-declared class not linking to xpcom not including nscomptr.h different settings of nscap_feature_debug_p...
Using the Gecko SDK
for information on how to retrieve and install the gecko sdk, see here. an xpcom component will be compatible with future versions of mozilla if it only makes use of frozen gecko apis. a frozen gecko api is one that is included in the gecko and marked frozen with the text <tt>@status frozen</tt> (with nspr as the exception to the rule). ...
...ecko api consists of a set of component interfaces (c++ vtables) and <tt>extern "c"</tt> symbols exported from the xpcom library and the nspr libraries. the abi of the component interfaces depends on the c++ abi of the host compiler (i.e., the vtable format and calling conventions of the virtual methods may vary from compiler to compiler). the gecko abi is therefore compiler sensitive. (<tt>about:
buildconfig</tt> can be loaded in mozilla to reveal details about the compiler that was used.) for the remainder of this guide, we'll assume you are developing components under linux. (ports of this guide are welcome.) a "frozen" interface or function is guaranteed to be supported by future versions of same major version of the platform. the sdk contains headers for all of the frozen interfaces and fun...
Working with Multiple Versions of Interfaces
iid ns_get_iid(nsiaccessibleretrieval). unfortunately we compiled this in the latest sdk, and so this magic number happens to be: "244e4c67-a1d3-44f2-9cab-cdaa31b68046" whereas, inside firefox 2, the iid it happens to know about is: "663ca4a8-d219-4000-925d-d8f66406b626". and this explains our ns_error_no_interface. fortunately there is a plan of action that we can follow to rectify this. we
build construct our xpcom component so that first tries to get the interface by it's new iid, then if that fails, attempts plan b. plan b is simply trying to get the interface by it's older iid. for expository purposes we will do this in two stages; buoyed by the fact that it is the actual route we took. the optimist's solution the first thing we do is replace line 6 above by our plan b: if (ns_f...
...ns to completion. all the xpcom calls succeed, or at least think they succeed. the bad news is that the thing we get back is not a valid hwnd. the problem now is not just interface identifier mismatch, but class declaration mismatch. getwindowhandle is the tenth method declared in the nsiaccessibledocument.h that firefox 2 was built with, but actually the eighth method in the sdk that i used to
build my extension (and hence xpcom component). since these classes don't use vtables this means i'm probably, no i can be more positive, definitely calling the wrong method. if i were a betting man, i'd hedge a bet on getaccessibleinparentchain, that being the tenth method in the interface declaration in the new sdk. in actual fact we were lucky we actually got as far as we did, since the very first i...
XPCOM ABI
the cpu architecture or the c++ compiler are unknown, the application wouldn't have an xpcom abi string and attempts to get it will result in error ns_error_not_available. it would still be a distinct abi, but we just wouldn't have a name for it. note: platforms this is not an exhaustive list of possible cpu architectures and compiler abis. newest information can always be found by exploring the
build system. note: target_xpcom_abi in the mozilla
build system, the variable storing the xpcom abi is named target_xpcom_abi. (this is an internals detail and should be of no concern to an extension developer.) extension installation when the application (e.g. firefox) is built, the name of the abi it supports is embedded into it. later on, it could use this value to check compatibility with third...
...lication (e.g. firefox) is built, the name of the abi it supports is embedded into it. later on, it could use this value to check compatibility with third-party binary xpcom components. a common point of compatibility check is during the installation of extensions. if an extension provides binary xpcom components, it should declare their xpcom abi in the install manifest. an extension author may
build (compile) the xpcom component for each and every supported machine and pack all the
builds into a single xpi, each into its distinctive platform-specific subdirectory. at extension installation time, the application will choose the most fitting component
build for its own abi. if no such
build is found, the extension will be deemed incompatible and the application will refuse to install it. if t...
XPCOM
rick potts wrote a templated-based generic factory (nsfactory<t>) that simplifies the factory creation process that just requires writing a createinstance() method. the new nsigenericfactory interface takes this a step further, by providing a single interface that can be reused anytime a simple implementation of nsifactory is needed. here is the interface, and a description of its use.</t>how to
build a binary xpcom component using visual studiothis is a simple tutorial for
building xpcom objects in c++ using visual studio. xpcom is mozilla’s cross platform component object model, similar to microsoft’s com technology. xpcom components can be implemented in c, c++, and javascript, and can be used from c, c++, and javascript. that means you can call javascript methods from c++ and vice vers...
... not be correctly displayed.xpcom gluethe xpcom glue is a static library which component developers and embedders can link against. it allows developers to link only against the frozen xpcom method symbols and maintain compatibility with multiple versions of xpcom.xpcom guidethese articles provide tutorials and usage documentation for xpcom, including how to use it in your own projects and how to
build xpcom components for your firefox add-ons and the like.xpcom ownership guidelines...naturally. if you create a temporary object, obviously it's up to you to destroy it. that's a sure sign of ownership. if you create an object with a longer lifespan, you will own it until you give ownership away.xpcom referencethis reference describes the interfaces and functions provided by the xpcom library. in ...
Mozilla technologies
ation of what originally started out as webshell. at the moment, the transition from webshell to docshell is not fully completed, but the long-term goal is to remove webshell and switch over entirely to docshell.embedded dialog apifeed content access apifirefox 2 and thunderbird 2 introduce a series of interfaces that make it easy for extension authors to access rss and atom feeds.life after xul:
building firefox interfaces with htmlthis page gathers technical solutions to common problems encountered by teams shipping html-based interfaces inside firefox.morkmork is a database file format invented by david mccusker for the mozilla code since the original netscape database information was proprietary and could not be released open source. starting with mozilla 1.9, it was phased out in favor of ...
...extrasthe xml extras module contains several features that allow developers to treat xml as data i.e. not as just another document format. the module is structured as a drop-in component and exposes its xml-as-data features both to javascript and c++/xpcom users. the xml extras module is built by default on all platforms, and is included in the browser installers so it is available in the nightly
builds.xpcomxpcom is a cross platform component object model, similar to microsoft com. it has multiple language bindings, allowing xpcom components to be used and implemented in javascript, java, and python in addition to c++.xpidlxpidl is an interface description language used to specify xpcom interface classes.xray visiongecko runs javascript from a variety of different sources and at a variety of d...
Thunderbird extensions
the following documentation provides help for creating extensions for the thunderbird email client. there are similarities with firefox extensions, but there are also differences that may confound the starting thunderbird developer. this documention series focuses on thunderbird. need personalized help? see community / communications. warning: this content is for older versions of thunderbird. much of it may no longer be relevant. see developer.thunderbird.net for newer information. documentation getting started with thunderbird a brave, young developer wants to develop an add-on for thunderbird. these links to help through this journey. ...
... warning: this content is for older versions of thunderbird. much of it may no longer be relevant. see developer.thunderbird.net for newer information. documentation getting started with thunderbird a brave, young developer wants to develop an add-on for thunderbird. these links to help through this journey. start by reading the tutorial and learn how to
build a thunderbird extension. also see thunderbird 57-60 add-ons guide for changes introduced in thunderbird 60. read about the main windows to learn about « thread pane », « preview pane », and « folder pane ». play with a demo add-on that exercises some more advanced thunderbird-specific features want to do even more? don't reinvent the wheel: steal from the thunderbird-stdlib ...
Thunderbird
rowser. currently one of the most popular open source email clients, it is used by tens of millions of people around the world to bring together all their email accounts, chat, newsgroup and feed reading in a familiar high-productivity environment. (from early 2007 to early 2011 thunderbird was developed by mozilla messaging, a subsidiary owned by mozilla.) documentation
building thunderbird information about
building thunderbird with the comm-central repository. there's also information about how the review process works and how to use the mozilla symbol server to help with debugging. mailnews protocols rough documentation about mail protocols.. database views backend information about nsimsgdbview and related interfaces. thunderbird api ...
... information about how the review process works and how to use the mozilla symbol server to help with debugging. mailnews protocols rough documentation about mail protocols.. database views backend information about nsimsgdbview and related interfaces. thunderbird api documentation thunderbird api documentation extension documentation tutorials and tips for
building thunderbird extensions view all... community thunderbird product home page thunderbird project community pages user support is handled at mozilla support development discussion happens on the tb-planning mailing list: subscribe archives add-on developers forum/mailing list mozillazine forums mozi...
Virtualenv
l 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
build process: http://mxr.mozilla.org/mozilla-central/source/js/src/
build/autoconf/python-virtualenv.m4 . the virtualenv is created in ${objdir}/_virtualenv and should be recreated as part of the configure step. the populate_virtualenv.py script, when invoked, installs a list of packages, http://mxr.mozilla.org/mozilla-central/source/
build/virtualenv/packages.txt , into the virtualenv via one of vario...
...lla.org/mozilla-central/source/js/src/
build/autoconf/python-virtualenv.m4 . the virtualenv is created in ${objdir}/_virtualenv and should be recreated as part of the configure step. the populate_virtualenv.py script, when invoked, installs a list of packages, http://mxr.mozilla.org/mozilla-central/source/
build/virtualenv/packages.txt , into the virtualenv via one of various methods. the mozilla
build system mostly uses .pth files instead of the more typically used python setup.py develop or python setup.py install to install python modules in to the virtualenv's python path due to performance concerns (although such functionality is available via the setup.py keyword in a packages.txt file). when using this method, be aware that the parts of package installation invoked via setup.py, such as ...
Working with windows in chrome code
bjects that can be imported into any other javascript scope. the importing scope will have access to the objects and data in the code module. since the code module is cached, all scopes get the same instance of the code module and can share the data in the module. see components.utils.import for more information. pros: it's the "right way" very simple to make and import. no need to
build an xpcom component. cons: only works in firefox 3 or newer. the scope is shared between modules and the importing scope, so you have to worry about name collisions. you can't use the window object, its members, like alert and open, and many other objects available from inside a window. the functionality isn't lost, however -- you just have to use the xpcom components directly in...
...lication.storage.get(keyname, default); where: keyname is a string used to identify the data data is the data default is the data value to return if keyname does not exists pros: its the "right way". you can store arbitrary javascript objects in the component. the scope is not shared between components, so you don't have to worry about name collisions. no need to
build an xpcom component. cons: only works in firefox 3 or newer. you can't use the window object, its members, like alert and open, and many other objects available from inside a window. the functionality isn't lost, however -- you just have to use the xpcom components directly instead of using convenient shortcuts. of course, this doesn't matter if you just store data in the component.
DOM Inspector internals - Firefox Developer Tools
simply switching away from the current viewer and back. knowing this about the way viewers are written, we should now be at a place where we can look at the way the dom inspector source is organized. 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/. its contents should resemble the following: extensions/ … jsutil/ … prefs/ … ...
...xul application={ec8030f7-c20a-464f-9b0e-13a3a9e97384} these host-provided overlays allow dom inspector to adopt a look and feel similar to its host application. (above, seamonkey and firefox, respectively.) there are several overlays from the resources/contents/ directory that do not fall into the category of host-integration overlays. that's because dom inspector also uses shared overlays to
build up its own ui. shared structure overlays taking a look at the contents of inspector.xul, dom inspector's primary ui, will reveal that it contains almost no visible elements. as of this writing, there's a toolbox containing an empty menubar and an empty toolbar, as well as an empty vbox: <toolbox id="tbxinstoolbox"> <menubar id="mbrinspectormain"/> <toolbar id="tbinspectorprimary"/> ...
DOM Inspector - Firefox Developer Tools
underbird. if you are looking for the dom inspector that's built into firefox, see the documentation for the page inspector. documentation introduction to dom inspector a guided tutorial that will help you get started with dom inspector. dom inspector faq answers to common questions on dom inspector. dom inspector page at mozillazine more information on the dom inspector. how to
build the dom inspector blog post on
building the dom inspector from source. getting dom inspector firefox & thunderbird you may download and install the dom inspector from the amo web site. (thunderbird users browsing amo in firefox should save the installation link, or visit the dom inspector for thunderbird page.) thunderbird 2 dom inspector for thunderbird 2 is available from thunderbir...
...you can install the sidebar panel via edit > preferences > advanced > dom inspector, then simply open up the inspector panel and visit a website. ...
BasicCardRequest.supportedNetworks - Web APIs
to change preferences in firefox, visit about:config.ie no support noopera no support nosafari ? webview android no support ...
...to change preferences in firefox, visit about:config.opera android no support nosafari ios ? samsung internet android full support 7.0legend ...
BasicCardResponse.billingAddress - Web APIs
to change preferences in firefox, visit about:config.ie no support noopera no support nosafari ? webview android no support ...
...to change preferences in firefox, visit about:config.opera android no support nosafari ios ? samsung internet android full support 7.0legend ...
BasicCardResponse.cardNumber - Web APIs
to change preferences in firefox, visit about:config.ie no support noopera no support nosafari ? webview android no support ...
...to change preferences in firefox, visit about:config.opera android no support nosafari ios ? samsung internet android full support 7.0legend ...
BasicCardResponse.cardSecurityCode - Web APIs
to change preferences in firefox, visit about:config.ie no support noopera no support nosafari ? webview android no support ...
...to change preferences in firefox, visit about:config.opera android no support nosafari ios ? samsung internet android full support 7.0legend ...
BasicCardResponse.cardholderName - Web APIs
to change preferences in firefox, visit about:config.ie no support noopera no support nosafari ? webview android no support ...
...to change preferences in firefox, visit about:config.opera android no support nosafari ios ? samsung internet android full support 7.0legend ...
BasicCardResponse.expiryMonth - Web APIs
to change preferences in firefox, visit about:config.ie no support noopera no support nosafari ? webview android no support ...
...to change preferences in firefox, visit about:config.opera android no support nosafari ios ? samsung internet android full support 7.0legend ...
BasicCardResponse.expiryYear - Web APIs
to change preferences in firefox, visit about:config.ie no support noopera no support nosafari ? webview android no support ...
...to change preferences in firefox, visit about:config.opera android no support nosafari ios ? samsung internet android full support 7.0legend ...
Drawing shapes with canvas - Web APIs
can be closed. to make shapes using paths, we take some extra steps: first, you create the path. then you use drawing commands to draw into the path. once the path has been created, you can stroke or fill the path to render it. here are the functions used to perform these steps: beginpath() creates a new path. once created, future drawing commands are directed into the path and used to
build the path up. path methods methods to set different paths for objects. closepath() adds a straight line to the path, going to the start of the current sub-path. stroke() draws the shape by stroking its outline. fill() draws a solid shape by filling the path's content area. the first step to create a path is to call the beginpath(). internally, paths are stored as a list of sub-paths (lin...
...ng of svg path data. new path2d(); // empty path object new path2d(path); // copy from another path2d object new path2d(d); // path from svg path data all path methods like moveto, rect, arc or quadraticcurveto, etc., which we got to know above, are available on path2d objects. the path2d api also adds a way to combine paths using the addpath method. this can be useful when you want to
build objects from several components, for example. path2d.addpath(path [, transform]) adds a path to the current path with an optional transformation matrix. path2d example in this example, we are creating a rectangle and a circle. both are stored as a path2d object, so that they are available for later usage. with the new path2d api, several methods got updated to optionally accept a path2d ob...
Element.animate() - Web APIs
t for as long as the element exists. you can also include a composite operation or iteration composite operation in your options list: composite optional determines how values are combined between this animation and other, separate animations that do not specify their own specific composite operation. defaults to replace. ...
...can be set to accumulate or replace (see above). defaults to replace. return value returns an animation. examples in the demo down the rabbit hole (with the web animation api), we use the convenient animate() method to immediately create and play an animation on the #tunnel element to make it flow upwards, infinitely. ...
KeyframeEffectOptions - Web APIs
gent should go about making the transition from keyframe to keyframe, and how to behave when the animation begins and ends. properties composite optional determines how values are combined between this animation and other, separate animations that do not specify their own specific composite operation. defaults to replace. ...
...can be set to accumulate or replace (see above). defaults to replace. pseudoelement optional the selector of the pseudo-element to be targeted, if any. defaults to null. delay optional the number of milliseconds to delay the start of the animation. defaults to 0. ...
Navigator - Web APIs
torage.storage read only returns the singleton storagemanager object used for managing persistence permissions and estimating available storage on a site-by-site/app-by-app basis. navigatorid.useragent read only returns the user agent string for the current browser. navigator.xr read only returns xr object, which represents the entry point into the webxr api. non-standard navigator.
buildid returns the
build identifier of the browser. in modern browsers this property now returns a fixed timestamp as a privacy measure, e.g. 20181001000000 in firefox 64 onwards. navigator.credentials returns the credentialscontainer interface which exposes methods to request credentials and notify the user agent when interesting events occur such as successful sign in or sign out. navigator...
...turns a wakelock interface you can use to request screen wake locks and prevent screen from dimming, turning off, or showing a screen saver. navigator.webkitnotification returns a notification object you can use to deliver notifications to the user from your web application. navigator.oscpu returns a string that represents the current operating system. navigator.productsub returns the
build number of the current browser (e.g., "20060909"). navigator.securitypolicy returns an empty string. in netscape 4.7x, returns "us & ca domestic policy" or "export policy". navigator.standalone returns a boolean indicating whether the browser is running in standalone mode. available on apple's ios safari only. navigator.storagequota read only returns a storagequota interface which pro...
PaymentAddress.toJSON() - Web APIs
ion 61: this feature is behind the #web-payments preference (needs to be set to enabled). to change preferences in chrome, visit chrome://flags.edge full support 15firefox full support 62notes disabled full support 62notes disabled notes available only in nightly
builds. 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). to change preferences in firefox, visit about:config.ie no support noop...
... 61disabled disabled from version 61: this feature is behind the #web-payments preference (needs to be set to enabled). to change preferences in chrome, visit chrome://flags.firefox android full support 62notes disabled full support 62notes disabled notes available only in nightly
builds. 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). to change preferences in firefox, visit about:config.opera android no support ...
PaymentRequest.abort() - Web APIs
to change preferences in firefox, visit about:config.ie no support noopera no support nosafari full support 11.1webview android ...
...to change preferences in firefox, visit about:config.opera android no support nosafari ios full support 11.3samsung internet android full support ...
PaymentRequest.prototype.id - Web APIs
to change preferences in firefox, visit about:config.ie no support noopera no support nosafari full support 11.1webview android ...
...to change preferences in firefox, visit about:config.opera android no support nosafari ios full support 11.3samsung internet android full support ...
PaymentRequest.onshippingaddresschange - Web APIs
to change preferences in firefox, visit about:config.ie no support noopera no support nosafari full support 11.1webview android ...
...to change preferences in firefox, visit about:config.opera android no support nosafari ios full support 11.3samsung internet android full support ...
PaymentRequest.onshippingoptionchange - Web APIs
to change preferences in firefox, visit about:config.ie no support noopera no support nosafari full support 11.1webview android ...
...to change preferences in firefox, visit about:config.opera android no support nosafari ios full support 11.3samsung internet android full support ...
PaymentRequest.shippingOption - Web APIs
to change preferences in firefox, visit about:config.ie no support noopera no support nosafari full support 11.1webview android ...
...to change preferences in firefox, visit about:config.opera android no support nosafari ios full support 11.3samsung internet android full support ...
PaymentRequest.shippingType - Web APIs
to change preferences in firefox, visit about:config.ie no support noopera no support nosafari full support 11.1webview android ...
...to change preferences in firefox, visit about:config.opera android no support nosafari ios full support 11.3samsung internet android full support ...
PaymentResponse.complete() - Web APIs
to change preferences in firefox, visit about:config.ie no support noopera no support nosafari full support yeswebview android ...
...6disabled disabled from version 53 until version 56 (exclusive): this feature is behind the #web-payments preference (needs to be set to enabled). to change preferences in chrome, visit chrome://flags.firefox android full support 56notes disabled full support 56notes disabled notes available only in nightly
builds.disabled from version 56: this feature is behind the dom.payments.request.enabled preference (needs to be set to true). to change preferences in firefox, visit about:config.opera android no support nosafari ios full support yessamsung internet android full support ...
PaymentResponse.details - Web APIs
to change preferences in firefox, visit about:config.ie no support noopera no support nosafari full support yeswebview android ...
...6disabled disabled from version 53 until version 56 (exclusive): this feature is behind the #web-payments preference (needs to be set to enabled). to change preferences in chrome, visit chrome://flags.firefox android full support 56notes disabled full support 56notes disabled notes available only in nightly
builds.disabled from version 56: this feature is behind the dom.payments.request.enabled preference (needs to be set to true). to change preferences in firefox, visit about:config.opera android no support nosafari ios full support yessamsung internet android full support ...
PaymentResponse.payerEmail - Web APIs
to change preferences in firefox, visit about:config.ie no support noopera no support nosafari full support yeswebview android ...
...6disabled disabled from version 53 until version 56 (exclusive): this feature is behind the #web-payments preference (needs to be set to enabled). to change preferences in chrome, visit chrome://flags.firefox android full support 56notes disabled full support 56notes disabled notes available only in nightly
builds.disabled from version 56: this feature is behind the dom.payments.request.enabled preference (needs to be set to true). to change preferences in firefox, visit about:config.opera android no support nosafari ios full support yessamsung internet android full support ...
PaymentRequest.payerName - Web APIs
to change preferences in firefox, visit about:config.ie no support noopera no support nosafari full support yeswebview android ...
...to change preferences in firefox, visit about:config.opera android no support nosafari ios full support yessamsung internet android full support ...
PaymentResponse.requestId - Web APIs
to change preferences in firefox, visit about:config.ie no support noopera no support nosafari full support yeswebview android ...
...to change preferences in firefox, visit about:config.opera android no support nosafari ios full support yessamsung internet android full support ...
PaymentResponse.shippingAddress - Web APIs
to change preferences in firefox, visit about:config.ie no support noopera no support nosafari full support yeswebview android ...
...6disabled disabled from version 53 until version 56 (exclusive): this feature is behind the #web-payments preference (needs to be set to enabled). to change preferences in chrome, visit chrome://flags.firefox android full support 56notes disabled full support 56notes disabled notes available only in nightly
builds.disabled from version 56: this feature is behind the dom.payments.request.enabled preference (needs to be set to true). to change preferences in firefox, visit about:config.opera android no support nosafari ios full support yessamsung internet android full support ...
PaymentResponse.shippingOption - Web APIs
to change preferences in firefox, visit about:config.ie no support noopera no support nosafari full support yeswebview android ...
...6disabled disabled from version 53 until version 56 (exclusive): this feature is behind the #web-payments preference (needs to be set to enabled). to change preferences in chrome, visit chrome://flags.firefox android full support 56notes disabled full support 56notes disabled notes available only in nightly
builds.disabled from version 56: this feature is behind the dom.payments.request.enabled preference (needs to be set to true). to change preferences in firefox, visit about:config.opera android no support nosafari ios full support yessamsung internet android full support ...
Adding 2D content to a WebGL context - Web APIs
the complete source code for this project is available on github. this project uses the glmatrix library to perform its matrix operations, so you will need to include that in your project. we're loading a copy from a cdn in our html's <head>. ...
...s positions. const positionbuffer = gl.createbuffer(); // select the positionbuffer as the one to apply buffer // operations to from here out. gl.bindbuffer(gl.array_buffer, positionbuffer); // now create an array of positions for the square. const positions = [ -1.0, 1.0, 1.0, 1.0, -1.0, -1.0, 1.0, -1.0, ]; // now pass the list of positions into webgl to
build the // shape. we do this by creating a float32array from the // javascript array, then use it to fill the current buffer. gl.bufferdata(gl.array_buffer, new float32array(positions), gl.static_draw); return { position: positionbuffer, }; } this routine is pretty simplistic given the basic nature of the scene in this example. it starts by calling th...
Lighting in WebGL - Web APIs
at that vertex. we need to know the direction in which the light is traveling; this is defined by the direction vector. then we update the vertex shader to adjust the color of each vertex, taking into account the ambient lighting as well as the effect of the directional lighting given the angle at which it's striking the face. we'll see how to do that when we look at the code for the shader.
building the normals for the vertices the first thing we need to do is generate the array of normals for all the vertices that comprise our cube. since a cube is a very simple object, this is easy to do; obviously for more complex objects, calculating the normals will be more involved. const normalbuffer = gl.createbuffer(); gl.bindbuffer(gl.array_buffer, normalbuffer); const vertexnormals = [...
... gl.uniformmatrix4fv( programinfo.uniformlocations.n...
WebRTC API - Web APIs
ction, or the last tone in the rtcdtmfsender's tonebuffer has been sent and the buffer is now empty. the event's type is rtcdtmftonechangeevent. guides introduction to webrtc protocols this article introduces the protocols on top of which the webrtc api is built. webrtc connectivity a guide to how webrtc connections work and how the various protocols and interfaces can be used together to
build powerful communication apps. lifetime of a webrtc session webrtc lets you
build peer-to-peer communication of arbitrary data, audio, or video—or any combination thereof—into a browser application. in this article, we'll look at the lifetime of a webrtc session, from establishing the connection all the way through closing the connection when it's no longer needed. establishing a connection:...
...ditions to these specifications defining the api needed to use webrtc, there are several protocols, listed under resources. see also mediadevices mediastreamevent mediastreamconstraints mediastreamtrack messageevent mediastream media capture and streams api firefox multistream and renegotiation for jitsi videobridge peering through the webrtc fog with socketpeer inside the party bus:
building a web app with multiple live video streams + interactive graphics web media technologies ...
Writing WebSocket servers - Web APIs
everything the client asks for, otherwise security issues can occur. tip: the request-uri (/chat here) has no defined meaning in the spec. so, many people use it to let one server handle multiple websocket applications. for example, example.com/chat could invoke a multiuser chat app, while /game on the same server might invoke a multiplayer game. client handshake request even though you're
building a server, a client still has to start the websocket handshake process by contacting the server and requesting a websocket connection. so, you must know how to interpret the client's request. the client will send a pretty standard http request with headers that looks like this (the http version must be 1.1 or greater, and the method must be get): get /chat http/1.1 host: example.com:8000 upgra...
...e using a subprotocol json. in this subprotocol, all data is passed as json. if the client solicits this protocol and the server wants to use it, the server needs to have a json parser. practically speaking, this will be part of a library, but the server needs to pass the data around. tip: to avoid name conflict, it's recommended to make your subprotocol name part of a domain string. if you are
building a custom chat app that uses a proprietary format exclusive to example inc., then you might use this: sec-websocket-protocol: chat.example.com. note that this isn't required, it's just an optional convention, and you can use any string you wish. related websocket handshake library in c++ writing websocket client applications tutorial: websocket server in c# tutorial: websocket server in...
Realizing common layouts using CSS Grid Layout - CSS: Cascading Style Sheets
into the row above. with css grid layout, we can place things into rows, with no danger of them rising up into the row above if it is left empty. due to this strict column and row placement we can also easily leave white space in our layout. we also don’t need special classes to pull or push things, to indent them into the grid. all we need to do is specify the start and end line for the item.
building a layout using the 12-column system to see how this layout method works in practice, we can create the same layout that we created with grid-template-areas, this time using the 12-column grid system. i am starting with the same markup as used for the grid template areas example. * {box-sizing: border-box;} .wrapper { max-width: 1024px; margin: 0 auto; font: 1.2...
...grid-column-end: span 2; } this technique of using auto-placement with some rules applied to certain items is very useful, and can help you to deal with content that is being output by a cms for example, where you have repeated items and can perhaps add a class to certain ones as they are rendered into the html. further exploration the best way to learn to use grid layout is to continue to
build examples like the ones we have covered here. pick something that you normally
build using your framework of choice, or using floats, and see if you can
build it using grid. don’t forget to find examples that are impossible to
build with current methods. that might mean taking inspiration from magazines or other non-web sources. grid layout opens up possibilities that we have not had before, we ...
Media buffering, seeking, and time ranges - Developer guides
buffered the buffered attribute will tell us which parts of the media has been downloaded. it returns a timeranges object, which will tell us which chunks of media have been downloaded. ...
...n't. if it doesn't then audio.seekable will be equivalent to audio.buffered, which will give a valid indication of the end of seekable media. if range requests are enabled this value usually becomes the duration of the media almost instantly. it is better perhaps to give an indication of how much media has actually downloaded — this what the browser's native players seem to display. so let's
build this. the html for our player looks like this: <audio id="my-audio" preload controls> <source src="music.mp3" type="audio/mpeg"> </audio> <div class="buffered"> <span id="buffered-amount"></span> </div> <div class="progress"> <span id="progress-amount"></span> </div> we'll use the following css to style the buffering display: .buffered { height: 20px; position: relative; backgroun...
HTML5 - Developer guides
this set is sometimes called html5 & friends and often shortened to just html5. ...
...mationframe allows control of animations rendering to obtain optimal performance. fullscreen api controls the usage of the whole screen for a web page or application, without the browser ui displayed. pointer lock api allows locking the pointer to the content, so games and similar applications don't lose focus when the pointer reaches the window limit. online and offline events in order to
build a good offline-capable web application, you need to know when your application is actually offline. incidentally, you also need to know when your application has returned to an online status again. device access touch events handlers to react to events created by a user pressing touch screens. using geolocation let browsers locate the position of the user using geolocation. detecting dev...
Developer guides
es. progressive web apps progressive web apps (pwas) use modern web apis along with traditional progressive enhancement strategy to create cross-platform web applications. these apps work everywhere and provide several features that give them the same user experience advantages as native apps. this set of guides tells you all you need to know about pwas. optimization and performance when
building modern web apps and sites, it's important to make your content work quickly and efficiently. this lets it perform effectively for both powerful desktop systems and weaker handheld devices. parsing and serializing xml the web platform provides different methods of parsing and serializing xml, each with its pros and cons. the web open font format (woff) woff (web open font format) is a font ...
...ff) woff (web open font format) is a font file format that is free for anyone to use on the web. unicode bidirectional text algorithm (bidi) the unicode® bidi algorithm is part of the unicode text standard. it describes how the browser should order characters while rendering unicode text. this guide covers the algorithm in general and how it applies to content you create—especially when you
build properly localized and internationalized content. using formdata objects the formdata object lets you compile a set of key/value pairs to send using xmlhttprequest. it's primarily intended for sending form data, but can be used independently from forms to transmit keyed data. the transmission is in the same format that the form's submit() method would use to send the data if the form's encoding...
<input type="email"> - HTML: Hypertext Markup Language
he input data, use the maxlength attribute. using email inputs e-mail addresses are among the most frequently-inputted textual data forms on the web; they're used when logging into web sites, when requesting information, to allow order confirmation, for webmail, and so forth. as such, the email input type can make your job as a web developer much easier since it can help simplify your work when
building the user interface and logic for e-mail addresses. when you create an email input with the proper type value, email, you get automatic validation that the entered text is at least in the correct form to potentially be a legitimate e-mail address. this can help avoid cases in which the user mistypes their address, or provides an invalid address. it's important, however, to note that this is no...
...ion if you need the entered e-mail address to be restricted further than just "any string that looks like an e-mail address," you can use the pattern attribute to specify a regular expression the value must match for it to be valid. if the multiple attribute is specified, each individual item in the comma-delineated list of values must match the regular expression. for example, let's say you're
building a page for employees of best startup ever, inc. which will let them contact their it department for help. in our simplified form, the user needs to enter their e-mail address and a message describing the problem they need help with. we want to ensure that not only does the user provide a valid e-mail address, but for security purposes, we require that the address be an internal corporate e-mai...
HTML: Hypertext Markup Language
it defines the meaning and structure of web content. other technologies besides html are generally used to describe a web page's appearance/presentation (css) or functionality/behavior (javascript). "hypertext" refers to links that connect web pages to one another, either within a single website or between websites. links are a fundamental aspect of the web. by uploading content to the internet and linking it to pages created by other people, you become an active participant in the world wide web. html uses "markup" to annotate text, images, and other content for display in a web browser. ...
... is a guide to these categories. quirks mode and standards mode historical information on quirks mode and standards mode. related topics applying color to html elements using css this article covers most of the ways you use css to add color to html content, listing what parts of html documents can be colored and what css properties to use when doing so. includes examples, links to palette-
building tools, and more. view all... ...
HTTP conditional requests - HTTP
n weak validation differs from strong validation, as it considers two versions of the document as identical if the content is equivalent. for example, a page that would differ from another only by a different date in its footer, or different advertising, would be considered identical to the other with weak validation. these same two versions are considered different when using strong validation.
building a system of etags that creates weak validation may be complex, as it involves knowing the importance of the different elements of a page, but is very useful towards optimizing cache performance. conditional headers several http headers, called conditional headers, lead to conditional requests. these are: if-match succeeds if the etag of the distant resource is equal to one listed in this...
...f-none-match with the special value of '*', representing any etag. the request will succeed, only if the resource didn't exist before: if-none-match will only work with http/1.1 (and later) compliant servers. if unsure if the server will be compliant, you need first to issue a head request to the resource to check this. conclusion conditional requests are a key feature of http, and allow the
building of efficient and complex applications. for caching or resuming downloads, the only work required for webmasters is to configure the server correctly; setting correct etags in some environments can be tricky. once achieved, the browser will serve the expected conditional requests. for locking mechanisms, it is the opposite: web developers need to issue a request with the proper headers, while ...
Proxy Auto-Configuration (PAC) file - HTTP
port number is not included in this parameter. it can be extracted from the url when necessary. description returns a string describing the configuration. the format of this string is defined in return value format below. ...
...unction should always be saved to a file by itself but not be embedded in a html file or any other file. the examples at the end of this document are complete. there is no additional syntax needed to save it into a file and use it. ...
A re-introduction to JavaScript (JS tutorial) - JavaScript
tures from those languages apply to javascript as well. javascript supports object-oriented programming with object prototypes, instead of classes (see more about prototypical inheritance and es2015 classes). javascript also supports functional programming — because they are objects, functions may be stored in variables and passed around like any other object. let's start off by looking at the
building blocks of any language: the types. javascript programs manipulate values, and those values all belong to a type. javascript's types are: number string boolean function object symbol (new in es2015) ... oh, and undefined and null, which are ... slightly odd. and array, which is a special kind of object. and date and regexp, which are objects that you get for free. and to be technicall...
...hp. the fact that this data structure is so widely used is a testament to its versatility. since everything (bar core types) in javascript is an object, any javascript program naturally involves a great deal of hash table lookups. it's a good thing they're so fast! the "name" part is a javascript string, while the value can be any javascript value — including more objects. this allows you to
build data structures of arbitrary complexity. there are two basic ways to create an empty object: var obj = new object(); and: var obj = {}; these are semantically equivalent; the second is called object literal syntax and is more convenient. this syntax is also the core of json format and should be preferred at all times. object literal syntax can be used to initialize an object in its entire...
JavaScript modules - JavaScript
is article, we've used .js extensions for our module files, but in other resources you may see the .mjs extension used instead. v8's documentation recommends this, for example. the reasons given are: it is good for clarity, i.e. it makes it clear which files are modules, and which are regular javascript. it ensures that your module files are parsed as a module by runtimes such as node.js, and
build tools such as babel. however, we decided to keep to using .js, at least for the moment. to get modules to work correctly in a browser, you need to make sure that your server is serving them with a content-type header that contains a javascript mime type such as text/javascript. if you don't, you'll get a strict mime type checking error along the lines of "the server responded with a non-javascr...
...rver you are serving files from, or are publishing files for public use, as we are here. for learning and portability purposes, we decided to keep to .js. if you really value the clarity of using .mjs for modules versus using .js for "normal" javascript files, but don't want to run into the problem described above, you could always use .mjs during development and convert them to .js during your
build step. it is also worth noting that: some tools may never support .mjs, such as typescript. the <script type="module"> attribute is used to denote when a module is being pointed to, as you'll see below. exporting module features the first thing you do to get access to module features is export them. this is done using the export statement. the easiest way to use it is to place it in front...
Regular expressions - JavaScript
specifications specification ecmascript (ecma-262)the definition of 'regexp' in that specification. ...
... specifications specification ecmascript (ecma-262)the definition of 'regexp' in that specification. ...
Function.name - JavaScript
configurable yes note that in non-standard, pre-es2015 implementations the configurable attribute was false as well. javascript compressors and minifiers warning: be careful when using function.name and source code transformations, such as those carried out by javascript compressors (minifiers) or obfuscators. these tools are often used as part of a javascript
build pipeline to reduce the size of a program prior to deploying it to production. such transformations often change a function's name at
build-time. source code such as: function foo() {}; let foo = new foo(); if (foo.constructor.name === 'foo') { console.log("'foo' is an instance of 'foo'"); } else { console.log('oops!'); } may be compressed to: function a() {}; let b = new a(); if (b.con...
... a(); if (b.constructor.name === 'foo') { console.log("'foo' is an instance of 'foo'"); } else { console.log('oops!'); } in the uncompressed version, the program runs into the truthy-branch and logs "'foo' is an instance of 'foo'". whereas, in the compressed version it behaves differently, and runs into the else-branch. if you rely on function.name, like in the example above, make sure your
build pipeline doesn't change function names, or don't assume a function to have a particular name. examples function statement name the name property returns the name of a function statement. function dosomething() {} dosomething.name; // "dosomething" function constructor name functions created with the syntax new function(...) or just function(...) create function objects and their name is "...
Object - JavaScript
); this.cantalk = false; }; mime.prototype = object.create(person.prototype); mime.prototype.constructor = mime; //if you don't set object.prototype.constructor to mime, //it will take prototype.constructor of person (parent). //to avoid that, we set the prototype.constructor to mime (child). ...
... //it will take prototype.constructor of person (parent). //to avoid that, we set the prototype.constructor to mime (child). var bob = new employee('bob', '
builder'); var joe = new customer('joe'); var rg = new employee('red green', 'handyman'); var mike = new customer('mike'); var mime = new mime('mime'); bob.greet(); // hi, i am bob, the
builder joe.greet(); // hi, i am joe rg.greet(); // hi, i am red green, the handyman mike.greet(); // hi, i am mike mime.greet(); specifications specification ecmascript (ecma-262)the definition of 'object' in that specification. ...
JavaScript
ic if you want to learn javascript but have no previous experience of javascript or programming. the complete modules available there are as follows: javascript first steps answers some fundamental questions such as "what is javascript?", "what does it look like?", and "what can it do?", along with discussing key javascript features such as variables, strings, numbers, and arrays. javascript
building blocks continues our coverage of javascript's key fundamental features, turning our attention to commonly-encountered types of code blocks such as conditional statements, loops, functions, and events. introducing javascript objects the object-oriented nature of javascript is important to understand if you want to go further with your knowledge of the language and write more efficient code, ...
...r development work. javascript guide javascript guide a much more detailed guide to the javascript language, aimed at those with previous programming experience either in javascript or another language. intermediate understanding client-side javascript frameworks javascript frameworks are an essential part of modern front-end web development, providing developers with proven tools for
building scalable, interactive web applications. this module gives you some fundamental background knowledge about how client-side frameworks work and how they fit into your toolset, before moving on to tutorial series covering some of today's most popular ones. a re-introduction to javascript an overview for those who think they know about javascript. javascript data structures overview of avai...
Authoring MathML - MathML
ns. let's consider the former, which was originally written by paul gartside at the beginning of the mozilla mathml project and has been maintained by jacques distler since then. it's a small stream filter written in c/c++ and generated with flex and bison ; in particular it is very fast. install flex/bison as well as the classical compiler and make tools. on unix, you can then download itex2mml,
build and install it: wget http://golem.ph.utexas.edu/~distler/blog/files/itextomml.tar.gz; \ tar -xzf itextomml.tar.gz; \ cd itex2mml/itex-src; make sudo make install now suppose that you have a html page with tex fragments delimited by dollars: input.html ... </head> <body> <p>$\sqrt{a^2-3c}$</p> <p>$$ {\sum_{i=1}^n i} = \frac{n(n+1)}{2} $$</p> </body> </html> then to generate the html pag...
...itex2mml. finally, bluegriffon has an add-on to insert mathml formulas in your document, using ascii/latex-like syntax. wysiywg editors firemath is an extension for firefox that provides a wysiwyg mathml editor. a preview of the formula is displayed using the rendering engine of mozilla. the generated mathml code is available at the bottom. use the text field for token elements and buttons to
build advanced constructions. once you are done, you can save your document as a xhtml page. lyx is a graphical latex editor, which has built-in support for xhtml+mathml export and can be configured to use similar latex-to-(x)html converters. you can for example, you can configure it to use latexml html5/epub export. openoffice and libreoffice have an equation editor (file → new → formula). it is...
Autoplay guide for media and Web Audio APIs - Web media technologies
portance to you as a web developer are listed. these include any that may aid in testing or debugging as well as any that could be set in a way that you need to be prepared to handle. firefox media.allowed-to-play.enabled a boolean preference which specifies whether or not the htmlmediaelement.allowedtoplay property is exposed to the web. this is currently false by default (except in nightly
builds, where it's true by default). if this is false, the allowedtoplay property is missing from the htmlmediaelement interface, and is thus not present on either <audio> or <video> elements. media.autoplay.allow-extension-background-pages this boolean preference, if true, allows browser extensions' background scripts to autoplay audio media. setting this value to false disables this capability. the...
...play.block-webaudio a boolean preference which indicates whether or not to apply autoplay blocking to the web audio api. the default is true. media.autoplay.default an integer preference which specifies whether per-domain configuration for autoplay support by default is allowed (0), blocked (1), or prompt-on-use (2). the default value is 0. media.autoplay.enabled.user-gestures-needed (nightly
builds only) a boolean preference which controls whether or not detection of user gestures is allowed to override the setting of media.autoplay.default. if media.autoplay.default is not set to 0 (autoplay allowed by default), this preference being true allows autoplay of media with audio tracks anyway if the page has been activated by user gestures, and media that isn't audible is not restricted at al...
Optimizing startup performance - Web Performance
. this article offers tips and suggestions to help you achieve that goal, both when writing a new app and when porting an app from another platform to the web. starting up nicely regardless of platform, it's always a good idea to start up as quickly as possible. since that's a universal issue, we won't be focusing on it too much here. instead, we're going to look at a more important issue when
building web apps: starting up as asynchronously as possible. that means not running all your startup code in a single event handler on the app's main thread. instead, you should write your code so that your app creates a web worker that does as much as possible in a background thread (for example, fetching and processing data.) then, anything that must be done on the main thread (such as user events ...
...thread, so you can't even proxy those apis to the main thread. this all means that unless you can easily pull out the "pure calculation" chunks of your startup process into workers, you'll wind up having to run most or all of your startup code on the main thread. however, even code like that can be made asynchronous, with a little work. getting asynchronous here are some suggestions for how to
build your startup process to be as asynchronous as possible (whether it's a new app or a port): use the defer or async attribute on script tags needed by the web application. this allows html parsers to continue processing the document, instead of having to wait until the scripts have been downloaded and executed before continuing. if you need to decode asset files (for example, decoding jpeg file...
Progressive loading - Progressive web apps (PWAs)
will force the browser to download them automatically, we can do it selectively via javascript. the js13kpwa app uses a placeholder image instead, which is small and lightweight, while the final paths to target images are stored in data-src attributes: <img src='data/img/placeholder.png' data-src='data/img/slug.jpg' alt='name'> those images will be loaded via javascript after the site finishes
building the html structure. the placeholder image is scaled the same way the original images are, so it will take up the same space and not cause the layout to repaint as the images load. loading via javascript the app.js file processes the data-src attributes like so: let imagestoload = document.queryselectorall('img[data-src]'); const loadimages = (image) => { image.setattribute('src', image.ge...
...offline availability with service workers, installable pwas, and finally notifications. we also explained push with help from the service worker cookbook. and in this article, we've looked into the concept of progressive loading, including an interesting example that makes use of the intersection observer api. feel free to experiment with the code, enhance your existing app with pwa features, or
build something entirely new on your own. pwas give a huge advantage over regular web apps. previous overview: progressive web apps ...
Graphic design for responsive sites - Progressive web apps (PWAs)
but today it is very much a reality. this article provides a high level discussion aimed at helping you to choose the best option for your graphical needs. ...
... infinitely so will still look crisp at high resolutions. you could use css3 properties for generating effects like drop shadows, gradients and rounded corners, and you could also consider using svg for other ui elements, instead of raster graphics formats. the downsides here are that css3 properties and svg don't work on old browsers such as ie6-8 (although polyfills are available, and you could
build in fallbacks), and svg isn't suitable for high detail images, such as photographs. using fonts for icons another technique to consider is using web fonts for icons. text is infinitely scalable on the web, and you can also use css text properties to style your web font icons, such as text-shadow and color. making your own font file can be a bit fiddly, but there are a number of good icon font se...
Introduction - SVG: Scalable Vector Graphics
iring third-party extensions. whether or not to use it often depends on your specific use case. basic ingredients html provides elements for defining headers, paragraphs, tables, and so on. in much the same way svg provides elements for circles, rectangles, and simple and complex curves. a simple svg document consists of nothing more than the <svg> root element and several basic shapes that
build a graphic together. in addition there is the <g> element, which is used to group several basic shapes together. starting from there, the svg image can become arbitrarily complex. svg supports gradients, rotations, filter effects, animations, interactivity with javascript, and so on. but all these extra features of the language rely on this relatively small set of elements to define the graphics ...
...ttribute values in svg must be placed inside quotes, even if they are numbers. svg is a huge specification. this tutorial attempts to cover the basics. once you are familiar you should be able to use the element reference and the interface reference to find out anything else you need to know. flavors of svg since becoming a recommendation in 2003, the most recent "full" svg version is 1.1. it
builds on top of svg 1.0, but adds more modularization to ease implementation. the second edition of svg 1.1 became a recommendation in 2011. "full" svg 1.2 was meant to be the next major release of svg. it was dropped for the upcoming svg 2.0, which is under heavy development right now and follows a similar approach to css 3 in that it splits components into several loosely coupled specifications. ap...
Tutorials
is used to style and lay out web pages — for example, to alter the font, color, size, and spacing of your content, split it into multiple columns, or add animations and other decorative features. this module provides a gentle beginning to your path towards css mastery with the basics of how it works, what the syntax looks like, and how you can start using it to add styling to html. css
building blocks this module carries on where css first steps left off — now you've gained familiarity with the language and its syntax, and got some basic experience with using it, its time to dive a bit deeper. this module looks at the cascade and inheritance, all the selector types we have available, units, sizing, styling backgrounds and borders, debugging, and lots more. the aim here is to p...
... javascript first steps in our first javascript module, we first answer some fundamental questions such as "what is javascript?", "what does it look like?", and "what can it do?", before moving on to taking you through your first practical experience of writing javascript. after that, we discuss some key javascript features in detail, such as variables, strings, numbers and arrays. javascript
building blocks in this module, we continue our coverage of all javascript's key fundamental features, turning our attention to commonly-encountered types of code block such as conditional statements, loops, functions, and events. you've seen this stuff already in the course, but only in passing — here we'll discuss it all explicitly. getting started with javascript what is javascript and how...
Using the WebAssembly JavaScript API - WebAssembly
y itself. memory imports work just like function imports, only memory objects are passed as values instead of javascript functions. memory imports are useful for two reasons: they allow javascript to fetch and create the initial contents of memory before or concurrently with module compilation. they allow a single memory object to be imported by multiple module instances, which is a critical
building block for implementing dynamic linking in webassembly. note: you can find our complete demo at memory.html (see it live also) . tables a webassembly table is a resizable typed array of references that can be accessed by both javascript and webassembly code. while memory provides a resizable typed array of raw bytes, it is unsafe for references to be stored in a memory since a reference ...
....exports.getglobal(), 0); global.value = 42; asserteq("getting js-updated value from wasm", instance.exports.getglobal(), 42); instance.exports.incglobal(); asserteq("getting wasm-updated value from js", global.value, 43); }); note: you can see the example running live on github; see also the source code. multiplicity now we’ve demonstrated usage of the main key webassembly
building blocks, this is a good place to mention the concept of multiplicity. this provides webassembly with a multitude of advances in terms of architectural efficiency: one module can have n instances, in the same way that one function literal can produce n closure values. one module instance can use 0–1 memory instances, which provide the "address space" of the instance. future versions of web...
SDK and XUL Comparison - Archive of obsolete content
giving your users a better, more consistent experience. mobile support starting in sdk 1.5, we've added experimental support for developing add-ons on the new native version of firefox mobile. see the tutorial on mobile development. advantages of xul-based add-ons user interface flexibility xul overlays offer a great deal of options for
building a ui and integrating it into the browser. using only the sdk's supported apis you have much more limited options for your ui. xpcom traditional add-ons have access to a vast amount of firefox functionality via xpcom. the sdk's supported apis expose a relatively small set of this functionality. low-level apis and third-party modules that's not the whole story. i...
High-Level APIs - Archive of obsolete content
unless the documentation explicitly says otherwise, all these modules are "stable": we'll avoid making incompatible changes to them. addon-page create a page that does not contain navigational elements. base64 data encoding and decoding using base64 algorithms. clipboard interact with the system clipboard, setting and getting its contents. context-menu adds items, submenus, and menu separators to the page's context menu. hotkeys assign hotkey combinations to functions in your add-on. indexed-db exposes the indexeddb api to add-ons. ...
content/loader - Archive of obsolete content
usage the module exports a constructor for the loader object, which inherits on(), once(), and removelistener() functions that enable its users to listen to events. loader adds code to initialize and validate a set of properties for managing content scripts: contenturl contentscript contentscriptfile contentscriptwhen contentscriptoptions allow when certain of these properties are set, the loader emits a propertychange event, enabling its users to take the appropriate action. the loader is used by modules that use content scripts but don't themselves load content, such as page-mod. ...
platform/xpcom - Archive of obsolete content
that implements a function called hello. by creating a factory and passing it the contract id for the helloworld component and the helloworld constructor, we enable xpcom clients to access the helloworld component, given its contract id. in this example the helloworld component is available to javascript only, so we use the technique documented under the "using wrappedjsobject" section of how to
build an xpcom component in javascript. var { class } = require('sdk/core/heritage'); var { unknown, factory } = require('sdk/platform/xpcom'); var { cc, ci } = require('chrome'); var contractid = '@me.org/helloworld'; // define a component var helloworld = class({ extends: unknown, get wrappedjsobject() this, hello: function() {return 'hello world';} }); // create and register the factory va...
remote/parent - Archive of obsolete content
an access web content. but content scripts don't have many more capabilities than untrusted web content. the sdk/remote/parent module enables you to load sdk modules into the child process to give them direct access to content frames. these sdk modules have higher privileges than content scripts, and have their own module loader so they can load other sdk modules. its primary purpose is to help
build apis. if you just need to access a web page, use sdk/page-mod to load a content script instead. terms process every application has at least one process running, the main process that displays the ui. multiprocess applications can have other remote processes where untrusted content like webpages are loaded. each process can contain many frames. frame every dom page loaded as a part of the ...
Examples and demos from articles - Archive of obsolete content
led an element or not. [article] css pure-css dropdown menu [html] with the :hover pseudo-class you can create complex cascade algorithms. this is a common technique used, for example, in order to create pure-css dropdown menus (that is only css, without using javascript). .[article] pure-css web gallery based on the :hover pseudoclass [zip] you can use the :hover pseudo-class in order to
build an image gallery with full-size images shown only when mouse goes over previews. .[article] pure-css web gallery based on the :checked pseudoclass [zip] you can also use the :checked pseudo-class applied to hidden radioboxes in order to
build, for example, an image gallery with full-size images shown only when mouse clicks on previews. [article] pure-css tooltips [html] this shows the use of ...
Miscellaneous - Archive of obsolete content
ponents.id("{e9d2d37c-bf25-4e37-82a1-16b8fa089939}"), queryinterface: xpcomutils.generateqi([ci.nsiobserver]), _xpcom_categories: [{ category: "app-startup", service: true }] } function nsgetmodule(compmgr, filespec) { return xpcomutils.generatemodule([certsservice]); } you need to delete your existing profile, otherwise the xpcom service is not used. see how to
build an xpcom component in javascript for details. now are your certificates installed on every application startup. unfortunately that seems to be the only working solution, apart from modifying the mozilla source code and recompiling. generating random bytes useful snippet for generating random bytes that can, for example be used as a good source for cryptographic entropy. const nob = 128; // num...
Rosetta - Archive of obsolete content
therefore, it is also possible, in theory, to use ecmascript for a smaller task: parsing exotic programming languages (i.e., creating compilers). beyond ecmascript this is not the place for showing a full compiler written in ecmascript. we can show, however, a possible way to start from. the following code is nothing but the base for an extensible colle...
SVG General - Archive of obsolete content
on this page you will find some simple, general information on svg markup. hopefully, enough to get you creating some svg images. you will also find some general purpose scripting helpers, that should make scripting svg a little easier. svg template here is a basic markup template to start
building an svg document: <svg xmlns="http://www.w3.org/2000/svg"> <!-- svg elements go here --> </svg> note: it is recommended that you do not use dtd's with svg documents. the tutorial and authoring guidelines have more information. dynamic scripting helper this little helper script can be used to simplify creation of svg elements in script. svg requires you to use setattributens to add attributes to a newly created svg dom element. no properties like html. svg image also requires the use o...
StringView - Archive of obsolete content
x: " + rawoffset + ", character: " + string.fromcharcode(charcode))); this.appendchild(document.createelement("br")); } (new stringview("\u4367\ud889\ude54\u4343\u5431")).foreachchar(mycallback, document.body); note: stringview.foreachchar() executes a complete cycle through all characters in the stringview between characteroffset and characteroffset + characterslength. if you want to
build a custom cycle through a variable-length-encoded stringview (utf-8, utf-16), you can use a code like the following, which does not make use of stringview.foreachchar(). if the encoding is a fixed-length one (ascii, utf-32, etc.), you can do a normal cycle upon the stringview.rawdata array. var mystringview = new stringview("\u4367\ud889\ude54\u4343\u5431 – hello world!"); // an utf-8-encode...
Code snippets - Archive of obsolete content
g c-like string functions. rosetta by default, the only possible standardized scripting language for html is ecmascript. hence, if you are going to use another scripting language you might expect that most of the browsers will not recognize it. nevertheless, the increasing computational power of modern browsers together with the introduction of typed arrays in ecmascript allow us, in theory, to
build full virtual machines in pure ecmascript. therefore, it is also possible, in theory, to use ecmascript for a smaller task: parsing exotic programming languages (i.e., creating compilers). this snippets shows a possible way to start from. browser-oriented code tabbed browser code (firefox/seamonkey) basic operations, such as page loading, with the tabbed browser, which is the heart of mozill...
Extension Etiquette - Archive of obsolete content
user interface tools menu items using the tool menu option gives the author the maximum amount of choices. whether the extensions should go at the top, bottom, or somewhere in between on the tools menu, the author always has a choice. ideally, the location would be below the add-ons item, grouped with the other extension-related commands (menuitem:insertafter="javascriptconsole,devtoolsseparator"). ...
How to convert an overlay extension to restartless - Archive of obsolete content
', 'max': '10'}) ), hbox({'id': 'pixel-coords', 'class': 'pixel-hbox'}, label({'control': 'coord-x', 'value': 'x:'}), textbox({'id': 'coord-x', 'class': 'coord-box', 'placeholder' : '0'}), label({'control': 'coord-y', 'value': 'y:'}), textbox({'id': 'coord-y', 'class': 'coord-box', 'placeholder': '0'}) ... that way you
build elements hierarchy with not much interaction with dom, plus you can see tag properties and it children in a nice, structured way, just like in overlay.xul. you can find working example here. it involves using of firebug.sdk xul.js with few modifications. step 7: manually handle global css stylesheets any global css style sheets which you are using will need to be registered upon load and unregi...
Appendix: What you should know about open-source software licenses - Archive of obsolete content
on’t have to give it away there’s nothing in an oss license that prevents you from charging money for software. one of the advantages of oss is that it emphasizes that software can be distributed for free, but it can also be distributed for money. of course, customers who buys the software can then redistribute it themselves, so unless you provide some added value, you’ll have a hard time
building a business. scope of modifications in the open-source world, “copyleft” is when you require that any modifications to your source code must also be released under the same terms. the following tasks can be considered modifications revision: rewriting the source code; addition: adding new code, or adding parts of it to other code; linkage: creating static or dynamic links. depending ...
Chapter 6: Firefox extensions and XUL applications - Archive of obsolete content
t a red bar. what’s the matter? the screen will display “expected -1, got 1”. somehow, using pop() got the order of the arguments mixed up. so let’s update the _letfunc function as shown in listing 6. if we run the test again, we should get a green bar, showing that it ran correctly. benefits of testing implementing the tests described here confirms that the methods work correctly, and
builds confidence in your implementations. multiplication and division are implemented the same way, but what will you do if an invalid string is passed? what if you attempt to run with nothing in the stack—what result will you return then? try to keep in mind real-world circumstances while you’re working on this. listing 4: test_calc.js (adding sample test case) '2 1 -': function() { var calc...
Chapter 1: Introduction to Extensions - Archive of obsolete content
ish extension. user scripts (change appearance and functionality through javascript) yes; you can use the greasemonkey extension or "bookmarklets." yes; you can change userchrome.js to add functionality through javascript. extensions (these can do anything) yes yes theming (this changes the look of the browser) no yes let's
build an extension table 1 shows the various customization options available to a user in firefox. users have flexible customization options, using css in user style sheets and javascript/dom in user scripts (these depend on stylish, greasemonkey, and userchrome.js). in addition to css and javascript, extensions can take advantage of xul and xpcom technologies for more sophisticated features. themes,...
Connecting to Remote Content - Archive of obsolete content
of text output, such as html, xul, and so on. we can not cover all transformations to various output formats, so we'll just look into converting an xml document to xul. first you need to create an xslt stylesheet that acts as a template. this template will transform the xml you receive (in our case, the example xml document above) and convert it into xul. the xslt tutorial contains details for
building these templates. <?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/xsl/transform" xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <xsl:template match="/data"> <xul:vbox> <xsl:for-each select="shops/name"> <xul:hbox> <xul:label value="name:" /> <xul:label> <xs...
Custom XUL Elements with XBL - Archive of obsolete content
with xbl you can define new elements and define their properties, attributes, methods and event handlers. many complex elements such as tabs, buttons and input controls are implemented using xbl and simpler xul elements. as explained earlier, xul is really just boxes, text and images. we'll look into xbl using a modified version of the hello world extension. download the hello world xbl project,
build it and test it for a while. you should see a new item in the hello world menu, that opens a binding test window where you can add "persons" to a list. xbl basics in order to create an xbl binding you'll need 2 files: the xbl file and a css file that binds an element name to your xbl declaration. if you look into the content directory, you'll see both files: person.xml - this is the main bind...
Intercepting Page Loads - Archive of obsolete content
method in the service to include it. everything mentioned before applies here as well, except you'll be receiving all the events for all tabs and windows in a single object, and you don't have to worry about adding and removing listeners every time a tab is opened or closed. this also has the advantage of detecting page loads anywhere in the application, not only in browser windows. if you are
building a web filtering extension, you should keep in mind that xul windows such as the dom inspector window and the add-ons manager window allow (limited) web navigation. other extensions might add xul windows that allow navigation as well, so in those cases it's best to use a global solution like this one. content policy finally, there is the option of implementing nsicontentpolicy. you can create...
Bundles - Archive of obsolete content
the unpacking overhead. a bundle can also be installed from firefox via the prism extension for firefox. the extension looks for <link> tags in the webpage that point to a webapp bundle: <link rel="webapp" href="prismdemo.webapp" title="prism demo"> when the extension finds such a <link> tag, it will notify the user. the user can then decide to install the webapp. ...
Extensions - Archive of obsolete content
d and the differences in the user interface (ui). extensions typically overlay the host application's ui to add toolbar buttons, menus and other features. one of prism's features is an extreme lack of ui elements, which means that trying to use the same overlays in firefox and prism is really not possible. the basics in order to install an extension in prism, you need to follow the guidelines for
building a mozilla-based extension. to support prism specifically, you'll need to add prism to the list of target applications in the extension's install.rdf file. the code snippet will look something like this: <em:targetapplication> <!– prism –> <description> <em:id>prism@developer.mozilla.org</em:id> <em:minversion>0.8</em:minversion> <em:maxversion>1.0.0.*</em:maxversion> </de...
RDF Datasource How-To - Archive of obsolete content
ote rdf/xml documents. each datasource that is listed will be loaded, and the assertions contained in the datasource will be made available to the tree control for display. ref="http://foo.bar.com/". this roots the graph in your content model. the tree tag will be treated as if it has the id attribute with a value http://foo.bar.com/. <template>...</template>. the xul template that is used to
build content from the graph. starting with the resource that corresponds to the tree element, http://foo.bar.com/, the graph will be traversed and content will be constructed using the pattern specified within the template tags. for a complete description of how content is built from rdf, see the xul:template guide. 1 as of this writing, it is not currently possible to implement javascript xpcom c...
Space Manager Detailed Design - Archive of obsolete content
t list(file* out); void sizeof(nsisizeofhandler* ahandler, pruint32* aresult) const; #endif private: // structure that maintains information about the region associated // with a particular frame struct frameinfo { nsiframe* const mframe; nsrect mrect; // rectangular region frameinfo* mnext; frameinfo(nsiframe* aframe, const nsrect& arect); #ifdef ns_
build_refcnt_logging ~frameinfo(); #endif }; // doubly linked list of band rects struct bandrect : prcliststr { nscoord mleft, mtop; nscoord mright, mbottom; printn mnumframes; // number of frames occupying this rect union { nsiframe* mframe; // single frame occupying the space nsvoidarray* mframes; // list of frames occupying the space }; ...
SpiderMonkey coding conventions - Archive of obsolete content
ercase and js-prefixed: jsdouble. aggregate type names are js-prefixed and mixed-case: jsobject. macros are generally all_caps and underscored, to call out potential side effects, multiple uses of a formal argument, etc. linkage dll entry points have their return type expanded within a js_public_api() macro call, to get the right windows secret type qualifiers in the right places for all
build variants. dll entry points that are not public apis use js_friend_api() instead. ...
File object - Archive of obsolete content
component of the spidermonkey javascript interpreter. file is non-standard, not generally compiled into distributions, is a potential source of huge security holes, and not well tested. getting started in order to use the file object from your javascript programs, you must enable it by setting the make variable js_has_file_object during the compilation of your spidermonkey engine. if you are
building a standalone version of spidermonkey (see: spidermonkey
build documentation), this variable can be added on the make command line, like so: cd mozilla/js/src make -f makefile.ref js_has_file_object=1 alternatively, if you are
building a larger product (such as a browser) and want to include the file object, you may need to perform minor makefile surgery. summary non-standard server-side o...
Merging TraceMonkey Repo - Archive of obsolete content
ontributed to the conflict. inspecting the files at those two changesets can be helpful: hg cat -c changeset filename once all the conflict markers are removed, you've performed the manual resolution, which you tell to mercurial by running hg resolve -m filename. again, exercuse caution. once you've resolved all the files, all the entries in hg resolve -l will have rs next to them. perform a
build. if the tree does not
build successfully you've likely merged something incorrectly. historically, auto-merge doesn't mess up much. land. if the sheriff gives you permission to land, hg push -r default ssh://hg.mozilla.org/tracemonkey and hg push ssh://hg.mozilla.org/mozilla-central if you can't push to mozilla-central because somebody ignored the "ask the sheriff" rule and pushed there anywa...
Table Layout Regression Tests - Archive of obsolete content
continues to work and whether it is still used or not. subject overview changes in layout, parser and content code can have unintended side effects, also known as regressions. it is good style to check for these unwanted regressions and fixing them before checkin rather than causing bugzilla avalanches. prerequisites in order to run these tests, you will need to have: make sure that your
build is a debug
build (in short you need ac_add_options --enable-debug in your .mozconfig file). to
build the layoutdebugger itself,
build either all extensions or include layoutdebug in your .mozconfig file. for example ac_add_options --enable-extensions=all. a mozilla tree with the test files at %moz_src%/layout/html/tests, disable_tests should not be defined (so ac_add_options --enable-tests), ...
Actionscript Acceptance Tests - Archive of obsolete content
the output from the testcase is matched line by line to the .out file and any difference is considered a failure. may be used in conjunction with a .exitcode file. testname.abc_ for special cases where the .as source is not available (e.g. fuzzed files) it is possible to check in a .abc_ which will let the test harness run compiled files without source. 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. support directories in some cases a test may require additional files to successfully run. there are two kinds of support directories available. files to be included when compiling the test: if a test requires additio...
Tamarin Roadmap - Archive of obsolete content
s and release dates. the roadmap is a living document representing current best thinking and is subject to change. comments or questions are welcome and encouraged via the tamarin-devel mailing list. tc jan '09 feature links status integrate the tt string class tamarin:string implementation tamarin:strings bug 465506 complete enhanced c++ profiler enhance memory profiler to work in release
builds and be more performant in progress enable lir for arm targets bug 460764 complete amd64 nanojit bug 464476 in progress port nanojit to powerpc bug 458077 complete add mac-x64 and linux-x64
buildbots complete fail
build on assertion in acceptance tests complete merge tracking bug bug 469836 in progress tc feb '09 spring backlog tbd. ...
Tamarin - Archive of obsolete content
s available under the mpl/gpl/lgpl tri-license. releases release tracking information on current, past, and upcoming releases of tamarin. documentation adobe actionscript virtual machine 2 (avm2) overview (pdf, 400k) the instructions, architecture, and file format supported by the avm2. see also the possible errata. tamarin
build documentation how to get,
build, and use tamarin. tamarin
build system documentation documentation on how the tamarin
build system works and how to modify. tamarin commit hook instructions for installing and using the mercurial hook for tamarin. tamarin acceptance testing instructions on how to validate changes to the tamarin source code. ...
TraceVis - Archive of obsolete content
vis, and run with tracevis enabled, then tracemonkey will output a log of all its activity transitions. the log can be postprocessed into a visualization that can be used to rapidly diagnose many tracing-related performance issues. so far, most of the documentation on tracevis is contained in the announcement blog post. prerequisites the visualization scripts require pil (python imaging library).
building with tracevis these are the steps to
build a js shell with tracevis, starting from a mozilla source directory. these directions create an optimized
build, because optimized
builds are usually better for performance analysis. cd js/src autoconf213 mkdir opt-tracevis cd opt-tracevis ../configure --enable-tracevis make -j2 the resulting binary will be at dist/bin/js relative to the current direct...
Tuning Pageload - Archive of obsolete content
painting till after we have a bunch of the data.this makes overall page load time shorter by not doing extra repaints very early on. content.interrupt.parsing this preference, when true, means that the content sink can tell the parser to stop for now and return to the event loop, which allows layout and painting to happen. if the parser gets a large chunk of data, it will try to parse it all,
building the corresponding content model. since layout and painting happen asynchronously, while the parser is working there is no layout or painting. so this preference is used to increase responsiveness, especially on cached loads (where data comes into the parser in large chunks) content.max.tokenizing.time controls how often the sink interrupts the parser. the parser is interrupted at least eve...
contentView - Archive of obsolete content
« xul reference contentview type: nsitreecontentview for trees built with a content
builder - that is, those that do not have flags set -- the contentview will be a reference to the nsitreecontentview for the tree. this interface lets you retrieve the dom element corresponding to a given a row index and vice versa. for trees that are not built with a content
builder, the functions of nsitreecontentview will not be available, since there are no dom nodes to retrieve. in newer versions of mozilla, the contentview property is actually a synonym for the view property, since the two interfaces are flattened together into a single interface in javascript. this property is read-only. ...
tag - Archive of obsolete content
for example, by using a value of treechildren, the condition will only match when placing elements directly inside a treechildren tag. ...
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...
Bindings - Archive of obsolete content
ents/1.1/description" object="?description"/> <action> ... </action> </rule> </template> the description triple has been changed to a binding element, but the attributes are the same. this allows a match to occur even if the description is not specified. note that when bindings are used, the bindings and the action must be enclosed inside a rule element. the template
builder examines bindings after the query has generated results. it has already determined, in this example, that three matches have been found. the
builder continues by filling in the values for any bindings. they are evaluated in a similar though simpler manner than the triples. the value of the ?photo variable is known for each match, the datasource is examined for the description, and the value of ...
Multiple Rule Example - Archive of obsolete content
use the same variable name. the only exception to this is that the container and member variables (those that are referred to in the uri attributes), must be the same in all rules. in this example, the container variable is ?start and the member variable is ?photo. if different variables were used for these, the rules would not work properly. the reason for this is due to the manner in which the
builder processes the data. looking back at the results listed above, the palace photo appears twice so the second one will be removed, leaving only three matches. although the
builder actually generates mutliple matches for one resource, in many cases it isn't necessary to be aware of this detail when creating templates. it is usually sufficient to assume that earlier rules are used to filter results ...
Multiple Rules - Archive of obsolete content
this involves using additional rule elements after the first. in addition, conditions may be applied to each rule. only those results that match the conditions have content generated for them. for each result, the conditions associated with each rule are examined to see if they match. the first rule that matches causes content to be generated for that result. for example, the first rule might match directories or folders, whereas the second rule might match files. in this situtation, you would want to use different output for each type. ...
Using Recursive Templates - Archive of obsolete content
</vbox> </vbox> <vbox id="row3" container="true" empty="false" class="indent"> <label value="female"/> <vbox id="row7" class="indent"><label value="cleopatra"/></vbox> <vbox id="row8" class="indent"><label value="laura secord"/></vbox> </vbox> </groupbox> note how similar content corresponding to the action body is created for both the groups as well as the people. the template
builder has also added container and empty attributes to the groups. this is done with all nodes that have children to indicate that the node contains generated children as well as whether the node is empty. these hints are used for trees, but they can also be used in a stylesheet to provide a different appearance for containers with children, empty containers, as well as non-containers. in this exampl...
XML Templates - Archive of obsolete content
« previousnext » mozilla also supports the use of xml datasources. an xml document will be loaded and xpath expressions may be used to take portions of the xml document and generate content from these. when an xml source is desired, specify a querytype attribute on the root node of the template to the value xml. this indicates to the template
builder that an xml source is being used as that the queries use syntax that is specific to xml. the datasources attribute should be set to the url of an xml document, either a local file or a remote web site. the ref attribute isn't currently used for xml sources, as the root of the document is always the starting point for xml queries; you should just set the ref attribute to a dummy value, for example '*' which is typically used. an...
Template Guide - Archive of obsolete content
template syntax result generation rdf query syntax actions recursive generation simple example bindings additional navigation filtering static content simple query syntax containment properties xml template syntax xml templates xml assignments sql template syntax sqlite templates common template syntax attribute substitution multiple rules using recursive templates
building menus with templates special condition tests multiple queries using multiple queries to generate more results
building trees with templates
building trees
building hierarchical trees template modifications template
builder interface template and tree listeners rdf modifications additional topics sorting results additional template attributes template logging xml namespa...
Things I've tried to do with XUL - Archive of obsolete content
istbox.appenditem( label, value ); // create and attach 2nd cell var cell = document.createelement('listcell'); cell.setattribute('label', label2 ); cell.setattribute('value', value2 ); row.appendchild( cell ); // etc // ... while this works at first, after a number of rows have been added it breaks and stops displaying the first cell (the one specified by the appenditem call). ...
Custom toolbar button - Archive of obsolete content
ge if all you really want is a button for some special purpose. you can also use this page to learn about extensions, and as a starting point if you plan to write a more complex extension. note that this extension is very simplified. use other tutorials and articles to find out more—the main extensions page here is a good starting point. in particular, the articles creating toolbar buttons and
building an extension explain the process in more detail. supported applications you can use the steps on this page with any or all of these mozilla applications: firefox 1.5 or a later version seamonkey 2.0 or a later version thunderbird 1.5 or a later version sunbird 0.3 or a later version pre-release versions of these (alphas, betas and release candidates) are also ok. in the rest of this...
Toolbars - Archive of obsolete content
forums... mailing list newsgroup rss feed #extdev irc channel mozillazine forum about:addons newsletter mozilla's web-tech blog mozdev project owners planet mozilla other community links... tools dom inspector edit the live dom (firefox and thunderbird) mozilla labs add-on
builder extension developer's extension a suite of development tools chrome list view files in chrome:// (firefox, thunderbird) extension wizard a web-based extension skeleton generator (firefox and thunderbird) ... more tools ... related topics xul, themes, developing mozilla ...
Adding Style Sheets - Archive of obsolete content
e the style sheet remotely as well. if you are creating a xul package to be installed as part of the chrome system, you have two choices. first, you could store the style sheet in the same directory as the xul file. this method has the disadvantage because it means your application will not be themeable. the second method involves placing your files as part of a theme. let's assume that we are
building the find files dialog for themeability, because the find files dialog can be referred to with the url chrome://findfile/content/findfile.xul so the style sheet file will be stored in chrome://findfile/skin/findfile.css. all the xul examples so far have actually been using a style sheet already. the second line has always been: <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> t...
Cross Package Overlays - Archive of obsolete content
nt to apply overlays to by adding additional li nodes. next, we add a node for each overlay to apply to the window. in this case, we only have one, but we could apply others also. add these lines just after the previous lines. <rdf:seq about="chrome://navigator/content/navigator.xul"> <rdf:li>chrome://findfile/content/foverlay.xul</rdf:li> </rdf:seq> mozilla reads this information and
builds a list of overlays that are applied to other windows. it stores this information in the chrome/overlayinfo directory. you do not need to manually modify the files in this directory. it is automatically generated and modified when mozilla is first run or when new packages are installed. however, you can force the data to be rebuilt by deleting this directory and the chrome.rdf file. as a side not...
Introduction - Archive of obsolete content
g is being modified. you can follow along by looking for these sections. what is xul and why was it created? xul (pronounced "zool" and rhyming with "cool") was created to make development of the mozilla browser easier and faster. it is an xml language so all features available to xml are also available to xul. most applications need to be developed using features of a specific platform making
building cross-platform software time-consuming and costly. a number of cross-platform solutions have been developed in the past. java, for example, has portability as a main selling point. xul is one such language designed specifically for
building portable user interfaces. it takes a long time to
build an application even for only one platform. the time required to compile and debug can be lengthy. w...
Manifest Files - Archive of obsolete content
hrome.txt ends with a slash and the file itself ends with a blank line. on windows, file urls are of the form file:///c:/files/app/, where c is the drive letter. make sure the contents.rdf file is in the right directory and is well-formed. open the contents.rdf file in mozilla to see if it parses as well-formed xml. if not, you will see an error on a yellow background. if you are using a debug
build of mozilla, some info will be printed to the terminal when starting up indicating what chrome applications are being checked. check if your application is listed. the error message "xml parsing error: undefined entity" in your xul file can be caused by an error in the manifest or in the jar file referenced by the manifest. for example, in <!doctype window system "chrome://fireclipse/locale/firec...
Persistent Data - Archive of obsolete content
for example, the window should remember which toolbars are collapsed even after the user exits. one possibility would be to write a script to collect information about what you would like to save and then save it to a file. however, that would be a pain to do for every application. conveniently, xul provides such a mechanism to save the state of a window. ...
Property Files - Archive of obsolete content
ge=hello, world! # this is another comment goodbyemessage=come back soon! stringbundles you could write the code to read properties yourself, however xul provides the stringbundle element which does this for you. the element has a number of functions which can be used to get strings from the property file and get other locale information. this element reads in the contents of a property file and
builds a list of properties for you. you can then look up a particular property by name. <stringbundleset id="stringbundleset"> <stringbundle id="strings" src="strings.properties"/> </stringbundleset> including this element will read the properties from the file 'strings.properties' in the same directory as the xul file. use a chrome url to read a file from the locale: <stringbundleset id="stringbundl...
Simple Menu Bars - Archive of obsolete content
reating menus. the most basic way is to add a menu bar with a row of menus on it like many applications have. you can also create popup menus. the menu features of xul consist of a number of different elements which allow you to create menu bars or popup menus. the items on the menus can be customized quite easily. we've already seen part of how to make menus using the menulist. this section will
build on that. menu bars are usually created much like a toolbar. the menu bar can optionally be placed inside a toolbox and the menu would work just like any other toolbar. xul does have some special elements which provide special functionality typical of menus. there are five elements associated with creating a menu bar and its menus, which are explained briefly here and in detail afterwards: me...
XBL Attribute Inheritance - Archive of obsolete content
however, with the features mentioned so far, the anonymous content is always created in the same way. it would be useful to add attributes to the bound elements that modify the inner elements. for example: xul: <searchbox/> xbl: <binding id="searchbinding"> <content> <xul:textbox/> <xul:button label="search"/> </content> </binding> in the example, the label attribute has been placed directly on the button element. ...
XPCOM Interfaces - Archive of obsolete content
we can attach scripts which modify the interface and perform tasks. however, there are quite a number of things that cannot be performed directly with javascript. for example, if we wanted to create a mail application, we would need to write scripts which would connect to mail servers to retrieve and send mail. ...
XUL Structure - Archive of obsolete content
rls may be used to access installed packages and open them with enhanced privileges. html, xml, and xul each have a different document type. some features may be used in any document type whereas some features are specific to one kind of document. the next few sections describe the basic structure of a chrome package which can be installed into mozilla. however, if you just want to get started
building a simple application, you may skip ahead to creating a window and save this section for later. package organization mozilla is organized such that you can have as many components as you want pre-installed. each extension is something of a standalone component with a separate chrome url. mozilla also has one component for each installed theme and locale. each of these components, or packages,...
Using Visual Studio as your XUL IDE - Archive of obsolete content
me://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"). as vs doesn't know how the chrome protocol works it can't detect where the dtd file is really located and thus will give you errors wherever you use the entities that are declared in this file. 5.2 text preprocessor the mozilla
build system includes a text preprocessor. as preprocessor directives are not valid xml, visual studio will mark them as errors in your xul files. 5.3 javascript related you will get validation errors for javascript code whenever using the keywords "const" and "let". these keywords are mozilla-specific at the moment. vs just supports ecmascript 3rd edition and thus doesn't know these keywords. ...
XUL Questions and Answers - Archive of obsolete content
ibute. possible values include: accept, cancel, help, open, save, find, clear, yes, no, apply, close, print, add, remove, refresh, go-forward, go-back, properties, select-font, select-color, network. if you are using a button that matches one of these common usages, use the icon attribute to indicate this. how to use dynamic objects in toolbar there may be a few ways to implement this: by
building your menupopup from an rdf datasource, which could be generated on the server. by getting data (e.g. json string) from the server, parsing it on client, and
building the menupopup using dom methods (such as document.createelementns). by getting data as xml from the server. (server can just send the xul code to use for popup - alternatively it can send generic xml describing the attributes of...
XUL accessibility guidelines - Archive of obsolete content
es are available in an accessible format. other issues custom widgets avoid re-creating functionality that already exists. ensure that custom components are built with accessibility in mind. use css system colors to ensure that new widgets interact well with other widgets and with user-defined colors and themes. learn more accessible custom widgets accessible dhtml
building accessible custom components in xul xul accessibility checklist use the following checklist to quickly verify the accessibility of a new xul application, or as a starting point for fixing accessibility problems in an existing one. keyboard access checkpoint pass fail tab order logical tab order is provided. tab order jumps around unexpectedly. t...
XUL accessibility tool - Archive of obsolete content
common accessibility mistakes will be found and reported. availability the xul accessibility tool can currently be obtained from [http://www.xulplanet.com/aaron/files...bilitytool.xpi]. future versions of the extension will be available from addons.mozilla.org. the version currently on xulplanet is compatible with the following xul applications: firefox 1.5+ thunderbird 3.0a+ recent sunbird
builds recent songbird
builds. it probably also works on seamonkey, but i haven't verified this. use to launch the tool after installation, look for an entry in the tools menu of the host application, or hit ctrl+alt+shift+f12. 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. be aware that th...
XUL Coding Style Guidelines - Archive of obsolete content
> <!-- entity homebtn.label "home" --> properties files are very similar, but use the pound sign instead of <!--<var>xxxxx</var>-->: # localization note entity name : content we recognize that translation is a subset of localization even though we've consistently referred to our notes as "localization note". files not to be localized? some files live in the tree but aren't really part of the
build; they're just there as programming examples or a kind of source documentation. to prevent them from being localized, you may insert a line of comment following the xml declaration as follows. <?xml version="1.0" encoding='utf-8'?> <!-- do not localize this file: [reason...] it isn't part of the
build; --> when translators see this line, they won't bother to look at the rest of the file. refere...
action - Archive of obsolete content
ter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject,
builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur...
arrowscrollbox - Archive of obsolete content
arrowscrollbox, false disables it. currently, smooth scrolling supports horizontal arrowscrollboxes only. tabindex type: integer the tab order of the element. the tab order is the order in which the focus is moved when the user presses the "tab" key. elements with a higher tabindex are later in the tab sequence. ...
assign - Archive of obsolete content
er, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject,
builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blu...
bbox - Archive of obsolete content
er, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject,
builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blu...
binding - Archive of obsolete content
object type: string the object of the element. it can be a variable reference, an rdf resource uri, or an rdf literal value. predicate type: uri the predicate or property to match. this must be a uri of the property. subject type: string the subject of the element. it can be a variable reference or an rdf resource uri. ...
bindings - Archive of obsolete content
ring the object of the element. it can be a variable reference, an rdf resource uri, or an rdf literal value. predicate type: uri the predicate or property to match. this must be a uri of the property. subject type: string the subject of the element. it can be a variable reference or an rdf resource uri. ...
box - Archive of obsolete content
er, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject,
builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blu...
broadcaster - Archive of obsolete content
er, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject,
builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blu...
broadcasterset - Archive of obsolete content
er, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject,
builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blu...
column - Archive of obsolete content
er, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject,
builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blu...
columns - Archive of obsolete content
er, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject,
builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blu...
command - Archive of obsolete content
s means that, to execute these commands, key events won't be passed to content, and event listeners registered for them in content will not be executed. currently, the content still receives these key events, even though it can't override them. in future releases, it won't receive them. see bug 1173061 for details. ...
commandset - Archive of obsolete content
ets type: comma-separated list of element ids a comma-separated list of element ids that the command updater will update upon. if this attribute is not specified, or you set it to the value '*', all elements are valid. the command update will only occur when the event occurs to one of the specified elements. ...
conditions - Archive of obsolete content
er, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject,
builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blu...
deck - Archive of obsolete content
perty, all items will be deselected. returns -1 if no items are selected do not hide panels; the deck element only understands visible panels. selectedpanel type: element holds a reference to the currently selected panel within a deck element. assigning a value to this property will modify the selected panel. ...
dialogheader - Archive of obsolete content
in a menu you can add the following css rule when you want to use the value none: menupopup > menuitem, menupopup > menu { max-width: none; } description type: string descriptive text to appear in addition to the dialog title. title type: string the text to appear in the title bar of the window. ...
dropmarker - Archive of obsolete content
ist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties accessibletype type: integer a value indicating the type of accessibility object for the element. ...
grid - Archive of obsolete content
er, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject,
builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blu...
grippy - Archive of obsolete content
er, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject,
builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blu...
groupbox - Archive of obsolete content
ist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties accessibletype type: integer a value indicating the type of accessibility object for the element. ...
hbox - Archive of obsolete content
er, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject,
builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blu...
image - Archive of obsolete content
the image is always checked to see whether it should be reloaded. never the image will be loaded from the cache if possible. properties accessibletype type: integer a value indicating the type of accessibility object for the element. src type: url gets and sets the value of the src attribute. ...
key - Archive of obsolete content
cts a menu item or presses a keyboard shortcut attached to the command. phase type: string the event phase where the handler is invoked. this should be set to the value capturing to indicate during the event capturing phase or target to indicate at the target element or left out entirely for the bubbling phase. ...
keyset - Archive of obsolete content
link) will have no effect. the element will, however, still respond to mouse events. to enable the element, leave this attribute out entirely. visible controls have a disabled property which, except for menus and menuitems, is normally preferred to use of the attribute, as it may need to update additional state. ...
listcell - Archive of obsolete content
element the value of this attribute is copied to the menulist.value property upon user selection of the menuitem. type type: string this attribute is reserved for use by anonymous children of listitem; do not use. properties disabled type: boolean gets and sets the value of the disabled attribute. ...
listcol - Archive of obsolete content
er, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject,
builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blu...
listcols - Archive of obsolete content
er, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject,
builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blu...
listhead - Archive of obsolete content
ce, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties accessibletype type: integer a value indicating the type of accessibility object for the element. disabled type: boolean gets and sets the value of the disabled attribute. ...
listheader - Archive of obsolete content
ist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties accessibletype type: integer a value indicating the type of accessibility object for the element. ...
member - Archive of obsolete content
reference to a node that is expected to be a child of the element that is referred to by the container element. container type: ? a variable reference to a node that is expected to be a container. if the variable is the same as the uri attribute on the content element, the resource must be a container element in order to match. ...
menubar - Archive of obsolete content
statusbar will update to the statustext of the items on the menu as the user moves the mouse over them. properties accessibletype type: integer a value indicating the type of accessibility object for the element. statusbar type: id of statusbar element gets and sets the value of the statusbar attribute. ...
menuitem - Archive of obsolete content
3. tabindex type: integer gets and sets the value of the tabindex attribute. value type: string gets and sets the value of the value attribute. for textbox and user editable menulist elements, the contents, as visible to the user, are read and set using the textbox.value and menulist.value syntax. ...
observes - Archive of obsolete content
er, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject,
builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blu...
page - Archive of obsolete content
er, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject,
builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blu...
popupset - Archive of obsolete content
er, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject,
builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blu...
preferences - Archive of obsolete content
er, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject,
builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods void firechangedevent(in domelement preference); creates...
progressmeter - Archive of obsolete content
value of the max attribute. mode type: string gets and sets the value of the mode attribute. value type: string gets and sets the value of the value attribute. for textbox and user editable menulist elements, the contents, as visible to the user, are read and set using the textbox.value and menulist.value syntax. ...
query - Archive of obsolete content
er, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject,
builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blu...
queryset - Archive of obsolete content
er, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject,
builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blu...
resizer - Archive of obsolete content
er, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject,
builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blu...
row - Archive of obsolete content
er, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject,
builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blu...
rows - Archive of obsolete content
er, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject,
builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blu...
rule - Archive of obsolete content
nts. parent type: element tag name if set, the rule will only match the corresponding tag. this may be used to have separate rules for leaf and container nodes with different tags. parsetype type: string if this attribute is set to integer, the rule will only match rdf nodes with a parse type of integer. ...
script - Archive of obsolete content
er, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject,
builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blu...
scrollbar - Archive of obsolete content
tion of the scrollbar. the default value is 100. pageincrement type: integer the amount by which the value of the curpos or value attribute changes when the tray of the scroll bar (the area in which the scroll bar thumb moves) is clicked, or when the page up or page down keys are pressed. the default value is 10. ...
scrollbox - Archive of obsolete content
er, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject,
builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blu...
scrollcorner - Archive of obsolete content
er, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject,
builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blu...
separator - Archive of obsolete content
er, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject,
builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blu...
spacer - Archive of obsolete content
er, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject,
builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blu...
spinbuttons - Archive of obsolete content
er, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject,
builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blu...
splitter - Archive of obsolete content
and collapse="both", determines which direction the splitter is actually collapsed in. since collapse="both" is a gecko 1.9+ feature, this will have no effect on earlier versions. before the element immediately before the splitter is collapsed. after the element immediately after the splitter is collapsed. ...
stack - Archive of obsolete content
er, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject,
builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blu...
statusbar - Archive of obsolete content
rsist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties accessibletype type: integer a value indicating the type of accessibility object for the element. ...
<statusbarpanel> - Archive of obsolete content
or an editable menuitem element the value of this attribute is copied to the menulist.value property upon user selection of the menuitem. properties image type: image url gets and sets the value of the image attribute. label type: string gets and sets the value of the label attribute. ...
stringbundleset - Archive of obsolete content
er, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject,
builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blu...
tabpanel - Archive of obsolete content
er, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject,
builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blu...
template - Archive of obsolete content
er, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject,
builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blu...
textnode - Archive of obsolete content
er, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject,
builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blu...
titlebar - Archive of obsolete content
ugh, 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 note: the allowevents attribute did not work for title bars prior to firefox 3. ...
toolbargrippy - Archive of obsolete content
orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties accessible type: nsiaccessible returns the accessibility object for the element. ...
toolbaritem - Archive of obsolete content
er, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject,
builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blu...
toolbarpalette - Archive of obsolete content
er, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject,
builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blu...
toolbarseparator - Archive of obsolete content
ersist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties accessibletype type: integer a value indicating the type of accessibility object for the element. ...
toolbarset - Archive of obsolete content
fter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject,
builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur,...
toolbarspacer - Archive of obsolete content
ist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties accessibletype type: integer a value indicating the type of accessibility object for the element. ...
toolbarspring - Archive of obsolete content
rsist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties accessibletype type: integer a value indicating the type of accessibility object for the element. ...
treecell - Archive of obsolete content
() (future-proof and clean, but not easily serializable). for user editable menulist elements, the contents, as visible to the user, are read and set using the menulist.value syntax. for those elements, setattribute("value", myvalue) and getattribute("value") do not access or affect the contents displayed to the user. ...
treechildren - Archive of obsolete content
er, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject,
builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blu...
treecol - Archive of obsolete content
. the value should not include a unit as all values are in pixels. specifying widths for your columns causes gecko to allow the tree to be scrolled horizontally if it is wider than the available space. properties accessibletype type: integer a value indicating the type of accessibility object for the element. ...
treecols - Archive of obsolete content
ist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties accessibletype type: integer a value indicating the type of accessibility object for the element. ...
treerow - Archive of obsolete content
er, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject,
builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blu...
treeseparator - Archive of obsolete content
er, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject,
builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blu...
triple - Archive of obsolete content
er, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject,
builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blu...
vbox - Archive of obsolete content
er, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject,
builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blu...
where - Archive of obsolete content
er, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject,
builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blu...
HTML basics - Learn web development
se are wrapped in a <ul> element. ordered lists are for lists where the order of the items does matter, such as a recipe. these are wrapped in an <ol> element. each item inside the lists is put inside an <li> (list item) element. for example, if we wanted to turn the part of the following paragraph fragment into a list <p>at mozilla, we’re a global community of technologists, thinkers, and
builders working together ... </p> we could modify the markup to this <p>at mozilla, we’re a global community of</p> <ul> <li>technologists</li> <li>thinkers</li> <li>
builders</li> </ul> <p>working together ... </p> try adding an ordered or unordered list to your example page. links links are very important — they are what makes the web a web! to add a link, we need to use a simple ele...
JavaScript basics - Learn web development
ity such as dynamically creating html and setting css styles; collecting and manipulating a video stream from a user's webcam, or generating 3d graphics and audio samples. third-party apis that allow developers to incorporate functionality in sites from other content providers, such as twitter or facebook. third-party frameworks and libraries that you can apply to html to accelerate the work of
building sites and applications. it's outside the scope of this article—as a light introduction to javascript—to present the details of how the core javascript language is different from the tools listed above. you can learn more in mdn's javascript learning area, as well as in other parts of mdn. the section below introduces some aspects of the core language, and offers an opportunity to play w...
Publishing your website - Learn web development
or storage in the git version control system. you can then collaborate on code projects, and the system is open-source by default, meaning that anyone in the world can find your github code, use it, learn from it, and improve on it. github has a very useful feature called github pages, which allows you to expose website code live on the web. google app engine is a powerful platform that lets you
build and run applications on google’s infrastructure — whether you need to
build a multi-tiered web application from scratch or host a static website. see how do you host your website on google app engine? for more information. these options are usually free, but you may outgrow the limited feature-set. using a web-based ide such as codepen there are a number of web apps that emulate a website...
What will your website look like? - Learn web development
ystem. sketching out your design next, grab pen and paper and sketch out roughly how you want your site to look. for your first simple webpage, there's not much to sketch out, but you should get in the habit of doing this now. it really helps — you don't have to be van gogh! note: even on real, complex websites, the design teams usually start out with rough sketches on paper and later on
build digital mockups using a graphics editor or web technologies. web teams often include both a graphic designer and a user experience (ux) designer. graphic designers put together the visuals of the website. ux designers have a somewhat more abstract role in addressing how users will experience and interact with the website. choosing your assets at this point, it's good to start putting together...
Using data attributes - Learn web development
ribute selectors in css to change styles according to the data: article[data-columns='3'] { width: 400px; } article[data-columns='4'] { width: 600px; } you can see all this working together in this jsbin example. data attributes can also be stored to contain information that is constantly changing, like scores in a game. using the css selectors and javascript access here this allows you to
build some nifty effects without having to write your own display routines. see this screencast for an example using generated content and css transitions (jsbin example). data values are strings. number values must be quoted in the selector for the styling to take effect. issues do not store content that should be visible and accessible in data attributes, because assistive technology may not acces...
Structuring a page of content - Learn web development
previous overview: introduction to html structuring a page of content ready for laying it out using css is a very important skill to master, so in this assessment you'll be tested on your ability to think about how a page might end up looking, and choose appropriate structural semantics to
build a layout on top of. prerequisites: before attempting this assessment you should have already worked through the rest of the course, with a particular emphasis on document and website structure. objective: to test knowledge of web page structures, and how to represent a prospective layout design in markup. starting point to get this assessment started, you should go and grab the zip file containing all the starting assets. the zip file contains: the html you...
Video and audio content - Learn web development
e features of note are: src in the same way as for the <img> element, the src (source) attribute contains a path to the video you want to embed. it works in exactly the same way. controls users must be able to control video and audio playback (it's especially critical for people who have epilepsy.) you must either use the controls attribute to include the browser's own control interface, or
build your interface using the appropriate javascript api. at a minimum, the interface must include a way to start and stop the media, and to adjust the volume. the paragraph inside the <video> tags this is called fallback content — this will be displayed if the browser accessing the page doesn't support the <video> element, allowing us to provide a fallback for older browsers. this can be anything...
HTML table basics - Learn web development
header>, <section>, <article>, or <div>), their width defaults to 100% of their parent element. tables on the other hand are sized according to their content by default, so extra measures are needed to get table layout styling to effectively work across a variety of devices. active learning: creating your first table we've talked table theory enough, so, let's dive into a practical example and
build up a simple table. first of all, make a local copy of blank-template.html and minimal-table.css in a new directory on your local machine. the content of every table is enclosed by these two tags : <table></table>. add these inside the body of your html. the smallest container inside a table is a table cell, which is created by a <td> element ('td' stands for 'table data'). add the following ...
Structuring the web with HTML - Learn web development
html is used to specify whether your web content should be recognized as a paragraph, list, heading, link, image, multimedia player, form, or one of many other available elements or even a new element that you define. looking to become a front-end web developer? we have put together a course that includes all the essential information you need to work towards your goal. get started prerequisites before starting this topic, you should have at least basic familiarity with using computers and using the web passively (i.e. just looking at it, consuming the content). ...
Making asynchronous programming easier with async and await - Learn web development
bye for now!`); }; } let han = new person('han', 'solo', 25, 'male', ['smuggling']); the first class method could now be used something like this: han.greeting().then(console.log); browser support one consideration when deciding whether to use async/await is support for older browsers. they are available in modern versions of most browsers, the same as promises; the main support proble...
Asynchronous JavaScript - Learn web development
tively handle potential blocking operations such as fetching resources from a server. looking to become a front-end web developer? we have put together a course that includes all the essential information you need to work towards your goal. get started prerequisites asynchronous javascript is a fairly advanced topic, and you are advised to work through javascript first steps and javascript
building blocks modules before attempting this. if you are not familiar with the concept of asynchronous programming, you should definitely start with the general asynchronous programming concepts article in this module. if you are, then you can probably skip to the introducing asynchronous javascript module. note: if you are working on a computer/tablet/other device where you don't have the ability...
Looping code - Learn web development
here we'll look at the loop structures available in javascript that handle such needs. prerequisites: basic computer literacy, a basic understanding of html and css, javascript first steps. objective: to understand how to use loops in javascript. keep me in the loop loops, loops, loops. as well as being associated with popular breakfast cereals, roller coasters, and musical production, they are also a critical concept in programming. ...
Function return values - Learn web development
some functions don't return a significant value, but others do. it's important to understand what their values are, how to use them in your code, and how to make functions return useful values. we'll cover all of these below. prerequisites: basic computer literacy, a basic understanding of html and css, javascript first steps, functions — reusable blocks of code. objective: to understand function return values, and how to make use of them. what are return values? return values are just what they sound like — the values that a function returns when it has completed. ...
Test your skills: Events - Learn web development
nside the button (btn) to change when it is clicked on, and change back when it is clicked again. the html should not be changed; just the javascript. try updating the live code below to recreate the finished example: download the starting point for this task to work in your own editor or in an online editor. events 2 now we'll look at keyboard events. to pass this assessment you need to
build an event handler that moves the circle around the provided canvas when the wasd keys are pressed on the keyboard. the circle is drawn with the function drawcircle(), which takes the folllowing parameters as inputs: x — the x coordinate of the circle. y — the y coordinate of the circle. size — the radius of the circle. try updating the live code below to recreate the finished example:...
Test your skills: Functions - Learn web development
note: you can try out solutions in the interactive editors below, however it may be helpful to download the code and use an online tool such as codepen, jsfiddle, or glitch to work on the tasks. if you get stuck, then ask us for help — see the assessment or further help section at the bottom of this page. ...
Video and Audio APIs - Learn web development
previous overview: client-side web apis next html5 comes with elements for embedding rich media in documents — <video> and <audio> — which in turn come with their own apis for controlling playback, seeking, etc. this article shows you how to do common tasks such as creating custom playback controls. prerequisites: javascript basics (see first steps,
building blocks, javascript objects), the basics of client-side apis objective: to learn how to use browser apis to control video and audio playback. html5 video and audio the <video> and <audio> elements allow us to embed video and audio into web pages. as we showed in video and audio content, a typical implementation looks like this: <video controls> <source src="rabbit320.mp4" type="video/mp4"> ...
Client-side web APIs - Learn web development
f the most common apis you'll come across often in your development work. looking to become a front-end web developer? we have put together a course that includes all the essential information you need to work towards your goal. get started prerequisites to get the most out of this module, you should have worked your way through the previous javascript modules in the series (first steps,
building blocks, and javascript objects). those modules typically involve simple api usage, as it is often difficult to write client-side javascript examples without them. for this tutorial, we will assume that you are knowledgable about the core javascript language, and we will explore common web apis in a bit more detail. basic knowledge of html and css would also be useful. note: if you are worki...
Storing the information you need — Variables - Learn web development
previous overview: first steps next after reading the last couple of articles you should now know what javascript is, what it can do for you, how you use it alongside other web technologies, and what its main features look like from a high level. in this article, we will get down to the real basics, looking at how to work with the most basic
building blocks of javascript — variables. prerequisites: basic computer literacy, a basic understanding of html and css, an understanding of what javascript is. objective: to gain familiarity with the basics of javascript variables. tools you need throughout this article, you'll be asked to type in lines of code to test your understanding of the content. if you are using a desktop browser, the best place to type...
Working with JSON - Learn web development
lient, so it can be displayed on a web page, or vice versa). you'll come across it quite often, so in this article we give you all you need to work with json using javascript, including parsing json so you can access data within it, and creating json. prerequisites: basic computer literacy, a basic understanding of html and css, familiarity with javascript basics (see first steps and
building blocks) and oojs basics (see introduction to objects). objective: to understand how to work with data stored in json, and create your own json objects. no, really, what is json? json is a text-based data format following javascript object syntax, which was popularized by douglas crockford. even though it closely resembles javascript object literal syntax, it can be used ind...
JavaScript — Dynamic client-side scripting - Learn web development
javascript first steps in our first javascript module, we first answer some fundamental questions such as "what is javascript?", "what does it look like?", and "what can it do?", before moving on to taking you through your first practical experience of writing javascript. after that, we discuss some key javascript features in detail, such as variables, strings, numbers and arrays. javascript
building blocks in this module, we continue our coverage of all javascript's key fundamental features, turning our attention to commonly-encountered types of code block such as conditional statements, loops, functions, and events. you've seen this stuff already in the course, but only in passing — here we'll discuss it all explicitly. introducing javascript objects in javascript, most things are o...
Client-Server Overview - Learn web development
stored efficiently in an easily extensible, modifiable, and searchable way. using html templates makes it very easy to change the html structure, because this only needs to be done in one place, in a single template, and not across potentially thousands of static pages. anatomy of a dynamic request this section provides a step-by-step overview of the "dynamic" http request and response cycle,
building on what we looked at in the last article with much more detail. in order to "keep things real" we'll use the context of a sports-team manager website where a coach can select their team name and team size in an html form and get back a suggested "best lineup" for their next game. the diagram below shows the main elements of the "team coach" website, along with numbered labels for the sequenc...
Server-side website programming first steps - Learn web development
lly, we provide a high-level introductory article about web server security. prerequisites before starting this module, you don't need to have any knowledge of server-side website programming, or indeed any other type of programming. however, you do need to understand how the web works. we recommend that you first read the following topics: what is a web server? what software do i need to
build a website? how do you upload files to a web server? with that basic understanding, you'll be ready to work your way through the modules in this section. guides introduction to the server side welcome to the mdn beginner's server-side programming course! in this first article, we look at server-side programming from a high level, answering questions such as "what is it?", "how does it dif...
Server-side website programming - Learn web development
(or of a particular programming language) is useful, but not essential. similarly, expertise in client-side coding is not required, but a basic knowledge will help you work better with the developers creating your client-side web "front end". you will need to understand "how the web works". we recommend that you first read the following topics: what is a web server what software do i need to
build a website? how do you upload files to a web server? with that basic understanding, you'll be ready to work your way through the modules in this section. modules this topic contains the following modules. you should start with the first module, then go on to one of the following modules, which show how to work with two very popular server-side languages using appropriate web frameworks. ...
Ember interactivity: Events, classes and state - Learn web development
ne just below the opening export... line: @service('todo-data') todos; now the placeholder alert(text); line can be replaced with a call to our new add() function. 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). using the ember inspector however, we can see that our todo was added: displaying our todos now that we know that we can create todos, there needs to be a way to swap out our static "buy movie tickets" todos with the todos we're actually creating. in the todolist component, we'll want to get the todos out of the service, and render a todo component for eac...
Ember app structure and componentization - Learn web development
eds to be done?" autofocus > </section> note: aria-label provides a label for assistive technology to make use of — for example, for a screenreader to read out. this is useful in such cases where we have an <input> being used with no corresponding html text that could be turned into a label. when you save application.hbs, the development server you started earlier will automatically re
build the app and refresh the browser. the rendered output should now look like this: it doesn't take too much effort to get our html looking like a fully-featured to-do list app. update the application.hbs file again so its content looks like this: <section class="todoapp"> <h1>todos</h1> <input class="new-todo" aria-label="what needs to be done?" placeholder="what needs to be done...
React resources - Learn web development
ways best. react provides the context api as a way to provide data to components that need it without passing props down the component tree. there's also a usecontext hook that facilitates this. if you'd like to try this api for yourself, smashing magazine has written an introductory article about react context. class components although this tutorial doesn’t mention them, it is possible to
build react components using es6 classes – these are called class components. until the arrival of hooks, es6 classes were the only way to bring state into components or manage rendering side effects. they're still the only way to handle certain other, more edge-case features, and they’re very common in legacy react projects. the official react docs are a great place to start learning about them. ...
Beginning our React todo list - Learn web development
this article will walk you through putting the basic app component structure and styling in place, ready for individual component definition and interactivity, which we'll add later. note: if you need to check your code against our version, you can find a finished version of the sample react app code in our todo-react repository. for a running live version, see https://mdn.github.io/todo-react-
build/. prerequisites: familiarity with the core html, css, and javascript languages, knowledge of the terminal/command line. objective: to introduce our todo list case study, and get the basic app structure and styling in place. our app's user stories in software development, a user story is an actionable goal from the perspective of the user. defining user s...
Componentizing our Svelte app - Learn web development
ponents and share information between them. we'll componentize our app, then add more functionality to allow users to update existing components. prerequisites: at minimum, it is recommended that you are familiar with the core html, css, and javascript languages, and have knowledge of the terminal/command line. you'll need a terminal with node + npm installed to compile and
build your app. objective: to learn how to break our app into components and share information among them. code along with us git clone the github repo (if you haven't already done it) with: git clone https://github.com/opensas/mdn-svelte-tutorial.git then to get to the current app state, run cd mdn-svelte-tutorial/04-componentizing-our-app or directly download the folder's...
Advanced Svelte: Reactivity, lifecycle, accessibility - Learn web development
we'll have to dig a little deeper into svelte's reactivity system. we'll also look at solving some accessibility focus issues, and more besides. prerequisites: at minimum, it is recommended that you are familiar with the core html, css, and javascript languages, and have knowledge of the terminal/command line. you'll need a terminal with node + npm installed to compile and
build your app. objective: learn some advanced svelte techniques involving solving reactivity issues, keyboard accessibility problems to do with component lifecycle, and more. we'll focus on some accessibility issues involving focus management. to do so, we'll utilize some techniques for accessing dom nodes and executing methods like focus() and select(). we will also see how to ...
Dynamic behavior in Svelte: working with variables and props - Learn web development
e'll be using variables and props to make our app dynamic, allowing us to add and delete todos, mark them as complete, and filter them by status. prerequisites: at minimum, it is recommended that you are familiar with the core html, css, and javascript languages, and have knowledge of the terminal/command line. you'll need a terminal with node + npm installed to compile and
build your app. objective: learn and put into practice some basic svelte concepts, like creating components, passing data using props, render javascript expressions into our markup, modify the components state and iterating over lists. code along with us git clone the github repo (if you haven't already done it) with: git clone https://github.com/opensas/mdn-svelte-tutorial.gi...
Creating our first Vue component - Learn web development
features of vue (like single file components or render functions), you'll need a terminal with node + npm installed. objective: to learn how to create a vue component, render it inside another component, pass data into it using props, and save its state. creating a todoitem component let's create our first component, which will display a single todo item. we'll use this to
build our list of todos. in your moz-todo-vue/src/components directory, create a new file named todoitem.vue. open the file in your code editor. create the component's template section by adding <template></template> to the top of the file. create a <script></script> section below your template section. inside the <script> tags, add a default exported object export default {}, which is your compon...
Vue resources - Learn web development
k, with some architectural opinions that can be useful to creating maintainable applications, even if you don’t use any of the server side rendering features it provides. this site provides detailed documentation on using nuxtjs. vue mastery — a paid education platform that specializes in vue, including some free lessons. vue school — another paid education platform specializing in vue.
building and publishing your vue app the vue cli also provides us with tools for preparing our app for publishing to the web. you can do this like so: if your local server is still running, end it by pressing ctrl + c in the terminal. next, run the npm run
build (or yarn
build) in the console. this will create a new dist directory containing all of your production ready files. to publish your si...
Styling Vue components with CSS - Learn web development
the reset styles should be applied to the app now. the images below show the look of the app before and after the reset is applied. before: after: noticeable changes include the removal of the list bullets, background color changes, and changes to the base button and input styles. adding global styles to single file components now that we've reset...
Command line crash course - Learn web development
gives us a directory and file count. so what is going on here? a general philosophy of (unix) command line tools is that they print text to the terminal (also referred to "printing to standard output" or stdout). a good deal of commands can also read content from streamed input (known as "standard input" or stdin). the pipe operator can connect these inputs and outputs together, allowing us to
build up increasingly more complex operations to suit our needs — the output from one command can become the input to the next command. in this case, ls would normally print its output to stdout, but instead ls’s output is being piped into wc, which takes that output as an input, counting the number of lines it contains, and prints that count to stdout instead. a slightly more complex example let...
Understanding client-side web development tools - Learn web development
ace (cli) tools. 3. package management basics in this article we'll look at package managers in some detail to understand how we can use them in our own projects — to install project tool dependencies, keep them up-to-date, and more. 4. introducing a complete toolchain in the final couple of articles in the series we will solidify your tooling knowledge by walking you through the process of
building up a sample case study toolchain. we'll go all the way from setting up a sensible development environment and putting transformation tools in place to actually deploying your app on netlify. in this article we'll introduce the case study, set up our development environment, and set up our code transformation tools. 5. deploying our app in the final article in our series, we take the example ...
Tools and testing - Learn web development
xplain the tools you can chain together, how to install them using package managers, and control them using the command line. we finish up by providing a complete toolchain example showing you how to get productive. understanding client-side javascript frameworks javascript frameworks are an essential part of modern front-end web development, providing developers with tried and tested tools for
building scalable, interactive web applications. many modern companies use frameworks as a standard part of their tooling, so many front-end development jobs now require framework experience. this module gives you some fundamental background knowledge about how client-side frameworks work and how they fit into your toolset, before moving on to tutorial series covering some of today's most popular ones.
Learn web development
s, formatters, transformation tools, version control systems, deployment tools, and client-side javascript frameworks. server-side website programming even if you are concentrating on client-side web development, it is still useful to know how servers and server-side code features work. this topic provides a general introduction to how the server-side works and detailed tutorials showing how to
build up a server-side app using two popular frameworks: django (python) and express (node.js). getting our code examples the code examples you'll encounter in the learning area are all available on github. if you want to copy them all to your computer, the easiest way is to download a zip of the latest master code branch. if you prefer to copy the repo in a more flexible way that allows for automa...
Chrome Worker Modules
stack traces unfortunately, the module loader doesn’t play nicely with error stack traces. that is, the following will not show human-readable stacks: try { mymodule.foo(); } catch (ex) { log("exception raised at " + ex.filename) log("stack: " + ex.stack); } rather, you should use prop...
Mozilla accessibility architecture
windows implementations accessible/src/atk/ atk implementations, may eventually be used on platforms other than linux and unix accessible/src/mac/ empty implementations of platform-specific classes for os x. these implementatiosn may be filled later. accessible/src/other/ empty implementations of platform-specific classes so that
builds don't fail on platforms currently not-supported where we put toolkit-specific code because atk and msaa are different accessibility api toolkits which share only about 75% of their code, there is a lot of toolkit-specific code that needs to live somewhere. in the past, this was accomplished through aggregation -- two separate trees of objects were kept, one in accessible/src and one in ...
Information for External Developers Dealing with Accessibility
d party assistive technologies, containing practical tips and the details of mozilla's implementation. accessibility api cross reference should be helpful at anyone looking at implementing accessibility api support for a product on multiple platforms. contains info on accessible roles, states and events. accessible toolkit checklist a list of what needs to be done for accessibility when
building new toolkits, widget by widget. in addition, here is a list of official keyboard ui guidelines for each desktop: windows keys: guidelines on keyboard ui design and on implementing keyboard shortcuts: an excellent resource from microsoft. mac keys: keyboard shortcuts quick reference for mac os x complete reference on keyboard for mac os x: this document list all func...
Mozilla's Section 508 Compliance
windows linux/unix mac os a) at least one mode of operation and information retrieval that does not require user vision shall be provided, or support for assistive technology used by people who are blind or visually impaired shall be provided. partially complete. window-eyes support in testing (must use very latest 1.8 alpha testing
builds and special
build from window-eyes). partially complete. gnopernicus support in beta no screen reader support on mac os x b) at least one mode of operation and information retrieval that does not require visual acuity greater than 20/70 shall be provided in audio and enlarged print output working together or independently, or support for assistive technology...
Mozilla’s UAAG evaluation report
asis for any government accessibility regulations at this time. this document is based on the september 12, 2001 candidate recommendation of uaag 1.0. this may be different from the most recent version, check for updates on the user agent working group home page. look to the "techniques" document for real-world implementation examples of each checkpoint. this uaag evaluation report covers nightly
builds of the mozilla web browser itself, running on windows 2000, as of february 20, 2002. we are claiming to support html 4, css 2, png, jpg and gif. this evaluation does not cover mailnews or composer. there may be accessibility and customizability features not listed here. a very good resource is the customizing document. when filing mozilla bugs based on uaag requirements, please use bug 24413 as ...
ZoomText
it doesn't do us any good to get bug reports on older stuff right now. our main focus is on the browser itself, so you you only need to install mailnews or address book if curious about the other apps. ...
Index
inner, tutorial, webextensions this article walks through the process of publishing an add-on. if you just want to get started, head to the submit a new add-on page on amo. 683 source code submission add-ons, extensions, review policy, distribution to complete the review process at addons.mozilla.org (amo), reviewers must be able to read the code in your extension. some
build processes render extension code difficult to read. these processes include minifying your code, as well as the use of module bundlers or similar tools, such as webpack. in this case, when you upload your extension to amo, you will need to provide your source code and instructions for
building that source code, where
build processes render your extension’s code hard to read. 684 theme...
Obsolete
this page contains theme documents and resources that we don't expect will ever be updated, but which we're keeping for the time being as potential source material for updated docs. ...
Theme concepts
uple of use cases for this option: to bundle a theme with a browser extension, as an added extra. create a dynamic theme that changes under programmatic control. and, obviously, you can combine the two and bundle a programmatically controlled theme with your extension. using the theme api is straightforward. first, request "theme" permission in the extension's manifest.json file. next, you
build a json object containing the same information you would use in a static theme’s manifest.json, finally, pass the json object in a theme.update() call. for example, the following code, from the dynamic theme example defines the content for the day and night elements of the dynamic theme: const themes = { 'day': { images: { theme_frame: 'sun.jpg', }, colors: { frame: '#c...
Add-ons
ublished extension an enterprise guide for developing and using extensions how to develop themes for firefox firefox developer communities extensions for firefox for android in 2020, mozilla will release a new firefox for android experience. this new, high-performance browser for android has been rebuilt from the ground up using geckoview, mozilla’s mobile browser engine. we are currently
building support for the webextensions api on geckoview. migrate an existing extension if you maintain a legacy extension, such as an xul overlay, bootstrapped, or add-on sdk-based extension, you can still port it to use webextension apis. there are some porting resources on firefox extension workshop, our site for firefox-specific development resources. for more information about transition suppor...
Adding a new CSS property
animation if the existing animation behaviors in nsstyleanimation aren't sufficient for how this new property is interpolated (as its specification should describe), then you'll need to implement a new behavior type in nsstyleanimation and reference it from nscssproplist.h. this should probably be in a separate patch from the basic addition of the property. finishing up then you'll need to re
build and run the mochitests in layout/style (./mach mochitest -f plain layout/style/). if you've done everything right, they should pass; if they don't, you need to fix something. then you should get review on the work you've done so far and move on to implementing whatever the property does (which should be in a separate patch or patches). ...
Adding phishing protection data providers
new data provider to install a data provider for phishing protection, it's necessary to set a series of preferences to provide details about the provider. each data provider has a unique id number. the data provider with the id number 0 is the default data provider shipped with firefox. when installing a new provider, you should use the next unused number. to find an id number to use, you can
build a loop that requests the value of browser.safebrowsing.provider.0.name, then browser.safebrowsing.provider.1.name, and so forth until no value is returned. then you can use that value. you can find examples of how to read and write preferences in the article adding preferences to an extension. required preferences browser.safebrowsing.provider.idnum.name a human-readable name for the data p...
Command line options
command-line arguments that open their own windows but don't already prevent default windows from opening. firefox, thunderbird3.x and seamonkey2.x only. -v or -version print application version. note that on windows this only works with a redirection such as |more (bug 355889). this option is available only in a command console. x11 options these options are only available for an application
build for and running atop the x11/x.org display and window system to be found on linux and other unix-based systems. --class=wm_class set the wm_class resource class of the x11 windows created by the application. --display=display set the x display to use. --g-fatal-warnings make all warnings fatal. --sync make x calls synchronous. other options need to be documented -print-xpcom-dir -pri...
Creating MozSearch plugins
gin is an xml file that describes the search engine, its url, and the parameters that need to be passed to that url. warning: mozsearch is non-standard and is intended for internal use within mozilla projects only. it should only be used if your intention is to distribute the search plugin packaged in a firefox extension, or if you are creating plugins meant to be shipped by default in a firefox
build. for creating search plugins for installation from the web, see creating opensearch plugins for firefox the plugin file the mozsearch format is similar to the opensearch format. the only difference is the root element and xml namespace. example: searching yahoo! the following xml is the bundled firefox 2 search plugin for searching using yahoo!: <searchplugin xmlns="http://www.mozilla.org/20...
Creating a Firefox sidebar
ns available, and some of them provide a sidebar. such kind of sidebar can be a simple web panel or a full-featured extension that is completely integrated with the browser. there are some ways to create an extension: the new sidebar api has been implemented in firefox 29 as part of the add-on sdk. it's the easiest way to create an extension with a sidebar.obsolete since gecko 57 you can also
build a restartless extension yourself without the sdk. a sample extension to add a web panel is available as a starter.obsolete since gecko 57 if you'd like to have a deeper integration with the browser to offer more complex features, a traditional overlay extension can be an option. the document might be obsolete, though.obsolete since gecko 57 the social api obsolete since gecko 57 (firefox 57...
Creating a Login Manager storage module
x keychain (bug 106400) and gnome keyring manager (bug 309807). you should start with the existing code if you want to implement that in your extension. to see some debugging output in the console set signon.debug to true using about:config. sample javascript implementation the following code snippet is a javascript component that implements a dummy nsiloginmanagerstorage interface. see how_to_
build_an_xpcom_component_in_javascript for more details about javascript components. const cc = components.classes; const ci = components.interfaces; components.utils.import("resource://gre/modules/xpcomutils.jsm"); function sampleloginmanagerstorage() {} sampleloginmanagerstorage.prototype = { classdescription: "sample nsiloginmanagerstorage implementation", contractid: "@example.com/login-mana...
Debugging Frame Reflow
e start of its reflow reflow reason available width, available height computed width, computed height the previous and the next frame in flow and a count number. when the frame's reflow is finished the following information is displayed : reflow metric (desired) width, height max. element width maximum width frame status overflow area getting the log make sure that your
build is a debug
build (in short you need ac_add_options --enable-debug in your .mozconfig file). create a text file (for instance reflow_rules.txt). enter this line in the text file * 1 this should look like: point the gecko_display_reflow_rules_file environment variable to the path of the reflow_rules.txt file. run the debug
build, saving stdout to a file. on mac th...
Debugging JavaScript
l javascript object inspection, you can write a function that dumps a whole object, similar to this ddumpobject(). log.jsm (formerly log4moz) this is a partial implementation of the log4* interfaces (for example, see log4j or log4net). components.utils.import("resource://gre/modules/log.jsm"); "debugger" keyword you can halt venkman or chromebug at a line using the keyword debugger. in debug
builds this also dumps a stack trace to the console, even when the debugger is not running. in extensions you can print the callstack using components.stack like this: function getstackdump() { var lines = []; for (var frame = components.stack; frame; frame = frame.caller) { lines.push(frame.filename + " (" + frame.linenumber + ")"); } return lines.join("\n"); } see also debugging moz...
HTTP logging
ing something that includes a lot of noise that's hard to parse through, you can do that. simply remove the text nssockettransport:5 from the commands above. turning off dns query logging you can turn off logging of host resolving (that is, dns queries) by removing the text nshostresolver:5 from the commands above. enable logging for try server runs you can enable pr_logging on try by hacking
build/automation.py.in, in 'def environment'. for example: def environment(... env['moz_log'] = 'nshttp:5' return env ...
Debugging
bugging. useful if a developer can't reproduce your crash. http logging how to log http network traffic for debugging purposes. debugging tools tools assorted tools that will help you debug your code or web site. nserror lookup useful for when your code gets a complicated numeric error code and you can't figure out what it means. download a debug
build recent automatically compiled debug
builds are available. note that these are replaced frequently by our tinderboxes. the debug
builds have "-debug" at the end of their file names. related topics performance and profiling troubleshooting performance problems. ...
Makefile - targets
this article lists possible targets provided by the makefile. target name description
build default target. compile firefox, thunderbird, etc check standalone shell unit test invoked directly by make configure launch the configure program to define headers and and attributes for the target
build machine. export generate and install exported headers: exports makefiles target used to only regenerate makefiles package generate a package tarball clean targets clean remove object files, binaries and generated content clobber alias for clean distclean ...
Installing headers using EXPORTS
for all <tt>makefile.in</tt>s which export public headers, you should set module to the module name where the files should be copied to in <tt>dist/include</tt>. for normal headers that are to be exported, you should set exports to the list of headers to be exported. they will be copied to <tt>dist/include/$(module)</tt>. ...
Linux Prerequisites
doc moved in-tree https://firefox-source-docs.mozilla.org/setup/linux_
build.html ...
Creating Custom Events That Can Pass Data
ard mouse/keyboard events) and, depending on the data passed along with this event, you want firefox to react differently. note that starting with version 6, firefox supports dom level 3 customevent, which lets you dispatch custom events with arbitrary data from javascript. (see bug 427537) requirements in order to do this you must be able to do all of the following: download mozilla source code
build mozilla creating custom firefox extensions with the mozilla
build system. this is the foundation for everything we'll do. what's in a name despite whatever you may have been taught in your english class, there's a lot in a name when it's an event name. as of gecko 1.8, if your event names do not start with "nsdom" and their interfaces do not start with "nsidom" then you can forget about passing ...
Interface Compatibility
ontext.mozdrawtext). these apis may be removed or replaced with standard interfaces in future releases of mozilla. jetpack the jetpack sdk and apis are not yet complete. the stable version 1.0 of the jetpack sdk is planned for later in 2010. documented apis which are shipped as part of the jetpack sdk are designed to work in future versions of firefox. achieving this compatibility may require re
building the extension with a new version of the jetpack sdk. javascript/xul interfaces traditional extensions written using xul overlays and xpcom have access to the full power of the mozilla platform. with the power, however, comes the understanding that the mozilla platform is constantly changing and many apis may change in future versions of firefox. in micro/maintenance releases, there should be...
Contributing to the Mozilla code base
our hands. here are some further resources to help: ask for help in a comment on the bug, or in #introduction:mozilla.org or #developers:mozilla.org check out https://developer.mozilla.org/docs/developer_guide and its parent document, https://developer.mozilla.org/docs/mozilla our reviewer checklist is very useful, if you have a patch near completion, and seek a favorable review utilize our
build tool mach, its linting, static analysis, and other code checking features step 3: get your code reviewed once you fix the bug, you can advance to having your code reviewed. when you commit your code, please use the following format for your commit message: `bug number - what your patch does; r?reviewer` for example, a commit message may look like `bug 1234567 - remove reflow by caching elemen...
Displaying Places information using views
xpanding the root nsinavhistorycontainerresultnode of this instance and displaying the nsinavhistoryresultnode objects contained therein. the built-in views if you need to show the contents of bookmarks or history in your extension or application, you may want to use the built-in places views, which are generic and will save you a lot of time writing basic functionality so that you can focus on
building your extension or application. places provides the following built-in views: tree menu toolbar instantiating the three built-in views are simply standard xul elements with a special type attribute whose value is "places". every xul document containing a built-in view must import the stylesheet browser/components/places/content/places.css and overlay the file browser/components/places...
Linux compatibility matrix
the following table lists the available library versions for the mozilla.org-distributed firefox
builds dependencies, and/or to
build firefox. distribution kernel glibc glib gtk+2 gtk+3 pixman stdc++ gcc clang python3 released eol fedora 16 3.1 2.14 2.30 2.24 3.2 0.22 4.6 4.6 2.9 n/a nov 2011 feb 2013 fedora 17 3.3 2.15 2.32 2.24 3.4 0.24 4.7 4.7 3.0 n/a may 2012 jul 2013 fedora 18 3.6 2.16 2.34 2.24 3.6 0.26 4.7 4.7 3.1 n/a jan 2013 jan 2014 fedora 19 3.9 2.17 2.36 2.24 3.8 0.30 4.8.1 4.8 3.3 n/a jul 2013 jan 2015 fedora 20 3.11 2.18 2.38 2.24 3.
Multiple Firefox profiles
ts" section, including the "edit info.plist" step. leave off the profile name if you want the profile selector to show up every time you launch. setting up multiple profiles for different firefox channels this section will be especially helpful if you are a developer, wanting to work with multiple channels, and each having their separate launcher. windows in windows, the developer and nightly
builds get their own directory in the "programs" folder, so you don't have to worry about where to store the downloaded files. however, all three will attempt to use the same profile by default. you won't want to keep this behavior, because the different channels have different levels of features. to set each launcher, follow the windows instructions at windows launcher. linux in linux, things aren't...
Performance best practices for Firefox front-end engineers
structured clone algorithm, meaning that you can stash things like maps, sets, dates, blobs, and more, without having to do conversions for json compatibility. a promise-based wrapper for indexeddb, indexeddb.jsm, is available for chrome code. test on weak hardware for the folks paid to work on firefox, we tend to have pretty powerful hardware for development. this is great, because it reduces
build times, and means we can do our work faster. we should remind ourselves that the majority of our user base is unlikely to have similar hardware. look at the firefox hardware report to get a sense of what our users are working with. test on slower machines to make it more obvious to yourself if what you’ve written impacts the performance of the browser. consider loading scripts with the subscri...
Overview of Mozilla embedding APIs
led the nswebbrowser. embedding applications can leverage this component to easily access many of gecko's features. each webbrowser instance represents the "client-area" of a typical browser window. the webbrowser exposes a set of interfaces which allow the embedding application to control activity and respond to changes within this client area. using these interfaces an embedding application can
build up its own user interface around a webbrowser instance. public classes the following utility classes are available from the xpcom dll. they provide some basic functionality which should be leveraged when
building new xpcom components. nscomptr<interface-type> these are templatized smart pointers which transparently deal with xpcom reference counting issues. see the nscomptr user's manual for...
Gecko Keypress Event
related handler is defined with <key key="=" modifiers="accel"/>, so that users do not need to use the shift key to access the zoom-in shortcut. of course, this is not much help to users with other keyboard layouts. e.g., on a japanese keyboard, '+' is entered with shift+';' (bug 339723). 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. however, users with the same non-latin keyboard layouts would also like to be able to use latin access keys of en-us
builds (including nightly
builds) without needing to switch keyboard layout (bug 399939). problem 3 users with non-latin keyboard layouts would like to be able to use latin access keys in web pages w...
HTTP Cache
the eviction preparation operation - i.e. clearing of the internal io state - is then put to the end of the open_priority level. all this ha...
How to get a process dump with Windows Task Manager
en. it is advisable to create a new, blank profile to use when reproducing the hang and capturing the memory dump. please ask for help doing this! requirements windows to get a process dump, you need to be using windows vista or above. a firefox nightly or release you need a firefox version for which symbols are available from the mozilla symbol server. you can use any official nightly
build or released version of firefox from mozilla. you can find the latest trunk nightly
builds under http://ftp.mozilla.org/pub/mozilla.o.../latest-trunk/. creating the dump file ensure that firefox is not already running. run firefox, reproduce the hang start firefox and perform whatever steps are necessary to cause firefox to hang. once the browser hangs, continue with the steps below. after t...
How to get a stacktrace for a bug report
e a stacktrace (call stack) in your report. a stacktrace will tell mozilla developers what crashed and provide a starting point for investigating its cause. this article describes how to use the mozilla crash reporter (breakpad) to get a crash id, which our engineers can use to get a stacktrace, and alternative ways to get a stacktrace if you can't get a crash id. requirements you need a binary
build of firefox from mozilla.org. seamonkey and thunderbird also support crash reporting. mozilla's crash report server currently only has debug information for mozilla
builds and thus the crash reporter cannot work if you use a
build from a linux distribution or if you compile from source code. in these cases you will need to use one of the alternative methods listed below. note: when filing a cras...
How to get a stacktrace with WinDbg
eed here. download it from install debugging tools for windows. (you'll want the 32-bit version, even if you are using a 64-bit version of windows) then install it, the standard settings in the installation process are fine. a firefox nightly or release you need a firefox version for which symbols are availables from the mozilla symbol server to use with windbg. you can use any official nightly
build or released version of firefox from mozilla. you can find the latest trunk nightly
builds under http://ftp.mozilla.org/pub/mozilla.o.../latest-trunk/. debugging to begin debugging, ensure that firefox is not already running and open windbg from the start menu. (start->all programs->debugging tools for windows->windbg) next, open the "file" menu and choose "open executable...". in the file choos...
NSS Key Log Format
d above can use these log files to decrypt packets. you can tell wireshark where to find the key file via edit→preferences→protocols→ssl→(pre)-master-secret log filename. key logging is enabled by setting the environment variable sslkeylogfile to point to a file. note: starting with nss 3.24 (used by firefox 48 and 49 only), the sslkeylogfile approach is disabled by default for optimized
builds using the makefile (those using gyp via
build.sh are not affected). distributors can re-enable it at compile time though (using the nss_allow_sslkeylogfile=1 make variable) which is done for the official firefox binaries. (see bug 1188657.) notably, debian does not have this option enabled, see debian bug 842292. this key log file is a series of lines. comment lines begin with a sharp character...
NSS 3.14 release notes
these changes have the observed effect of doubling rsa performance. bug 792681 - new default cipher suites the default cipher suites in nss 3.14 have been changed to better reflect the current security landscape. the defaults now better match the set that most major web browsers enable b...
NSS 3.15.1 release notes
bug 875601 - secmod_closeuserdb/secmod_openuserdb fails to reset the token delay, leading to spurious failures. bug 884072 - fix a typo in the header include guard macro of secmod.h. bug 876352 - certutil now warns if importing a pem file that contains a private key. bug 565296 - fix the bug that shlibsign exited with status 0 even though it failed. the nss_survive_double_bypass_failure
build option is removed. bugs fixed in nss 3.15.1 https://bugzilla.mozilla.org/buglist.cgi?list_id=5689256;resolution=fixed;classification=components;query_format=advanced;target_milestone=3.15.1;product=nss compatibility nss 3.15.1 shared libraries are backward compatible with all older nss 3.x shared libraries. a program linked with older nss 3.x shared libraries will work with nss 3.15.1 shared...
NSS 3.15.4 release notes
#11 mechanisms none. notable changes in nss 3.15.4 reordered the cipher suites offered in ssl/tls client hello messages to match modern best practices. updated the set of root ca certificates (version 1.96). improved ssl/tls false start. in addition to enabling the ssl_enable_false_start option, an application must now register a callback using the ssl_setcanfalsestartcallback function. when
building on windows, os_target now defaults to win95. to use the winnt
build configuration, specify os_target=winnt. bugs fixed in nss 3.15.4 a complete list of all bugs resolved in this release can be obtained at https://bugzilla.mozilla.org/buglist.cgi?resolution=fixed&classification=components&query_format=advanced&target_milestone=3.15.4&product=nss compatibility nss 3.15.4 shared libraries are ba...
NSS 3.15 release notes
able_ocsp_stapling - used with ssl_optionset to configure tls client sockets to request the certificate_status extension (eg: ocsp stapling) when set to pr_true notable changes in nss 3.15 secitem_reallocitem is now deprecated. please consider using secitem_reallocitemv2 in all future code. nss has migrated from cvs to the mercurial source control management system. updated
build instructions are available at migration to hg as part of this migration, the source code directory layout has been re-organized. the list of root ca certificates in the nssckbi module has been updated. the default implementation of ssl_authcertificate has been updated to add certificate status responses stapled by the tls server to the ocsp cache. applications that use...
NSS 3.17 release notes
y is reused for multiple handshakes. this option does not affect the tls client code, which always generates a fresh ephemeral ecdh key for each handshake. new macros in ssl.h ssl_reuse_server_ecdhe_key notable changes in nss 3.17 the manual pages for the certutil and pp tools have been updated to document the new parameters that had been added in nss 3.16.2. on windows, the new
build variable use_static_rtl can be used to specify the static c runtime library should be used. by default the dynamic c runtime library is used. bugs fixed in nss 3.17 this bugzilla query returns all the bugs fixed in nss 3.17: https://bugzilla.mozilla.org/buglist.cgi?resolution=fixed&classification=components&query_format=advanced&product=nss&target_milestone=3.17 ...
NSS 3.19.2.1 release notes
ority of nss uses a separate, unaffected der decoder, several public routines also accept ber data, and thus are affected. an attacker that successfully exploited these issues can overflow the heap and may be able to obtain remote code execution. the following security-relevant bugs have been resolved in nspr 4.10.10, which affect nss. because nss includes portions of the affected nspr code at
build time, it is necessary to use nspr 4.10.10 when
building nss. bug 1205157 (nspr, cve-2015-7183): a logic bug in the handling of large allocations would allow exceptionally large allocations to be reported as successful, without actually allocating the requested memory. this may allow attackers to bypass security checks and obtain control of arbitrary memory. new in nss 3.19.2.1 new functio...
NSS 3.19.4 release notes
ority of nss uses a separate, unaffected der decoder, several public routines also accept ber data, and thus are affected. an attacker that successfully exploited these issues can overflow the heap and may be able to obtain remote code execution. the following security-relevant bugs have been resolved in nspr 4.10.10, which affect nss. because nss includes portions of the affected nspr code at
build time, it is necessary to use nspr 4.10.10 when
building nss. bug 1205157 (nspr, cve-2015-7183): a logic bug in the handling of large allocations would allow exceptionally large allocations to be reported as successful, without actually allocating the requested memory. this may allow attackers to bypass security checks and obtain control of arbitrary memory. new in nss 3.19.4 new functiona...
NSS 3.19 release notes
s was also known as smack. new in nss 3.19 new functionality for some certificates, such as root ca certificates that don't embed any constraints, nss might impose additional constraints such as name constraints. a new api (cert_getimposednameconstraints) has been added that allows one to lookup imposed constraints. it is possible to override the directory (sqlite_lib_dir) in which the nss
build system will look for the sqlite library. new functions in cert.h cert_getimposednameconstraints - check if any imposed constraints exist for the given certificate, and if found, return the constraints as encoded certificate extensions. notable changes in nss 3.19 the ssl 3 protocol has been disabled by default. nss now more strictly validates tls extensions and will fail a ...
NSS 3.20.1 release notes
ority of nss uses a separate, unaffected der decoder, several public routines also accept ber data, and thus are affected. an attacker that successfully exploited these issues can overflow the heap and may be able to obtain remote code execution. the following security-relevant bugs have been resolved in nspr 4.10.10, which affect nss. because nss includes portions of the affected nspr code at
build time, it is necessary to use nspr 4.10.10 when
building nss. bug 1205157 (nspr, cve-2015-7183): a logic bug in the handling of large allocations would allow exceptionally large allocations to be reported as successful, without actually allocating the requested memory. this may allow attackers to bypass security checks and obtain control of arbitrary memory. new in nss 3.20.1 new functiona...
NSS 3.21 release notes
fc 7627) ssl_preinfo_version - used with sslpreliminarychannelinfo to indicate that a tls version has been selected ssl_preinfo_cipher_suite - used with sslpreliminarychannelinfo to indicate that a tls cipher suite has been selected ssl_preinfo_all - used with sslpreliminarychannelinfo to indicate that all preliminary information has been set notable changes in nss 3.21 nss now
builds with elliptic curve ciphers enabled by default (bug 1205688) nss now
builds with warnings as errors (bug 1182667) the following ca certificates were removed cn = verisign class 4 public primary certification authority - g3 sha1 fingerprint: c8:ec:8c:87:92:69:cb:4b:ab:39:e9:8d:7e:57:67:f3:14:95:73:9d cn = utn-userfirst-network applications sha1 fingerprint:...
NSS 3.22 release notes
c with sha-512 truncated to 256 bits for pbkdf (not supported) in secoidt.h nss_use_alg_in_ssl nss_use_policy_in_ssl in ssl.h ssl_enable_signed_cert_timestamps in sslt.h ssl_max_extensions is updated to 13 notable changes in nss 3.22 nss c++ tests are built by default, requiring a c++11 compiler. set the nss_disable_gtests variable to 1 to disable
building these tests. bugs fixed in nss 3.22 this bugzilla query returns all the bugs fixed in nss 3.22: https://bugzilla.mozilla.org/buglist.cgi?resolution=fixed&classification=components&query_format=advanced&product=nss&target_milestone=3.22 compatibility nss 3.22 shared libraries are backward compatible with all older nss 3.x shared libraries. a program linked with older nss 3.x shared librar...
NSS 3.23 release notes
on number that they possibly support. this gives them access to the version downgrade protection from tls 1.3. notable changes in nss 3.23 the copy of sqlite shipped with nss has been updated to version 3.10.2 (bug 1234698) the list of tls extensions sent in the tls handshake has been reordered to increase compatibility of the extended master secret with servers (bug 1243641) the
build time environment variable nss_enable_zlib has been renamed to nss_ssl_enable_zlib (bug 1243872). the
build time environment variable nss_disable_chachapoly was added, which can be used to prevent compilation of the chacha20/poly1305 code. the following ca certificates were removed cn = staat der nederlanden root ca sha-256 fingerprint: d4:1d:82:9e:8c:16:59:82:2a:f9:3f:ce:62:bf:f...
NSS 3.26 release notes
la.org for secure https download: source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/nss_3_26_rtm/src/ new in nss 3.26 new functionality the selfserv test utility has been enhanced to support alpn (http/1.1) and 0-rtt added support for the system-wide crypto policy available on fedora linux, see http://fedoraproject.org/wiki/changes/cryptopolicy introduced
build flag nss_disable_libpkix which allows compilation of nss without the libpkix library notable changes in nss 3.26 the following ca certificate was added cn = isrg root x1 sha-256 fingerprint: 96:bc:ec:06:26:49:76:f3:74:60:77:9a:cf:28:c5:a7:cf:e8:a3:c0:aa:e1:1a:8f:fc:ee:05:c0:bd:df:08:c6 npn is disabled, and alpn is enabled by default the nss test suite now com...
NSS 3.27.1 release notes
ftp.mozilla.org/pub/mozilla.org/security/nss/releases/nss_3_27_1_rtm/src/ new in nss 3.27.1 new functionality no new functionality is introduced in this release. this is a patch release to address a tls compatibility issue which some applications experienced with nss 3.27. notable changes in nss 3.27.1 availability of the tls 1.3 (draft) implementation has been re-disabled in the default
build. previous versions of nss made tls 1.3 (draft) available only when compiled with nss_enable_tls_1_3. nss 3.27 set this value on by default, allowing tls 1.3 (draft) to be disabled using nss_disable_tls_1_3, although the maximum version used by default remained tls 1.2. however, some applications query the list of protocol versions that are supported by the nss library, enabling all supported tl...
NSS 3.27 release notes
ed to tls 1.3 (draft). although the maximum tls version enabled by default is still tls 1.2, there are applications that query the list of tls protocol versions supported by nss, and enable all supported versions. for those applications, updating to nss 3.27 may result in tls 1.3 (draft) to be enabled. the tls 1.3 (draft) protocol can be disabled, by defining symbol nss_disable_tls_1_3 when
building nss. npn can not be enabled anymore. hard limits on the maximum number of tls records encrypted with the same key are enforced. disabled renegotiation in dtls. the following ca certificates were removed cn = igc/a, o = pm/sgdn, ou = dcssi sha256 fingerprint: b9:be:a7:86:0a:96:2e:a3:61:1d:ab:97:ab:6d:a3:e2:1c:10:68:b9:7d:55:57:5e:d0:e1:12:79:c1:1c:89:32 cn =...
NSS 3.35 release notes
is fedora linux project page: https://fedoraproject.org/wiki/changes/nssdefaultfileformatsql added formally verified implementations of non-vectorized chacha20 and non-vectorized poly1305 64-bit. for stronger security, when creating encrypted pkcs#7 or pkcs#12 data, the iteration count for the password based encryption algorithm has been increased to one million iterations. note that debug
builds will use a lower count, for better performance in test environments. as a reminder, debug
builds should not be used for production purposes. nss 3.30 had introduced a regression, preventing nss from reading some aes encrypted data, produced by older versions of nss. nss 3.35 fixes this regression and restores the ability to read affected data. the following ca certificates were removed: ...
NSS 3.36.1 release notes
1 source distributions are available on ftp.mozilla.org for secure https download: source tarballs: https://ftp.mozilla.org/pub/security/nss/releases/nss_3_36_1_rtm/src/ new in nss 3.xx new functionality no new functionality is introduced in this release. this is a patch release to fix regression bugs. notable changes in nss 3.36.1 in nss version 3.35 the iteration count in optimized
builds, which is used for password based encryption algorithm related to encrypted pkcs#7 or pkcs#12 data, was increased to one million iterations. that change had caused an interoperability regression with operating systems that are limited to 600 k iterations. nss 3.36.1 has been changed to use the same 600 k limit. bugs fixed in nss 3.36.1 certain smartcard operations could result in a deadlock...
NSS 3.37.3 release notes
ires nspr 4.19 or newer. nss 3.37.3 source distributions are available on ftp.mozilla.org for secure https download: source tarballs: https://ftp.mozilla.org/pub/security/nss/releases/nss_3_37_3_rtm/src/ new in nss 3.37.3 new functionality no new functionality is introduced in this release. this is a patch release to fix regression bugs. bugs fixed in nss 3.37.3 bug 1459739 - fix
build on armv6/armv7 and other platforms. bug 1461731 - fix crash on macos related to authentication tokens, e.g. pk11or webauthn. compatibility nss 3.37.3 shared libraries are backward compatible with all older nss 3.x shared libraries. a program linked with older nss 3.x shared libraries will work with nss 3.37.3 shared libraries without recompiling or relinking. furthermore, applications ...
NSS 3.40 release notes
https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/nss_3_40_rtm/src/ new in nss 3.40 new functionality the draft-00 version of encrypted sni support is implemented tstclnt now takes -n option to specify encrypted sni key new functions none notable changes in nss 3.40 the mozilla::pkix library has been ported from mozilla psm to nss. this is a c++ library for
building certification paths. mozilla::pkix apis are not exposed in the libraries nss
builds. it is easier to
build nss on windows in mozilla-
build environments. the following ca certificates were removed: cn = visa ecommerce root sha-256 fingerprint: 69fac9bd55fb0ac78d53bbee5cf1d597989fd0aaab20a25151bdf1733ee7d122 bugs fixed in nss 3.40 bug 1478698 - ffdhe key exchang...
NSS 3.43 release notes
08f cn = emsign ecc root ca - c3 sha-256 fingerprint: bc4d809b15189d78db3e1d8cf4f9726a795da1643ca5f1358e1ddb0edc0d7eb3 cn = hongkong 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 - f...
NSS 3.48 release notes
ertfromhandle bug 1591742 - ensure des iv length is valid before usage from pkcs#11 bug 1588567 - enable mozilla::pkix gtests in nss ci bug 1591315 - update nsc_decrypt length in constant time bug 1562671 - increase nss mp kdf default iteration count, by default for modern key4 storage, optionally for legacy key3.db storage bug 1590972 - use -std=c99 rather than -std=gnu99 bug 1590676 - fix
build if arm doesn't support neon bug 1575411 - enable tls extended master secret by default bug 1590970 - ssl_settimefunc has incomplete coverage bug 1590678 - remove -wmaybe-uninitialized warning in tls13esni.c bug 1588244 - nss changes for delegated credential key strength checks bug 1459141 - add more cbc padding tests that missed nss 3.47 bug 1590339 - fix a memory leak in btoa.c bug 158981...
NSS 3.54 release notes
oot certificates. bug 1641718 - remove "luxtrust global root 2" root certificate. bug 1639987 - remove "staat der nederlanden root ca - g2" root certificate. bug 1618402 - remove symantec root certificates and disable email trust bit. bug 1640516 - nss 3.54 should depend on nspr 4.26. bug 1642146 - fix undefined reference to `port_zalloc_stub' in seed.c. bug 1642153 - fix infinite recursion
building nss. bug 1642638 - fix fuzzing assertion crash. bug 1642871 - enable ssl_sendsessionticket after resumption. bug 1643123 - support ssl_exportearlykeyingmaterial with external psks. bug 1643557 - fix numerous compile warnings in nss. bug 1644774 - ssl gtests to use clearservercache when resetting self-encrypt keys. bug 1645479 - don't use secitem_makeitem in secutil.c. bug 1646520 - stri...
nss tech note8
background information on libssl's cache functions and sids nss technical note: 8 27 february 2006 nelson b. bolyard here is some background information on libssl's cache functions and sids. a sid (or sslsessionid struct) contains all the info needed to restart the ssl session at a later time on another socket. the protocol code
builds such a structure, and then asks the cache code (client or server) to save the info. the protocol code can also ask to remove a sid from the cache. every ssl socket has two function pointers, ss->sec.cache and ss->sec.uncache, which have the following types: typedef void (*sslsessionidcachefunc) (sslsessionid *sid); typedef void (*sslsessioniduncachefunc)(sslsessionid *sid); there are two separate implementations of each function, one for clients a...
NSS Third-Party Code
this is a list of third-party code included in the nss repository, broken into two lists: code that can be compiled into the nss libraries, and code that is only used for testing. note that not all code that can be compiled into the nss libraries necessarily is. often this is configurable at
build time, with various trade-offs. compiled in sqlite [/lib/sqlite] berkleydb [/lib/dbm] zlib [/lib/zlib] libjar [/lib/jar] fiat-crypto, ring [lib/freebl/ecl] used for tests gtest [/gtests] downloaded by certain test tooling tlsfuzzer [/tests/tlsfuzzer] bogo tests [/tests/bogo] boringssl, openssl [/tests/interop] ...
Notes on TLS - SSL 3.0 Intolerant Servers
the code. if you have questions concerning netscape browsers and problem servers, please contact us using the feedback address at the top of this page. detecting intolerant servers because newer versions of netscape and mozilla have built-in workaround for the problem servers, it is now unlikely that you will experience this problem. but if you're running netscape 6.0/6.01/6.1 pr 1 or mozilla
build (prior to 6/11/2001), you should look out for the symptom described below. you may also run this test with versions later than the older versions of netscape 6.x or mozilla -- just in case code changes in netscape 6.1/mozilla 0.9.2 or later may not catch all problem servers. when you find a secure site which simply does not display any page content or drops the connection, check to see if the ...
PKCS11 FAQ
your token is read/write and has only one session, nss will open that one initial session read/write. what permanent pkcs #11 objects are used by nss or read from the token? example: rsa private key, ca certificate, user's own certificate, user's name. private keys (rsa and dsa) and the corresponding certificates are read from the token. other certificates on the token are also loaded (to allow
building certificate chains), but it's not necessary to include the full chain, as long as the full chain is available in the regular certificate database. for the sake of completeness, it's also a good idea to expose public key objects. nss falls back to looking for for the existance of public keys to determine if the token may have the corresponding private key while the token is not logged in. how ...
PKCS11 Implement
ss calls c_createobject when loading new private keys and new certificates into a token. typically, nss uses c_createobject for creating a new private key if pkcs #12 is operating or if your writable token doesn't support c_generatekeypair. currently pkcs #12 isn't allowed to import onto a token. the nss also uses c_createobject to create new session keys. the nss sometimes loads raw key data and
builds a key from that. the nss will be doing more and more session key generation on tokens in the future. it's also possible for nss to load a key if the private key that decrypted the key is located on a different slot. for example, if a particular token can't do des encryption, nss decrypts the key, then copies it over to the token that can do des encryption. the nss creates certificates as token o...
Installation guide
our makefiles also have an "install" target, but it has a different meaning: our "install" means installing the headers, libraries, and programs in the appropriate directories under mozilla/dist. so right now you need to manually install the headers, libraries, and programs in the directories you want. if you install the libraries in a directory other than /usr/lib, you usually need to set the ld_library_path environment variable. you can avoid that by installing the libraries in a directory that is $origin/../lib, where $origin is the directory where the programs are installed. ...
Sample manual installation
the nss
build system does not include a target to install header files and shared libraries in the system directories, so this needs to be done manually. after
building nss with "gmake nss_
build_all", the resulting
build can be found in the nss source tree as follows: nss header files: mozilla/dist/public/nss nspr header files: mozilla/dist/<obj-dir>/include nspr/nss shared libs: mozilla/dist/<obj-dir>/lib nss binary executables: mozilla/dist/<obj-dir>/bin. where <obj-dir> would vary according to the type of
build and the platform. for example, <obj-dir> for a debug
build of nss on the x86 platform with a linux kernel version 2.6 with glibc would be: linux2.6_x86_glibc_pth_dbg.obj from these directories, you can copy the files to any system (or other) directory. if the destinati...
NSS reference
ormat described in the mdn style guide. if you are inclined to help with this migration, your help would be very much appreciated. the proposed chapters below are based on the chapters of the ssl reference and the categories of functions in nss public functions. should a particular page require the use of an underscore, please see the documentation for the title override extension.
building and installing nss overview of an nss application based on "overview of an ssl application" in the ssl reference. getting started with nss based on "getting started with ssl" in the ssl reference. data types based on "selected ssl types and structures" in the ssl reference. nss initialization and shutdown nss_init nss_initreadwrite nss_nodb_init nss_initialize nss_shutdown util...
OLD SSL Reference
he sslsamples directory. ssl, pkcs #11, and the default security databases setting up the certificate and key databases setting up the ca db and certificate setting up the server db and certificate setting up the client db and certificate verifying the server and client certificates
building nss programs chapter 3 selected ssl types and structures this chapter describes some of the most important types and structures used with the functions described in the rest of this document, and how to manage the memory used for them. additional types are described with the functions that use them or in the header files. types and structures ...
NSS Tools
st, debug, and manage applications that use nss. the tools information table below describes both the tools that are currently working and those that are still under development. the links for each tool take you to the source code, documentation, plans, and related links for each tool. the links will become active when information is available. currently, you must download the nss 3.1 source and
build it to create binary files for the nss tools. for information about downloading the nss source, see https://developer.mozilla.org/nss/
building. if you have feedback or questions, please feel free to post to mozilla.dev.tech.crypto. this newsgroup is the preferred forum for all questions about nss and nss tools. overall objectives provide a tool for analyzing and repairing certificate databas...
NSS Tools modutil
, certificate, and pkcs #11 module management process generally begins with creating the keys and key database necessary to generate and manage certificates and the certificate database. this document discusses security module database management. for information on certificate database and key database management, see using the certificate database tool. availability this tool is known to
build on solaris 2.5.1 (sunos 5.5.1) and windows nt 4.0. syntax to run the security module database tool, type the command modutil option [arguments] where option and arguments are combinations of the options and arguments listed in the following section. each command takes one option. each option may take zero or more arguments. to see a usage string, issue the command without options. op...
NSS Tools ssltap
using the ssl debugging tool (ssltap) newsgroup: mozilla.dev.tech.crypto the ssl debugging tool is an ssl-aware command-line proxy. it watches tcp connections and displays the data going by. if a connection is ssl, the data display includes interpreted ssl records and handshaking. availability this tool is known to
build on solaris 2.5.1 (sunos 5.5.1) and windows nt 4.0. description the ssltap command opens a socket on a rendezvous port and waits for an incoming connection from the client side. once this connection arrives, the tool makes another connection to the specified host name and port on the server side. it passes any data sent by the client to the server and vice versa. the tool also displays the data to the shell window from which it was called. it can do this f...
Necko FAQ
everything you wanted to know about the networking library in mozilla... and did ask. what is necko? a word rhyming with gecko and starting with the same letters as networking. that's all! any resemblance in flavor to the necco candy is purely coincidental. what do i need to
build this library? see the code section on the main page. currently you'd need to get the mozilla tree and at least
build nspr, and xpcom. todo put links! how does psm fit into this picture? todo how does the proxy support work? todo what about proxy auto config? todo what about socks support? todo when is the next stable release of this library going to be available? todo i'd like to use this library for my project. what licences apply? todo - mpl what do the page load options mean in the...
Necko
is a network library that provides a platform-independent api for several layers of networking, ranging from transport to presentation layers. this api is used in many mozilla-based client applications (including firefox) and can be used for writing other networking clients. currently the library is built as part of the mozilla distribution. you can get the whole distribution as described in the
build documentation. eventually we'd like to move to a binary distribution mechanism for the networking library so that you can
build your application that uses this library without having to
build mozilla. browse our code in its latest state at netwerk/ documents a necko code walkthrough necko architecture necko multithreading necko faq necko interfaces overview the necko http module proxie...
Rhino and BSF
is bsf? the bean scripting framework (or bsf) was originally developed by ibm and now published as open source as a project at the apache software foundation. it provides a framework for using a number of scripting languages with java. rhino is one of the supported languages. this framework has been embedded in a number of open source projects, including the xsl processor xalan and the xml/java
build tool ant. see xalan-java extensions for more information on adding javascript to xsl and the description of the optional script task in the apache ant manual for using scripting in ant
build files. using bsf with rhino now that the apache jakarta bean scripting framework (bsf), version 2.4.0, has been officially released, you can use rhino easily with bsf. see http://commons.apache.org/proper/c...
Rhino documentation
use scopes and contexts for the best performance and flexibility, with an eye toward multithreaded environments. serialization how to serialize javascript objects and functions in rhino. runtime a brief description of the javascript runtime. small footprint hints for those interested in small-footprint embeddings. examples a set of examples showing how to control the javascript engine and
build javascript host objects. using rhino with bean scripting framework (bsf) how to use rhino with apps that support bsf (bean scripting framework) from the apache jakarta project. external references scripting languages for java (link broken? try this at http://archive.is/ssvxq ) an article comparing and contrasting rhino and jython. rhino contributors interested in contributing to rhino...
Download Rhino
available under mpl 2.0. previous versions were released under mpl 1.1/gpl 2.0 license. see rhino license for further information. source in addition to getting the source from the zip files above, the source code for rhino can be found in github at https://github.com/mozilla/rhino. to get the source, use the command git clone https://github.com/mozilla/rhino.git rhino uses gradle as its
build system. running the ./gradlew tasks command at the top directory of the rhino distribution will print the list of available
build targets. ...
Shumway
eveloper tool but it is something that content creators should test against (and report bugs or performance issues to). for even more information, please refer to the external links. the whats and whys of shumway shumway is a renderer for adobe flash built entirely in web standards (javascript, webgl, and others). it is currently available as an extension and as a component in firefox's nightly
builds that can be enabled through about:config (you need to find the shumway.disabled preference and set it to false). it is expected to be included in firefox at some point to allow plugin-free compatibility with swf-based games and animations. shumway has certain limitations compared to adobe flash player especially when unavoidable patents (such as those surrounding flash drm) get in the way. some ...
Future directions
se, the idea of the future is always evolving in time as things change and we learn more. concurrent and wasm gc we are working towards a concurrent collector. we would also like to allow webassembly to interact with gc-managed data. parallelism most machines that run spidermonkey have multiple cores, so parallelism is almost certainly part of our future. it will take some experimentation to
build the right set of parallel facilities. during that experimentation, we must take care to apply parallelism with conceptual clarity and discipline. the api the spidermonkey api is c++. for the near future, we do not intend to provide a stable api, because too many things are changing. also, we will someday want a more modern c++ api. going forward from now, the api will likely be semi-stable, bu...
SpiderMonkey Internals: Thread Safety
be used by only one thread at a time. a single jscontext can run work with code and objects in multiple compartments as long as no other thread is accessing those compartments. objects may be shared among jscontexts within a jscompartment. there's no fixed association between an object and a context. thread-safety in spidermonkey is turned on by compiling with -djs_threadsafe. in a js_threadsafe
build, these operations are handled specially: access to jsruntime data structures garbage collection accesses to jsruntime data structures are serialized with a few mutexes. the treatment of gc requires more explanation. making gc thread-safe with js_threadsafe, the api changes slightly. the program must group jsapi calls into "requests": js_setcontextthread(cx); js_beginrequest(cx); /* .
JS::Add*Root
const char *name); bool js::addnamedobjectroot(jscontext *cx, js::heap<jsobject *> *rp, const char *name); bool js::addnamedscriptroot(jscontext *cx, js::heap<jsscript *> *rp, const char *name); name type description cx jscontext * the context in which to add the new root. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. rt jsruntime * the runtime in which to add the new root. vp js::heap<js::value> the address of the js::value variable to root. rp js::heap<jsstring *> the address of the jsstring * variable to root. rp js::heap<jsobject *> the address of the jsobject * variable to root. rp j...
JS::GetSelfHostedFunction
rmonkey 31 create a new javascript function that is implemented in self-hosted javascript. syntax jsfunction* js::getselfhostedfunction(jscontext* cx, const char* selfhostedname, js::handle<jsid> id, unsigned nargs); name type description cx jscontext* the context from which to get the function. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. selfhostedname const char* function name in the self-hosted javascript. id js::handle<jsid> a pointer to jsid of the name to assign to the new function. nargs unsigned number of arguments the function expects. description js::getselfhostedfunction creates a new javascript function implem...
JS::OrdinaryToPrimitive
rticle covers features introduced in spidermonkey 38 convert an ordinary object to a primitive value. syntax bool js::ordinarytoprimitive(jscontext *cx, js::handleobject obj, jstype type, js::mutablehandlevalue vp); name type description cx jscontext * the context in which to perform the conversion. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. obj js::handleobject the object to convert. type jstype the type of converted value. vp js::mutablehandlevalue out parameter. on success, *vp receives the converted value. description js::ordinarytoprimitive converts a javascript object to a specified type value, by the algorithm specified in ...
JS::PropertySpecNameToPermanentId
this article covers features introduced in spidermonkey 38 create a jsid that does not need to be marked for gc. syntax bool js::propertyspecnametopermanentid(jscontext *cx, const char *name, jsid *idp); name type description cx jscontext * pointer to a js context from which to derive runtime information. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. name const char * jspropertyspec::name or jsfunctionspec::name. idp jsid * out parameter. receives the created id. description js::propertyspecnametopermanentid creates a jsid that does not need to be marked for gc from jspropertyspec::name or jsfunctionspec::name. the resulting jsid, on success, is either an interned s...
JS::ProtoKeyToId
this article covers features introduced in spidermonkey 38 convert a jsprotokey to js id. syntax void js::protokeytoid(jscontext *cx, jsprotokey key, js::mutablehandleid idp); name type description cx jscontext * pointer to a js context from which to derive runtime information. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. key jsprotokey the prototype key to convert. vp js::mutablehandleid out parameter. *idp receives the converted id. description js::protokeytoid converts a specified js prototype key key, to a js id. js::protokeytoid stores a jsid to *idp. see also mxr id search for js::protokeytoid js_idtoprotokey bug 987669 ...
JS::Remove*Root
uerootrt(jsruntime *rt, js::heap<js::value> *vp); void removestringrootrt(jsruntime *rt, js::heap<jsstring *> *rp); void removeobjectrootrt(jsruntime *rt, js::heap<jsobject *> *rp); void removescriptrootrt(jsruntime *rt, js::heap<jsscript *> *rp); name type description cx jscontext * the context from which to remove the root. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. rt jsruntime * the runtime from which to remove the root. vp js::heap<js::value> address of the js::value variable to remove from the root set. this must have been passed to one of js::addvalueroot, js::addnamedvalueroot or js::addnamedvaluerootrt. rp js::heap<jsstring *> address of the jsstring * var...
JS::Rooted
this article covers features introduced in spidermonkey 17 local variable of type t whose value is always rooted. syntax js::rooted<t> var(cx); js::rooted<t> var(cx, initial); js::rooted<t> var(rt); js::rooted<t> var(rt, initial); name type description cx jscontext * the context in which to add the root. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. rt jsruntime * the runtime in which to add the root. initial t an initial value for the rooted variable. methods here, ptr represents the private member of js::rooted<t>, typed with t. method description t &get() returns ptr. const t &get() const operator const t&() const ...
JS::ToInt32
this article covers features introduced in spidermonkey 17 convert any javascript value to a signed 32bit integer. syntax bool js::toint32(jscontext *cx, js::handlevalue v, int32_t *out); name type description cx jscontext * the context in which to perform the conversion. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. v js::handlevalue the value to convert. out int32_t * out parameter. on success, *out receives the converted floating-point value. description js::toint32 converts a javascript value to a signed 32bit integer. it implements the toint32 operator described in ecma 262-3 §9.5. on success, js::toint32 stores the converted value in *out and returns true. o...
JS::ToInt64
this article covers features introduced in spidermonkey 17 convert any javascript value to a signed 64bit integer. syntax bool js::toint64(jscontext *cx, js::handlevalue v, int64_t *out); name type description cx jscontext * the context in which to perform the conversion. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. v js::handlevalue the value to convert. out int64_t * out parameter. on success, *out receives the converted floating-point value. description js::toint64 converts a javascript value to a signed 64bit integer. on success, js::toint64 stores the converted value in *out and returns true. on error or exception, it returns false, and the value left in *out...
JS::ToPrimitive
introduced in spidermonkey 45 converts a javascript object to a primitive value, using the semantics of toprimitive. syntax bool js::toprimitive(jscontext *cx, js::handleobject obj, jstype hint, js::mutablehandlevalue vp); name type description cx jscontext * the context in which to perform the conversion. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. obj js::handleobject the object to convert. hint jstype the hint to pass to the toprimitive and @@toprimitive method when converting the object. hint must be jstype_string or jstype_number to pass the corresponding type as a hint, or jstype_void to pass no hint. do not pass any other type. vp js::mutable...
JS::ToString
is article covers features introduced in spidermonkey 31 convert any javascript value to a string. syntax #include "js/conversions.h" // as of spidermonkey 38; previously in jsapi.h jsstring* js::tostring(jscontext *cx, js::handlevalue v) name type description cx jscontext * the context in which to perform the conversion. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. v js::handlevalue the value to convert. description js::tostring returns a string representation of a javascript value. if v.isstring() is true, it calls v.tostring(). otherwise, it converts the value to string. on success, js::tostring returns a jsstring instance. on error or exception, it returns nullptr. see also ...
JS::ToUint16
this article covers features introduced in spidermonkey 17 convert any javascript value to an unsigned 16bit integer. syntax bool js::touint16(jscontext *cx, js::handlevalue v, uint16_t *out); name type description cx jscontext * the context in which to perform the conversion. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. v js::handlevalue the value to convert. out uint16_t * out parameter. on success, *out receives the converted floating-point value. description js::toint16 converts a javascript value to an unsigned 16bit integer. it implements the toint16 operator described in ecma 262-3 §9.7. on success, js::toint16 stores the converted value in *out and return...
JS::ToUint32
this article covers features introduced in spidermonkey 17 convert any javascript value to an unsigned 32bit integer. syntax bool js::touint32(jscontext *cx, js::handlevalue v, int32_t *out); name type description cx jscontext * the context in which to perform the conversion. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. v js::handlevalue the value to convert. out int32_t * out parameter. on success, *out receives the converted floating-point value. description js::touint32 converts a javascript value to an unsigned 32bit integer. it implements the touint32 operator described in ecma 262-3 §9.5. on success, js::touint32 stores the converted value in *out and retur...
JS::ToUint64
this article covers features introduced in spidermonkey 17 convert any javascript value to an unsigned 64bit integer. syntax bool js::touint64(jscontext *cx, js::handlevalue v, uint64_t *out); name type description cx jscontext * the context in which to perform the conversion. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. v js::handlevalue the value to convert. out uint64_t * out parameter. on success, *out receives the converted floating-point value. description js::toint64 converts a javascript value to an unsigned 64bit integer. on success, js::toint64 stores the converted value in *out and returns true. on error or exception, it returns false, and the value lef...
JS::Value
en val.isnull(). the now-deprecated jsval methods allowed jsval_to_object(val) when jsval_is_null(val), but this was a source of constant bugs. val.toobject() is only permitted when val.isobject(). an assertion is thrown in the case that the type is not correct (val.isx() is called for each val.tox(), where x is the type). it is highly recommended that you develop and test with an --enable-debug
build to detect most js::value misuse. debug
builds will assert correct jsapi use in many other instances as well. js::value is subject to garbage collection a js::value can refer to a string or object located in spidermonkey's garbage-collected heap. the garbage collector is designed to automatically free unreachable memory. it is rather eager about its job. it's like a robot that goes around picki...
JSAutoByteString
this article covers features introduced in spidermonkey 17 take ownership of a string and free it later. syntax jsautobytestring str; jsautobytestring(jscontext *cx, jsstring *str); name type description cx jscontext * the context in which to add the root. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. str jsstring * a pointer to jsstring to get initial content by calling js_encodestring(cx, str). methods method description void initbytes(char *bytes) take ownership of the given byte array. char *encodelatin1(jscontext *cx, jsstring *str) call js_encodestring and take ownership of the returned string, and return the string. char *encode...
JSDeletePropertyOp
ticle covers features introduced in spidermonkey 24 the type of the jsclass.delproperty. syntax typedef bool (* jsdeletepropertyop)(jscontext *cx, js::handleobject obj, js::handleid id, bool *succeeded); name type description cx jscontext * the context in which the property access is taking place. provides request. in js_threadsafe
builds, the javascript engine calls this callback only from within an active request on cx. the callback does not need to call js_beginrequest()). obj js::handleobject the object whose properties are being deleted. id js::handleid the name or index of the property being deleted. this is either a string (unicode property identifier) or an integer (element index). ...
JSFastNative
ive. the term "native" here refers to c/c++ code as opposed to javascript code. added in spidermonkey 1.8.1 jsfastnative has been renamed to jsnative. syntax typedef jsbool (*jsfastnative)(jscontext *cx, unsigned int argc, jsval *vp); name type description cx jscontext * the context in which the fast native is being called. provides request. in js_threadsafe
builds, the javascript engine calls this callback only from within an active request on cx. the callback does not need to call js_beginrequest()). argc unsigned int the number of arguments supplied to the function by the caller (as opposed to, say, the number of arguments the function is specified to take in its jsfunctionspec). vp jsval * the arguments, including the thi...
JSID_IS_STRING
ol jsid_is_string(jsid id); jsstring * jsid_to_string(jsid id); jsid interned_string_to_jsid(jscontext *cx, jsstring *str); // added in spidermonkey 38 jsflatstring * jsid_to_flat_string(jsid id); // added in spidermonkey 17 name type description cx jscontext * pointer to a js context from which to derive runtime information. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. id jsid the property identifier to test or convert. str jsstring * an interned string to convert to an id. description jsid_is_string tests whether a specified js id, id, is a string, and returns true if it's a string. jsid_to_string converts a specified js id, id to a jsstring *. interned_string_to_jsid c...
JSNative
ented as jsnative callbacks provided by the application, written in c/c++ code. the term "native" here refers to c/c++ code as opposed to javascript code. syntax typedef bool (* jsnative)(jscontext *cx, unsigned argc, js::value *vp); name type description cx jscontext * the context in which the native function is being called. provides request. in js_threadsafe
builds, the javascript engine calls this callback only from within an active request on cx. the callback does not need to call js_beginrequest()). argc unsigned the number of arguments supplied to the function by the caller (as opposed to, say, the number of arguments the function is specified to take in its jsfunctionspec). vp js::value * the arguments, the this argument...
JSObjectOps.defaultValue
ck to implement customized [[defaultvalue]] behavior. the jsclass.convert callback should convert obj to the given type, returning js_true with the resulting value in *vp on success, and returning js_false on error or exception. on success, *vp must be a primitive value: per es5 §8.12.8, every object "must ensure that its [[defaultvalue]] internal method can return only primitive values." debug
builds of spidermonkey will assert if a convert callback is successful but leaves *vp holding a primitive value. js_convertstub implements the default behavior for the jsclass.convert hook, which is to call obj.valueof() and obj.tostring() in accordance with the algorithm in es5 §8.12.8. ...
JS_AddExternalStringFinalizer
s memory is about to be freed. description add a finalizer for external strings created by js_newexternalstring using a type-code returned from this function, and that understands how to free or release the memory pointed at by js_getstringchars(str). returns a nonnegative type index if there is room for finalizer in the global gc finalizers table, else returns -1. in a js_threadsafe
build, this function must be invoked on the primordial thread only, at startup—or else the entire program must single-thread itself while loading a module that calls this function. to remove an external string finalizer, use js_removeexternalstringfinalizer. see also js_removeexternalstringfinalizer bug 724810 ...
JS_Add*Root
const char *name); jsbool js_addnamedstringroot(jscontext *cx, jsstring **spp, const char *name); jsbool js_addnamedobjectroot(jscontext *cx, jsobject **opp, const char *name); jsbool js_addnamedgcthingroot(jscontext *cx, void **rp, const char *name); name type description cx jscontext * the context in which to add the new root. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. vp jsval * (in js_addvalueroot and js_addnamedvalueroot) the address of the jsval variable to root spp jsstring ** (in js_addstringroot and js_addnamedstringroot) the address of the jsstring* variable to root opp jsobject ** (in js_addobjectroot and js_addnamedobjectroot) the address of the jsobject* ...
JS_AliasElement
scouraged since it could be removed at any time. try to avoid using it. create an aliased index entry for an existing numeric property of a native object. syntax jsbool js_aliaselement(jscontext *cx, jsobject *obj, const char *name, jsint alias); name type description cx jscontext * the context in which to create the alias. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. obj jsobject * the object for which to create the alias. name const char * name of the element for which to create an alias. this name corresponds to a string representation of the element's current index number. alias jsint alias number to assign to the element. description js_aliaselement assi...
JS_AliasProperty
ts use is discouraged since it could be removed at any time. try to avoid using it. create an alias for a native property. syntax jsbool js_aliasproperty(jscontext *cx, jsobject *obj, const char *name, const char *alias); name type description cx jscontext * pointer to a js context from which to derive runtime information. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. obj jsobject * object for which to create the alias. name const char * name of the property for which to create an alias. alias const char * alias name to assign to the property. description js_aliasproperty assigns an alternate name for a property associated with a native object. obj is the obj...
JS_AlreadyHasOwnProperty
yhasownpropertybyid(jscontext *cx, js::handleobject obj, js::handleid id, bool *foundp); // added in spidermonkey 1.8.1 boo js_alreadyhasownelement(jscontext *cx, js::handleobject obj, uint32_t index, bool *foundp); name type description cx jscontext * pointer to a js context. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. obj jsobject * the object to be searched. name or id const char * or const char16_t *or js::handleid (in js_alreadyhasownproperty, alreadyhasownucproperty, and js_alreadyhasownpropertybyid) the name of the property to search for. namelen size_t (in js_alreadyhasownucproperty only) the length of name, ...
JS_BindCallable
atures introduced in spidermonkey 17 bind the given callable to use the given object as this. syntax jsobject* js_bindcallable(jscontext *cx, js::handle<jsobject*> callable, js::handle<jsobject*> newthis); name type description cx jscontext * pointer to a js context from which to derive runtime information. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. callable js::handle<jsobject*> pointer to the function object to bind new this. newthis js::handle<jsobject*> pointer to the new this value for callable. description js_bindcallable binds the given callable to use the given object as this. if callable is not callable, will throw and return nullp...
JS_BufferIsCompilableUnit
determine whether a buffer is compilable unit. syntax bool js_bufferiscompilableunit(jscontext *cx, js::handle<jsobject*> obj, const char *utf8, size_t length); name type description cx jscontext * pointer to a js context from which to derive runtime information. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. obj js::handleobject the global object, or null. utf8 const char * string containing the script to compile. length size_t the length of utf8 in characters. description given a buffer, return false if the buffer might become a valid javascript statement with the addition of more lines. otherwise return true. the intent is t...
JS_CStringsAreUTF8
in spidermonkey 1.8 description by default, all c/c++ strings passed into the jsapi are treated as iso/iec 8859-1, also known as iso-latin-1. that is, each byte is treated as a unicode character, and there is no way to pass in a string containing characters beyond u+00ff. however, spidermonkey can optionally interpret these strings as utf-8. there are two ways to enable this: at compile time, by
building spidermonkey with js_c_strings_are_utf8 defined; or at run time, by calling js_setcstringsareutf8 before the first call to js_newruntime. enabling this option also causes js_getstringbytes and js_encodecharacters to produce utf-8 strings instead of latin-1. js_cstringsareutf8 returns js_true if the javascript engine is configured (either at compile time or at run time) to interpret char string...
JS_CallFunction
jsobject *obj, const char *name, unsigned argc, jsval *argv, jsval *rval); bool js_callfunctionvalue(jscontext *cx, jsobject *obj, jsval fval, unsigned argc, jsval *argv, jsval *rval); name type description cx jscontext * pointer to a js context from which to derive runtime information. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. obj js::handleobject the "current" object on which the function operates; the object specified here is "this" when the function executes. fun js::handlefunction pointer to the function to call. fun should be a native function or jsapi-compiled function. see below. name const char * pointer to the name...
JS_CheckAccess
d be removed at any time. try to avoid using it. check whether a running script may access a given object property. syntax jsbool js_checkaccess(jscontext *cx, jsobject *obj, jsid id, jsaccessmode mode, jsval *vp, unsigned int *attrsp); name type description cx jscontext * the context in which to perform the access check. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. obj jsobject * the object that has the property being accessed. id jsid the name or index of the property being accessed. mode jsaccessmode the type of access requested (read, write, etc.) vp jsval * out parameter. on success, *vp receives the property's stored value. attrsp ...
JS_ClearContextThread
eturns the thread id of the last thread to be associated with this context. (this is always the current thread id when the function is used properly.) js_newcontext automatically associates the new context with the calling thread. use js_getcontextthread to determine whether a context is associated with a thread. js_setcontextthread and js_clearcontextthread are available only in js_threadsafe
builds. mxr id search for js_setcontextthread mxr id search for js_clearcontextthread ...
JS_ClearDateCaches
this article covers features introduced in spidermonkey 17 clear the cache of calculated local time from each date object. syntax void js_cleardatecaches(jscontext *cx); name type description cx jscontext * pointer to a javascript context from which to derive runtime information. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. description js_cleardatecaches clears the cache of calculated local time from each date object. call to propagate a system timezone change. see also mxr id search for js_cleardatecaches js_newdateobject js_newdateobjectmsec js_objectisdate bug 285615 replaced by js::resettimezone ...
JS_ClearNonGlobalObject
uraged since it could be removed at any time. try to avoid using it. this article covers features introduced in spidermonkey 24 remove all properties associated with an object. syntax void js_clearnonglobalobject(jscontext *cx, jsobject *obj); name type description cx jscontext * the context in which to clear the object. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. obj jsobject * object from which to delete all properties. description js_clearnonglobalobject removes all of obj's own properties, except the special __proto__ and __parent__ properties, in a single operation. properties belonging to objects on obj's prototype chain are not affected. to remove a single property from an obje...
JS_ClearScope
e is obsolete. although it may still work in some browsers, its use is discouraged since it could be removed at any time. try to avoid using it. remove all properties associated with an object. syntax void js_clearscope(jscontext *cx, jsobject *obj); name type description cx jscontext * the context in which to clear the object. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. obj jsobject * object from which to delete all properties. description js_clearscope removes all of obj's own properties, except the special __proto__ and __parent__ properties, in a single operation. properties belonging to objects on obj's prototype chain are not affected. to remove a single property from an object, use js...
JS_CloneFunctionObject
s discouraged since it could be removed at any time. try to avoid using it. create a new function object from an existing jsfunction. syntax jsobject * js_clonefunctionobject(jscontext *cx, jsobject *funobj, jsobject *parent); name type description cx jscontext * pointer to a js context from which to derive runtime information. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. funobj jsobject * the function to clone. parent jsobject * the new function's parent. description js_clonefunctionobject creates a new function object from funobj. the new object has the same code and argument list as funobj, but uses parent as its enclosing scope. this can be helpful if funobj is an extant fu...
JS_CompileFileHandleForPrincipals
this article covers features introduced in spidermonkey 1.8.5 please provide a description of this function. syntax jsobject * js_compilefilehandleforprincipals(jscontext *cx, jsobject *obj, const char *filename, file *fh, jsprincipals *principals); name type description cx jscontext * the context. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. obj jsobject * filename const char fh file * principals jsprincipals * description please provide a description. see also js_compilefilehandleforprincipalsversion ...
JS_CompileFileHandleForPrincipalsVersion
article covers features introduced in spidermonkey 1.8.5 please provide a description for this function. syntax jsobject * js_compilefilehandleforprincipalsversion(jscontext *cx, jsobject *obj, const char *filename, file *fh, jsprincipals *principals, jsversion version); name type description cx jscontext * the context. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. obj jsobject * filename const char fh file * principals jsprincipals * version jsversion description please provide a description. see also js_compilefilehandleforprincipals ...
JS_CompileFunction
ame, unsigned int lineno); jsfunction * js_compileucfunction(jscontext *cx, jsobject *obj, const char *name, unsigned int nargs, const char **argnames, const jschar *body, size_t length, const char *filename, unsigned int lineno); name type description cx jscontext * the context in which to compile the function. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. obj jsobject * object with which the function is associated. name const char * name to assign the newly compiled function. nargs unsigned int number of arguments to pass to the function. argnames const char ** names to assign to the arguments passed to the function. body con...
JS_CompileFunctionForPrincipals
ion * js_compileucfunctionforprincipals(jscontext *cx, jsobject *obj, jsprincipals *principals, const char *name, unsigned int nargs, const char **argnames, const jschar *body, size_t length, const char *filename, unsigned int lineno); name type description cx jscontext * the context in which to compile the function. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. obj jsobject * object with which the function is to be associated. principals jsprincipals * pointer to the structure holding the security information for this function. name const char * name to assign the newly compiled function. nargs unsigned int number of arguments to pass to the f...
JS_CompileScript
); bool js_compileucscript(jscontext *cx, js::handleobject obj, const char16_t *chars, size_t length, const js::compileoptions &options, js::mutablehandlescript script); name type description cx jscontext * pointer to a js context from which to derive runtime information. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. obj js::handleobject the global object, or null. if the jsoption_compile_n_go option is set in cx, the resulting script must be executed in this scope, and at most once. obsolete since jsapi 39 ascii or chars const char * or const char16_t * string containing the script to compile. length size_t the l...
JS_CompileScriptForPrincipals
jsapi 19 jsobject * js_compileucscriptforprincipalsversion(jscontext *cx, jsobject *obj, jsprincipals *principals, const jschar *src, size_t length, const char *filename, unsigned int lineno, jsversion version); // obsoleted since jsapi 19 name type description cx jscontext * the context in which to compile the script. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. obj jsobject * object with which the script is associated. principals jsprincipals * pointer to the structure holding the security information for this script. src const char * or const jschar * string containing the script to compile. length size_t the length of src, in characters. ...
JS_CompileUCFunctionForPrincipalsVersion
sfunction * js_compileucfunctionforprincipalsversion(jscontext *cx, jsobject *obj, jsprincipals *principals, const char *name, unsigned int nargs, const char **argnames, const jschar *chars, size_t length, const char *filename, unsigned int lineno, jsversion version); name type description cx jscontext * the context. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. obj jsobject * principals jsprincipals * name const char * nargs unsigned int argnames const char ** chars const jschar * length size_t filename const char * lineno unsigned int versio...
JS_CompileUTF8File
some browsers, its use is discouraged since it could be removed at any time. try to avoid using it. compile a script, reading the source code from a file. syntax jsobject * js_compileutf8file(jscontext *cx, jsobject *obj, const char *filename); name type description cx jscontext * the context in which to compile the script. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. obj jsobject * object with which the script is associated. filename const char * name of file containing the script to compile. description js_compileutf8file compiles the text of script in an external file location for execution by the js engine. filename is the name of the file containing the script to com...
JS_CompileUTF8FileHandle
t * js_compileutf8filehandle(jscontext *cx, jsobject *obj, const char *filename, file *file); jsobject * js_compileutf8filehandleforprincipals( jscontext *cx, jsobject *obj, const char *filename, file *file, jsprincipals *principals); name type description cx jscontext * the context in which to compile the script. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. obj jsobject * object with which the script is associated. filename const char * filename to associate with the compiled script. this filename is used for error messages. it should be the name of the file that contains the script, if available. file file * the file handle containing the script to comp...
JS_ConstructObject
sobject * js_constructobject(jscontext *cx, jsclass *clasp, jsobject *proto, jsobject *parent); jsobject * js_constructobjectwitharguments(jscontext *cx, jsclass *clasp, jsobject *proto, jsobject *parent, unsigned int argc, jsval *argv); name type description cx jscontext * the context in which to create the new object. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. clasp jsclass * pointer to the class to use for the new object. if this is null, an ordinary javascript object is created. proto jsobject * the object to serve as the new object's prototype, or null. parent jsobject * the object to serve as the new object's parent, or null. argc unsigned i...
JS_ConvertArguments
js_convertarguments(jscontext *cx, unsigned argc, jsval *argv, const char *format, ...); // obsolete since jsapi 30 name type description cx jscontext * the context in which to perform any necessary conversions. cx also affects the interpretation of format, if js_addargumentformatter has been called. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. args const js::callargs & reference to the arguments to convert. added in spidermonkey 31 argc unsigned the number of arguments to convert. obsolete since jsapi 30 argv jsval * pointer to the vector of arguments to convert. obsolete since jsapi 30 this must be an argv pointer cr...
JS_ConvertArgumentsVA
ntsva(jscontext *cx, const js::callargs &args, const char *format, va_list ap); bool js_convertargumentsva(jscontext *cx, unsigned argc, jsval *argv, const char *format, va_list ap); name type description cx jscontext * pointer to a js context from which to derive runtime information. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. args const js::callargs & reference to the arguments to convert. added in spidermonkey 31 argc unsigned the number of arguments to convert. obsolete since jsapi 30 argv jsval * pointer to the vector of arguments to convert. obsolete since jsapi 30 format const char * charac...
JS_ConvertValue
raged since it could be removed at any time. try to avoid using it. converts a javascript value to a value of a specific javascript type. syntax bool js_convertvalue(jscontext *cx, js::handlevalue v, jstype type, js::mutablehandlevalue vp); name type description cx jscontext * the context in which to perform the conversion. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. v js::handlevalue the value to convert. type jstype the type to which the value is to be converted. type must be one of jstype_void, jstype_object, jstype_function, jstype_string, jstype_number, or jstype_boolean. otherwise js_convertvalue reports an error. vp js::mutablehandlevalue out parameter. on ...
JS_DecompileFunction
generates the complete source code of a function declaration from a compiled function. syntax jsstring * js_decompilefunction(jscontext *cx, js::handle<jsfunction*> fun); name type description cx jscontext * pointer to a js context from which to derive runtime information. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. fun js::handle<jsfunction*> function to decompile. description js_decompilefunction generates the complete source code of a function declaration from a function's compiled form, fun. if successful, js_decompilefunction returns a string containing the text of the function. otherwise, it returns null. if you decompile a function that does not make a native c call, the...
JS_DecompileFunctionBody
generate the source code representing the body of a function, minus the function keyword, name, parameters, and braces. syntax jsstring * js_decompilefunctionbody(jscontext *cx, js::handle<jsfunction*> fun, unsigned indent); name type description cx jscontext * the context in which to decompile the function. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. fun js::handle<jsfunction*> the function to decompile. indent unsigned if it's not js_dont_pretty_print, js_decompilefunction returns pretty printed source code of the function. description js_decompilefunctionbody generates the source code of a function's body, minus the function keyword, name, parameters, and braces, fro...
JS_DecompileScript
script js::handle<jsscript*> script or function to decompile. description js_decompilescript returns the source code of script. ...
JS_DecompileScriptObject
this article covers features introduced in spidermonkey 1.8.5 fixme: please provide a description for this function. syntax jsstring * js_decompilescriptobject(jscontext *cx, jsobject *scriptobj, const char *name, unsigned int indent); name type description cx jscontext * the context. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. scriptobj jsobject * name const char * indent unsigned int description fixme: please provide a description. see also fixme: ...
JS_DeepFreezeObject
this article covers features introduced in spidermonkey 1.8.5 freeze obj, and all objects it refers to, recursively. syntax bool js_deepfreezeobject(jscontext *cx, js::handle<jsobject*> obj); name type description cx jsruntime * the context. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. obj js::handle<jsobject*> an object to freeze. description js_deepfreezeobject freezes obj, and all objects it refers to, recursively. this will not recurse through non-extensible objects, on the assumption that those are already deep-frozen. see also mxr id search for js_deepfreezeobject js_freezeobject bug 492849 ...
JS_DefaultValue
ing the semantics of that object's internal [[defaultvalue]] hook. renamed to js::toprimitive from jsapi 44. syntax bool js_defaultvalue(jscontext *cx, js::handle<jsobject*> obj, jstype hint, js::mutablehandle<js::value> vp); name type description cx jscontext * the context in which to perform the conversion. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. obj js::handle<jsobject*> the object to convert. hint jstype the hint to pass to the [[defaultvalue]] hook when converting the object. hint must be jstype_string or jstype_number to pass the corresponding type as a hint, or jstype_void to pass no hint. do not pass any other type. vp js::mutablehand...
JS_DefineConstDoubles
bles(jscontext *cx, js::handleobject obj, const jsconstdoublespec *cds); bool js_defineconstintegers(jscontext *cx, js::handleobject obj, const jsconstintegerspec *cis); // added in spidermonkey 38 name type description cx jscontext * the context in which to define the new properties. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. obj jsobject * object for which to create new properties. cds jsconstdoublespec * pointer to an array of jsconstdoublespec records containing property names and values to create. the last array element must contain zero-valued members. cis jsconstintegerspec * pointer to an array of jsconstintegerspec...
JS_DefineElement
jsnative getter = nullptr, jsnative setter = nullptr); /* obsolete since jsapi 32 */ js_defineelement(jscontext *cx, jsobject *obj, uint32_t index, jsval value, jspropertyop getter, jsstrictpropertyop setter, unsigned attrs); name type description cx jscontext * the context in which to create the new property. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. obj js::handleobject or jsobject * the object on which to create the new property. index uint32_t the index of the property to define. value js::handlevalue or js::handleobject or js::handlestring or int32_t or uint32_t or double or jsval initial value to assign to the property. getter js...
JS_DefineFunction
signed nargs, unsigned attrs); jsfunction * js_definefunctionbyid(jscontext *cx, js::handle<jsobject*> obj, js::handle<jsid> id, jsnative call, unsigned nargs, unsigned attrs); // added in spidermonkey 17 name type description cx jscontext * the context in which to define the function. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. obj js::handle<jsobject*> object for which to define a function as a property (method). name const char * or const char16_t * name to assign to the function. id js::handle<jsid> a pointer to jsid for name to assign to the function. added in spidermonkey 17 call jsnative the ...
JS_DefineFunctions
finefunctions(jscontext *cx, js::handle<jsobject*> obj, const jsfunctionspec *fs, propertydefinitionbehavior behavior = defineallproperties); in spidermonkey versions prior to spidermonkey 24, fs was not const. name type description cx jscontext * the context in which to define functions. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. obj js::handle<jsobject*> the object on which functions are to be defined. fs const jsfunctionspec * a null-terminated array of function specifications. each element of the array defines an individual function. behavior propertydefinitionbehavior see below. added in spidermonkey 38 enum p...
JS_DefineObject
create an object that is a property of another object. syntax jsobject * js_defineobject(jscontext *cx, js::handleobject obj, const char *name, const jsclass *clasp = nullptr, unsigned attrs = 0); name type description cx jscontext * the context in which to create the new object. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. obj js::handleobject object to which this new object belongs as a property. name const char * name of the property being defined in obj to hold the new object. clasp const jsclass * class to use for the new object. proto js::handleobject prototype object to use for the new object, or null. obsolete since jsapi 38 ...
JS_DefineOwnProperty
avoid using it. this article covers features introduced in spidermonkey 1.8.5 please provide a description for this function. syntax bool js_defineownproperty(jscontext *cx, js::handleobject obj, js::handleid id, js::handlevalue descriptor, bool *bp); name type description cx jscontext * the context. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. obj js::handleobject object on which the property should be defined own. id js::handleid the jsid of the property that should be defined. descriptor js::handlevalue this should be an jsval consisting of an object interpretable as property descriptor. bp bool * true if successful. ...
JS_DefineProperty
nullptr, jsnative setter = nullptr); bool js_definepropertybyid(jscontext *cx, js::handleobject obj, js::handleid id, double value, unsigned attrs, jsnative getter = nullptr, jsnative setter = nullptr); name type description cx jscontext * the context in which to define the property. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. obj js::handleobject the object on which to create the new property. name or id const char * or const char16_t *or js::handleid the name of the new property. namelen size_t (only in js_defineucproperty) the length of name, in characters; or (size_t) -1 to indicate that name is null-terminated. ...
JS_DefinePropertyWithTinyId
jspropertyop setter, unsigned int attrs); jsbool js_defineucpropertywithtinyid( jscontext *cx, jsobject *obj, const jschar *name, size_t namelen, int8 tinyid, jsval value, jspropertyop getter, jspropertyop setter, unsigned int attrs); name type description cx jscontext * the context in which to define the property. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. obj jsobject * object for which to create the new property. name const char * or const jschar * name for the property to create. namelen size_t (only in js_defineucpropertywithtinyid) the length of name in characters; or (size_t) -1 to indicate that name is null-terminated. tinyid int8 ...
JS_DeleteElement
bool js_deleteelement(jscontext *cx, js::handleobject obj, uint32_t index); // added in spidermonkey 45 bool js_deleteelement(jscontext *cx, js::handleobject obj, uint32_t index, js::objectopresult &result); name type description cx jscontext * pointer to a js context from which to derive runtime information. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. obj js::handleobject object from which to delete an element. index uint32_t index number of the element to delete. result js::objectopresult & (out parameter) receives the result of the operation. description js_deleteelement removes a specified element or numeric property, index, from an ...
JS_DeleteElement2
emoves a specified element or numeric property from an object. renamed to js_deleteelement in jsapi 39 syntax bool js_deleteelement2(jscontext *cx, js::handleobject obj, uint32_t index, bool *succeeded); name type description cx jscontext * pointer to a js context from which to derive runtime information. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. obj js::handleobject object from which to delete an element. index uint32_t index number of the element to delete. succeeded bool * out parameter. on success, *succeeded receives false if the property was not deleted because it is permanent and true otherwise. description js_deleteelement2 rem...
JS_DeleteProperty
ect obj, js::handleid id, js::objectopresult &result); bool js_deleteucproperty(jscontext *cx, js::handleobject obj, const char16_t *name, size_t namelen, js::objectopresult &result); name type description cx jscontext * pointer to a js context from which to derive runtime information. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. obj js::handleobject object from which to delete a property. name or id const char * or jsid or const char16_t * name of the property to delete. namelen size_t (only in js_deleteucproperty) the length of name in characters; or -1 to indicate that name is null-terminated. result js::objecto...
JS_DeleteProperty2
t char16_t *name, size_t namelen, bool *succeeded); bool js_deletepropertybyid2(jscontext *cx, js::handleobject obj, js::handleid id, bool *succeeded); // added in spidermonkey 1.8.1 name type description cx jscontext * pointer to a js context from which to derive runtime information. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. obj js::handleobject object from which to delete a property. name or id const char * or const char16_t or js::handleid name of the property to delete. namelen size_t (only in js_deleteucproperty2) the length of name in characters; or -1 to indicate that name is null-terminated. succeeded b...
JS_DestroyContext
ons destroy a context, cx. js_destroycontext additionally performs garbage collection to reclaim any memory that was being used by cx's global object. js_destroycontextnogc does not perform garbage collection. js_destroycontextmaybegc may or may not perform garbage collection; the engine makes an educated guess as to whether enough memory would be reclaimed to justify the work. in a js_threadsafe
build, it does not matter whether the calling thread is in a request on cx. however, there must not be any suspended requests on cx. if js_setcontextcallback has been called, this calls the callback. see also mxr id search for js_destroycontext mxr id search for js_destroycontextnogc mxr id search for js_destroycontextmaybegc js_newcontext bug 737364 ...
JS_DestroyScript
script jsscript * the script to destroy. description js_destroyscript destroys the given compiled script, freeing the memory allocated to it. ...
JS_DropExceptionState
destroys a jsexceptionstate object previously created using js_saveexceptionstate. syntax void js_dropexceptionstate(jscontext *cx, jsexceptionstate *state); name type description cx jscontext * pointer to a js context from which to derive runtime information. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. state jsexceptionstate * pointer to the jsexceptionstate object to destroy. description this function destroys the specified jsexceptionstate object, unrooting as necessary any attached exception object and freeing the memory resources associated with the jsexceptionstate object. this object should previously have been created using js_saveexceptionstate. see also mxr id search for js_drops...
JS_EncodeString
this article covers features introduced in spidermonkey 1.8 convert a javascript string to a c string. syntax char * js_encodestring(jscontext *cx, jsstring *str); char * js_encodestringtoutf8(jscontext *cx, js::handlestring str); // added in spidermonkey 24 name type description cx jscontext * a context. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext.. str jsstring * / js::handlestring a string to encode. description js_encodestring and js_encodestringtoutf8 convert the specified javascript str to a c string (an array of 8-bit chars). if js_cstringsareutf8 is true, then the returned string of js_encodestring is utf-8, and the conversion is lossless. otherwise the high byte is sim...
JS_EnterLocalRootScope
obsolete since javascript 1.8.5this feature is obsolete. although it may still work in some browsers, its use is discouraged since it could be removed at any time. try to avoid using it. enter a local root scope. syntax jsbool js_enterlocalrootscope(jscontext *cx); name type description cx jscontext * pointer to the context. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. description scoped local root management allows native functions, getter/setters, etc. to avoid calling js_addroot and js_removeroot to manage global roots temporarily. js_addroot roots a variable, ensuring that whatever the variable points to at any given moment is protected from gc. by contrast, local root scopes protect newly-created ob...
JS_Enumerate
obj js::handleobject the object whose properties are to be enumerated. ...
JS_EnumerateStandardClasses
enumerate standard class in an object. syntax bool js_enumeratestandardclasses(jscontext *cx, js::handleobject obj); name type description cx jscontext * pointer to the executable script context for which to initialize js function and object classes. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. obj js::handleobject an object to enumerate standard classes. description the global object's class's enumerate op should call js_enumeratestandardclasses(cx, obj), to define eagerly during for...in loops any classes not yet resolved lazily. see also mxr id search for js_enumeratestandardclasses js_resolvestandardclass ...
JS_EvaluateScript
ar *src, unsigned int length, const char *filename, unsigned int lineno, jsval *rval); jsbool js_evaluateucscript(jscontext *cx, jsobject *obj, const jschar *src, unsigned int length, const char *filename, unsigned int lineno, jsval *rval); name type description cx jscontext * the context in which to run the script. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. obj jsobject * the scope in which to execute the script. this parameter is documented in detail at js_executescript. src const char * or const jschar * string containing the script to compile and execute. length unsigned int the length of src, in characters. filename const char * name o...
JS_EvaluateScriptForPrincipals
, jsversion version); jsbool js_evaluateucscriptforprincipalsversion(jscontext *cx, jsobject *obj, jsprincipals *principals, const jschar *chars, unsigned int length, const char *filename, unsigned int lineno, jsval *rval, jsversion version); name type description cx jscontext * the context in which to run the script. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. obj jsobject * the scope in which to execute the script. this parameter is documented in detail at js_executescript. principals jsprincipals * pointer to the structure holding the security information for this script. src / bytes / chars const char * or const jschar string containing the script to com...
JS_ExecuteRegExp
js::mutablehandlevalue rval); bool js_executeregexpnostatics(jscontext *cx, js::handleobject reobj, char16_t *chars, size_t length, size_t *indexp, bool test, js::mutablehandlevalue rval); name type description cx jscontext * the context. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. obj js::handleobject a pointer to a global object. reobj js::handleobject a pointer to a regexp object. chars const char16_t * a pointer to the string contains a input string. length size_t the length of bytes or chars, in characters. indexp size_t * in/out parameter.
JS_ExecuteScript
*cx, js::handle<jsscript*> script); // added in spidermonkey 45 bool js::cloneandexecutescript(jscontext *cx, js::handle<jsobject*> obj, js::handle<jsscript*> script); // added in spidermonkey 31, obsoleted since jsapi 39 name type description cx jscontext * the context in which to execute the script. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. obj js::handleobject the scope in which to execute the script. in the simplest cases, this should just be the embedding's global object. obsolete since jsapi 39 obj must not be an array, an e4x xml object, a with object, or a proxy. in ecmascript terms, the script is executed in a new execution context, but that con...
JS_ExecuteScriptPart
tescript instead. executes a part of a compiled script. syntax typedef enum jsexecpart { jsexec_prolog, jsexec_main } jsexecpart; jsbool js_executescriptpart( jscontext *cx, jsobject *obj, jsscript *script, jsexecpart part, jsval *rval); name type description cx jscontext * the context in which to execute the script. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. obj jsobject * the scope in which to execute the script. this parameter is documented in detail at js_executescript. script jsscript * the compiled script to execute. part jsexecpart the part of script to execute. rval jsval * out parameter. on success, *rval receives the value from the...
JS_ExecuteScriptVersion
this article covers features introduced in spidermonkey 1.8.5 execute a compiled script with specified version. syntax jsbool js_executescriptversion(jscontext *cx, jsobject *obj, jsobject *scriptobj, jsval *rval, jsversion version); name type description cx jscontext * the context in which to execute the script. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. obj jsobject * the scope in which to execute the script. in the simplest cases, this should just be the embedding's global object. obj must not be an array, an e4x xml object, a with object, or a proxy. in ecmascript terms, the script is executed in a new execution context, but that context is not initialized quite ...
JS_FS
omage to the old jsnative/jsfastnative split) simply adds the flag jsfun_stub_gsops. js_fninfo allows the simple adding of jsjitinfos. js_self_hosted_fn declares a self-hosted function. finally js_fnspec has slots for all the fields. the _sym variants allow defining a function with a symbol key rather than a string key. for example, use js_sym_fn(iterator, ...) to define an @@iterator method. (in
builds without es6 symbols, it defines a method with the string id "@@iterator".) see an example in the jsapi user guide. see also mxr id search for js_fs mxr id search for js_fn mxr id search for js_sym_fn mxr id search for js_fninfo mxr id search for js_self_hosted_fn mxr id search for js_self_hosted_sym_fn mxr id search for js_sym_fnspec mxr id search for js_fnspec mxr id search for js_fs_...
JS_FlattenString
this article covers features introduced in spidermonkey 1.8.5 flattens a string. this makes getting the characters of the string infallible. syntax jsflatstring * js_flattenstring(jscontext *cx, jsstring *str); name type description cx jscontext * the context. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. str jsstring * the string to flatten. description js_flattenstring flattens a string str and returns a pointer to jsflatstring. to catch errors, an opaque jsflatstring type is returned. note: the input and output of js_flattenstring() are the same actual gc-thing so only one needs to be rooted. if a jsstring is known to be flat, you can use js_assert_string_is_flat to ma...
JS_FlushCaches
g it. this article covers features introduced in spidermonkey 1.8.5 flushes the code cache for the current thread. the operation might be delayed if the cache cannot be flushed currently because native code is currently executing. syntax void js_flushcaches(jscontext *cx); name type description cx jscontext * the context. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. description . see also bug 737364 ...
JS_ForwardGetPropertyTo
js::handleobject obj, js::handleid id, js::handleobject onbehalfof, js::mutablehandlevalue vp); bool js_forwardgetelementto(jscontext *cx, js::handleobject obj, uint32_t index, js::handleobject onbehalfof, js::mutablehandlevalue vp); name type description cx jscontext * a context. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. obj js::handleobject object to search on for the property. id or index js::handleid or uint32_t name or index of the property to look up. onbehalfof js::handleobject object to receive getter invocation. vp js::mutablehandlevalue out parameter. on success, *vp receives the current value ...
JS_GetLatin1FlatStringChars
string. syntax const js::latin1char * js_getlatin1flatstringchars(const js::autocheckcannotgc &nogc, jsflatstring *str); const char16_t * js_gettwobyteflatstringchars(const js::autocheckcannotgc &nogc, jsflatstring *str); name type description cx jscontext * a context. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext.. nogc js::autocheckcannotgc & a reference to js::autocheckcannotgc. str jsflatstring * a string to get characters. description js_getlatin1flatstringchars and js_gettwobyteflatstringchars return a pointer to the string. see also mxr id search for js_getlatin1flatstringchars mxr id search for js_gett...
JS_GetLatin1InternedStringChars
syntax const js::latin1char * js_getlatin1internedstringchars(const js::autocheckcannotgc &nogc, jsstring *str); const char16_t * js_gettwobyteinternedstringchars(const js::autocheckcannotgc &nogc, jsstring *str); name type description cx jscontext * a context. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext.. nogc js::autocheckcannotgc & a reference to js::autocheckcannotgc. str jsstring * a string to get characters. description js_getlatin1internedstringchars and js_gettwobyteinternedstringchars gets the characters of the string, str. if successful, js_getlatin1stringcharsandlength and js_gettwobytestringc...
JS_GetLatin1StringCharsAndLength
jscontext *cx, const js::autocheckcannotgc &nogc, jsstring *str, size_t *length); const char16_t * js_gettwobytestringcharsandlength(jscontext *cx, const js::autocheckcannotgc &nogc, jsstring *str, size_t *length); name type description cx jscontext * a context. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext.. nogc js::autocheckcannotgc & a reference to js::autocheckcannotgc. str jsstring * a string to get characters. length size_t * out parameter. receives the length of the string. description js_getlatin1stringcharsandlength and js_gettwobytestringcharsandlength get the characters and the len...
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. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. callbacks jslocalecallbacks * pointer to a jslocalecallbacks struct. callback functions struct jslocalecallbacks { jslocaletouppercase localetouppercase; jslocaletolowercase localetolowercase; jslocalecompare localecompare; // not used #if expose_intl_api jslocaletounicode localetounicode...
JS_GetObjectPrototype
article covers features introduced in spidermonkey 17 retrieves the original, canonical object.prototype for an object's global object. syntax jsobject * js_getobjectprototype(jscontext *cx, js::handleobject forobj); name type description cx jscontext * pointer to a javascript context from which to derive runtime information. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. forobj js::handleobject an object from the global whose object.prototype is being retrieved. description js_getobjectprototype() retrieves the original object.prototype of a specified object, obj. if an error occurs, it returns null. note: this expression might have different values over time if the global object property...
JS_GetOwnPropertyDescriptor
ct obj, js::handleid id, js::mutablehandle<jspropertydescriptor> desc); bool js_getownucpropertydescriptor(jscontext *cx, js::handleobject obj, const char16_t *name, js::mutablehandle desc); // added in spidermonkey 45 name type description cx jscontext * a context. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. obj js::handleobject the object to search for the property. id const char * or js::handleid or const char16_t the name of the property to look up. desc js::mutablehandle<jspropertydescriptor> out parameter. on success, if no property is found, desc->obj is set to null. if a property is found, *d...
JS_GetPendingException
vp js::mutablehandlevalue out parameter. on success, *vp receives the current pending exception. ...
JS_GetProperty
cx, js::handleobject obj, const char16_t *name, size_t namelen, js::mutablehandlevalue vp); bool js_getpropertybyid(jscontext *cx, js::handleobject obj, js::handleid id, js::mutablehandlevalue vp); // added in spidermonkey 1.8.1 name type description cx jscontext * a context. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. obj js::handleobject object to search on for the property. name or id const char * or const char16_t * or js::handleid name of the property to look up. namelen size_t (in js_getucproperty only) the length of name, in characters; or -1 to indicate that name is null-terminated. vp js::mutabl...
JS_GetPropertyAttributes
s(jscontext *cx, jsobject *obj, const char *name, unsigned int *attrsp, jsbool *foundp); jsbool js_getucpropertyattributes(jscontext *cx, jsobject *obj, const jschar *name, size_t namelen, unsigned int *attrsp, jsbool *foundp); name type description cx jscontext * the context in which to look up property attributes. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. obj jsobject * the object that has the property to be queried. name const char * or const jschar * name of the property from which to retrieve attributes. namelen size_t (only in js_getucpropertyattributes) the length of name in characters; or (size_t) -1 to indicate that name is null-terminated. ...
JS_GetPropertyAttrsGetterAndSetter
tterp, jspropertyop *setterp); jsbool js_getpropertyattrsgetterandsetterbyid(jscontext *cx, jsobject *obj, jsid id, unsigned int *attrsp, jsbool *foundp, jspropertyop *getterp, jspropertyop *setterp); // added in spidermonkey 1.8.1 name type description cx jscontext * the context in which to perform the property lookup. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. obj jsobject * object from which to retrieve property attributes. name or id const char * or const jschar * or jsid the name of the property to examine. namelen size_t (only in js_getucpropertyattrsgetterandsetter) the length of name in characters; or (size_t) -1 to indicate that name is null-terminat...
JS_GetPropertyDefault
bool js_getpropertydefault(jscontext *cx, jsobject *obj, const char *name, jsval def, js::mutablehandle<js::value> vp); bool js_getpropertybyiddefault(jscontext *cx, jsobject *obj, jsid id, jsval def, js::mutablehandle<js::value> vp); name type description cx jscontext * a context. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. obj js::handleobject object to search on for the property. name or id const char * or js::handleid name of the property to look up. def js::handlevalue default value if the property is not found. vp js::mutablehandlevalue out parameter. on success, *vp receives the current value of the ...
JS_GetPropertyDescriptor
const char *name, js::mutablehandle<jspropertydescriptor> desc); // added in spidermonkey 31 bool js_getpropertydescriptorbyid(jscontext *cx, js::handleobject obj, js::handleid id, js::mutablehandle<jspropertydescriptor> desc); name type description cx jscontext * a context. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. obj js::handleobject the object to search for the property. id const char * or js::handleid the name of the property to look up. desc js::mutablehandle<jspropertydescriptor> out parameter. on success, if no property is found, desc->obj is set to null. if a property is found, *desc receives a des...
JS_GetPrototype
obj js::handleobject object for which to retrieve the prototype. ...
JS_GetStringCharAt
features introduced in spidermonkey 38 return a specified character from a string. syntax bool js_getstringcharat(jscontext *cx, jsstring *str, size_t index, char16_t *res); char16_t js_getflatstringcharat(jsflatstring *str, size_t index); name type description cx jscontext * the context in which to create the new string. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. str jsstring * or jsflatstring * the string to get character. index size_t an integer between 0 and 1-less-than the length of the string. res char16_t * (js_getstringcharat only) out parameter. on successful, receives the character code. description js_getstringcharat and js_getflatstringchara...
JS_GetStringCharsAndLength
aged since it could be removed at any time. try to avoid using it. this article covers features introduced in spidermonkey 1.8.5 get the characters and the length of a string. syntax const jschar * js_getstringcharsandlength(jscontext *cx, jsstring *str, size_t *length); name type description cx jscontext * the context. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. str jsstring * a string to get characters. length size_t * out parameter. receives the length of the string. description js_getstringcharsandlength gets the characters and the length of the string, str if successful, js_getstringcharsandlength returns a pointer to the string, and store the length to *length, o...
JS_IsIdentifier
he given string is a valid ecmascript identifier. syntax bool js_isidentifier(jscontext *cx, js::handlestring str, bool *isidentifier); bool js_isidentifier(const char16_t *chars, size_t length); // added in spidermonkey 38 name type description cx jscontext * pointer to a js context from which to derive runtime information. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. str js::handlestring the string to test. chars const char16_t * the pointer of the string to test. length size_t the length of chars. isidentifier bool * out parameter. on success, *isidentifier receives whether str is an identifier or not. description js_isidentifier tests if t...
JS_LeaveLocalRootScope
ough it may still work in some browsers, its use is discouraged since it could be removed at any time. try to avoid using it. 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(). requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. description see js_enterlocalrootscope for an explanation of local root scopes. leaving a nested local root scope causes all objects created since the matching js_enterlocalrootscope call to become subject to garbage collection. that is, they are not transferred to the enclosing local root scope. however, js_leavelocalrootscopewithresult p...
JS_LeaveLocalRootScopeWithResult
any time. try to avoid using it. 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. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. rval jsval the result value that should remain protected from garbage collection. description see js_enterlocalrootscope for an explanation of local root scopes. the protection this function affords to rval is tenuous. if there is an enclosing local root scope, then rval is transferred to it. otherwise, the value is stored i...
JS_LinkConstructorAndPrototype
prototype = proto and proto.constructor = ctor with the right property flags. syntax bool js_linkconstructorandprototype(jscontext *cx, js::handle<jsobject*> ctor, js::handle<jsobject*> proto); name type description cx jscontext * pointer to a js context from which to derive runtime information. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. ctor js::handle<jsobject*> pointer to the constructor object. proto js::handle<jsobject*> pointer to the prototype object. description js_linkconstructorandprototype sets the prototype property of class constructor function, ctor, to prototype object, proto with jsprop_permanent | jsprop_readonly...
JS_LockGCThing
ction. syntax jsbool js_lockgcthing(jscontext *cx, void *thing); // obsolete since jsapi 21 jsbool js_unlockgcthing(jscontext *cx, void *thing); // obsolete since jsapi 21 jsbool js_lockgcthingrt(jsruntime *rt, void *thing); jsbool js_unlockgcthingrt(jsruntime *rt, void *thing); name type description cx jscontext * a context. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. rt jsruntime * a runtime. thing void * pointer to the item to protect. description js_lockgcthing is a deprecated function that protects a specified item, thing, associated with an executable script context, cx, from garbage collection. thing is a pointer to a jsdouble, jsstring, or jsobject. js_unlockgcthing ...
JS_LookupElement
ged since it could be removed at any time. try to avoid using it. determine if a specified numeric property exists. syntax bool js_lookupelement(jscontext *cx, js::handleobject obj, uint32_t index, js::mutablehandlevalue vp); name type description cx jscontext * the context in which to look up the property. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. obj js::handleobject the object to search. index uint32_t the numeric id of the property to look up. vp js::mutablehandlevalue out parameter. on success, *vp receives the stored value of obj[index], or undefined if the element does not exist. description js_lookupelement examines a specified j...
JS_LookupProperty
; bool js_lookuppropertywithflagsbyid(jscontext *cx, js::handleobject obj, js::handleid id, unsigned flags, js::mutablehandleobject objp, js::mutablehandlevalue vp); // added in spidermonkey 1.8.1 name type description cx jscontext * pointer to a js context from which to derive runtime information. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. obj js::handleobject object to search on for the property. name or id const char * or const char16_t *or js::handleid name of the property to look up. namelen size_t (only in js_lookupucproperty) the length of name in characters; or -1 to indicate that name is null-terminated. flags unsign...
JS_LooselyEqual
dermonkey 1.8.1 determine whether two javascript values are equal in the sense of the == operator. syntax bool js_looselyequal(jscontext *cx, js::handle<js::value> v1, js::handle<js::value> v2, bool *equal); name type description cx jscontext * the context in which to perform the conversion. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. v1, v2 js::handle<js::value> the value to compare. equal bool * out parameter. receives the comparison result. description js_looselyequal determines if v1 is loosely equal to v2 under the javascript == operator, as specified in ecma 262-3 §11.9.3. if the comparison attempt was successful, the method ...
JS_MakeStringImmutable
solete since javascript 1.8.5this feature is obsolete. although it may still work in some browsers, its use is discouraged since it could be removed at any time. try to avoid using it. make a jsstring thread-safe. syntax jsbool js_makestringimmutable(jscontext *cx, jsstring *str); name type description cx jscontext * a context. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. s jsstring * the string to operate on. s must not be null. description a string's characters can never be changed, but spidermonkey uses two string optimization techniques behind the scenes: a growable string (see js_newgrowablestring ) has a buffer that the javascript engine can reallocate so that concatenating it with a...
JS_New
vascript function. syntax jsobject * js_new(jscontext *cx, js::handleobject ctor, const js::handlevaluearray& args); // added in jsapi 32 jsobject * js_new(jscontext *cx, jsobject *ctor, unsigned argc, jsval *argv); // obsolete since jsapi 32 name type description cx jscontext * the context in which to create the new object. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. ctor js::handleobject the constructor function object. args js::handlevaluearray & an array of argument values to pass to the constructor. added in spidermonkey 38 argc unsigned the number of arguments to pass to the constructor. obsolete since jsapi 32 argv jsval * pointer to the e...
JS_NewArrayObject
::handlevaluearray& contents); // added in spidermonkey 31 jsobject * js_newarrayobject(jscontext *cx, size_t length); // added in spidermonkey 31 jsobject * js_newarrayobject(jscontext *cx, int length, jsval *vector); // obsolete since jsapi 30 name type description cx jscontext * the context in which to create the new array. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. contents js::handlevaluearray& reference to the initial values for the array's elements. added in spidermonkey 31 length size_t or int the length of the new array. this must not be negative. vector jsval * pointer to the initial values for the array's elements, or null. obsolete since jsapi 30 ...
JS_NewCompartmentAndGlobalObject
in bug 755186. use js_newglobalobject instead. create a new global object in a new compartment. syntax jsobject * js_newcompartmentandglobalobject(jscontext *cx, jsclass *clasp, jsprincipals *principals); name type description cx jscontext * the context in which to create the new global object. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. clasp jsclass * the class to use for the new global object. clasp->flags must have the jsclass_global_flags bits set. the caller must ensure that the jsclass remains alive throughout the lifetime of the new object, including the garbage collection cycle that finally frees it. the usual way to do this is to make jsclas...
JS_NewContext
turns a pointer to the new context. otherwise it returns null. for more details about contexts, see jscontext. for sample code that creates and initializes a jscontext, see jsapi user guide. the stackchunksize parameter does not control the javascript stack size. (the jsapi does not provide a way to adjust the stack depth limit.) passing a large number for stackchunksize is a mistake. in a debug
build, large chunk sizes can degrade performance dramatically. the usual value of 8192 is recommended. the application must call js_destroycontext when it is done using the context. before a jsruntime may be destroyed, all the jscontexts associated with it must be destroyed. the new jscontext initially has no global object. the new jscontext is associated with the calling thread. no other thread ma...
JS_NewDateObject
this article covers features introduced in spidermonkey 1.8.5 creates a new date object instance for the given time and date. syntax jsobject * js_newdateobject(jscontext *cx, int year, int mon, int mday, int hour, int min, int sec); name type description cx jscontext * the context in which to create the new date object. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. year int the year to set the new object to. mon int the month to set the new object to. mday int the day of the month to set the new object to. hour int the hour to set the new object to. min int the minute to set the new object's time to. sec int the secon...
JS_NewDateObjectMsec
this article covers features introduced in spidermonkey 1.8.5 creates a new date object instance, configured to represent the date and time indicated by the specified time in milliseconds since the unix epoch. syntax jsobject * js_newdateobjectmsec(jscontext *cx, double msec); name type description cx jscontext * the context. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. msec double time since unix epoch in milliseconds. description the returned jsobject is a standard javascript date. see also mxr id search for js_newdateobjectmsec js_newdateobject js_objectisdate bug 625870 ...
JS_NewDependentString
create a new javascript string containing a range of characters from an existing string. syntax jsstring * js_newdependentstring(jscontext *cx, js::handlestring str, size_t start, size_t length); name type description cx jscontext * the context in which to create the new string. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. str js::handlestring the string containing the characters for the new string. start size_t the start index of the substring. length size_t length of the substring, in characters. description js_newdependentstring creates a new string as a substring of an existing javascript string, str. the new string contains the same ch...
JS_NewDouble
work in some browsers, its use is discouraged since it could be removed at any time. try to avoid using it. use js_newnumbervalue instead. allocates a copy of jsdouble on the gc heap. syntax jsdouble * js_newdouble(jscontext *cx, jsdouble d); name type description cx jscontext * the context in which to create the new number. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. d jsdouble the number to copy. description js_newdouble allocates a copy of the number d on the javascript garbage collection heap. this function is not very useful. to convert a jsdouble to a jsval, use js_newnumbervalue instead. warning: the argument d must not be a value that could fit in an integer jsval. if it is, ...
JS_NewDoubleValue
ill work in some browsers, its use is discouraged since it could be removed at any time. try to avoid using it. use js_numbervalue instead. create a floating-point jsval syntax jsbool js_newdoublevalue(jscontext *cx, jsdouble d, jsval *rval); name type description cx jscontext * the context in which to create the new number. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. d jsdouble the numeric value to convert. this must not be a value that could fit in an integer jsval (see int_fits_in_jsval). rval jsval * out parameter. on success, *rval receives a javascript number with the value d. description js_newdoublevalue creates a floating-point jsval. warning: the argument d m...
JS_NewExternalString
hars, size_t length, const jsstringfinalizer *fin); jsstring * js_newexternalstringwithclosure(jscontext *cx, jschar *chars, size_t length, int type, void *closure); // obsolete since jsapi 13 name type description cx jscontext * the context in which to create the new string. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. chars const char16_t * or const jschar * pointer to the first element of an array of char16_ts. this array is used as the character buffer of the jsstring to be created. the array must be populated with the desired character data before js_newexternalstring is called, and the array must remain in memory, with its contents unchang...
JS_NewFunction
js::handle<jsobject*> parent, const char *name); jsfunction * js_newfunctionbyid(jscontext *cx, jsnative call, unsigned nargs, unsigned flags, js::handle<jsobject*> parent, js::handle<jsid> id); // added in spidermonkey 17 name type description cx jscontext * the context in which to create the new function. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. call jsnative native c/c++ implementation of this function. nargs unsigned number of arguments the function expects. flags unsigned pass jsfun_constructor to make a native that can be called as a constructor, otherwise 0. parent js::handle<jsobject*> pointer to the parent object f...
JS_NewGlobalObject
x jsobject * js_newglobalobject(jscontext *cx, const jsclass *clasp, jsprincipals *principals, js::onnewglobalhookoption hookoption, const js::compartmentoptions &options = js::compartmentoptions()); name type description cx jscontext * the context in which to create the new global object. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. clasp jsclass * the class to use for the new global object. clasp->flags must have the jsclass_global_flags bits set. the caller must ensure that the jsclass remains alive throughout the lifetime of the new object, including the garbage collection cycle that finally frees it. the usual way to do this is to make jscla...
JS_NewObject
t*> proto, js::handle<jsobject*> parent); jsobject * js_newobjectwithgivenproto(jscontext *cx, const jsclass *clasp, js::handle<jsobject*> proto, js::handle<jsobject*> parent); // added in spidermonkey 1.8 name type description cx jscontext * the context in which to create the new object. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. clasp const jsclass * pointer to the class to use for the new object. if this is null, an ordinary javascript object is created. the jsclass may be used to override low-level object behavior, including such details as the physical memory layout of the object and how property lookups are done. added in spidermonkey 1.8.1 ...
JS_NewPlainObject
this article covers features introduced in spidermonkey 38 creates a new plain javascript object. syntax jsobject * js_newplainobject(jscontext *cx); name type description cx jscontext * the context in which to create the new object. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. description js_newplainobject creates a new plain object, like new object(), with object.prototype as [[prototype]]. on success, js_newplainobject returns a pointer to the new object. otherwise it returns nullptr. see also mxr id search for js_newplainobject js_newobject bug 1125356 ...
JS_NewPropertyIterator
k in some browsers, its use is discouraged since it could be removed at any time. try to avoid using it. crate an iterator object for use with js_nextproperty. syntax jsobject * js_newpropertyiterator(jscontext *cx, js::handle<jsobject*> obj); name type description cx jscontext * the js context in which to enumerate properties. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. obj js::handle<jsobject*> the object whose properties are to be enumerated. description create an object to iterate over the enumerable own properties of obj, in arbitrary order. (this differs from longstanding for..in loop order, which uses the order in which obj's properties were defined. note also that while for..in...
JS_NewRegExpObject
xpobjectnostatics(jscontext *cx, char *bytes, size_t length, unsigned flags); jsobject * js_newucregexpobjectnostatics(jscontext *cx, char16_t *chars, size_t length, unsigned flags); name type description cx jscontext * the context in which to create the new object. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. obj js::handleobject a pointer to a global object. bytes or chars const char * or const char16_t * a pointer to the string that contains a regular expression. length size_t the length of bytes or chars, in characters. flags unsigned regular expression flags. see below. flags ...
JS_NewScriptObject
id using it. return the javascript script object that wraps a compiled script. the compiled script and its parts live until the script object is garbage collected. syntax jsobject * js_newscriptobject(jscontext *cx, jsscript *script); name type description cx jscontext * the context in which to create the new script object. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. script jsscript * the compiled script for which to create a new script object. description js_newscriptobject returns the script object associated with the given jsscript. every jsscript object has an associated jsobject script object. as long as the script object is reachable, the jsscript and its components are protecte...
JS_NewUCString
rmonkey 1.8.5. use js_newstringcopyn and js_newucstringcopyn instead. syntax jsstring * js_newucstring(jscontext *cx, char16_t *chars, size_t length); jsstring * js_newstring(jscontext *cx, char *buf, size_t length); // obsolete since jsapi 1.8.5 name type description cx jscontext * the context in which to create the new string. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. buf char * or char16_t * pointer to a character array, allocated with js_malloc, containing the characters for the js string to create. the javascript engine adopts the buffer. length size_t number of characters in the text string. description js_newstring creates and returns a new string, using the memory sta...
JS_NewStringCopyN
create a new js string. syntax jsstring * js_newstringcopyn(jscontext *cx, const char *s, size_t n); jsstring * js_newucstringcopyn(jscontext *cx, const char16_t *s, size_t n); name type description cx jscontext * pointer to a js context from which to derive runtime information. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. s const char* or const char16_t * pointer to the array of characters containing the text for the js string to create. n size_t number of characters to copy from s into the new string. description js_newstringcopyn allocates space for a javascript string and its underlying storage, and copies n characters from a c character array, s, into the new jsstring. j...
JS_NewStringCopyZ
create a new javascript string based on a null-terminated c string. syntax jsstring * js_newstringcopyz(jscontext *cx, const char *s); jsstring * js_newucstringcopyz(jscontext *cx, const char16_t *s); name type description cx jscontext * pointer to a js context from which to derive runtime information. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. s const char * or const char16_t * pointer to the character array containing the text for the js string to create; or null. description js_newstringcopyz allocates space for a new javascript string and its underlying storage, and then copies the contents of a null-terminated character array, s, into the new string. on success, js_newstringcopyz ret...
JS_NextProperty
d since it could be removed at any time. try to avoid using it. get the next property id from an iterator object produced by js_newpropertyiterator. syntax bool js_nextproperty(jscontext *cx, js::handleobject iterobj, js::mutablehandleid idp); name type description cx jscontext * the js context in which to enumerate properties. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. iterobj js::handleobject the opaque iterator object returned by a previous call to js_newpropertyiterator. idp js::mutablehandleid out parameter. on success, *idp receives the name or index of the next property name; or jsid_void if there are no more enumerable properties to visit. description on success, js_n...
JS_ObjectIsDate
this article covers features introduced in spidermonkey 1.8.5 determines if a specified object is a date object. syntax bool js_objectisdate(jscontext *cx, js::handleobject obj); name type description cx jscontext * pointer to a javascript context from which to derive runtime information. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. obj jsobject * jsobject that should be checked. description js_objectisdate() can be used to check if you are dealing with a date object, or a date object used across compartments (or windows or sites, in the browser embedding). this function returns true if the object is a date. see also mxr id search for js_objectisdate js_newdateobject js...
JS_ParseJSON
6 parse a string using the json syntax described in ecmascript 5 and return the corresponding value. syntax jsbool js_parsejson(jscontext *cx, const jschar *chars, uint32 len, jsval *vp); jsbool js_parsejsonwithreviver(jscontext *cx, const jschar *chars, uint32 len, jsval reviver, jsval *vp); name type description cx jscontext * pointer to a js context. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. ch jsobject * the object to be searched. chars const jschar * the characters of the string. len uint32 the length of the string. index jsint (in js_parsejsonwithreviver only) a reviver function to apply to the created value after parsing; see json.parse. vp jsval * out parameter. *vp receives the value after parsing (and optionally, pr...
JS_PopArguments
may still work in some browsers, its use is discouraged since it could be removed at any time. try to avoid using it. frees the stack entry allocated by js_pusharguments. syntax void js_poparguments(jscontext *cx, void *mark); name type description cx jscontext * pointer to a js context from which to derive runtime information. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. mark void * pointer to a void * which holds the stack frame pointer previously supplied by js_pusharguments. description js_poparguments frees the stack frame pointer previously allocated by js_pusharguments and unroots the jsvals which have been associated with it (those returned by js_pusharguments as well). see also js_p...
JS_PreventExtensions
ion of any new properties to an object. syntax // added in spidermonkey 45 bool js_preventextensions(jscontext *cx, js::handleobject obj, js::objectopresult &result); // obsolete since jsapi 39 bool js_preventextensions(jscontext *cx, js::handleobject obj, bool *succeeded); name type description cx jscontext * the context. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. obj js::handleobject object to be made non-extensible. result js::objectopresult & (out parameter) receives the result of the operation. added in spidermonkey 45 succeeded bool * outparam indicating, on jsapi success, whether the object is now non-extensible. obsolete since jsapi 39 descrip...
JS_PushArguments
xt *cx, void **markp, const char *format, ...); jsval * js_pushargumentsva(jscontext *cx, void **markp, const char *format, va_list ap); name type description cx jscontext * the context in which to perform any necessary conversions. cx also affects the interpretation of format, if js_addargumentformatter has been called. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. markp void ** out parameter. on success, *markp receives the internally allocated stack mark which should be passed to js_poparguments. format const char * null-terminated string holding a list of format types to convert the following arguments to. ... various (in js_pusharguments) a variable number o...
JS_PutEscapedString
rite a string into buffer with escaping. syntax size_t js_putescapedstring(jscontext *cx, char *buffer, size_t size, jsstring *str, char quote); size_t js_putescapedflatstring(char *buffer, size_t size, jsflatstring *str, char quote); name type description cx jscontext * a context. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. buffer char * a pointer to char buffer to write into. size size_t the size of buffer in bytes. str jsstring * or jsflatstring * a string to write into the file. quote char one of 0, single quote, and double quote. description js_putescapedstring and js_putescapedstring write str...
JS_Remove*Root
ed-at gc thing to be garbage collected as needed. syntax jsbool js_removevalueroot(jscontext *cx, jsval *vp); jsbool js_removestringroot(jscontext *cx, jsstring **spp); jsbool js_removeobjectroot(jscontext *cx, jsobject **opp); jsbool js_removegcthingroot(jscontext *cx, void **rp); name type description cx jscontext * a context. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. vp jsval * address of the jsval variable to remove from the root set. this must have been passed to either js_addvalueroot or js_addnamedvalueroot. spp jsstring * address of the jsstring* variable to remove from the root set. this must have been passed to either js_addstringroot or js_addnamedstringroot. ...
JS_ReportErrorNumber
d errornumber, ...); void js_reporterrornumberucarray(jscontext *cx, jserrorcallback errorcallback, void *userref, const unsigned errornumber, const char16_t **args); // added in spidermonkey 19 name type description cx jscontext * the context in which to report the error. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. flags unsigned error report flags. errorcallback jserrorcallback callback to fetch the error message. userref void * a pointer to application data. the javascript engine passes this pointer to errorcallback. the meaning of the data is up to the application. errornumber const unsigned an...
JS_ReportPendingException
forward the current pending exception in a given jscontext to the current jserrorreporter callback. syntax bool js_reportpendingexception(jscontext *cx); name type description cx jscontext * the context in which the exception was thrown. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. description if an exception is pending in the context cx, js_reportpendingexception converts the exception to a string and reports it to the current error reporter. on success, it clears the exception as though by calling js_clearpendingexception and returns true. if no exception is pending, or if a second error occurs while trying to report the first one, it returns false. this function can be used to catch exceptions thrown fr...
JS_ResolveStandardClass
resolve a standard class in an object. syntax bool js_resolvestandardclass(jscontext *cx, js::handleobject obj, js::handleid id, bool *resolved); name type description cx jscontext * pointer to the executable script context for which to initialize js function and object classes. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. obj js::handleobject an object to resolve id to a standard class. id js::handleid an id of a standard class name, which must contain either a string or an int. resolved bool * out parameter. if the id is resolved, true is stored into *resolved if success. false otherwise. description js_resolvestandardclass resolve...
JS_RestoreExceptionState
restores the exception state from a jsexceptionstate object previously created using js_saveexceptionstate. syntax void js_restoreexceptionstate(jscontext *cx, jsexceptionstate *state); name type description cx jscontext * pointer to a js context from which to derive runtime information. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. state jsexceptionstate * pointer to the jsexceptionstate object to restore exception state from. description this function permits to restore any previously saved exception state which was saved into a jsexceptionstate object created by the js_saveexceptionstate function. if any exception was pending when js_saveexceptionstate was called, the same exception will b...
JS_SameValue
d in spidermonkey 45 bool js_samevalue(jscontext *cx, js::handle<js::value> v1, js::handle<js::value> v2, bool *same); // obsolete since jsapi 39 bool js_samevalue(jscontext *cx, jsval v1, jsval v2, bool *same); name type description cx jscontext * pointer to a js context from which to derive runtime information. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. v1 js::handle<js::value> / jsval the first value. v2 js::handle<js::value> / jsval the second value. description js_samevalue determines whether two values are the same, returning true or false accordingly. this method is infallible. see also mxr id search for js_samevalue js_strictlyequal ...
JS_SaveExceptionState
saves the exception state from the specified context. syntax jsexceptionstate * js_saveexceptionstate(jscontext *cx); name type description cx jscontext * pointer to a js context from which to derive runtime information. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. description saves the current exception state (that is, any pending exception, or a cleared exception state) associated with the specified context cx, and returns a jsexceptionstate object holding this state. that object may then be used to restore again the context using js_restoreexceptionstate, or discarded using js_dropexceptionstate. either of those two functions frees any memory used by the jsexceptionstate. the jsexceptionstate created by...
JS_SetAllNonReservedSlotsToUndefined
in spidermonkey 24 assign undefined to all of the object's non-reserved slots. note: this is done for all slots, regardless of the associated property descriptor. syntax void js_setallnonreservedslotstoundefined(jscontext *cx, jsobject *objarg); name type description cx jscontext * the context in which to clear the object. requires request. in a js_threadsafe
build, the caller must be in a request on this jscontext. obj jsobject * object from which to delete all properties. description js_setallnonreservedslotstoundefined assignes undefined to all of obj's own properties, except the special __proto__ and __parent__ properties, in a single operation. properties belonging to objects on obj's prototype chain are not affected. see also mx...
Running Automated JavaScript Tests
(some js reftests will be skipped when run in the browser, as it lacks some shell-specific testing functionality.) running jstests running jstests on a js shell the jstests shell harness is js/src/tests/jstests.py. ...
WebReplayRoadmap
lder version of the architecture that can replay a simple page but not rewind, which should make writing a complete windows port easier. cloud integration (partially implemented) storing recordings in the cloud and interacting with them via the debugger could streamline several features described above: difficulties when recording and replaying on different machines with incompatible firefox
builds or operating systems will be smoothed out. recordings can be uploaded, and cloud services can locate the correct
build and os needed to replay them. management of a corpus of recordings (some which may have been made with different
builds or operating systems) will be easier to manage, with shared storage in the cloud. expensive dynamic analyses are easier to run in the cloud, allowing a high...
A Web PKI x509 certificate primer
cate policy and applying for inclusion as per ca:how_to_apply. users may override the default root certificate settings using the certificate manager. some organizations make use of the set of cas included in mozilla's products. if you wish to do this, you should read the relevant part of the mozilla ca faq before doing so. running your own ca if you are going to have your own ca, we recommend
building 3 certificates: a long term root cert, a medium term intermediate cert, and a short term end-entity cert. this type of hierarchy allows for a relatively simple long term root to be distributed to clients, and some flexibility on the intermediate cert so that you can change parameters based on best practices and security research. generate your ca root update *.example.com and *.example.net b...
Signing Mozilla apps for Mac OS X
, to modify apple's automatic signing process (for example, to exclude a file or folder), you'll need to provide this file.. once the application bundle is signed, this file will contain the hashes/checksums of all files that are included in the signature. if any file is subsequently changed, the folder will no longer validate. the coderesources file used to sign official firefox and thunderbird
builds is available in mozilla-central. for more details on using the coderesources file, refer to the code resources section on erick dransch's blog post about code signing. ...
Task graph
after a change to the gecko source code is pushed to version-control, jobs for that change appear on treeherder. how does this work? a "decision task" is created to decide what to do with the push. the decision task creates a lot of additional tasks. these tasks include
build and test tasks, along with lots of other kinds of tasks to
build docker images,
build toolchains, perform analyses, check syntax, and so on. these tasks are arranged in a "task graph", with some tasks (e.g., tests) depending on others (
builds). once its prerequisite tasks complete, a dependent task begins. the result of each task is sent to treeherder where developers and sheriffs can track the status of the push. the outputs from each task, log files, firefox installers, and so on, appear attached to each t...
AT Development
provements over the past two decades. this article (from 2007) reviews the progress and technology as it has developed. guidelines at apis implementation by gecko at vendors guide to support gecko-based applications like firefox, thunderbird and so on. accessibility architecture how the accessibility hierarchy is implemented in mozilla (some issues aren't addressed by previous guide).
building xulrunner with python how to
build xulrunner with python on windows. then comtypes gives access to msaa and iaccessible2. references at apis implementation references shows how gecko handles atk, iaccessible2, msaa and universal access api accessible web specifications references provides the map of reflecting web specification to at apis. this page includes: aria references ...
Feed content access API
dtextconstruct that can represent the text in various formats; we get its text property to fetch the feed's title as html-encoded text. we could, alternatively, use its plaintext() method to get a copy of the title translated into plain text. we then scan the array of items in the feed by looking at the feed.items nsiarray. this array contains nsifeedentry objects that describe each feed item. we
build the contents of the document by looking at the title, link, summary, and content properties for each item. the full url of the link is retrieved using the link's resolve() method. to initialize a fetch of the feed, we simply call fetch(url). this opens a new window containing the feed contents, with each item's title a clickable link that takes you to the article itself. for details on each of th...
FUEL
fuel is new in firefox 3. fuel is about making it easier for extension developers to be productive, by minimizing some of the xpcom formality and adding some "modern" javascript ideas. we want to start with areas that will provide the most benefit. fuel has a fueliapplication interface that implements all the functions of extiapplication. ...
SMILE
smile is about making it easier for extension developers to be productive, by minimizing some of the xpcom formality and adding some "modern" javascript ideas. we want to start with areas that will provide the most benefit. smile has a smileiapplication interface that implements all the functions of extiapplication. the library has also been implemented in firefox ("fuel") and in thunderbird ("steel"). ...
Binary compatibility
if mozilla decides to upgrade to a compiler that does not have the same abi as the current version, any built component may fail. it is a possiblity that is introduced when upgrading to a new compiler without recompiling everything. effectively, it is a different platform. what does this mean to you? if you
build a component and it works fine in version 1.0 of mozilla. if and when mozilla upgrades the compiler they use, your component will have to be rebuilt against the same compiler. when you see a @status frozen, note that this means it should work as long as the component and xpcom are built with the same compiler abi. for more information on issues of componentization and binary compatibility, see http://mozilla.org/projects/xpcom/gl...ent_reuse.html . comments and questions should ...
XPCOM Glue without mozalloc
y is new in xulrunner 2.0, and it's identical to xpcomglue_s, except that it's compiled without mozalloc. simply change all references to "xpcomglue_s" in your compiler and linker flags to "xpcomglue_s_nomozalloc". resulting xpcom components will no longer have a dependency on mozalloc, and will thus be compatible with xulrunner applications prior to 2.0 as well. comment: you might also need to
build your component with the moz_no_mozalloc flag (-dmoz_no_mozalloc) ...
Creating the Component Code
they define the module and factory interfaces, and they contain a couple of important macros as well (see the following chapter for information about using these macros). the two other includes, nsicomponentmanager.h and nsicomponentregistrar.h, provide functions such as registerfactorylocation that are required to implement the module and factory classes in your code. ...
Using XPCOM Components
ned from a search on "gfx" as part of the contract id and the right column a list of the interfaces. when you open a component on the left, you can see the interfaces it implements along with a list of the methods provided by each interface. the xpcom component viewer can be extremely useful for this sort of gross interrogation, but again: it displays all of the components and interfaces in your
build, many of which are not practical for actual reuse or stable enough to be used reliably in your own application development. use comprehensive lists like this with caution. using xpcom components in your cpp xpconnect makes it easy to acecss xpcom components as javascript objects, but using xpcom components in c++ is not much more difficult. managing cookies from cpp duplicates code from gett...
Using XPCOM Utilities to Make Things Easier
t of methods to be supported. the ns_init_isupports macro is also a bit of a special case. historically, it gets called in the constructor for your class and sets mrefcnt to zero. however, a change in xpcom that occurred before mozilla 1.3 makes ns_init_isupports no longer necessary: mrefcnt's type has been changed from an integer to a class that provides its own auto-initialization. if you are
building with versions earlier than mozilla 1.3, this macro is still required. the following table summarizes the macro usage in this portion of the weblock.cpp source file: common xpcom macros ns_impl_isupportsn implements nsisupports for a given class with n number of interfaces ns_decl_isupports declares methods of nsisupports including mrefcnt ns_init_isupports ...
Interfacing with the XPCOM cycle collector
the collector wakes up and examines any suspicious pointers that have been sitting in its buffer for a while. this is the scanning stage of the collector's operation. in this stage the collector repeatedly asks each candidate for a singleton cycle-collection helper class, and if that helper exists, the collector asks the helper to describe the candidate's (owned) children. this way the collector
builds a picture of the ownership subgraph reachable from suspicious objects. if the collector finds a group of objects that all refer back to one another, and establishes that the objects' reference counts are all accounted for by internal pointers within the group, it considers that group cyclical garbage, which it then attempts to free. this is the unlinking stage of the collectors operation. in th...
Components.utils.forceGC
a hash of weak javascript references. users should note that garbage collection is a very expensive operation and should only be forced when it is known to be absolutely necessary. note: nsidomwindowutils.garbagecollect() offers similar functionality but will trigger the cycle collector in addition to the garbage collector in the javascript engine. this will make sure that xpcom components that
build cycles with javascript objects also get collected which might be important, for example for testcases that depend on the garbage collector. requires universalxpconnect privileges. if you want to schedule garbage collection to occur in the future, at a time when no javascript code is running, you can use components.utils.scheduleprecisegc() instead. ...
Components.utils.setGCZeal
this method lets scripts set the zeal level for garbage collection. you can get details on what this method does in js_setgczeal. this method calls through to that thusly: js_setgczeal(<current context>, zeal, js_default_zeal_freq, false); syntax components.utils.setgczeal(zeal); where zeal is the zeal value you wish to use. this method has no effect unless running in a debug
build. ...
JavaXPCOM
with javaxpcom, a developer can talk to xpcom or embed gecko from a java application. javaxpcom is very similar to xpconnect (javascript-xpcom bridge), and uses xpidl. note: javaxpcom was included in xulrunner up through version 1.9.2. it has been removed in xulrunner 2, and is not actively maintained. documentation javaxpcom development how to get and
build the source, as well as how to view and report bugs. sample code there are several java test applications checked in to the tree that give examples on how to embed gecko or init xpcom from within java. embedding mozilla in a java application using javaxpcom xulrunner ships with the javaxpcom component, which allows java code to interact with xpcom ob...
Profiling XPCShell
ction; the functions name; the starting line number; the ending line number; the function's size; the amount of time (in milliseconds) the fastest call took; the time of the slowest call; the average time spend; the total time; the time spend in the function itself is given (that is the total time excluding the time spend in functions called from this function). notes you need a trunk
build from after 2007-05-28. using an earlier
build will cause the profiler to hang the more adventurous can use the nsixpctoolsprofiler.idl interface directly, but be aware that you must start the profiler before loading the files you want to profile (creating an instance of a component loads the file!) ...
IAccessible2
d to: the msaa objectid which is used by the server to disambiguate between iaccessibles per hwnd or the msaa childid which is used to disambiguate between children being managed by an iaccessible. this value is provided so the at can have access to a unique runtime persistent identifier even when not handling an event for the object. an example of when this value is useful is if the at wants to
build a cache. the at could cache the uniqueids in addition to other data being cached. when an event is fired the at could map the uniqueid to its internal model. thus, if there's a reorder/show/hide event the at knows which part of the internal structure has been invalidated and can refetch just that part. this value can also be used by an at to determine when the current control has changed. if the ...
nsIAppStartup
tup and the timestamps indicating when they occurred. parameters none. return value a javascript object with the following fields. keys are the event names and their values are the times. events that didn't occur are not in the object. event identifier (key) description main time at which main application core was loaded. note: only available with libxul
builds. firstpaint time the first paint occurred. note: only available with libxul
builds. sessionrestored time session restore finished. example this example logs startup time information to the console. var aconsoleservice = components.classes["@mozilla.org/consoleservice;1"] .getservice(components.interfaces.nsiconsoleservice...
nsIBrowserSearchService
engines. defaultengine nsisearchengine the default search engine. returns the first visible engine if the default engine is hidden. may be null if there are no visible search engines. read only. originaldefaultengine nsisearchengine the original default engine. this differs from the "defaultengine" attribute in that it always returns a given
build's default engine, regardless of whether it is hidden. read only. methods addengine() adds a new search engine from the file at the supplied uri, optionally asking the user for confirmation first. if a confirmation dialog is shown, it will offer the option to begin using the newly added engine right away; if no confirmation dialog is shown, the new engine will be used right away automati...
nsIChannel
ell) to indicate whether or not the channel corresponds to an initial document uri load (for example link click). load_targeted 20 set (for example by the uriloader) to indicate whether or not the end consumer for this load has been determined. load_call_content_sniffers 21 if this flag is set, the channel should call the content sniffers as described in netwerk/
build/nsnetcid.h about ns_content_sniffer_category. see nsicontentsniffer [en-us] note: channels may ignore this flag; however, new channel implementations should only do so with good reason. load_classify_uri 22 this flag tells the channel to use uri classifier service to check the uri when opening the channel. methods asyncopen() asynchronously open this channel. dat...
nsIContentSniffer
netwerk/base/public/nsicontentsniffer.idlscriptable content sniffer interface. components implementing this interface can determine a mime type from a chunk of bytes. inherits from: nsisupports last changed in gecko 1.9 (firefox 3) to implement this interface use net-content-sniffers category. see netwerk/
build/nsnetcid.h about ns_content_sniffer_category. method overview acstring getmimetypefromcontent(in nsirequest arequest, [const,array,size_is(alength)] in octet adata, in unsigned long alength); methods getmimetypefromcontent() given a chunk of data, determines a mime type. information from the given request may be used in order to make a better decision. note: implementations should consider the request read-only. especially, they should not attempt to set the...
nsIDOMWindowUtils
ssed from unprivileged context (not content-accessible) will throw a dom security error if called without universalxpconnect privileges. void forceupdatenativemenuat( in astring indexstring ); parameters indexstring garbagecollect() force a garbage collection followed by a cycle collection. will throw a dom security error if called without universalxpconnect privileges in non-debug
builds. available to all callers in debug
builds. void garbagecollect( in nsicyclecollectorlistener alistener optional ); parameters alistener optional listener that receives information about the cc graph (see @mozilla.org/cycle-collector-logger;1 for a logger component) getcursortype() get current cursor type from this window. short getcursortype(); parameters none. return value th...
nsIDebug
as javascript, java, python, perl, and so forth. inherits from: nsisupports last changed in gecko 1.7 note: c/c++ consumers who are planning to use the nsidebug interface with the @mozilla.org/xpcom;1 contract should use ns_debugbreak() from xpcom glue instead, or alternatively the ns_abort, ns_assertion, ns_break, and ns_warning macros, which also call ns_debugbreak() if used in a debugging
build. method overview void abort(in string afile, in long aline); void assertion(in string astr, in string aexpr, in string afile, in long aline); void break(in string afile, in long aline); void warning(in string astr, in string afile, in long aline); methods abort() requests the process to trigger a fatal abort. void abort( in string afile, in long aline ); parameters afile file co...
nsIDebug2
xpcom/base/nsidebug2.idlscriptable adds access to additional information in debug
builds of mozilla code by expanding upon the features in nsidebug 1.0 66 introduced gecko 1.9.2 inherits from: nsidebug last changed in gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) attributes attribute type description assertioncount long the number of assertions since process start. this is normally zero in release
builds, but does include calls to nsidebug.assertion(). read only. isdebug
build boolean whether xpcom was compiled with debug defined. this often correlates to whether other code (for example, firefox, xulrunner) was compiled with debug defined. read only. see also nsidebug ...
nsIEditorSpellCheck
ersonal dictionary. returns an empty string when there are no more words. wstring getpersonaldictionaryword(); parameters none. return value the next word in the personal dictionary. getsuggestedword() used to get suggestions for the last word that was checked and was misspelled. the first call returns the first (best) suggestion. subsequent calls iterate through all suggestions, allowing you to
build a list. when there are no more suggestions, an empty string (not a null pointer) is returned. wstring getsuggestedword(); parameters none. return value the next best suggestion for the last word that was checked and was misspelled, or an empty string if there are no remaining suggestions. ignorewordalloccurrences() tells the spell checker to ignore all occurrences of the specified word when spel...
nsIFile
tory to the location of an existing directory that is not writable. ns_error_file_destination_not_dir indicates that "newparentdir" exists and is not a directory. normalize() this method is used to canonicalize the path represented by this nsifile. (for example by resolving symlinks as well as removing .. and . components on unix). as of gecko 1.7, this method is only implemented under unix
builds (except for mac osx). this method will fail if the path does not exist. void normalize(); parameters none. exceptions thrown ns_error_file_target_does_not_exist indicates that the file path does not exist. ns_error_file_destination_not_dir indicates that a component of the path prefix is not a directory. ns_error_file_access_denied read or search permission was denied for a componen...
nsIFileView
note: a quirk of the nsifileview is that it requires an appropriate treecols section in the tree tag, by default fileview will return the file size in the column. ...
Gecko Plugin API Reference - Plugins
lement for plug-in display using custom embed attributes plug-in references plug-in development overview writing plug-ins registering plug-ins ms windows unix mac os x drawing a plug-in instance handling memory sending and receiving streams working with urls getting version and ui information displaying messages on the status line making plug-ins scriptable
building plug-ins
building, platforms, and compilers
building carbonized plug-ins for mac os x type libraries installing plug-ins native installers xpi plug-ins installations plug-in installation and the windows registry initialization and destruction initialization instance creation instance destruction shutdown initialize and shutdown example drawing and ev...
Accessibility Inspector - Firefox Developer Tools
s done via the accessibility apis available inside web browsers, which expose information on what roles the different elements on your page play (e.g., are they just text, or are they buttons, links, form elements, etc.?). semantic dom elements have roles assigned to them by default that hint at what their purpose is. sometimes, however, you need to use some non-semantic markup (e.g., <div>s) to
build a complex custom control, and the control won't have a default role that reflects its purpose. in such a situation, you can use wai-aria role attributes to provide your own roles. roles and other information exposed by browser accessibility apis are presented in a hierarchical structure called the accessibility tree. this is a bit like the dom tree, except that it contains a more limited set of ...
Browser Console - Firefox Developer Tools
se); bonus features available for add-on sdk add-ons, the console api is available automatically. here's an example add-on that just logs an error when the user clicks a widget: widget = require("sdk/widget").widget({ id: "an-error-happened", label: "error!", width: 40, content: "error!", onclick: logerror }); function logerror() { console.error("something went wrong!"); } if you
build this as an xpi file, then open the browser console, then open the xpi file in firefox and install it, you'll see a widget labeled "error!" in the add-on bar: click the icon. you'll see output like this in the browser console: for add-on sdk-based add-ons only, the message is prefixed with the name of the add-on ("log-error"), making it easy to find all messages from this add-on using the "fil...
Validators - Firefox Developer Tools
y web page or external css files according to the w3c css standards. w3c rdf validator the rdf validator service will validate the rdf/xml contained on a given uri. link checker this tool will check links on a given web page. html tidy html tidy is a tool that can be used to report errors in an html page and to format web pages for better reading. (some authoring software, such as html-kit,
builds in html tidy which makes validation quick and easy.) html validator pro this is an automated html5 checker using the same validator as the w3c. provide a starting url and the tool will find and validate all pages in a website. accessibility services lynx viewer checks a web page using lynx visualization and allows validation of accessibility features original document information last ...
View Source - Firefox Developer Tools
e errors are reported even though all the reported errors are parse errors according to the html specification, not all parse errors are reported by view source. among the errors that don't get reported: bytes that are illegal according to the document's encoding aren't marked as errors. forbidden characters aren't reported as errors. errors related to the end-of-file aren't reported. tree
builder errors relating to text (as opposed to tags, comments, or doctypes) aren't reported. parse errors related to xmlns attributes aren't reported. xml syntax highlighting view source uses the html tokenizer when highlighting xml source. while the tokenizer has support for processing instructions when highlighting xml source, that's the only xml-specific capability provided. because of this, doc...
about:debugging (before Firefox 68) - Firefox Developer Tools
tton, navigate to the directory containing the add-on's file, and select any file in that directory. the temporary add-on will be displayed under the "temporary extensions" header. you don't have to package or sign the add-on. the add-on will stay installed until you restart firefox. the big advantages of this method, compared with installing an add-on from an xpi, are: you don't have to re
build an xpi and reinstall when you change the add-on's code you can load an add-on without signing it and without needing to disable signing. updating a temporary add-on if you install the add-on in this way, what happens when you update the add-on's files? before firefox 48 if you change files that are loaded on demand, like content scripts or popups, then changes you make are picked up autom...
about:debugging - Firefox Developer Tools
button, navigate to the directory containing the add-on and select its manifest file. the temporary extension is then displayed under the temporary extensions header. you don't have to package or sign the extension before loading it, and it stays installed until you restart firefox. the major advantages of this method, compared with installing an add-on from an xpi, are: you don't have to re
build an xpi and reinstall when you change the add-on's code; you can load an add-on without signing it and without needing to disable signing. once you have loaded a temporary extension, you can see information about it and perform operations on it. you can use the following buttons: inspect loads the extension in the debugger. reload reloads the temporary extension. this is handy when you...
AudioNode - Web APIs
,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">audionode</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} note: an audionode can be target of events, therefore it implements the eventtarget interface. description the audio routing graph each audionode has inputs and outputs, and multiple audio nodes are connected to
build a processing graph. this graph is contained in an audiocontext, and each audio node can only belong to one audio context. a source node has zero inputs but one or multiple outputs, and can be used to generate sound. on the other hand, a destination node has no outputs; instead, all its inputs are directly played back on the speakers (or whatever audio output device the audio context uses). in ad...
AudioTrack.language - Web APIs
't contain speech. for example, if the primary language used in the track is united states english, this value would be "en-us". for brazilian portuguese, the value would be "pt-br". example this example locates all of a media element's primary language and translated audio tracks and returns a list of objects containing each of those tracks' id, kind, and language. this could then be used to
build a user interface for selecting the language the user would like to listen to while watching a movie, for example. function getavailablelanguages(el) { var tracklist = []; const wantedkinds = [ "main", "translation" ]; el.audiotracks.foreach(function(track) { if (wantedkinds.includes(track.kind)) { tracklist.push({ id: track.id, kind: track.kind, la...
Using the CSS Painting API - Web APIs
om argument feature comes in handy. another way to think about it is that arguments are set to control what you are actually drawing, whereas properties are set to control styling. now we can really start to see the benefits of this api, if we can control a myriad of drawing parameters from our css through both custom properties and extra paint() function arguments, then we can really start to
build reusable and highly controllable styling functions. registerpaint('hollowhighlights', class { static get inputproperties() { return ['--boxcolor']; } // input arguments that can be passed to the `paint` function static get inputarguments() { return ['*','']; } static get contextoptions() { return {alpha: true}; } paint(ctx, size, props, args) { // ctx -> drawing context //...
CSS Typed Object Model API - Web APIs
manipulated and understood more easily and more reliably than string parsing and concatenation. this is easier for authors (for example, numeric values are reflected with actual js numbers, and have unit-aware mathematical operations defined for them). it is also generally faster, as values can be directly manipulated and then cheaply translated back into underlying values without having to both
build and parse strings of css. css typed om both allows for the performant manipulation of values assigned to css properties while enabling maintainable code that is both more understand and easier to write. interfaces cssstylevalue the cssstylevalue interface of the the css typed object model api is the base class of all css values accessible through the typed om api. an instance of this class ma...
Using images - Web APIs
mages. screenshotlive sample the script itself is very simple. each <img> is assigned an id attribute, which makes them easy to select using document.getelementbyid(). we then simply use drawimage() to slice the rhino out of the first image and scale him onto the canvas, then draw the frame on top using a second drawimage() call. art gallery example in the final example of this chapter, we'll
build a little art gallery. the gallery consists of a table containing several images. when the page is loaded, a <canvas> element is inserted for each image and a frame is drawn around it. in this case, every image has a fixed width and height, as does the frame that's drawn around them. you could enhance the script so that it uses the image's width and height to make the frame fit perfectly around ...
Canvas tutorial - Web APIs
simple (and not so simple) animations. the images on this page show examples of <canvas> implementations which will be created in this tutorial. this tutorial describes how to use the <canvas> element to draw 2d graphics, starting with the basics. the examples provided should give you some clear ideas about what you can do with canvas, and will provide code snippets that may get you started in
building your own content. first introduced in webkit by apple for the os x dashboard, <canvas> has since been implemented in browsers. today, all major browsers support it. before you start using the <canvas> element is not very difficult, but you do need a basic understanding of html and javascript. the <canvas> element is not supported in some older browsers, but is supported in recent versions o...
ContentIndex.getAll() - Web APIs
rl string of the source image. sizes: optional a string representation of the image size. type: optional the mime type of the image. exceptions no exceptions are thrown. if there are no items in the content index, an empty array is returned. examples the below example shows an asynchronous function that retrieves items within the content index and iterates over each entry,
building a list for the interface. async function createreadinglist() { // access our service worker registration const registration = await navigator.serviceworker.ready; // get our index entries const entries = await registration.index.getall(); // create a containing element const readinglistelem = document.createelement('div'); // test for entries if (!array.length) { // if...
ContentIndex - Web APIs
async function createreadinglist() { // access our service worker registration const registration = await navigator.serviceworker.ready; // get our index entries const entries = await registration.index.getall(); // create a containing element const readinglistelem = document.createelement('div'); // test for entries if (!array.length) { // if...
Content Index API - Web APIs
async function createreadinglist() { // access our service worker registration const registration = await navigator.serviceworker.ready; // get our index entries const entries = await registration.index.getall(); // create a containing element const readinglistelem = document.createelement('div'); // test for entries if (!array.length) { // if...
DataTransferItem.webkitGetAsEntry() - Web APIs
""; for (let i=0; i<items.length; i++) { let item = items[i].webkitgetasentry(); if (item) { scanfiles(item, listing); } } }, false); this fetches the list of datatransferitem objects representing the items dropped from event.datatransfer.items. then we call event.preventdefault() to prevent the event from being handled further after we're done. now it's time to start
building the list. first, the list is emptied by setting listing.innerhtml to be empty. that leaves us with an empty ul to begin inserting directory entries into. then we iterate over the items in the list of dropped items. for each one, we call its webkitgetasentry() method to obtain a filesystementry representing the file. if that's successful, we call scanfiles() to process the item—either by add...
Document.createDocumentFragment() - Web APIs
syntax var fragment = document.createdocumentfragment(); value a newly created, empty, documentfragment object, which is ready to have nodes inserted into it. usage notes documentfragments are dom node objects which are never part of the main dom tree. the usual use case is to create the document fragment, append elements to the document fragment and then append the document fragment to the dom tree. in the dom tree, the document fragment is replaced by all its children. ...
Document.createEvent() - Web APIs
patchevent. syntax var event = document.createevent(type); event is the created event object. type is a string that represents the type of event to be created. possible event types include "uievents", "mouseevents", "mutationevents", and "htmlevents". see notes section for details. example // create the event. var event = document.createevent('event'); // define that the event name is '
build'. event.initevent('
build', true, true); // listen for the event. elem.addeventlistener('
build', function (e) { // e.target matches elem }, false); // target can be any element or other eventtarget. elem.dispatchevent(event); notes event type strings suitable for passing to createevent() are listed in the dom standard — see the table in step 2. bear in mind that most event objects now ...
Document.getElementsByTagName() - Web APIs
name of the elements. the special string "*" represents all elements. the latest w3c specification says elements is an htmlcollection; however, this method returns a nodelist in webkit browsers. see bug 14869 for details. example in the following example, getelementsbytagname() starts from a particular parent element and searches top-down recursively through the dom from that parent element,
building a collection of all descendant elements which match the tag name parameter. this demonstrates both document.getelementsbytagname() and the functionally identical element.getelementsbytagname(), which starts the search at a specific element within the dom tree. clicking the buttons uses getelementsbytagname() to count the descendant paragraph elements of a particular parent (either the documen...
Traversing an HTML table with JavaScript and DOM Interfaces - Web APIs
o the parents from the bottom up. here's the html markup generated by the javascript code: ... <table border="2"> <tbody> <tr><td>cell is row 0 column 0</td><td>cell is row 0 column 1</td></tr> <tr><td>cell is row 1 column 0</td><td>cell is row 1 column 1</td></tr> </tbody> </table> ... here's the dom object tree generated by the code for the <table> element and its child elements: you can
build this table and its internal child elements by using just a few dom methods. remember to keep in mind the tree model for the structures you are planning to create; this will make it easier to write the necessary code. in the <table> tree of figure 1 the element <table> has one child: the element <tbody>. <tbody> has two children. each <tbody>'s child (<tr>) has two children (<td>). finally, each <...
Using the W3C DOM Level 1 Core - Web APIs
epresentation. for example, the following document <html> <head> <title>my document</title> </head> <body> <h1>header</h1> <p>paragraph</p> </body> </html> has a dom tree that looks like this: (note that, although the above tree is similar to the above document's dom tree, it's not identical, as the actual dom tree preserves whitespace.) when a web browser parses an html document, it
builds a dom tree and then uses it to display the document. what does the dom level 1 core let me do? the w3c dom level 1 core allows you to change a dom tree in any way you want. this implies the ability to create any html or xml document from scratch, or to change any contents of a given html or xml document. the easiest way for web page authors to edit the dom of a document is to use javascript to...
How whitespace is handled by HTML, CSS, and in the DOM - Web APIs
whitespace? whitespace is any string of text composed only of spaces, tabs or line breaks (to be precise, crlf sequences, carriage returns or line feeds). these characters allow you to format your code in a way that will make it easily readable by yourself and other people. in fact, much of our source code is full of these whitespace characters, and we only tend to get rid of it in a production
build step to reduce code download sizes. html largely ignores whitespace? in the case of html, whitespace is largely ignored — whitespace in between words is treated as a single character, and whitespace at the start and end of elements and outside elements is ignored. take the following minimal example: <!doctype html> <h1> hello world! </h1> this source code contains a coup...
Element.innerHTML - Web APIs
on a web page. 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. then the message is appended to the box with the class "log". we add a second method that logs information about mouseevent based events (such as mousedown, click, and mouseenter): function logevent(event) { var msg = "event <strong>" + event.type + "</strong> at <em>" + event.clientx + ", " + event.clienty + "</em>"; log(msg)...
EventTarget.addEventListener() - Web APIs
n adding more parameters to the function (complicating things enormously when dealing with optional values), the third parameter was changed to an object that can contain various properties defining the values of options to configure the process of removing the event listener. because older browsers (as well as some not-too-old browsers) still assume the third parameter is a boolean, you need to
build your code to handle this scenario intelligently. you can do this by using feature detection for each of the options you're interested in. for example, if you want to check for the passive option: let passivesupported = false; try { const options = { get passive() { // this function will be called when the browser // attempts to access the passive property. pas...
Using files from web applications - Web APIs
this.files[i].name + ": " + this.files[i].size + " bytes"; li.appendchild(info); } } } this starts by fetching the url of the <div> with the id filelist. this is the block into which we'll insert our file list, including thumbnails. if the filelist object passed to handlefiles() is null, we simply set the inner html of the block to display "no files selected!". otherwise, we start
building our file list, as follows: a new unordered list (<ul>) element is created. the new list element is inserted into the <div> block by calling its node.appendchild() method. for each file in the filelist represented by files: create a new list item (<li>) element and insert it into the list. create a new image (<img>) element. set the image's source to a new object url representi...
FileError - Web APIs
s of the methods for the sake of the sanity of your users. a web app could fail for various reasons, so you don't want to spend the rest of your day guessing what's going on and going through maddening troubleshooting. don't run your app from file:// for security reasons, browsers do not allow you to run your app from file://. in fact, many of the powerful storage apis (such as file system, blob
builder, and filereader) throw errors if you run the app locally from file://. when you're just testing your app, and you don't want to set up a web server, you can bypass the security restriction on chrome. just start chrome with the --allow-file-access-from-files flag. use the flag only for testing purposes. attribute attribute type description code unsigned short ...
FileSystemDirectoryReader.readEntries() - Web APIs
""; for (let i=0; i<items.length; i++) { let item = items[i].webkitgetasentry(); if (item) { scanfiles(item, listing); } } }, false); this fetches the list of datatransferitem objects representing the items dropped from event.datatransfer.items. then we call event.preventdefault() to prevent the event from being handled further after we're done. now it's time to start
building the list. first, the list is emptied by setting listing.innerhtml to be empty. that leaves us with an empty ul to begin inserting directory entries into. then we iterate over the items in the list of dropped items. for each one, we call its webkitgetasentry() method to obtain a filesystementry representing the file. if that's successful, we call scanfiles() to process the item—either by add...
FileSystemFileEntry - Web APIs
// create a filewriter object for our filesystemfileentry (log.txt). fileentry.createwriter(function(filewriter) { filewriter.onwriteend = function(e) { console.log('write completed.'); }; filewriter.onerror = function(e) { console.log('write failed: ' + e.tostring()); }; // create a new blob and write it to log.txt. var bb = new blob
builder(); bb.append('meow'); filewriter.write(bb.getblob('text/plain')); }, errorhandler); }, errorhandler); } window.requestfilesystem(window.temporary, 1024*1024, oninitfs, errorhandler); specifications specification status comment file and directory entries apithe definition of 'filesystemfileentry' in that specification. draft draft of prop...
FileHandle API - Web APIs
ckedfile filerequest it also has connections with the file api, especially the file and blob interfaces. basic operations create a filehandle because the intent is to allow the storage of files through indexeddb, creating a filehandle instance requires an indexeddb database. var idbreq = indexeddb.open("myfilestoragedatabase"); idbreq.onsuccess = function(){ var db = this.result; var
buildhandle = db.mozcreatefilehandle("test.txt", "plain/text");
buildhandle.onsuccess = function(){ var myfilehandle = this.result; console.log('handle', myfilehandle); }; }; mozcreatefilehandle() takes two arguments: a name and an optional type. both of these are just descriptive and are not used by the database. however, they are important for the filehandle object as it can generate ...
Node.replaceChild() - Web APIs
an> // </div> // create an empty element node // without an id, any attributes, or any content var sp1 = document.createelement("span"); // give it an id attribute called 'newspan' sp1.id = "newspan"; // create some content for the new element. ...
Using Pointer Events - Web APIs
this example is based on the one in the touch events overview, except it uses the pointer events input event model. another difference is that because pointer events are pointer device agnostic, the application accepts coordinate-based inputs from a mouse, a pen, or a fingertip using the same code. this application will only work on a browser that supports pointer events. a live version of this application is available on github. the source code is available on github and pull requests and bug reports are welcome. definitions surface a touch-sensitive surface. ...
PublicKeyCredentialCreationOptions.pubKeyCredParams - Web APIs
-key" may be used. alg a numeric identifier for the algorithm to be used to generate the key pair. the links between identifier and algorithms are defined in this iana registry (e.g. -7 indicates the elliptic curve algorithm ecdsa with sha-256). though those elements are sorted by preference (the first element being the most prefered), it is up to the client to choose among those elements for
building the credential. examples var publickey = { pubkeycredparams: [ // we would like an elliptic curve to be used if possible { type: "public-key", alg: -7 }, // if not, then we will fallback on an rsa algorithm { type: "public-key", alg: -37 } ], challenge: new uint8array(26) /* this actually is given from the server */, rp: { name: "ex...
Web Push API Notifications best practices - Web APIs
in receiving updates. in addition to the question of whether a push notification is required at all, there are many different types of push notifications, ranging from casual-and-disappearing to persistent-and-requiring-interaction. we caution you to use the interaction-requiring ones very sparingly, since they can be the most annoying. your notifications should be assistive, not disruptive.
building trust some studies have shown that as many as 60% of push notifications are blocked. allowing your site to push notifications in realtime requires trust. you can
build trust by having a well-designed website that provides good content that shows respect for the user, and a clear value to accepting push notifications. browser mitigations because of abuses of push notifications in the past, w...
RTCDataChannel.bufferedAmount - Web APIs
this only includes data buffered by the user agent itself; it doesn't include any framing overhead or buffering done by the operating system or network hardware. the user agent may implement the process of actually sending data in any way it chooses; this may be done periodically during the event loop or truly asynchronously. as messages are actually sent, this value is reduced accordingly. ...
RTCDataChannel.label - Web APIs
erty label returns a domstring containing a name describing the data channel. these labels are not required to be unique. you may use the label as you wish; you could use it to identify all the channels that are being used for the same purpose, by giving them all the same name. or you could give each channel a unique label for tracking purposes. it's entirely up to the design decisions made when
building your site or app. a unique id can be found in the id property. a data channel's label is set when the channel is created by calling rtcpeerconnection.createdatachannel(). it cannot be changed after that. syntax var name = adatachannel.label; value a string identifier assigned by the web site or app when the data channel was created, as specified when rtcpeerconnection.createdatachanne...
RTCIceCandidateInit.candidate - Web APIs
1 is encoded to this string; 2 becomes "rtcp") protocol = "udp" priority = 2043278322 ip = "192.168.0.56" port = 44323 type = "host" example when a new ice candidate is received by your signaling code from the remote peer, you need to construct the rtcicecandidate object that encapsulates it. this is done in the event handler for the icecandidate event. ...
RTCIceCandidatePairStats.state - Web APIs
the state property in an rtcicecandidatepairstats object indicates the state of the check list of which the candidate pair is a member. syntax state = rtcicecandidatepairstats.state; value a domstring whose value is one of those found in the rtcstatsicecandidatepairstate enumerated type. ice check lists during ice negotiation, the ice layer
builds up a check list, which is a list of potential pairings of ice candidates. each pair has a state, whose value is represented by rtcstatsicecandidatepairstate. when a candidate pair is added to the check list, it begins in the frozen state. as soon as there are no checks ongoing which block the pair from being analyzed, it is unfrozen and moves into the waiting state. this may happen immediately upon being added to the check list. each time a...
RTCPeerConnection.addIceCandidate() - Web APIs
f the specified object's candidate is either missing or an empty string (""), it signals that all remote candidates have been delivered. the end-of-candidates notification is transmitted to the remote peer using a candidate with an a-line value of end-of-candidates. during negotiation, your app will likely receive many candidates which you'll deliver to the ice agent in this way, allowing it to
build up a list of potential connection methods. this is covered in more detail in the articles webrtc connectivity and signaling and video calling. syntax apromise = pc.addicecandidate(candidate); addicecandidate(candidate, successcallback, failurecallback); parameters candidate optional an object conforming to the rtcicecandidateinit dictionary, or an rtcicecandidate object; the contents...
RTCPeerConnection.addTrack() - Web APIs
ding stream (or streams) automatically on the other end of the connection, and will then automatically add the received track to those streams. streamless tracks if no streams are specified, then the track is streamless. this is perfectly acceptable, although it will be up to the remote peer to decide what stream to insert the track into, if any. this is a very common way to use addtrack() when
building many types of simple applications, where only one stream is needed. for example, if all you're sharing with the remote peer is a single stream with an audio track and a video track, you don't need to deal with managing what track is in what stream, so you might as well just let the transceiver handle it for you. here's an example showing a function that uses getusermedia() to obtain a stream ...
RTCStats - Web APIs
cating the time at which the sample was taken for this statistics object. type a domstring indicating the type of statistics the object contains, taken from the enum type rtcstatstype. the statistics type hierarchy the various dictionaries that are used to define the contents of the objects that contain each of the various types of statistics for webrtc are structured in such a way that they
build upon the core rtcstats dictionary, each layer adding more relevant information. 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...
Using Service Workers - Web APIs
dard thing to want to do, but it can be a bit of a pain. we can use .onload to only display the image after it’s loaded, but what about events that start happening before we start listening to them? we could try to work around this using .complete, but it’s still not foolproof, and what about multiple images? and, ummm, it’s still synchronous, so blocks the main thread. instead, we could
build our own promise to handle this kind of case. (see our promises test example for the source code, or look at it running live.) note: a real service worker implementation would use caching and onfetch rather than the xmlhttprequest api. those features are not used here so that you can focus on understanding promises. const imgload = (url) => { return new promise((resolve, reject) => { var r...
Service Worker API - Web APIs
uests in any way you want, using the fetchevent.respondwith method. note: because oninstall/onactivate could take a while to complete, the service worker spec provides a waituntil method, once this is called oninstall or onactivate, it passes a promise. functional events are not dispatched to the service worker until the promise is successfully resolved. for a complete tutorial to show how to
build up your first basic example, read using service workers. other use case ideas service workers are also intended to be used for such things as: background data synchronization. responding to resource requests from other origins. receiving centralized updates to expensive-to-calculate data such as geolocation or gyroscope, so multiple pages can make use of one set of data. client-side compi...
Multi-touch interaction - Web APIs
the touch event interfaces support application-specific single and multi-touch interactions. however, the interfaces can be a bit tricky for programmers to use because touch events are very different from other dom input events, such as mouse events. the application described in this guide shows how to use touch events for simple single and multi-touch interactions, the basics needed to
build application-specific gestures. a live version of this application is available on github. the source code is available on github and pull requests and bug reports are welcome. example this example demonstrates using the touchstart, touchmove, touchcancel, and touchend) touch events for the following gestures: single touch, two (simultaneous) touches, more than two simultaneous touches, 1-finger swipe, ...
TransformStream - Web APIs
{ let t = {...tds, encoding, options} super(t) _jstes_wm.set(this, t) } get encoding() {return _jstds_wm.get(this).decoder.encoding} get fatal() {return _jstds_wm.get(this).decoder.fatal} get ignorebom() {return _jstds_wm.get(this).decoder.ignorebom} } chaining multiple readablestreams together this is a useful one, where multiple streams can be conjoined. examples include
building a pwa with progressive loading and progressive streaming. let responses = [ /* conjoined response tree */ ] let {readable, writable} = new transformstream responses.reduce( (a, res, i, arr) => a.then(() => res.pipeto(writable, {preventclose: (i+1) !== arr.length})), promise.resolve() ) note that this is not resilient to other influences. specifications specification statu...
URL - Web APIs
.log(url.pathname); // "/cats" url properties can be set to construct the url: url.hash = 'tabby'; console.log(url.href); // "http://www.example.com/cats#tabby" urls are encoded according to the rules found in rfc 3986. for instance: url.pathname = 'démonstration.html'; console.log(url.href); // "http://www.example.com/d%c3%a9monstration.html" the urlsearchparams interface can be used to
build and manipulate the url query string. to get the search params from the current window's url, you can do this: // https://some.site/?id=123 const parsedurl = new url(window.location.href); console.log(parsedurl.searchparams.get("id")); // "123" the tostring() method of url just returns the value of the href property, so the constructor can be used to normalize and encode a url directly. const...
Animating textures in WebGL - Web APIs
this is actually pretty easy to do and fun to watch, so let's get started. you can use similar code to use any sort of data (such as a <canvas>) as the source for your textures. this example uses the glmatrix library to perform its matrix and vertex math. you'll need to include it if you create your own project based on this code. our sample loads a copy from a cdn in our html's <head>. ...
Getting started with WebGL - Web APIs
hematics involved in 3d graphics, and this article doesn't pretend to try to teach you 3d graphics concepts itself. the code examples in this tutorial can also be found in the webgl-examples github repository. it's worth noting here that this series of articles introduces webgl itself; however, there are a number of frameworks available that encapsulate webgl's capabilities, making it easier to
build 3d applications and games, such as three.js and babylon.js. preparing to render in 3d the first thing you need in order to use webgl for rendering is a canvas. the html fragment below declares a canvas that our sample will draw into. <body> <canvas id="glcanvas" width="640" height="480"></canvas> </body> preparing the webgl context the main() function in our javascript code, is called whe...
WebGL tutorial - Web APIs
s graphics processing unit (gpu). webgl elements can be mixed with other html elements and composited with other parts of the page or page background. this tutorial describes how to use the <canvas> element to draw webgl graphics, starting with the basics. the examples provided should give you some clear ideas what you can do with webgl and will provide code snippets that may get you started in
building your own content. before you start using the <canvas> element is not very difficult, but you do need a basic understanding of html and javascript. the <canvas> element and webgl are not supported in some older browsers, but are supported in recent versions of all major browsers. in order to draw graphics on the canvas we use a javascript context object, which creates graphics on the fly. in...
WebGL best practices - Web APIs
/left/right to fairly reliably 'pre-snap' our canvas to whole integer device coordinates. demo: https://jdashg.github.io/misc/webgl/device-pixel-presnap.html resizeobserver and 'device-pixel-content-box' on supporting browsers (chromium?), resizeobserver can be used with 'device-pixel-content-box' to request a callback that includes the true device pixel size of an element. ...
WebRTC coding guide - Web APIs
once you have an overall understanding of what webrtc does and how it works, your mind likely turns to implementation. how do you create a web application that uses two-way video or data streams without having to do all the hard work of compressing frames,
building streams, and so forth by yourself? this coding guide will explain in depth how webrtc works, and will dive into actual code that uses webrtc to do useful things. there are no subpages at this time. if you need to learn more about the fundamentals of how webrtc and its protocols work, check out our high-level guides for webrtc. ...
High-level guides - Web APIs
road, multi-component system for setting up and operating complex audio, video, and data channels across networks among two or more peers on the web. the high-level guides listed below introduce webrtc technology from a top-down perspective, describing the overall architecture, the life cycle of a webrtc connection, and basic security and technological issues you might run into as you explore and
build web content or apps using the webrtc api. in addition, you'll find suggestions as to tools, libraries, and frameworks that might be helpful and compatibility information so you know which parts of the overall suite of webrtc features can be safely used given your target audience. there are no subpages at this time. when you're ready to explore webrtc in more depth, be sure to take a look at ou...
Lifetime of a WebRTC session - Web APIs
in this article, we'll look at the lifetime of a webrtc session, from establishing the connection all the way through closing the connection when it's no longer needed. this article doesn't get into details of the actual apis involved in establishing and handling a webrtc connection; it simply reviews the process in general with some information about why each step is required. see signaling and video calling for an actual example with a step-by-step explanation of what the code does. this page is currently under construction, and some of the content will move to other pages as the webrtc guide material is built out. ...
Writing a WebSocket server in C# - Web APIs
oduction environments. using system.text; using system.text.regularexpressions; while(client.available < 3) { // wait for enough bytes to be available } byte[] bytes = new byte[client.available]; stream.read(bytes, 0, bytes.length); //translate bytes of request to string string data = encoding.utf8.getstring(bytes); if (regex.ismatch(data, "^get")) { } else { } the response is easy to
build, but might be a little bit difficult to understand. the full explanation of the server handshake can be found in rfc 6455, section 4.2.2. for our purposes, we'll just
build a simple response. you must: obtain the value of the "sec-websocket-key" request header without any leading or trailing whitespace concatenate it with "258eafa5-e914-47da-95ca-c5ab0dc85b11" (a special guid specified by rf...
The WebSocket API (WebSockets) - Web APIs
form networking library that works in the browser. it consists of a c wrapper around websockets and webrtc that abstracts away cross-browser differences, facilitating the creation of multi-user networking functionality for games and other apps. µwebsockets: highly scalable websocket server and client implementation for c++11 and node.js. clusterws: lightweight, fast and powerful framework for
building scalable websocket applications in node.js. cws: fast c++ websocket implementation for node.js (uwebsockets v0.14 fork) socket.io: a long polling/websocket based third party transfer protocol for node.js. socketcluster: a pub/sub websocket framework for node.js with a focus on scalability. websocket-node: a websocket server api implementation for node.js. total.js: web application framewo...
Viewpoints and viewers: Simulating cameras in WebXR - Web APIs
that is, you get the same answer whether you multiply left to right or right to left), matrix multiplication is not commutative! this is because each transform affects the position of the object and possibly the very coordinate system itself, which can dramatically change the results of the next operation performed. so you need to be careful about the order in which you apply your transforms when
building your composite transform (or directly applying transforms in sequence). applying the transform to apply the transform, you multiply the point or vector by the transform or composition of transforms. this has been a very quick overview of the concepts of position in terms of physical location, orientation or facing direction, and perspective. for more detail on the subject, see the articles ...
Fundamentals of WebXR - Web APIs
libraries that are built atop webgl to make it more convenient to use. a particular benefit to using a framework rather than directly using the webgl api is that libraries tend to implement virtual camera functionality. opengl (and thus webgl by extension) does not directly offer a camera view, using a library that simulates one on your behalf can make your job much, much easier, especially when
building code that allows free movement through your virtual world. since webgl is used for rendering the 3d world into the webxr session, you should first be familiar with webgl's general usage, and with the basics of 3d graphics in general. general-purpose 3d frameworks these frameworks are good for general-purpose programming as well as for game development when you want to do the logic yourself.
Geometry and reference spaces in WebXR - Web APIs
sing xr headsets and other such equipment, webxr has additional concepts that must be understood. in this article, we introduce the ways in which webxr expands upon the geometry of webgl, and how the positions and orientations of objects—both physical and virtual—are described in relation to one another using spaces and, in particular, reference spaces. the article spatial tracking in webxr
builds upon the information provided here to cover how the physical position and orientation of the user's head, as well as potentially other parts of their body such as the hands, are mapped into the digital world, as well as how the relative positions of both physical and virtual objects are tracked as they move around, so that the scene can be properly rendered and composited. fundamentals of 3d ge...
Lighting a WebXR setting - Web APIs
ned with the time of day can be used to determine the user's geographic location without involving the geolocation api. by ensuring that the coordinates of the ar scene don't align with compass coordinates, and by reducing the precision of the sun's light angle, the location can no longer be accurately estimated using this technique. temporal and spatial filtering consider an attack that uses a
building's automated lighting system to flash the lights on and off quickly in a known pattern. without proper precautions, the lighting estimation data could be used to detect this pattern and thus determine that a user is in a particular location. this could be done remotely, or it could be performed by an attacker who's located in the same room but wants to determine if the other person is also in t...
WebXR performance guide - Web APIs
lacing their contents with the new information each time you need to use them. they can be thought of as being similar to the registers in a microprocessor: a limited set of memory storage slots for specific kinds of data or use cases. while an individual vector or matrix doesn't occupy an inordinate amount of memory, the sheer number of vectors and matrices and other structures that are used to
build each frame of a 3d scene means the memory management becomes a problem eventually if you keep allocating and de-allocating memory objects. consider the following function drawscene(gl, view, programinfo, buffers, texture, deltatime) { ... for (object in scene) { let vertexlist = ... let normalmatrix = mat4.create(); let modelviewmatrix = mat4.create(); let objectmatrix = mat...
Using Feature Policy - HTTP
or an iframe to have a feature enabled, the origin must be in the allowlist for both the parent page and the allow attribute. disabling a feature in a policy is a one-way toggle. if a feature has been disabled for a child frame by its parent frame, the child cannot re-enable it, and neither can any of the child's descendants. enforcing best practices for good user experiences it's difficult to
build a website that uses all the latest best practices and provides great performance and user experiences. as the website evolves, it can become even harder to maintain the user experience over time. you can use feature policies to specify the desired best practices, and rely on the browser to enforce the policies to prevent regressions. there are several policy-controlled features designed to repre...
Expect-CT - HTTP
rt" notes root cas manually added to the trust store override and suppress expect-ct reports/enforcement. browsers will not remember an expect-ct policy, unless the site has 'proven' it can serve a certificate satisfying the certificate transparency requirements. browsers implement their own trust model regarding which ct logs are considered trusted for the certificate to have been logged to.
builds of chrome are designed to stop enforcing the expect-ct policy 10 weeks after the installation's
build date. specifications specification title internet draft expect-ct extension for http ...
Large-Allocation - HTTP
e of these addons installed, then we will continue to use the old single process architecuture for compatibility, and cannot handle the large-allocation header. this page would be loaded in a new process due to a large-allocation header, however large-allocation process creation is disabled on non-win32 platforms. firefox currently only supports the large-allocation header in our 32-bit windows
builds, as memory fragmentation is not an issue in 64-bit
builds. if you are running a non-win32 version of firefox, this error will appear. this check can be disabled with the "dom.largeallocation. forceenable" boolean preferece in about:config. specifications not part of any current specifications. an explainer of the ideas behind this header can be found in this document. ...
Firefox user agent string reference - HTTP
android. form factor gecko user agent string phone mozilla/5.0 (android 4.4; mobile; rv:41.0) gecko/41.0 firefox/41.0 tablet mozilla/5.0 (android 4.4; tablet; rv:41.0) gecko/41.0 firefox/41.0 focus for android from version 1, focus is powered by android webview and uses the following user agent string format: mozilla/5.0 (linux; <android version> <
build tag etc.>) applewebkit/<webkit rev> (khtml, like gecko) version/4.0 focus/<focusversion> chrome/<chrome rev> mobile safari/<webkit rev> tablet versions on webview mirror mobile, but do not contain a mobile token. starting in version 6, users can opt into using a geckoview-based focus for android with a hidden preference: it uses a geckoview ua string to advertise gecko compatibility. ...
Link prefetching FAQ - HTTP
nce to disable <link> tag prefetching may simply encourage websites to stick with js/dom hacks, and that would not be good for users. this is one reason why prefetching is enabled by default. which browsers support link prefetching? browsers based on mozilla 1.2 (or later) as well as browsers based on mozilla 1.0.2 (or later) support prefetching. this includes firefox and netscape 7.01+. camino
builds as of march 2003 are based on mozilla 1.0.1, and therefore do not support prefetching. test your browser to see if it supports link prefetching. privacy implications along with the referral and url-following implications already mentioned above, prefetching will generally cause the cookies of the prefetched site to be accessed. (for example, if you google amazon, the google results page will p...
An overview of HTTP - HTTP
o implement) and persistent connections: the underlying tcp connection can be partially controlled using the connection header. http/2 went a step further by multiplexing messages over a single connection, helping keep the connection warm and more efficient. experiments are in progress to design a better transport protocol more suited to http. for example, google is experimenting with quic which
builds on udp to provide a more reliable and efficient transport protocol. what can be controlled by http this extensible nature of http has, over time, allowed for more control and functionality of the web. cache or authentication methods were functions handled early in http history. the ability to relax the origin constraint, by contrast, has only been added in the 2010s. here is a list of common ...
Functions - JavaScript
a function in javascript is similar to a procedure—a set of statements that performs a task or calculates a value, but for a procedure to qualify as a function, it should take some input and return an output where there is some obvious relationship between the input and the output. to use a function, you must define it somewhere in the scope from which you wish to call it. see also the exhaustive reference chapter about javascript functions to get to know the details. ...
Numbers and dates - JavaScript
: ':') + second; temp += (hour >= 12) ? ' p.m.' : ' a.m.'; return temp; } the jsclock function first creates a new date object called time; since no arguments are given, time is created with the current date and time. then calls to the gethours, getminutes, and getseconds methods assign the value of the current hour, minute, and second to hour, minute, and second. the next four statements
build a string value based on the time. the first statement creates a variable temp, assigning it a value using a conditional expression; if hour is greater than 12, (hour - 12), otherwise simply hour, unless hour is 0, in which case it becomes 12. the next statement appends a minute value to temp. if the value of minute is less than 10, the conditional expression adds a string with a preceding zero; ...
Using Promises - JavaScript
dosomething() is the same function as before. you can read more about the syntax here. promises solve a fundamental flaw with the callback pyramid of doom, by catching all errors, even thrown exceptions and programming errors. this is essential for functional composition of asynchronous operations. promise rejection events whenever a promise is rejected, one of two events is...
Inheritance and the prototype chain - JavaScript
y definition, null has no prototype, and acts as the final link in this prototype chain. nearly all objects in javascript are instances of object which sits on the top of a prototype chain. while this confusion is often considered to be one of javascript's weaknesses, the prototypal inheritance model itself is, in fact, more powerful than the classic model. it is, for example, fairly trivial to
build a classic model on top of a prototypal model. inheritance with the prototype chain inheriting properties javascript objects are dynamic "bags" of properties (referred to as own properties). javascript objects have a link to a prototype object. when trying to access a property of an object, the property will not only be sought on the object but on the prototype of the object, the prototype of t...
Public class fields - JavaScript
see the compat information below. both static and instance public fields are writable, enumerable, and configurable properties. as such, unlike their private counterparts, they participate in prototype inheritance. ...
Classes - JavaScript
-side) data properties and prototype data properties must be defined outside of the classbody declaration: rectangle.staticwidth = 20; rectangle.prototype.prototypewidth = 25; field declarations public and private field declarations are an experimental feature (stage 3) proposed at tc39, the javascript standards committee. support in browsers is limited, but the feature can be used through a
build step with systems like babel. public field declarations with the javascript field declaration syntax, the above example can be written as: class rectangle { height = 0; width; constructor(height, width) { this.height = height; this.width = width; } } by declaring fields up-front, class definitions become more self-documenting, and the fields are always present. as seen abov...
Warning: String.x is deprecated; use String.prototype.x instead - JavaScript
eprecated syntax var num = 15; string.replace(num, /5/, '2'); standard syntax var num = 15; string(num).replace(/5/, '2'); shim the following is a shim to provide support to non-supporting browsers: /*globals define*/ // assumes all supplied string instance methods already present // (one may use shims for these if not available) (function() { 'use strict'; var i, // we could also
build the array of methods with the following, but the // 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', 'endswi...
Array.prototype.reduce() - JavaScript
e, reject) => { resolve(a * 2) }) } // function 3 - will be wrapped in a resolved promise by .then() function f3(a) { return a * 3 } // promise function 4 function p4(a) { return new promise((resolve, reject) => { resolve(a * 4) }) } const promisearr = [p1, p2, f3, p4] runpromiseinsequence(promisearr, 10) .then(console.log) // 1200 function composition enabling piping //
building-blocks to use for composition const double = x => x + x const triple = x => 3 * x const quadruple = x => 4 * x // function composition enabling pipe functionality const pipe = (...functions) => input => functions.reduce( (acc, fn) => fn(acc), input ) // composed functions for multiplication of specific values const multiply6 = pipe(double, triple) const multiply9 = pipe(triple, tripl...
Array.prototype.map() - JavaScript
ction once for each element in an array, in order, and constructs a new array from the results. callback is invoked only for indexes of the array which have assigned values (including undefined). it is not called for missing elements of the array; that is: indexes that have never been set; which have been deleted; or which have never been assigned a value. when not to use map() since map
builds a new array, using it when you aren't using the returned array is an anti-pattern; use foreach or for-of instead. you shouldn't be using map if: you're not using the array it returns; and/or you're not returning a value from the callback. parameters in detail callback is invoked with three arguments: the value of the element, the index of the element, and the array object being mapped. ...
Intl.DateTimeFormat.prototype.formatToParts() - JavaScript
rings produced by datetimeformat formatters. syntax datetimeformat.formattoparts(date) parameters date optional the date to format. return value an array of objects containing the formatted date in parts. description the formattoparts() method is useful for custom formatting of date strings. 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. the structure the formattoparts() method returns, looks like this: [ { type: 'day', value: '17' }, { type: 'weekday', value: 'monday' } ] possible types are the following: day the string used for the day, for example "17". dayperiod the string used for the day period, for example, "am", "pm", "in the morning", or "noon" era ...
Intl.NumberFormat.prototype.formatToParts() - JavaScript
t formatters. syntax intl.numberformat.prototype.formattoparts(number) parameters number optional a number or bigint to format. return value an array of objects containing the formatted number in parts. description the formattoparts() method is useful for custom formatting of number strings. 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. the structure the formattoparts() method returns, looks like this: [ { type: "integer", value: "3" }, { type: "group", value: "." }, { type: "integer", value: "500" } ] possible types are the following: currency the currency string, such as the symbols "$" and "€" or the name "dollar", "euro" depending on how currencydisplay...
String - JavaScript
the string object is used to represent and manipulate a sequence of characters. description strings are useful for holding data that can be represented in text form. some of the most-used operations on strings are to check their length, to
build and concatenate them using the + and += string operators, checking for the existence or location of substrings with the indexof() method, or extracting substrings with the substring() method. creating strings strings can be created as primitives, from string literals, or as objects, using the string() constructor: const string1 = "a string primitive"; const string2 = 'also a string primitive'; const string3 = `yet another string primitive`; const string4 = new string("a string object"); string primitives and string objects can be used interchan...
WebAssembly.Module.customSections() - JavaScript
note that the webassembly text format currently doesn't have a syntax specified for adding new custom sections; you can however add a name section to your wasm during conversion from text format over to .wasm. the wast2wasm command available as part of the wabt tool has a --debug-names option — specify this during conversion to get a .wasm with a names custom section, for example: wast2wasm...
delete operator - JavaScript
he same name, the property will be iterated in its old position--not at the end of the iteration sequence as one might expect after having deleted the property and then added it back. if you want to use an ordered associative array in a cross-browser environment, use a map object if available, or simulate this structure with two separate arrays (one for the keys and the other for the values), or
build an array of single-property objects, etc. examples // creates the property adminname on the global scope. adminname = 'xyz'; // creates the property empcount on the global scope. // since we are using var, this is marked as non-configurable. the same is true of let and const. var empcount = 43; employeedetails = { name: 'xyz', age: 5, designation: 'developer' }; // adminname is a prope...
Web audio codec guide - Web media technologies
s: aac support in firefox using external library, by platform platform first firefox version with aac support windows (vista and later) 22 android 20 linux (depends on gstreamer) 26 macos 35 [2] chrome supports aac only in mp4 containers, and only supports aac's main profile. in addition, aac is not available in chromium
builds. alac (apple lossless audio codec) the apple lossless audio codec (alac or apple lossless) is a lossless codec developed by apple. after initially being a closed format, apple opened it up under an apache license. cross-platform and browser support for alac is not very strong, making it a less than ideal choice for general usage. however, if your target is primarily macos and ios users, it ma...
Web video codec guide - Web media technologies
ion doesn't do any good. motion compensation is a technique that looks for motion (either of the camera or of objects in the frame of view) and determines how many pixels the moving object has moved in each direction. then that shift is stored, along with a description of the pixels that have moved that can't be described just by that shift. in essence, the encoder finds the moving objects, then
builds an internal frame of sorts that looks like the original but with all the objects translated to their new locations. in theory, this approximates the new frame's appearance. then, to finish the job, the remaining differences are found, then the set of object shifts and the set of pixel differences are stored in the data representing the new frame. this object that describes the shift and the pixe...
Media type and format guide: image, audio, and video content - Web media technologies
e to fundamental concepts involved with digital video as used on the web, including basics about color formats, chroma subsampling, how human perception influences video coding, and so forth. tutorials and how-tos learning: video and audio content this tutorial introduces and details the use of media on the web. handling media support issues in web content in this guide, we look at how to
build web content that maximizes quality or performance while providing the broadest possible compatibility, by choosing media formats wisely, and offering fallbacks and alternate formats where it would be helpful. other topics media capabilities api the media capabilities api lets you discover the encoding and decoding capabilities of the device your app or site is running on. this lets you make...
Performance fundamentals - Web Performance
under current circumstances. it tells the browser to render results even while the browser isn't actually drawing; that is, while the video hardware hasn't reached the next display cycle. this wastes processor time and can even lead to reduced battery life on the user's device. instead, you should try to use window.requestanimationframe(). this waits until the browser is actually ready to start
building the next frame of your animation, and won't bother if the hardware isn't going to actually draw anything. another benefit to this api is that animations won't run while your app isn't visible on the screen (such as if it's in the background and some other task is operating). this will save battery life and prevent users from cursing your name into the night sky. make events immediate as old-...
Navigation and resource timings - Web Performance
e') to query the navigation and resource timings respectively. navigation timing when a user requests a web site or application, to populate the browser the user agent goes through a series of steps, including a dns lookup, tcp handshake, and ssl negotiation, before the user agent makes the actual request and the servers return the requested assets. the browser then parses the content received,
builds the dom, cssom, accessibility, and render trees, eventually rendering the page. once the user agent stops parsing the document, the user agent sets the document readiness to interactive. if there are deferred scripts needing to be parsed, it will do so, then fire the domcontentloaded, after which the readiness is set to complete. the document can now handle post-load tasks, after which point the...
Web Performance
g a browser's document navigation events. resource timings are detailed network timing measurements regarding the loading of an application's resources.optimizing startup performanceregardless of platform, it's always a good idea to start up as quickly as possible. since that's a universal issue, we won't be focusing on it too much here. instead, we're going to look at a more important issue when
building web apps: starting up as asynchronously as possible. that means not running all your startup code in a single event handler on the app's main thread.performance budgetsa performance budget is a limit to prevent regressions. it can apply to a file, a file type, all files loaded on a page, a specific metric (e.g. time to interactive), a custom metric (e.g. time to hero element), or a threshold o...
How to make PWAs re-engageable using Notifications and Push - Progressive web apps (PWAs)
stem, or another mechanism if desired. the technology is still at a very early stage — some working examples use the google cloud messaging platform, but are being rewritten to support vapid (voluntary application identification), which offers an extra layer of security for your app. you can examine the service workers cookbook examples, try to set up a push messaging server using firebase, or
build your own server (using node.js for example). as mentioned before, to be able to receive push messages, you have to have a service worker, the basics of which are already explained in the making pwas work offline with service workers article. inside the service worker, a push service subscription mechanism is created. registration.pushmanager.getsubscription() .then( /* ... */ ); once the user ...
Structural overview of progressive web apps - Progressive web apps (PWAs)
ive 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. in this structural overview, we'll look at the features that make up a standard web application, as well as some design patterns you can follow when
building your pwa. architecture of an app there are two main, different approaches to rendering a website — on the server or on the client. they both have their advantages and disadvantages, and you can mix the two approaches to some degree. server-side rendering (ssr) means a website is rendered on the server, so it offers quicker first load, but navigating between pages requires downloading ne...
accumulate - SVG: Scalable Vector Graphics
the accumulate attribute controls whether or not an animation is cumulative. it is frequently useful for repeated animations to
build upon the previous results, accumulating with each iteration. this attribute said to the animation if the value is added to the previous animated attribute's value on each iteration. four elements are using this attribute: <animate>, <animatecolor>, <animatemotion>, and <animatetransform> usage notes value none | sum default value none animatable no sum specifies that each repeat iteration after the first
builds upon the last value of the previous iteration. none specifies that repeat iterations are not cumulative. this attribute is ignored if the target attribute value does not support addition, or if the ani...
Content type - SVG: Scalable Vector Graphics
st> is used to specify a list of coordinate system transformations. a detailed description of the possible values for a <transform-list> is given in the transform attribute definition. within the svg dom, a <transform-list> value is represented using an svgtransformlist or svganimatedtransformlist object. url url a uniform resource locator. a url is a sequence of unicode characters,
building an address to an internal or external resource. before svg 2, the more limited iri content type was used instead, because the url specification was not standardized before. ...
Filter effects - SVG: Scalable Vector Graphics
g's mechanism to create sophisticated effects. a basic example is to add a blur effect to svg content. while basic blurs can be achieved with the help of gradients, the blur filter is needed to do anything beyond. example filters are defined by <filter> element, which should be put in the <defs> section of your svg file. between the filter tags, goes a list of primitives, basic operations that
build on top of the previous operations (like blurring, adding a lighting effect, etc). to apply your created filter on a graphic element, you set the filter attribute. <svg width="250" viewbox="0 0 200 85" xmlns="http://www.w3.org/2000/svg" version="1.1"> <defs> <!-- filter declaration --> <filter id="myfilter" filterunits="userspaceonuse" x="0" y="0" width="200...
mimeTypes.rdf corruption - SVG: Scalable Vector Graphics
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. this bug has been fixed in trunk
builds. problems in the way mozilla obtains the media type for files loaded locally can occur in two ways. first, certain actions can cause the media types cache in mimetypes.rdf to associate a filename extension with the wrong media type. second, certain actions may cause the os to associate a filename extension with the wrong media type. if either of these things happen, then mozilla can end up with ...
Web Components
t interface related to slots: element.slot: returns the name of the shadow dom slot attached to the element. css pseudo-elements pseudo-elements relating specifically to slots: ::slotted: matches any content that is inserted into a slot. the slotchange event fired on an htmlslotelement instance (<slot> element) when the node(s) contained in that slot change. examples we are
building up a number of examples in our web-components-examples github repo. more will be added as time goes on. specifications specification status comment html living standardthe definition of '<template> element' in that specification. living standard the definition of <template>. html living standardthe definition of 'custom elements' in that specification. ...
XPath
be read from the javascript interpreter (like for web-apps languages or settings xml documents, for example). in these cases jxon could represent the most practical way and valid alternative to xpath. view all... tools chropath xpath panel that integrates tightly into firebug, providing an editor and inspector (firefox add-on). xmlquire (formerly known as sketchpath) a graphical xpath
builder/debugger(.net). xpath tester an online xpath
builder/debugger. related topics xslt, xquery, xml, dom, jxon, jsonpath comparison of css selectors and xpath ...
<xsl:attribute-set> - XSLT: Extensible Stylesheet Language Transformations
ent creates a named set of attributes, which can then be applied as whole to the output document, in a manner similar to named styles in css. syntax <xsl:attribute-set name=name use-attribute-sets=list-of-names> <xsl:attribute> </xsl:attribute-set> required attributes name specifies the name of the attribute set. the name must be a valid qname. optional attributes use-attribute-sets
builds an attribute set from other attribute sets. the names of the contributing sets must be separated with whitespace characters and must not directly or indirectly embed themselves. type top-level, must be the child of <xsl:stylesheet> or <xsl:transform>. defined xslt, section 7.1.4. gecko support supported. ...
Web technology for developers
velopers of extensions for the various mozilla applications. many of these samples can also be used in xulrunner applications, as well as in actual mozilla code itself. view all... web technology references web apis reference material for each of the individual apis that comprise the web's powerful scriptability, including the dom and all of the related apis and interfaces you can use to
build web content and apps. html hypertext markup language is the language used to describe and define the content of a web page. css cascading style sheets are used to describe the appearance of web content. svg scalable vector graphics let you describe images as sets of vectors and shapes in order to allow them to scale smoothly regardless of the size at which they're drawn. mathml the mathem...
Compiling a New C/C++ Module to WebAssembly - WebAssembly
content as the template with some glue code added into load the generated wasm, run it, etc. open it in your browser and you'll see much the same output as the last example. note: you could specify outputting just the javascript "glue" file* rather than the full html by specifying a .js file instead of an html file in the -o flag, e.g. emcc -o hello2.js hello2.c -o3 -s wasm=1. you could then
build your custom html completely from scratch, although this is an advanced approach; it is usually easier to use the provided html template. emscripten requires a large variety of javascript "glue" code to handle memory allocation, memory leaks, and a host of other problems calling a custom function defined in c if you have a function defined in your c code that you want to call as needed from...
WebAssembly Concepts - WebAssembly
ains a <canvas> element that is used as the rendering target. it’s very easy to modify the emscripten output and turn it into whatever web app you require. you can find full documentation on emscripten at emscripten.org, and a guide to implementing the toolchain and compiling your own c/c++ app across to wasm at compiling from c/c++ to webassembly. writing webassembly directly do you want to
build your own compiler, or your own tools, or make a javascript library that generates webassembly at runtime? in the same fashion as physical assembly languages, the webassembly binary format has a text representation — the two have a 1:1 correspondence. you can write or generate this format by hand and then convert it into the binary format with any of several webassemby text-to-binary tools. fo...
Understanding WebAssembly text format - WebAssembly
rlying bytecode it represents — and the wrapper objects representing wasm in javascript. note: this is potentially overkill if you are a web developer who just wants to load a wasm module into a page and use it in your code (see using the webassembly javascript api), but it is more useful if for example, you want to write wasm modules to optimize the performance of your javascript library, or
build your own webassembly compiler. s-expressions in both the binary and textual formats, the fundamental unit of code in webassembly is a module. in the text format, a module is represented as one big s-expression. s-expressions are a very old and very simple textual format for representing trees, and thus we can think of a module as a tree of nodes that describe the module’s structure and its...