Search completed in 1.05 seconds.
FileSystemEntry.filesystem - Web APIs
the read-only
filesystem property of the
filesystementry interface contains a
filesystem object that represents the file system on which the entry resides.
... syntax var
filesystem =
filesystementry.
filesystem; value a
filesystem representing the file system on which the file or directory described by the
filesystementry is located..
... example this example obtains a
filesystemdirectoryentry for the root directory of the file system containing a file.
...And 2 more matches
Using files from web applications - Web APIs
using the file api, which was added to the dom in html5, it's now possible for web content to ask the user to select local
files and then read the contents of those
files.
... accessing selected file(s) consider this html: <input type="file" id="input" multiple> the file api makes it possible to access a filelist containing file objects representing the
files selected by the user.
... the multiple attribute on the input element allows the user to select multiple
files.
...And 27 more matches
Manifest Files - Archive of obsolete content
« previousnext » in this section, we'll see how to put chrome and xul
files into a package and create the manifest
files for them.
... packages a package is a set of xul
files and scripts that define the functionality of a user interface.
...a package can contain any kinds of
files and may be split into subdirectories for different parts of the package.
...And 25 more matches
Multiple Firefox profiles
you can find details about pro
files on mozilla's end-user support site.
... reasons to have multiple pro
files the casual user may want to have different pro
files for work and personal use, or different family members.
... having different pro
files would help separate work and personal life, or allow each family member to have his or her own set of bookmarks, settings, and add-ons.
...And 25 more matches
FileSystemDirectoryReader.readEntries() - Web APIs
the
filesystemdirectoryreader interface's readentries() method retrieves the directory entries within the directory being read and delivers them in an array to a provided callback function.
... the objects in the array are all based upon
filesystementry.
... generally, they are either
filesystemfileentry objects, which represent standard
files, or
filesystemdirectoryentry objects, which represent directories.
...And 17 more matches
FileSystemEntrySync - Web APIs
the
filesystementrysync interface of the file and directory entries api represents an entry in a file system; it can be either a fileentrysync or directoryentry.
... it includes methods for working with
files—including copying, moving, removing, and reading
files—as well as information about the file it points to—including the file name and its path from the root to the entry.
... basic concepts the
filesystementrysync interface includes methods that you would expect for manipulating
files and directories, but it also include a really handy method for getting a url of the entry: tourl().
...And 17 more matches
FileSystemEntry - Web APIs
the
filesystementry interface of the file and directory entries api represents a single in a file system.
...it includes methods for working with
files—including copying, moving, removing, and reading
files—as well as information about a file it points to—including the file name and its path from the root to the entry.
... basic concepts you don't create
filesystementry objects directly.
...And 14 more matches
LocalFileSystem - Web APIs
the local
filesystem interface of the file system api gives you access to a sandboxed file system.
... creating new storage you request access to a sandboxed file system by calling window.request
filesystem().
... the argument of a successful callback is the
filesystem object, which has two properties: the name and root of the file system.
...And 13 more matches
FileSystem - Web APIs
the file and directory entries api interface
filesystem is used to represent a file system.
... these objects can be obtained from the
filesystem property on any file system entry.
... some browsers offer additional apis to create and manage file systems, such as chrome's request
filesystem() method.
...And 11 more matches
LocalFileSystemSync - Web APIs
the local
filesystemsync interface of the file system api gives you access to a sandboxed file system.
... basic concepts you can request access to a sandboxed file system by requesting local
filesystemsync object from within a web worker.
... the global methods in the window object request
filesystemsync() and resolvelocal
filesystemsyncurl() methods are exposed to the worker's global scope.
...And 11 more matches
Property Files - Archive of obsolete content
property
files are used instead.
... properties dtd
files are suitable when you have text in a xul file.
...for this purpose, property
files can be used.
...And 10 more matches
How do you upload your files to a web server? - Learn web development
objective: learn how to push
files to a server using the various file transfer tools available.
... your account is: demozilla your website will be visible at demozilla.examplehostingprovider.net to publish to this account, please connect through sftp with the following credentials: sftp server: sftp://demozilla.examplehostingprovider.net username: demozilla password: quickbrownfox port: 5548 to publish on the web, put your
files into the public/htdocs directory.
... here and there: local and remote view once connected, your screen should look something like this (we've connected to an example of our own to give you an idea): let's examine what you're seeing: on the center left pane, you see your local
files.
...And 10 more matches
FileSystemDirectoryEntry.getDirectory() - Web APIs
the
filesystemdirectoryentry interface's method getdirectory() returns a
filesystemdirectoryentry object corresponding to a directory contained somewhere within the directory subtree rooted at the directory on which it's called.
... syntax
filesystemdirectoryentry.getdirectory([path][, options][, successcallback][, errorcallback]); parameters path optional a usvstring representing an absolute path or a path relative to the directory on which the method is called, describing which directory entry to return.
... options optional an object based on the
filesystemflags dictionary, which allows you to specify whether or not to create the entry if it's missing and if it's an error if the file already exists.
...And 9 more matches
FileSystemDirectoryEntry.getFile() - Web APIs
} the
filesystemdirectoryentry interface's method getfile() returns a
filesystemfileentry object corresponding to a file contained somewhere within the directory subtree rooted at the directory on which it's called.
... syntax
filesystemdirectoryentry.getfile([path][, options][, successcallback][, errorcallback]); parameters path optional a usvstring specifying the path, relative to the directory on which the method is called, describing which file's entry to return.
... options optional an object based on the
filesystemflags dictionary, which allows you to specify whether or not to create the entry if it's missing and if it's an error if the file already exists.
...And 9 more matches
FileSystemFlags - Web APIs
the
filesystemflags dictionary defines a set of values which are used when specifying option flags when calling certain methods in the file and directory entries api.
... note that these option flags currently don't have any useful meaning when used in the scope of web content, where security precautions prevent the creation of new
files or the replacement of existing ones.
... option values file/directory condition result create exclusive false n/a[1] path exists and matches the desired type (depending on whether the function called is getfile() or getdirectory() the successcallback is called with a
filesystemfileentry if getfile() was called or a
filesystemdirectoryentry if getdirectory() was called.
...And 9 more matches
Accessing Files - Archive of obsolete content
file and stream guide: [ nsiscriptableio | accessing
files | getting file information | reading from
files | writing to
files | moving, copying and deleting
files | uploading and downloading
files | working with directories ] important note: the pages from the file and stream guide use the io object (nsiscriptableio), which was not available in any released version of the platform (pending some fixes).
...other documentation on
files and i/o not using the unavailable nsiscriptableio apis: code snippets: file i/o, open and save dialogs, reading textual data, writing textual data, list of file-related error codes.
... accessing
files this section describes how to create a file reference.
...And 8 more matches
FileSystemDirectoryEntry - Web APIs
the
filesystemdirectoryentry interface of the file and directory entries api represents a directory in a file system.
... it provides methods which make it possible to access and manipulate the
files in a directory, as well as to access the entries within the directory.
...window.request
filesystem = window.request
filesystem || window.webkitrequest
filesystem; window.directoryentry = window.directoryentry || window.webkitdirectoryentry; ...
...And 7 more matches
FileSystemFlags.create - Web APIs
the create property on the
filesystemflags dictionary is used to indicate whether or not the file should be created if it's missing.
...
filesystemflags is only used when calling
filesystemdirectoryentry.getfile() or
filesystemdirectoryentry.getdirectory().
... syntax
filesystemflags.create = booleanvalue values the table below describes the result of each possible combination of these flags depending on whether or not the target file or directory path already exists.
...And 7 more matches
Writing to Files - Archive of obsolete content
file and stream guide: [ nsiscriptableio | accessing
files | getting file information | reading from
files | writing to
files | moving, copying and deleting
files | uploading and downloading
files | working with directories ] important note: the pages from the file and stream guide use the io object (nsiscriptableio), which was not available in any released version of the platform (pending some fixes).
...other documentation on
files and i/o not using the unavailable nsiscriptableio apis: code snippets: file i/o, open and save dialogs, reading textual data, writing textual data, list of file-related error codes.
...to learn more about file objects, see
files and streams.
...And 6 more matches
Thunderbird Configuration Files
configuration
files some tips and tricks require that you edit configuration
files manually.
... there are three
files you should know about: userchrome.css used to change the appearance of the browser.
... all these
files are plain text
files you need to create in your profile folder and can be edited using a standard text editor, such as notepad on windows and gedit or kate on linux.
...And 6 more matches
FileSystemFlags.exclusive - Web APIs
the exclusive property on the
filesystemflags dictionary is used in tandem with the create property to determine whether or not it's acceptable to require that the file not already exist when the reference to it is created by calling
filesystemdirectoryentry.getfile() or
filesystemdirectoryentry.getdirectory().
... syntax
filesystemflags.exclusive = booleanvalue values the table below describes the result of each possible combination of these flags depending on whether or not the target file or directory path already exists.
... option values file/directory condition result create exclusive false n/a[1] path exists and matches the desired type (depending on whether the function called is getfile() or getdirectory() the successcallback is called with a
filesystemfileentry if getfile() was called or a
filesystemdirectoryentry if getdirectory() was called.
...And 6 more matches
Moving, Copying and Deleting Files - Archive of obsolete content
file and stream guide: [ nsiscriptableio | accessing
files | getting file information | reading from
files | writing to
files | moving, copying and deleting
files | uploading and downloading
files | working with directories ] important note: the pages from the file and stream guide use the io object (nsiscriptableio), which was not available in any released version of the platform (pending some fixes).
...other documentation on
files and i/o not using the unavailable nsiscriptableio apis: code snippets: file i/o, open and save dialogs, reading textual data, writing textual data, list of file-related error codes.
... there are several methods of the nsifile object which may be used to move and copy
files on disk.
...And 5 more matches
Dealing with files - Learn web development
previous overview: getting started with the web next 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 on your local computer, make sure they can talk to one another, and get all your content looking right before you eventually upload them to a server.
... dealing with
files discusses some issues you should be aware of so you can set up a sensible file structure for your website.
...And 5 more matches
nsIToolkitProfileService
toolkit/profile/public/nsitoolkitpro
fileservice.idlscriptable the profile service manages user pro
files.
...to access the service, you can use the following code: var toolkitpro
fileservice = components.classes["@mozilla.org/toolkit/profile-service;1"] .createinstance(components.interfaces.nsitoolkitpro
fileservice); prior to gecko 1.9.1 only the built-in profile manager was able to access the toolkit profile service.
... nsitoolkitprofile createprofile(in nsilocalfile arootdir, in autf8string aname); void flush(); nsitoolkitprofile getprofilebyname(in autf8string aname); nsiprofilelock lockprofilepath(in nsilocalfile adirectory, in nsilocalfile atempdirectory); attributes attribute type description profilecount unsigned long the number of user pro
files currently in existence.
...And 5 more matches
Reading from Files - Archive of obsolete content
file and stream guide: [ nsiscriptableio | accessing
files | getting file information | reading from
files | writing to
files | moving, copying and deleting
files | uploading and downloading
files | working with directories ] important note: the pages from the file and stream guide use the io object (nsiscriptableio), which was not available in any released version of the platform (pending some fixes).
...other documentation on
files and i/o not using the unavailable nsiscriptableio apis: code snippets: file i/o, open and save dialogs, reading textual data, writing textual data, list of file-related error codes.
...to learn more about file objects, see
files and streams.
...And 4 more matches
DataTransfer.files - Web APIs
the datatransfer.
files property is a list of the
files in the drag operation.
... if the operation includes no
files, the list is empty.
... this feature can be used to drag
files from a user's desktop to the browser.
...And 4 more matches
FileSystemEntry.toURL() - Web APIs
the
filesystementry interface's method tourl() creates and returns a string containing a url which can be used to identify the file system entry.
... this is done by exposing a new url scheme—
filesystem:—that can be used as the value of src and href attributes.
... syntax
filesystementry.tourl([mimetype]); parameters mimetype optional an optional string specifying the mime type to use when interpreting the file.
...And 4 more matches
Window.requestFileSystem() - Web APIs
the non-standard window method request
filesystem() method is a google chrome-specific method which lets a web site or app gain access to a sandboxed file system for its own use.
... the returned
filesystem is then available for use with the other file system apis.
... even compared to the rest of the file and directory entries api, request
filesystem() is especially non-standard; only chrome implements it, and all other browser makers have decided that they will not implement it.
...And 4 more matches
Downloading Files - Archive of obsolete content
the following methods of downloading
files may not work as expected after firefox 26, and should no longer be used.
... downloading
files to download a file, create an instance of nsiwebbrowserpersist and call its nsiwebbrowserpersist.saveuri() method, passing it a url to download and an nsifile instance representing the local file name/path.
...var privacy = privatebrowsingutils.privacycontextfromwindow(urlsourcewindow); persist.persistflags = persist.persist_flags_from_cache | persist.persist_flags_replace_existing_
files; persist.saveuri(uritosave, null, null, null, "", targetfile, privacy); if you don't need detailed progress information, you might be happier with nsidownloader.
...And 2 more matches
How Thunderbird and Firefox find their configuration files - Archive of obsolete content
how thunderbird and firefox find their configuration
files thunderbird looks into the binary %appdata%\thunderbird\pro
files.ini file for its "registry", which contains, amongst other information, a pointer to the directory where the profile is stored (usually located in %appdata%\thunderbird\pro
files\profilename).
... likewise, firefox uses a similar file, located in %appdata%\mozilla\firefox\pro
files.ini.
...all other
files in that directory are dynamically created by mozilla on first start.
...And 2 more matches
Uploading and Downloading Files - Archive of obsolete content
file and stream guide: [ nsiscriptableio | accessing
files | getting file information | reading from
files | writing to
files | moving, copying and deleting
files | uploading and downloading
files | working with directories ] important note: the pages from the file and stream guide use the io object (nsiscriptableio), which was not available in any released version of the platform (pending some fixes).
...other documentation on
files and i/o not using the unavailable nsiscriptableio apis: code snippets: file i/o, open and save dialogs, reading textual data, writing textual data, list of file-related error codes.
... the io object and stream objects can be used to upload
files to servers in various ways.
...And 2 more matches
Skinning XUL Files by Hand - Archive of obsolete content
in the very near future, it will be possible to skin xul
files dynamically and completely -- by pressing a button, selecting a skin from a menu, or by accepting a skin from over the web.
... by the way, in contrast to the term skin, "chrome" refers to the skin and the content and whatever localization and platform-specific
files are necessary for a particular part of the application or window.
...most widgets have their styles defined in separate css
files in the same directory that the global.css file.
...And 2 more matches
FileSystemDirectoryEntry.removeRecursively() - Web APIs
the
filesystemdirectoryentry interface's method removerecursively() removes the directory as well as all of its content, hierarchically iterating over its entire subtree of descendant
files and directories.
... to remove a single file, or an empty directory, you can also use
filesystementry.remove().
... syntax
filesystemdirectoryentry.removerecursively(successcallback[, errorcallback]); parameters successcallback a function to call once the directory removal process has completed.
...And 2 more matches
FileSystemFileEntry - Web APIs
the
filesystemfileentry interface of the file system api represents a file in a file system.
... properties inherits the properties of its parent interface,
filesystementry, but has no properties unique to this interface.
... function oninitfs(fs) { fs.root.getfile('log.txt', {create: true}, function(fileentry) { // create a filewriter object for our
filesystemfileentry (log.txt).
...And 2 more matches
XRInputSource.profiles - Web APIs
the read-only xrinputsource property pro
files returns an array of strings, each describing a configuration profile for the input source.
... note: the pro
files list is always empty when the webxr session is in inline mode.
... syntax let profilelist = xrinputsource.pro
files; value an array of domstring objects, each describing one configuration profile for the input device represented by the xrinputsource object.
...And 2 more matches
FileSystemDirectoryEntry.createReader() - Web APIs
the
filesystemdirectoryentry interface's method createreader() returns a
filesystemdirectoryreader object which can be used to read the entries in the directory.
... syntax directoryreader =
filesystemdirectoryentry.createreader(); parameters none.
... return value a
filesystemdirectoryreader object which can be used to read the directory's entries.
... example this example creates a method called readdirectory(), which fetches all of the entries in the specified
filesystemdirectoryentry and returns them in an array.
FileSystemEntry.fullPath - Web APIs
the read-only fullpath property of the
filesystementry interface returns a usvstring specifying the full, absolute path from the file system's root to the file represented by the entry.
... syntax var fullpath =
filesystementry.fullpath; value a usvstring indicating the entry's full path.
... example this example shows a function which is called with a file system; it then gets a
filesystemfileentry for a file named data.json and returns its full path.
... function got
filesystem(fs) { let path = ""; fs.root.getfile("data.json", { create: true, exclusive: true }, function(entry) { path = fullpath; }, handleerror(error)); return path; } obviously, this is somewhat contrived, since we know that the file's full path is "/data.json", having just looked it up ourselves, but the concept holds up for scenarios in which you don't know it.
FileSystemEntry.getParent() - Web APIs
the
filesystementry interface's method getparent() obtains a
filesystemdirectoryentry.
... syntax
filesystementry.getparent(successcallback[, errorcallback]); parameters successcallback a function which is called when the parent directory entry has been retrieved.
... the callback receives a single input parameter: a
filesystemdirectoryentry object representing the parent directory.
... fileentry.getparent(function(parent) { fileentry.moveto(parent, "newname.html", function(updatedentry) { console.log("file " + fileentry.name + " renamed to newname.html."); }); }, function(error) { console.error("an error occurred: unable to rename " + fileentry.name + " to newname.html."); }); this is accomplished by first obtaining a
filesystemdirectoryentry object representing the directory the file is currently located in.
FileSystemDirectoryReader - Web APIs
the
filesystemdirectoryreader interface of the file and directory entries api lets you access the fileentry-based objects (generally
filesystemfileentry or
filesystemdirectoryentry) representing each entry in a directory.
...each item in the array is an object based on
filesystementry—typically either
filesystemfileentry or
filesystemdirectoryentry.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internet
filesystemdirectoryreader deprecatednon-standardchrome full support 8alternate name full support 8alternate name alternate name uses the non-standard name: directoryreaderedge full support ≤18alternate name full support �...
FileSystemEntry.copyTo() - Web APIs
the
filesystementry interface's method copyto() copies the file specified by the entry to a new location on the file system.
... syntax
filesystementry.copyto(newparent[, newname][, successcallback][, errorcallback]); parameters newparent a
filesystemdirectoryentry object specifying the destination directory for the copy operation.
...receives a single input parameter: a
filesystementry based object providing the copied item's new details.
FileSystemEntry.getMetadata() - Web APIs
} the
filesystementry interface's method getmetadata() obtains a metadata object with information about the file system entry, such as its modification date and time and its size.
... syntax
filesystementry.getmetadata(successcallback[, errorcallback]); parameters successcallback a function which is called when the copy operation is succesfully completed.
... errors fileerror.not_found_err the
filesystementry refers to an item which doesn't exist.
FileSystemEntry.moveTo() - Web APIs
the
filesystementry interface's method moveto() moves the file specified by the entry to a new location on the file system, or renames the file if the destination directory is the same as the source.
... syntax
filesystementry.moveto(newparent[, newname][, successcallback][, errorcallback]); parameters newparent a
filesystemdirectoryentry object specifying the destination directory for the move operation.
...receives a single input parameter: a
filesystementry based object providing the moved item's new details.
FileSystemEntry.name - Web APIs
the read-only name property of the
filesystementry interface returns a usvstring specifying the entry's name; this is the entry within its parent directory (the last component of the path as indicated by the fullpath property).
... syntax var name =
filesystementry.name; value a usvstring indicating the entry's name.
... example this example shows a function called isfilewithextension() which returns true if the specified
filesystementry is both a file and the file's name ends with a given extension.
FileSystemEntry.remove() - Web APIs
the
filesystementry interface's method remove() deletes the file or directory from the file system.
... to recursively remove a directory as well as all of its contents and its subdirectories, call
filesystemdirectoryentry.removerecursively() instead.
... syntax
filesystementry.remove(successcallback[, errorcallback]); parameters successcallback a function which is called once the file has been successfully removed.
FileSystemSync - Web APIs
in the file system api, a
filesystemsync object represents a file system.
... basic concepts the
filesystemsync object is your gateway to the entire api and you will use it a lot.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internet
filesystemsync non-standardchrome full support 13prefixed full support 13prefixed prefixed implemented with the vendor prefix: webkitedge full support ≤79prefixed full support ≤79prefixed prefixed implemented with the v...
WEBGL_compressed_texture_astc.getSupportedProfiles() - Web APIs
the webgl_compressed_texture_astc.getsupportedpro
files() method returns an array of strings containing the names of the astc pro
files supported by the implementation.
... syntax sequence<domstring> ext.getsupportedpro
files(); return value an array of domstring elements indicating which astc pro
files are supported by the implementation.
... examples var ext = gl.getextension('webgl_compressed_texture_astc'); ext.getsupportedpro
files(); // ["ldr"] specifications specification status comment webgl_compressed_texture_astcthe definition of 'webgl_compressed_texture_astc' in that specification.
How Mozilla finds its configuration files - Archive of obsolete content
how mozilla finds its configuration
files mozilla looks into the binary %userprofile%\application data\mozilla\registry.dat file for its "registry", which contains, amongst other information, a pointer to the directory where the profile is stored (located at common/pro
files/profilename/directory.
...all other
files in that directory are dynamically created by mozilla on first start.
Makefiles - Best practices and suggestions
laundry list make
files should remove all content that it will generate.
... # transient directory for storing timestamps ts=.ts ##################################################### ## extra dep needed to synchronize parallel execution ##################################################### $(ts): $(ts)/.done $(ts)/.done: $(mkdir) -p $(dir $@) touch $@ # "clean" target garbage_dirs += $(ts) maintain clean targets - make
files should be able to remove all content that is generated so "make clean" will return the sandbox/directory back to a clean state.
Encodings for localization files
when creating a localization for mozilla products, it’s important to be aware of the encoding of the
files that you generate.
... in general,
files in the mozilla repositories are utf-8 encoded.
nsIFileStreams
the nsi
filestreams interface is an input stream that allows you to read from a file.
... netwerk/base/public/nsi
filestreams.idlscriptable please add a summary to this article.
FileSystem.name - Web APIs
the read-only name property of the
filesystem interface indicates the file system's name.
... syntax var fsname =
filesystem.name; value a usvstring representing the file system's name.
FileSystem.root - Web APIs
the read-only root property of the
filesystem interface specifies a
filesystemdirectoryentry object representing the root directory of the file system, for use with the file and directory entries api.
... syntax var rootdirent =
filesystem.root; value a
filesystemdirectoryentry representing the file system's root directory.
FileSystemEntry.isDirectory - Web APIs
the read-only isdirectory property of the
filesystementry interface is true if the entry represents a directory (meaning it's a
filesystemdirectoryentry) and false if it's not.
... syntax var isdirectory =
filesystementry.isdirectory; value a boolean indicating whether or not the
filesystementry is a directory.
FileSystemEntry.isFile - Web APIs
the read-only isfile property of the
filesystementry interface is true if the entry represents a file (meaning it's a
filesystemfileentry) and false if it's not.
... syntax var isfile =
filesystementry.isfile; value a boolean indicating whether or not the
filesystementry is a file.
FileSystemFileEntry.createWriter() - Web APIs
the
filesystemfileentry interface's method createwriter() returns a filewriter object which can be used to write data into the file represented by the directory entry.
... syntax
filesystemfileentry.createwriter(successcallback[, errorcallback]); parameters successcallback a callback function which is called when the filewriter has been created successfully; the filewriter is passed into the callback as the only parameter.
FileSystemFileEntry.file() - Web APIs
the
filesystemfileentry interface's method file() returns a file object which can be used to read data from the file represented by the directory entry.
... syntax
filesystemfileentry.file(successcallback[, errorcallback]); parameters successcallback a callback function which is called when the file has been created successfully; the file is passed into the callback as the only parameter.
Localizing XLIFF files for iOS
most translation tools support the xliff standard, making localizing the xliff
files for firefox for ios easy to do using translation tools.
getFiles
nsisimpleenumerator get
files( in string aname ); parameters aname [in] the symbolic name for an enumeration of file or directory locations.
nsIFileSpec
declared in xpcom/obsolete/nsi
filespec.idl don't use this interface.
Index - Web APIs
the file interface is based on blob, inheriting blob functionality and expanding it to support
files on the user's system.
... 289 blob.size api, blob, bytes, file api,
files, property, reference, length, size the blob interface's size property returns the size of the blob or file in bytes.
... 788 datatransfer.
files api, html dom, property, reference, drag and drop the datatransfer.
files property is a list of the
files in the drag operation.
...And 126 more matches
Index
nss doesn't require the programmer to manage individual
files containing individual certificates or keys.
...in the most simple scenario, the programmer will provide a directory on your
filesystem as a parameter to the init function, and nss is designed to do the rest.
...storage consists of multiple
files: a key database file, which contains your secret keys, and a certificate database file which contains the public portion of your own certificates, the certificates of peers or cas, and a list of trust decisions (such as to not trust a built-in ca, or to explicitly trust other cas).
...And 71 more matches
Index - Archive of obsolete content
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 any other.
... syntax highliting support for .htaccess
files less.
... 86 fs/path provides access to the local
filesystem with the nodejs path module api.
...And 62 more matches
XUL Structure - Archive of obsolete content
for this reason, mozilla provides a method of installing content locally and registering the installed
files as part of its chrome system.
...by accessing a file using a chrome url, the
files receive elevated privileges to access local
files, access preferences and bookmarks and perform other privileged operations.
...the extensions are small packages of xul
files, javascript, style sheets and images packed together into a single file.
...And 50 more matches
How Mozilla's build system works
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.
...configure also produces some additional
files (like autoconf.mk).
...however, mozilla's config.status is different from many other config.status
files, as it's written in python!
...And 46 more matches
Creating custom Firefox extensions with the Mozilla build system - Archive of obsolete content
it has thus been necessary to solve all of the issues involved in creating and registering xpcom components, building jar
files and manifests, installing the lot into the firefox extensions/ directory and so forth.
... note that before actually building anything, the mozilla build system invokes a configuration process that generates the actual make
files used for the build from makefile templates called makefile.in.
... the actual make
files tend to be very similar or identical to the templates, but the extra flexibility gained from having the make
files generated dynamically is one of the things that makes the build system so powerful.
...And 43 more matches
Chapter 5: Let's build a Firefox extension - Archive of obsolete content
three kinds of packages make up chrome the content package this package is used to contain the main xul and javascript source
files.
... the skin package this is used to include source
files used as visual elements in the gui, including style sheets and images.
...source
files represented through chrome urls run with universalxpconnect privileges; even if they haven’t been granted “use xpconnect as local file” privileges, as discussed in chapter 4, they will be able to use xpcom functions (figure 1).
...And 36 more matches
Localizing with Koala
easy way involves opening the console and issuing the following commands: c:\users\stas> cd c:\mozilla\l10n\application\firefox c:\mozilla\l10n\application\firefox> rmdir 3.6 c:\mozilla\l10n\application\firefox> hg clone http://hg.mozilla.org/releases/mozilla-1.9.2 3.6 requesting all changes adding changesets adding manifests adding file changes added 33099 changesets with 158636 changes to 50664
files (+9 heads) updating working directory 40357
files updated, 0
files merged, 0
files removed, 0
files unresolved configure the locale locale id: x-testing (put your locale's code) version: 3.6 location: choose the folder where you want to keep the localized
files or leave empty for now check "mercurial" if you wish to use mercurial to keep the revision history of your
files (very recommended) ...
...it is still recommended to use mercurial locally to version your local
files.
...for example: c:\users\stas> cd c:\mozilla\l10n\locale\x-testing c:\mozilla\l10n\locale\x-testing> rmdir 3.6 c:\mozilla\l10n\locale\x-testing> hg clone http://bitbucket.org/mozillal10n/x-testing 3.6 otherwise, it's a good idea to create your local repository in order to be able to track changes you make to the localization
files.
...And 32 more matches
<input type="file"> - HTML: Hypertext Markup Language
<input> elements with type="file" let the user choose one or more
files from their device storage.
... once chosen, the
files can be uploaded to a server using form submission, or manipulated using javascript code and the file api.
... events change and input supported common attributes required additional attributes accept, capture,
files, multiple idl attributes
files and value dom interface htmlinputelement properties properties that apply only to elements of type file methods select() value a file input's value attribute contains a domstring that represents the path to the selected file(s).
...And 32 more matches
How to convert an overlay extension to restartless - Archive of obsolete content
well, xul overlays and windows, jsm
files, chrome & resource mappings with localization, default preferences, but no xpcom components of your own.
... step 1: use services.jsm if you load one of mozilla's internal jsm
files, for example services.jsm, you'll do so via privileged javascript code like this: components.utils.import("resource://gre/modules/services.jsm"); from here on out, it is assumed you've imported services.jsm somewhere at the top of whatever file you're in and will be using it in all code examples.
...mappings, so that you can access your
files with custom paths such as: resource://myaddon/filename.ext chrome://myaddon/content/filename.ext step 2: no more resource:// uris for
files internal to your bundle unfortunately, resource mappings in your chrome.manifest were not usable in restartless add-ons until mozilla finally fixed this bug in firefox 38, which looked bad, but only because mozilla is still using resource:// uris internally and in examples.
...And 24 more matches
NSS tools : signtool
name signtool — digitally sign objects and
files.
...name] ] [[-f filename] ] [[-t|--token tokenname] ] [[-e extension] ] [[-o] ] [[-z] ] [[-x] ] [[--outfile] ] [[--verbose value] ] [[--norecurse] ] [[--leavearc] ] [[-j directory] ] [[-z jarfile] ] [[-o] ] [[-p password] ] [directory-tree] [archive] description the signing tool, signtool, creates digital signatures and uses a java archive (jar) file to associate the signatures with
files in a directory.
...to help address some of these problems, you can associate digital signatures with the
files in a jar archive.
...And 22 more matches
NSS Tools modutil
using the security module database (modutil) newsgroup: mozilla.dev.tech.crypto the security module database tool is a command-line utility for managing pkcs #11 module information within secmod.db
files or within hardware tokens.
...this tool can also create key3.db, cert8.db, and secmod.db security database
files.
... the tasks associated with security module database management are part of a process that typically also involves managing key databases (key3.db
files) and certificate databases (cert8.db
files).
...And 21 more matches
File and Directory Entries API - Web APIs
the file and directory entries api simulates a local file system that web apps can navigate within and access
files in.
... you can develop apps which read, write, and create
files and/or directories in a virtual, sandboxed file system.
... the firefox implementation of the file and directory entries api is very limited; there is no support for creating
files.
...And 21 more matches
Index
for example, you can import xpcomutils.jsm to avoid copy/pasting long xpcom component registration boilerplate in your component
files.
... 62 appshellservice xpcom:language bindings, xpconnect quitting mozilla: 63 nsiprofile interfaces, xpcom, xpcom:language bindings, xpconnect this interface is obsolete; you should use nsitoolkitpro
fileservice instead; however, reference documentation for nsiprofile is available if you're working with old code.
...but sometimes, venkman gives too much noise (because it also pro
files chrome code).
...And 20 more matches
filter - CSS: Cascading Style Sheets
ead> <tr> <th style="text-align: left;" scope="col">original image</th> <th style="text-align: left;" scope="col">live example</th> <th style="text-align: left;" scope="col">svg equivalent</th> <th style="text-align: left;" scope="col">static example</th> </tr> </thead> <tbody> <tr> <td><img alt="test_form.jpg" id="img1" class="internal default" src="/
files/3710/test_form_2.jpg" style="width: 100%;" /></td> <td><img alt="test_form.jpg" id="img2" class="internal default" src="/
files/3710/test_form_2.jpg" style="width: 100%;" /></td> <td> <div class="svg-container"> <svg id="img3" overflow="visible" viewbox="0 0 212 161" color-interpolation-filters="srgb"> <filter id="svgblur" x="-5%" y="-5%" width="110%" heig...
...ht="110%"> <fegaussianblur in="sourcegraphic" stddeviation="3.5"/> </filter> <image xlink:href="/
files/3710/test_form_2.jpeg" filter="url(#svgblur)" width="212px" height="161px"/> </svg> </div> </td> <td><img alt="test_form_s.jpg" id="img4" class="internal default" src="/
files/3711/test_form_2_s.jpg" style="width: 100%;" /></td> </tr> </tbody> </table> html { height:100%; } body { font: 14px/1.286 "lucida grande", "lucida sans unicode", "dejavu sans", lucida, arial, helvetica, sans-serif; color: rgb(51, 51, 51); height:100%; overflow:hidden; } #img2 { width:100%; height:auto; -webkit-filter:blur(5px); -ms-filter:blur(5px); filter:blur(5px); } table.standard-table { border: 1px solid rgb(187, 187, 18...
...ead> <tr> <th style="text-align: left;" scope="col">original image</th> <th style="text-align: left;" scope="col">live example</th> <th style="text-align: left;" scope="col">svg equivalent</th> <th style="text-align: left;" scope="col">static example</th> </tr> </thead> <tbody> <tr> <td><img alt="test_form.jpg" id="img1" class="internal default" src="/
files/3708/test_form.jpg" style="width: 100%;" /></td> <td><img alt="test_form.jpg" id="img2" class="internal default" src="/
files/3708/test_form.jpg" style="width: 100%;" /></td> <td><div class="svg-container"><svg xmlns="http://www.w3.org/2000/svg" id="img3" viewbox="0 0 286 217" color-interpolation-filters="srgb"> <filter id="brightness"> <fecomponenttransfer> <fefuncr type=...
...And 20 more matches
Chapter 4: Using XPCOM—Implementing advanced processes - Archive of obsolete content
introduction javascript lacks functions for opening
files and character-code conversion, among other things.
...for instance, this is the case for
files (nsilocalfile).
...ing xpconnect <?xml version="1.0" encoding="utf-8"?> <page xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <script type="application/javascript"><![cdata[ var ioservice = components.classes['@mozilla.org/network/io-service;1'] .getservice(components.interfaces.nsiioservice); alert(ioservice); ]]></script> </page> calling xpconnect using local
files try saving the contents of listing 1 as the file test.xul, somewhere on your desktop, and drag and drop it into firefox to open it.
...And 19 more matches
Install Scripts - Archive of obsolete content
for example, you may wish to check versions of
files and only install updated
files, or perhaps you wish to apply patches to existing
files.
... the install script is even flexible enough to allow you to uninstall
files.
... use the install functions to indicate what
files and directories need to be installed.
...And 19 more matches
Eclipse CDT
to rebuild for changes in an individual directory (for example, to take account of some changes that you yourself made) select "index > freshen all
files" on that directory.
... opening
files you can quickly open a file by name using cmd-shift-r/ctrl-shift-r.
... headers are only parsed once for performance reasons, eclipse only processes header
files that have include guards once, using the compiler options for the first source file it encounters that includes that header (eclipse bug 380511).
...And 19 more matches
Setting Up a Development Environment - Archive of obsolete content
to package xpi
files, we use make.
... we recommend you set up make in your system, since our examples come with all the necessary
files to build and install the resulting xpi using this tool.
...this is where all the resulting build
files will be created, and where you'll find the extension xpi file once you get it to build.
...And 18 more matches
The Essentials of an Extension - Archive of obsolete content
now we'll look into its
files and code, starting with the install.rdf file.
...if we open the chrome.manifest file (again, any text editor will do), we see that the same 3 sections are mentioned: content xulschoolhello content/ skin xulschoolhello classic/1.0 skin/ locale xulschoolhello en-us locale/ the chrome.manifest file tells firefox where to look for chrome
files.
...the content is the most important section, holding user interface (xul) and script (js)
files.
...And 18 more matches
NSS tools : modutil
synopsis modutil [options] arguments description the security module database tool, modutil, is a command-line utility for managing pkcs #11 module information both within secmod.db
files and within hardware tokens.
... this tool can also create certificate, key, and module security database
files.
...the jar file uses the nss pkcs #11 jar format to identify all the
files to be installed, the module's name, the mechanism flags, and the cipher flags, as well as any
files to be installed on the target machine, including the pkcs #11 module library file and other
files such as documentation.
...And 18 more matches
MCD, Mission Control Desktop, AKA AutoConfig - Archive of obsolete content
instead of configuring end user individual preferences
files (~/.mozilla/default/randomdir/prefs.js) we now use a centralized default set of preferences.
... file location (not tested since 2012 ...) in thunderbird , firefox, the javascript preference file that calls the centralized preference file is located in $install_dir_moz_app/defaults/pref, for example in thunderbird this would be repectively for windows/linux: c:\program
files\mozilla thunderbird\defaults\pref /usr/lib/thunderbird/default/pref ( it used to be in /usr/lib/thunderbird-version#/default/pref as in /usr/lib/thunderbird-5/default/pref ) for the record/history purpose ...
...// pref("general.config.obscure_value", 0); // for mcd .cfg
files pref('general.config.filename', 'thunderbird.cfg'); // for mcd .cfg
files it used to be in previous releases (up until 7.0) in /usr/lib/thunderbird-x.0/default/pref/autoconf.js the first pref just tells us that we won't encode the file (no more rotary 13 or 7 cf below), the second pref is the name of the file to be read: /usr/lib/thunderbird/thunderbird.cfg.
...And 17 more matches
NSS tools : modutil
please contribute to the initial review in mozilla nss bug 836477[1] description the security module database tool, modutil, is a command-line utility for managing pkcs #11 module information both within secmod.db
files and within hardware tokens.
... this tool can also create certificate, key, and module security database
files.
...the jar file uses the nss pkcs #11 jar format to identify all the
files to be installed, the module's name, the mechanism flags, and the cipher flags, as well as any
files to be installed on the target machine, including the pkcs #11 module library file and other
files such as documentation.
...And 17 more matches
nsIFile
xpcom/io/nsifile.idlscriptable an instance of this interface is a cross-platform representation of a location in the
filesystem.
... with an nsifile you can navigate to ancestors or descendants without having to deal with the different path separators used on different platforms, query the state of any file or directory at the position represented by the nsifile and create, move or copy items in the
filesystem.
...in addition, the native form cannot deal with
files whose name contains characters outside the default system code page on windows.
...And 17 more matches
Using XPInstall to Install Plugins - Archive of obsolete content
xpi packages, like zip
files, "contain" other
files, typically: the software component to be installed.
...unlike native code installers (for example,
files called setup.exe), the programming language for install operations in xpi is javascript.
... plugins can consist of the following types of
files, all of which can be installed via an xpi package: shared libraries (i.e.
...And 15 more matches
Index - Archive of obsolete content
424 fileguide see io 425 accessing
files file and stream guide: [ nsiscriptableio | accessing
files | getting file information | reading from
files | writing to
files | moving, copying and deleting
files | uploading and downloading
files | working with directories ] 426 getting file information file and stream guide: [ nsiscriptableio | accessing
files | getting file information | reading from
files | wr...
...iting to
files | moving, copying and deleting
files | uploading and downloading
files | working with directories ] 427 io file and stream guide: [ nsiscriptableio | accessing
files | getting file information | reading from
files | writing to
files | moving, copying and deleting
files | uploading and downloading
files | working with directories ] 428 moving, copying and deleting
files file and stream guide: [ nsiscriptableio | accessing
files | getting file information | reading from
files | writing to
files | moving, copying and deleting
files | uploading and downloading
files | working with directories ] 429 reading from
files file and stream guide: [ nsiscriptableio | accessing
files | getting file information | reading from fi...
...les | writing to
files | moving, copying and deleting
files | uploading and downloading
files | working with directories ] 430 toc file and stream guide: [ nsiscriptableio | accessing
files | getting file information | reading from
files | writing to
files | moving, copying and deleting
files | uploading and downloading
files | working with directories ] 431 uploading and downloading
files file and stream guide: [ nsiscriptableio | accessing
files | getting file information | reading from
files | writing to
files | moving, copying and deleting
files | uploading and downloading
files | working with directories ] 432 working with directories file and stream guide: [ nsiscriptableio | accessing
files | getting file information | rea...
...And 15 more matches
Profile Manager
see http://kb.mozillazine.org/profile_manager#accessing_the_profile_manager for an alternative method of managing pro
files.
... firefox and other xulrunner applications store user settings and data in special folders, called pro
files.
... firefox provides a built-in applet to manage these pro
files, 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.
...And 15 more matches
Setting up adaptive streaming media sources - Developer guides
we are required to provide several different quality
files split up over several time points.
...various bitrate streams are broken into segments and placed in appropriate server folders — we have to provide our media players with a link to lookup
files or playlists specifying the name and location of these stream folders.
... there are a few pro
files we can use.
...And 15 more matches
Using the application cache - HTML: Hypertext Markup Language
if the manifest file has changed, all the
files listed in the manifest—as well as those added to the cache by calling applicationcache.add()—are fetched into a temporary cache, following the appropriate http caching rules.
... once all the
files have been successfully retrieved, they are moved into the real offline cache automatically, and a cached event is sent to the applicationcache object.
... in firefox, the offline cache data is stored separately from the firefox profile—next to the regular disk cache: windows vista/7: c:\users\<username>\appdata\local\mozilla\firefox\pro
files\<salt>.<profile name>\offlinecache mac/linux: /users/<username>/library/caches/firefox/pro
files/<salt>.<profile name>/offlinecache in firefox the current status of the offline cache can be inspected on the about:cache page (under the "offline cache device" heading).
...And 15 more matches
Creating XULRunner Apps with the Mozilla Build System - Archive of obsolete content
psrcdir@/../mccoybase # global options ac_add_options --enable-debug ac_add_options --disable-optimize # xulrunner options ac_add_app_options xulrunner --enable-application=xulrunner # mccoy options ac_add_app_options mccoy --enable-application=mccoy ac_add_app_options mccoy --with-libxul-sdk=../xulrunner/dist the first section tells mozilla what to build and where to put the resulting object
files.
...of course, you only really need the mozilla build system since all the other mozilla
files are in the xulrunner sdk, and there is a bug filed to make it possible to check out the build system only.
...first you're going to have to write a whole bunch of make
files and stuff.
...And 14 more matches
Chrome registration
note: with gecko 1.9.2 and older, mozilla reads chrome/*.manifest
files from applications.
...the providers work together to supply a complete set of chrome for a particular window, from the images on the toolbar buttons to the
files that describe the text, content, and appearance of the window itself.
...the javascript
files that define the user interface are also contained within the content packages, as well as most xbl binding
files.
...And 14 more matches
MIME types (IANA media types) - HTTP
if this is not correctly configured, browsers are likely to misinterpret the contents of
files and sites will not work correctly, and downloaded
files may be mishandled.
...for example, for the mime type text, the subtype might be plain (plain text), html (html source code), or calendar (for icalendar/.ics)
files.
...a multipart type is one which represents a document that's comprised of multiple component parts, each of which may have its own individual mime type; or, a multipart type may encapsulate multiple
files being sent together in one transaction.
...And 14 more matches
Enhanced Extension Installation - Archive of obsolete content
it forces its items to be located in different places on the user's disk - some vendors wish to keep all of their installed content within c:\program
files\foo\ for example.
... there is no clean uninstall procedure, as the -install-global-extension flag was designed only as a means to install items for all user pro
files, not as a means for third party installers to register their components.
...when a newer version fo an existing extension is installed,
files for the newer version are copied into the folder used by the older version, and obsolete
files are not cleaned up.
...And 13 more matches
SeaMonkey - making custom toolbar (SM ver. 1.x) - Archive of obsolete content
your operating system normally provides them: a way to create and work with
files and directories a text editor for plain text
files character encoding some text editors have a setting for character encoding.
...if your language uses accents or other non-latin characters, set your text editor to save
files using the utf-8 encoding.
... explanation: the chrome directory contains program
files that are part of seamonkey itself, together with other
files that are provided by extensions.
...And 13 more matches
Writing Skinnable XUL and CSS - Archive of obsolete content
each package has its own skin, css
files and images that determine the appearance of that package.
... writing css
files for a package learn css!
... css
files for a skin fall into two categories: base skin
files and derived skin
files.
...And 13 more matches
Localizing without a specialized tool
from the create a new localization document, an interested localizer can follow a technical step-by-step process that starts the localization process by focusing on how to localize two of the primary types of localization
files (dtd and properties) used in the mozilla source code.
... with that document, users can see immediately two localized
files in their user interface by following closely and carefully the steps to create a language pack or a binary file that is ready for installation.
...der structure throughout this document, we will be using the following folder structure in all examples: your working directory (root) mozilla-1.9.2 (en-us source, pulled from http://hg.mozilla.org/releases/mozilla-1.9.2) l10n-mozilla-1.9.2 (a directory containing localization directories, one dir per localization; often referred to as "l10n base") x-testing (a directory with your localization
files) please either follow this structure closely or adjust all commands in the documentation as needed by your custom set-up.
...And 13 more matches
NSS API Guidelines
the public headers is a list of header
files that contain types, and functions, that are publicly available to higer-level apis.
... lib/util base64.h, ciferfam.h, nssb64.h, nssb64t.h, nsslocks.h, nssrwlk.h, nssrwlkt.h, portreg.h, pqgutil.h, secasn1.h, secasn1t.h, seccomon.h, secder.h, secdert.h, secdig.h, secdigt.h, secitem.h, secoid.h, secoidt.h, secport.h, secrng.h, secrngt.h, secerr.h, watcomfx.h naming conventions this section describes the rules that (ideally) should be followed for naming and identifying new
files, functions, and data types.
...you can even put them in header
files; the header
files are protected from double inclusion.
...And 13 more matches
DataTransferItem.webkitGetAsEntry() - Web APIs
if the item described by the datatransferitem is a file, webkitgetasentry() returns a
filesystemfileentry or
filesystemdirectoryentry representing it.
... return value a
filesystementry-based object describing the dropped item.
... this will be either
filesystemfileentry or
filesystemdirectoryentry.
...And 13 more matches
<blend-mode> - CSS: Cascading Style Sheets
<div id="div"></div> #div { width: 300px; height: 300px; background: url('https://mdn.mozillademos.org/
files/8543/br.png'), url('https://mdn.mozillademos.org/
files/8545/tr.png'); background-blend-mode: normal; } multiply the final color is the result of multiplying the top and bottom colors.
... <div id="div"></div> #div { width: 300px; height: 300px; background: url('https://mdn.mozillademos.org/
files/8543/br.png'), url('https://mdn.mozillademos.org/
files/8545/tr.png'); background-blend-mode: multiply; } screen the final color is the result of inverting the colors, multiplying them, and inverting that value.
... <div id="div"></div> #div { width: 300px; height: 300px; background: url('https://mdn.mozillademos.org/
files/8543/br.png'), url('https://mdn.mozillademos.org/
files/8545/tr.png'); background-blend-mode: screen; } overlay the final color is the result of multiply if the bottom color is darker, or screen if the bottom color is lighter.
...And 13 more matches
JavaScript modules - JavaScript
46safari ios full support 11.3samsung internet android full support 8.0nodejs full support 13.2.0notes full support 13.2.0notes notes dynamic import can be used in either commonjs or es module
files, to import either commonjs or es module
files.
... full support 12.0.0notes disabled notes dynamic import can be used in either commonjs or es module
files, to import either commonjs or es module
files.
... aside — .mjs versus .js throughout this article, we've used .js extensions for our module
files, but in other resources you may see the .mjs extension used instead.
...And 13 more matches
Web video codec guide - Web media technologies
video encoder configuration effects on quality and size feature effect on quality effect on size lossless compression no loss of quality lossless compression cannot reduce the overall video size nearly as much as lossy compression; the resulting
files are likely to still be too large for general usage.
...epending on the specific codec and how much compression is being applied the more the encoded video is allowed to deviate from the source, the easier it is to accomplish higher compression rates quality setting the higher the quality configuration, the more like the original media the encoded video will look in general, higher quality settings will result in larger encoded video
files; the degree to which this is true varies depending on the codec bit rate quality generally improves with higher bit rates higher bit rates inherently lead to larger output
files the options available when encoding video, and the values to be assigned to those options, will vary not only from one codec to another but depending on the encoding software you use.
... av1 currently offers three pro
files: main, high, and professional with increasing support for color depths and chroma subsampling.
...And 13 more matches
Creating XPI Installer Modules - Archive of obsolete content
under the chrome/ directory, you'll notice that in addition to the package subdirectories, there are now also a handful of jar
files, or java archives (see figure below).
... jar is a file format based on the zip file format and is used for aggregating multiple
files into a single file.
... in addition to these jar
files, there are also several new rdf
files.
...And 12 more matches
Learn XPI Installer Scripting by Example - Archive of obsolete content
a xpi is a pkzip-compressed archive (like zip and jar
files) with a special script at the highest level that manages the installation.
...es\ note that this high-level structure parallels the directory structure of the installed browser very closely: as you will see in the installation script, the contents of the archive are installed onto the file system in much the same way that they are stored in the archive itself, though it's possible to rearrange things arbitrarily upon installation--to create new directories, to install
files in system folders and other areas.
... most installation scripts, including the one discussed here, take the following basic form (in pseudo-code and with links to the sections in which these installation steps are documented): initinstall(); if (verify_space()) { err = add_dirs_and_
files; register_
files; if (err==success) { performinstall() }; else { cancelinstall() }; } as you can see in the code listing, the verification process at the top is on lines 1 to 18; the file addition process, here part of the main installation block, is on lines 24 to 41; the registration part of the main installation block is on lines 42-58; and the execution at the end of the main block...
...And 12 more matches
Creating an Installer - Archive of obsolete content
xpinstall packages mozilla provides a mechanism which can be used to package xul windows, scripts, skins and other
files into single file installers.
... xpinstall installers are packaged into jar
files.
... inside the jar file, you can add all the various
files that you want to have installed.
...And 12 more matches
Localization - Archive of obsolete content
dtd
files entities are declared in document type definition (dtd)
files.
...
files of this type are normally used to declare the syntax and semantics of a particular xml file, but they also let you declare entities.
... in the mozilla chrome system, you will find dtd
files located in the locales subdirectory.
...And 12 more matches
Building a Theme - Archive of obsolete content
setting up the development environment themes and extensions are packaged and distributed in zip
files or bundles, with the xpi (pronounced “zippy”) file extension.
...inside your new theme folder, create two new empty text
files, one called chrome.manifest and the other called install.rdf.
...the location differs by operating system: linux: /usr/lib/mozillafirefox/chrome/classic.ja or /usr/lib/firefox-*.*.*/omni.ja windows: \program
files\mozilla firefox\omni.ja mac os x: /applications/firefox.app/contents/macos/omni.ja now, open (or unzip) this file into the directory you created.
...And 12 more matches
Deployment and next steps - Learn web development
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.
... 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.
...it will however minify and compress our javascript
files using terser.
...And 12 more matches
Color picker tool - CSS: Cascading Style Sheets
e; -ms-user-select: none; user-select: none; } .ui-color-picker .picking-area { width: 198px; height: 198px; margin: 5px; border: 1px solid #ddd; position: relative; float: left; display: table; } .ui-color-picker .picking-area:hover { cursor: default; } /* hsv format - hue-saturation-value(brightness) */ .ui-color-picker .picking-area { background: url('https://mdn.mozillademos.org/
files/5707/picker_mask_200.png') center center; background: -moz-linear-gradient(bottom, #000 0%, rgba(0, 0, 0, 0) 100%), -moz-linear-gradient(left, #fff 0%, rgba(255, 255, 255, 0) 100%); background: -webkit-linear-gradient(bottom, #000 0%, rgba(0, 0, 0, 0) 100%), -webkit-linear-gradient(left, #fff 0%, rgba(255, 255, 255, 0) 100%); background: -ms-linear-gradient(bottom, #000 0%, rgba(0, 0,...
...; position: absolute; top: 45%; left: 45%; } .ui-color-picker .picker:before { width: 8px; height: 8px; content: ""; position: absolute; border: 1px solid #999; border-radius: 50%; } .ui-color-picker .hue, .ui-color-picker .alpha { width: 198px; height: 28px; margin: 5px; border: 1px solid #fff; float: left; } .ui-color-picker .hue { background: url("https://mdn.mozillademos.org/
files/5701/hue.png") center; background: -moz-linear-gradient(left, #f00 0%, #ff0 16.66%, #0f0 33.33%, #0ff 50%, #00f 66.66%, #f0f 83.33%, #f00 100%); background: -webkit-linear-gradient(left, #f00 0%, #ff0 16.66%, #0f0 33.33%, #0ff 50%, #00f 66.66%, #f0f 83.33%, #f00 100%); background: -ms-linear-gradient(left, #f00 0%, #ff0 16.66%, #0f0 33.33%, #0ff 50%, #00f 66.66%, #f0f 83.33%, #f00 ...
...100%); background: -o-linear-gradient(left, #f00 0%, #ff0 16.66%, #0f0 33.33%, #0ff 50%, #00f 66.66%, #f0f 83.33%, #f00 100%); } .ui-color-picker .alpha { border: 1px solid #ccc; background: url("https://mdn.mozillademos.org/
files/5705/alpha.png"); } .ui-color-picker .alpha-mask { width: 100%; height: 100%; background: url("https://mdn.mozillademos.org/
files/6089/alpha_mask.png"); } .ui-color-picker .slider-picker { width: 2px; height: 100%; border: 1px solid #777; background-color: #fff; position: relative; top: -1px; } /* input hsv and rgb */ .ui-color-picker .info { width: 200px; margin: 5px; float: left; } .ui-color-picker .info * { float: left; } .ui-color-picker .input { width: 64px; margin: 5px 2px; float: left; } .ui-color-picker .input .name { height: 20...
...And 12 more matches
Media container formats (file types) - Web media technologies
the format of audio and video media
files is defined in two parts (three if a file has both audio and video in it, of course): the audio and/or video codecs used and the media container format (or file type) used.
...these
files use the audio/mp3 mime type and the .mp3 extension, even though their containers are just mpeg.
...flac
files can only contain flac audio data.
...And 12 more matches
Image file type and format guide - Web media technologies
another popular feature of gif is support for interlacing, where rows of pixels are stored out of order so that partially-received
files can be displayed in lower quality.
...if you use ico
files, you should use the bmp format, as support for png inside ico
files wasn't added until windows vista and may not be well supported.
... ico
files should not be used in web content.
...And 12 more matches
Working With Directories - Archive of obsolete content
file and stream guide: [ nsiscriptableio | accessing
files | getting file information | reading from
files | writing to
files | moving, copying and deleting
files | uploading and downloading
files | working with directories ] important note: the pages from the file and stream guide use the io object (nsiscriptableio), which was not available in any released version of the platform (pending some fixes).
...other documentation on
files and i/o not using the unavailable nsiscriptableio apis: code snippets: file i/o, open and save dialogs, reading textual data, writing textual data, list of file-related error codes.
...the first line below with retrieve the directory corresponding to the user's home directory, while the second will retrieve the directory 'my
files' on the desktop.
...And 11 more matches
IO - Archive of obsolete content
file and stream guide: [ nsiscriptableio | accessing
files | getting file information | reading from
files | writing to
files | moving, copying and deleting
files | uploading and downloading
files | working with directories ] important note: the pages from the file and stream guide use the io object (nsiscriptableio), which was not available in any released version of the platform (pending some fixes).
...other documentation on
files and i/o not using the unavailable nsiscriptableio apis: code snippets: file i/o, open and save dialogs, reading textual data, writing textual data, list of file-related error codes.
...
files and streams this section describes how to access and get information about
files, read from
files and create and write
files.
...And 11 more matches
Creating a Skin - Archive of obsolete content
for simplicity, we'll only apply it to the find
files dialog.
... a simple skin the image below shows the current find
files dialog.
...normally, a skin would apply to the entire application, but we'll focus on just the find
files dialog to make it easier.
...And 11 more matches
Makefile - variables
variable name description add_to_def_file cpp_sources cpp_unit_tests a list of source
files to compile as unit tests.
... csrcs a list of c source
files to compile.
... defines additional preprocessor defines for c++ expand_mozlibname exports a list of exported header
files and sources to install for external use.
...And 11 more matches
Eclipse CDT Manual Setup
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.
...if eclipse can successfully identify which source file was being compiled, then it can associate with that file the resolvable include paths, preprocessor defines, and pre-include
files that were passed to the compiler.
...first, eclipse needs build console output for a complete build, so that it can find compiler options for as many source
files as possible.
...And 11 more matches
Python binding for NSS
identifer names follow the preferred python style instead of the style in the nss/nspr c header
files.
... enumerated constants used in the nss/nspr api's are available in the python module under the exact same name as they appear in the c header
files of nss/nspr.
...for information on downloading python-nss releases as tar
files, see source download.
...And 11 more matches
Building the WebLock UI
weblock indicator in browser user interface package list the user interface described in this section is comprised of four
files: weblockoverlay.xul is the file that defines the little status icon in the browser.
... weblock.css provides style rules for both of the xul
files.
... weblock.js provides javascript functions for both of the xul
files.
...And 11 more matches
Starting WebLock
once the interface has been described in the xpidl language, the interface file can be used to generate the header
files needed for the implementation code, the binary type library
files that let you use the interface of the weblock component from javascript, and even broken linkjavadoc style html documentation.
... file interfaces
files and directories are abstracted and encapsulated by interfaces.
...on the macintosh platform, for example,
files are represented as a triplet - two numbers and one string - so using a string on the macintosh does not adequately identify
files on that operating system.
...And 11 more matches
XUL Overlays
xul
files and xul overlays overlays are xul
files used to describe extra content in the ui.
...overlays provide a general mechanism for: adding ui for additional components, as described in the example above overriding small pieces of a xul file without having to resupply the whole ui reusing particular pieces of the ui xul
files and overlays work together to describe a single master document.
... though there is no formal restriction on what kind of xul content is located in "base" xul
files and what kind should be put in overlays, xul overlays generally define items that are not present in the basic versions of the ui, such as additional components.
...And 11 more matches
Introduction to the File and Directory Entries API - Web APIs
you can develop apps that can read, write, and create
files and directories in a sandboxed, virtual file system.
... audio or photo editor with offline access or local cache (great for performance and speed) the app can write to
files in place (for example, overwriting just the id3/exif tags and not the entire file).
... offline video viewer the app can download large
files (>1gb) for later viewing.
...And 11 more matches
Web audio codec guide - Web media technologies
t of change varies from codec to codec bit rate the higher the bit rate, the higher the quality can be the higher the bit rate, the larger the encoded file is likely to be audio frequency bandwidth if there is any audio in the removed frequency band(s), there may be a noticeable loss of fidelity removing frequency bands means less data to encode, thus smaller encoded
files stereo coding simple stereo and mid-side stereo coding don't affect quality; intensity stereo coding introduces loss of detail, however.
... aac has a number of pro
files that define methods of compressing audio for specific use cases, including everything from high quality surround sound to low-fidelity audio for speech-only use.
... amr audio which is stored in
files may simply be typed .amr, but may also be encapsulated in .3gp
files.
...And 11 more matches
Localization - Archive of obsolete content
the sdk supports localization of strings appearing in: your main add-on's javascript code html
files packaged with your add-on the title, description and homepage fields of your add-on's metadata the title and description fields of your add-on's preferences.
...the
files: use the .properties format are named "xx-yy.properties", where "xx-yy" is the name of the locale in question contain one entry for each string you want to localize, consisting of an identifier for the string and its translation in that locale, in the format identifier=translation need to use utf-8 without bom encoding lines starting with "#" (after optional whitespace) are comments suppose your add-on contains a single localizable string, represented in english as "hello!", an...
... you'd add two
files to the "locale" directory: my-addon/ data lib locale/ en-us.properties fr.properties "en-us.properties" contains this: hello_id= hello!
...And 10 more matches
Localizing an extension - Archive of obsolete content
performing a few simple steps makes your extension much easier to localize into various languages without having to edit the xul or javascript
files themselves.
...download the sample localizing strings in xul
files create the needed locale
files each xul file that comprises the user interface for your extension should have a locale file in its locale directory.
... each locale file maps entity names referenced in the xul
files to the strings themselves.
...And 10 more matches
Source code directories overview - Archive of obsolete content
if
files can be grouped into submodules, they are usually put in their own third level directory and given a unique name (e.g.
... build contains any special make
files for building the particular module.
... idl contains the xpidl (cross platform interface definition language) interface
files.
...And 10 more matches
Custom toolbar button - Archive of obsolete content
your operating system normally provides them: a way to create and work with
files and directories a text editor for plain text
files character encoding some text editors have a setting for character encoding.
... if your language uses accents or other non-latin characters, set your text editor to save
files using the utf-8 encoding.
...you will add the other directories and
files that are shown in the diagram.
...And 10 more matches
HTTP logging
go to the folder containing the specified log file, and gather all the log
files.
... you will see several
files that look like: log.txt-main.1806, log.txt-child.1954, log.txt-child.1970, etc.
... note that this approach winds up logging the whole browser history, so
files can get rather large (they compress well :) setting environment variables differs by operating system.
...And 10 more matches
SVN for Localizers
here you'll learn the process of using svn to obtain mozilla website source
files from the mozilla servers and pushing your localizations right back to them.
...it's a handy tool that allows us to grab, change, and store versions of source
files in one location.
...you use it to copy
files from the server to your computer and to push changed or localized
files back onto the server.
...And 10 more matches
Getting started - SVG: Scalable Vector Graphics
basic properties of svg
files the first important thing to notice is the order of rendering elements.
... the globally valid rule for svg
files is, that later elements are rendered atop previous elements.
... svg
files on the web can be displayed directly in the browser or embedded in html
files via several methods: if the html is xhtml and is delivered as type application/xhtml+xml, the svg can be directly embedded in the xml source.
...And 10 more matches
jpm - Archive of obsolete content
see using pro
files for more information.
...jpm test include a file called "test-mycode.js", but will exclude
files called "test_mycode.js" or "testmycode.js") call every function exported from that file whose name starts with "test".
... jpm test --filter base64:btoa the above command only runs tests in
files whose names contain "base64", and in those
files only runs tests whose names contain "btoa".
...And 9 more matches
Making a Mozilla installation modifiable - Archive of obsolete content
mozilla's user interface is made up of xul (described below), xbl (a topic for another tutorial), javascript, css, and image
files.
... xul, xbl, javascript, and css
files are all in text format and can be edited in a standard text editor, while image
files are in binary gif, jpg, or png format and must be edited with an image editing program.
... the
files are then collected into a series of jar archives, which are just zip
files that contain a specially formatted "manifest" file which describes the contents of the archive so mozilla knows what to do with them.
...And 9 more matches
Getting Started - Archive of obsolete content
for this reason we suggest that you install a second copy into a second directory (make sure that you use a different profile as stated in the release notes) extract the chrome the chrome is stored in \mozilla\chrome and the individual modules are stored in jar
files.
... jar
files are zip
files with a different extension.
... you can open them up in your zip program the same way you open up zip
files.
...And 9 more matches
Creating a Skin for Firefox/Getting Started - Archive of obsolete content
opening the .jar
files in your archive manager of choice should result in the file being automatically detected as being a zip archive.
...see theme changes in firefox 4 for details on how to extract skin
files from firefox 4 or later.
... classic.jar locations linux: /usr/lib/mozillafirefox/chrome/classic.jar or /usr/lib/firefox-*.*.*/chrome/classic.jar windows: \program
files\mozilla firefox\chrome\classic.jar for mac os x: go to your applications folder control click application icon(firefox icon), choose show package contents.
...And 9 more matches
Actionscript Acceptance Tests - Archive of obsolete content
support
files: there are a variety of support
files available for non-standard actionscript tests.
... testname.as.asc_args
files will take precedence over the dir.asc_args file.
...(see bug 587093 for details.) specifying multiple .abcs: if you desire to run a test with multiple .abc
files (e.g: avmshell a.abc b.abc testname.abc) there is a special avm_args directive called multiabc that is specified surrounded by two pipe (|) symbols: |multiabc| $dir/testname_support/a.abc $dir/testname_support/b.abc the extra abc
files will usually be placed in a _support dir (see additional
files below).
...And 9 more matches
Simple Thunderbird build
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 that the build process will find the
files, that is c:\program
files (x86)\windows kits\10\include\10.0.nnnnn.0\shared, where nnnnn is the highest number present on the system.
... note that the downloaded outlook 2010 mapi header
files contain 18 fies, of which only 17 are needed.
...And 9 more matches
Application Translation with Mercurial
file and text editor for editing individual
files a text editor can be a better choice than a file comparion program, e.g.
... progress tracking tool to track which strings and
files already have been translated and later also to see which new strings have already been tested in the product as being a good translation for the functionality behind the translated strings and that the translated texts fit into the available, the translation progress should be tracked.
... extract the
files: hg update obtaining the texts of your localization go back to the parent folder of mozilla-aurora: cd ..
...And 9 more matches
A brief guide to Mozilla preferences
all preferences
files may call pref(), user_pref() and sticky_pref(), while the config file in addition may call lockpref().
... preferences
files to protect privacy by preventing inadvertent loading of a preferences file in the browser, the first line of the file is made un-parseable and skipped on loading.
... on application launch, several preferences
files are loaded.
...And 9 more matches
Setting up the Gecko SDK
the two top level header
files are special.
...the idl directory contains the public idl
files exported by the module.
... the includes directory contains c++ header
files used by your component.
...And 9 more matches
Using XMLHttpRequest - Web APIs
using xmlserializer to serialize dom trees to strings or to
files.
... submitting forms and uploading
files instances of xmlhttprequest can be used to submit forms in two ways: using only ajax using the formdata api using the formdata api is the simplest and fastest, but has the disadvantage that data collected can not be stringified.
...the only case where you need an additional api is if you want to upload one or more
files, where you use the filereader api.
...And 9 more matches
Extension Packaging - Archive of obsolete content
extensions use a directory structure which can provide chrome, components, and other
files to extend the functionality of an xul program.
... after the extension
files and install.rdf have been prepared, there are several ways to prepare an extension for installation: zip the extension directory into a user-installable xpi (xpinstall) file, unpack the extension directly into the user's application or profile directory, or register the extension in the windows registry.
... note: starting in gecko 2.0, xpi
files are no longer unpacked when extensions are installed.
...And 8 more matches
Setting up an extension development environment - Archive of obsolete content
edit
files in the extensions folder of this profile, and restart the application as this new developer profile.
... note: for an extended guide on how to set up even more user pro
files, take a look at multiple firefox pro
files.
... on ubuntu (and many other linux distributions): /usr/bin/firefox -no-remote -p dev on other distributions of linux/unix: /usr/local/bin/firefox -no-remote -p dev on macos mavericks (10.9) and newer: /applications/firefox.app/contents/macos/firefox-bin -no-remote -p dev & on windows: start -> run "%program
files%\mozilla firefox\firefox.exe" -no-remote -p dev on windows 64 bit: start -> run "%program
files(x86)%\mozilla firefox\firefox.exe" -no-remote -p dev to start thunderbird or seamonkey instead of firefox, substitute thunderbird, or seamonkey for the firefox used in our examples.
...And 8 more matches
Promises - Archive of obsolete content
}) .then(response => { if (response.messages) return publish({ username: user, messages: response.messages }); }) .then(null, (e) => { self.reporterror("publication failed", e); }); file io file io in add-ons should be done via the os.file api, which provides a simple, but powerful, interface for reading, writing, and manipulating both text and binary
files.
... let config = json.parse( yield os.file.read(configpath, { encoding: "utf-8" })); let
files = []; // get the directory contents from a list of directories.
... let iter = new os.file.directoryiterator(dir); yield iter.foreach(entry => { if (!entry.isdir)
files.push(entry.path); }); iter.close(); } // read the
files as binary blobs and process them.
...And 8 more matches
Structure of an installable bundle - Archive of obsolete content
basic structure of a bundle a bundle may include any of the following
files: path from the root of the bundle description version information /install.rdf extension/theme install manifest /application.ini application launch manifest /bootstrap.js the bootstrap script for extensions not requiring a restart (those with <em:bootstrap>true</em:bootstrap> in their install.rdf).
... note that other
files and directories (e.g.
... (>=2.0) /chrome.manifest chrome registration manifest (>=1.8) /components/* xpcom components (*.js, *.dll), and interface
files from *.xpt (>=1.7) /defaults/preferences/*.js default preferences (>=1.7) /plugins/* npapi plugins (>=1.8) /chrome/icons/default/* window icons (>=1.8) /icon.png extension icon, for display in the add-ons manager, 32px × 32px (>=1.9.2) /icon64.png extension icon, for display in the add-ons manager, 64px × 64px (>=2.0) /options.xul extension options, for display in the add-ons manager (>=7.0) ...
...And 8 more matches
Tamarin build documentation - Archive of obsolete content
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.
...if you have trouble starting the app try this: $ export android_swt=$android_build_top/android-sdk-mac_86/tools/lib/x86_64 where $android_build_top is the full path to your sdk/ndk top folder - get the openssl-0.9.8r.tar (openssl-1.0.0c.tar.gz won't work) openssl
files from http://www.openssl.org (use the source link on the left).
...the necessary static
files 'libcrypto.a' and 'libssl.a' are made correctly and are present in the /openssl folder.
...And 8 more matches
Complete - Archive of obsolete content
if you want to see these techniques in action, then you can download and install the complete allcustom extension: allcustom.xpi (the link is external only because this wiki does not support xpi
files.) the extension does not contain any useful functions.
... chrome directory containing the extension code chrome/allcustom.jar the extension jar defaults/preferences directory containing a preferences file inside the jar there are three directories: content xul, javascript and other content that does not depend on the locale or theme locale
files for each locale skin
files for each theme version checks firefox etc.
...to tell the application that the
files it needs are in a jar, there are changes to chrome.manifest (for firefox etc.) and to install.js (for seamonkey).
...And 8 more matches
Web fonts - Learn web development
web fonts are a css feature that allows you to specify font
files to be downloaded along with your website as it is accessed, meaning that any browser that supports web fonts can have exactly the fonts you specify available to it.
... you should use the web-font-start.html and web-font-start.css
files as a starting point to add your code to (see the live example).
... make a copy of these
files in a new directory on your computer now.
...And 8 more matches
Getting started with Svelte - Learn web development
svelte will watch for file updates, and automatically recompile and refresh the app for you when changes are made to the source
files.
... .gitignore: tells git which
files or folder to ignore from the project — useful if you decide to include your app in a git repo.
... public: this directory contains all the
files that will be published in production.
...And 8 more matches
Command line crash course - Learn web development
it is also useful for automation — for example to write a command to update the titles of hundreds of
files instantly, say from “ch01-xxxx.png” to “ch02-xxxx.png”.
...out of the box, here are just a few of the things the command line can do, along with names of relevant tools in each case: navigate your computer’s file system along with base level tasks such as create, copy, rename and delete: move around your directory structure: cd create directories: mkdir create
files (and modify their metadata): touch copy
files: cp move
files: mv delete
files or directories: rm download
files found at specific urls: curl search for fragments of text inside larger bodies of text: grep view a file's contents page by page: less, cat manipulate and transform streams of text (for example changing all the instances of <div>s in an html file to <article>): awk, tr...
... try running this now in your terminal: ls this gives you a list of the
files and directories in your present working directory, but the information is really basic — you only get the name of each item present, not whether it is a file or a directory, or anything else.
...And 8 more matches
Configuring Build Options
build options, including options not usable from the command-line, may appear in "confvars.sh"
files in the source tree.
...this is useful if you choose to have multiple mozconfig
files for different applications or configurations (see below for a full example).
... building with an objdir this means that the source code and object
files are not intermingled in your directory system and you can build multiple applications (e.g., firefox and thunderbird) from the same source tree.
...And 8 more matches
OS.File for the main thread
let sessionstore = os.path.join(os.constants.path.profiledir, "sessionstore.js"); // under linux, this is generally "$home/.firefox/pro
files/$profilename/sessionstore.js" // under macos, this is generally "$home/library/application support/firefox/$profilename/sessionstore.js" // under windows, this is generally "%appdata%\local\temp\%profilename%"\sessionstore.js // etc.
... var img = new image(); img.onload = function() { var canvas = document.createelementns('http://www.w3.org/1999/xhtml', 'canvas'); canvas.width = img.naturalwidth; canvas.height = img.naturalheight; var ctx = canvas.getcontext('2d'); ctx.drawimage(img, 0, 0); (canvas.toblobhd || canvas.toblob).call(canvas, function(b) { var r = cc['@mozilla.org/
files/filereader;1'].createinstance(ci.nsidomfilereader); //new filereader(); r.onloadend = function() { // r.result contains the arraybuffer.
...if unspecified,
files are created with a default mode of 0600 (file is private to the user, the user can read and write).
...And 8 more matches
SpiderMonkey Internals
so optimizations such as dense arrays and the property cache are, alas, not transparently tucked away in the jsarray.* and jsobj.*
files.
...most parts of the jit also avoid depending directly on the layout: the
files punboxassembler.h and nunboxassembler.h are used to generate native code that depends on the value layout.
... all self-hosted code lives in .js
files under builtin/.
...And 8 more matches
Component Internals
components reside in modules, and those modules are defined in shared library
files that typically sit in the components directory of an xpcom application.
... another, even more basic view of this relationship of components to the
files and interfaces that define them is shown in onion peel view of xpcom component creation in the next chapter.
... xpcom registry manifests xpcom uses special
files called manifests to track and persist information about the components to the local system.
...And 8 more matches
nsIProfile
profile/public/nsiprofile.idlunknown the profile manager is responsible for creating, maintaining, and organizing user pro
files.
... this interface was superseded by the nsitoolkitpro
fileservice interface in gecko 1.8.1.
...method overview void cloneprofile(in wstring profilename); void createnewprofile(in wstring profilename, in wstring nativeprofiledir, in wstring langcode, in boolean useexistingdir); void deleteprofile(in wstring name, in boolean candelete
files); void getprofilelist(out unsigned long length, [retval, array, size_is(length)] out wstring profilenames); boolean profileexists(in wstring profilename); void renameprofile(in wstring oldname, in wstring newname); void shutdowncurrentprofile(in unsigned long shutdowntype); attributes attribute type description currentprofile ws...
...And 8 more matches
Inputs and input sources - Web APIs
profile strings each input source can have zero or more input profile name strings, found in the array pro
files, each of which describes a preferred visual representation of the input source within the 3d world as well as how the input source functions.
... the use of these pro
files is briefly described under input pro
files below, and a more complete guide may be found in our article using webxr input pro
files.
... identifying the input's profile each input source has a pro
files property, which contains a live list of the webxr input pro
files which apply to the input source, in order of specificity from most-specific to least.
...And 8 more matches
JavaScript Object Management - Archive of obsolete content
namespace declaration is best located in a file of its own, so that you have this one js file that should be included in all of your xul
files.
...if you have complex behavior that requires too much code, look for ways to divide it into multiple objects and
files.
...to keep things simple, just locate the jsm
files in a modules directory under the root of our project.
...And 7 more matches
Signing an XPI - Archive of obsolete content
windows contains its own version of some of these
files (e.g.
...tree "signed/" signed successfully re-package xpi change to the signed/ folder, create a new zip with the meta-inf/zigbert.rsa file listed first, then add the remaining
files.
... image obtaining a valid software developer code-signing certificate warning: currently firefox expects xpi
files to be signed with certificates that conform to the older object signing convention, rather than the newer code signing convention.
...And 7 more matches
Sunbird Theme Tutorial - Archive of obsolete content
to make a theme, you usually need these tools: a jar tool or zip tool an editor for plain text
files software for creating and editing images note: some zip tools only work with
files whose names have <tt>.zip</tt> at the end.
...you also need knowledge of: using your operating system to create
files and directories using the tools listed above css graphic design knowledge of xul, xbl and javascript is useful for advanced themes.
... making a theme a theme consists of: a unique identifier a file containing information about the theme a file that registers the theme with sunbird some
files containing the theme itself set up your theme in sunbird's profile directory.
...And 7 more matches
Video and audio content - Learn web development
prerequisites: basic computer literacy, basic software installed, basic knowledge of working with
files, familiarity with html fundamentals (as covered in getting started with html) and images in html.
... video and audio on the web web developers have wanted to use video and audio on the web for a long time, ever since the early 2000s when we started to have bandwidth fast enough to support any kind of video (video
files are much larger than text or even images.) in the early days, native web technologies such as html didn't have the ability to embed video and audio on the web, so proprietary (or plugin-based) technologies like flash (and later, silverlight) became popular for handling such content.
... we won't be teaching you how to produce audio and video
files — that requires a completely different skillset.
...And 7 more matches
Client-Server Overview - Learn web development
an html page usually references javascript and css pages), and will send separate http requests to download these
files.
... post https://developer.mozilla.org/pro
files/hamishwillee/edit http/1.1 host: developer.mozilla.org connection: keep-alive content-length: 432 pragma: no-cache cache-control: no-cache origin: https://developer.mozilla.org upgrade-insecure-requests: 1 user-agent: mozilla/5.0 (windows nt 10.0; wow64) applewebkit/537.36 (khtml, like gecko) chrome/52.0.2743.116 safari/537.36 content-type: application/x-www-form-urlencoded accept: text/html,appl...
...ication/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8 referer: https://developer.mozilla.org/pro
files/hamishwillee/edit accept-encoding: gzip, deflate, br accept-language: en-us,en;q=0.8,es;q=0.6 cookie: sessionid=6ynxs23n521lu21b1t136rhbv7ezngie; _gat=1; csrftoken=zipujsazv6pcgcbjscj1zu6pqzbfmuat; dwf_section_edit=false; dwf_sg_task_completion=false; _ga=ga1.2.1688886003.1471911953; ffo=true csrfmiddlewaretoken=zipujsazv6pcgcbjscj1zu6pqzbfmuat&user-username=hamishwillee&user-fullname=hamish+willee&user-title=&user-organization=&user-location=australia&user-locale=en-us&user-timezone=australia%2fmelbourne&user-irc_nickname=&user-interests=&user-expertise=&user-twitter_url=&user-stackoverflow_url=&user-linkedin_url=&user-mozillians_url=&user-facebook_url= the main difference is that the...
...And 7 more matches
omni.ja (formerly omni.jar)
firefox and thunderbird achieve performance improvements by moving many of their internal parts from being standalone
files or sets of jar
files into just one jar file called omni.ja; this reduces the amount of i/o needed to load the application.
... note: starting with firefox 10 and thunderbird 10, the file extension .ja is used because windows system restore does not back up
files with the .jar extension, but it does back up .ja
files.
...it is suggested that windows 7 users unzip the file by renaming it to omni.zip and using windows explorer to extract all
files.
...And 7 more matches
Creating reftest-based unit tests
if the bitmaps resulting from displaying the two
files in an 800x1000 window are identical, the test passes.
...i can create 50 or 100 test
files that have spaces between the element name and the attribute of a element for a bunch of different elements, add those to the list of tests to be run, and it causes no problems for anyone.
... maybe it will actually take 500 test
files to actually check this behavior.
...And 7 more matches
Profiling with the Firefox Profiler
understanding pro
files the firefox profiler has more current documentation available at profiler.firefox.com/docs/.
...with more experience you can read pro
files faster by recognizing patterns.
... tips understanding pro
files can be difficult.
...And 7 more matches
sslfnc.html
nss_init nss_initreadwrite nss_nodb_init ssl_optionsetdefault ssl_optiongetdefault ssl_cipherprefsetdefault ssl_cipherprefgetdefault ssl_clearsessioncache ssl_configserversessionidcache ssl_configmpserversidcache ssl_inheritmpserversidcache nss_init sets up configuration
files and performs other tasks required to run network security services.
... database
files are opened read-only.
... description nss_init opens the certn.db, keyn.db, and secmod.db
files (wheren is a numeric digit) in the specified directory.
...And 7 more matches
File and Directory Entries API support in Firefox - Web APIs
mozilla instead opted to implement other apis which can be used to solve many of the same problems, such as indexeddb; see the blog post why no
filesystem api in firefox?
... chrome deviations from the specification the largest compatibility issue still remaining is that chrome is still using older names for many of the interfaces in the api, since they implemented a related but different specification: name in specification name in google chrome
filesystemdirectoryentry directoryentry
filesystemdirectoryentrysync directoryentrysync
filesystemdirectoryreader directoryreader
filesystemdirectoryreadersync directoryreadersync
filesystementry entry
filesystementrysync entrysync
filesystemfileentry fileentry
filesystemfileentrysync fileentrysync be sure to ...
... to ensure your code will work in both chrome and other browsers, you can include code similar to the following: var
filesystemdirectoryentry = window.
filesystemdirectoryentry || window.directoryentry; var
filesystementry = window.
filesystementry || window.entry; limitations in firefox next, let's look at limitations of the firefox implementation of the api.
...And 7 more matches
Border-image generator - CSS: Cascading Style Sheets
t { margin: 0; padding: 0; width: 50px; text-align: center; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; } .ui-input-slider-info { width: 90px; padding: 0px 10px 0px 0px; text-align: right; text-transform: lowercase; } .ui-input-slider-left, .ui-input-slider-right { width: 16px; cursor: pointer; background: url("https://mdn.mozillademos.org/
files/5679/arrows.png") center left no-repeat; } .ui-input-slider-right { background: url("https://mdn.mozillademos.org/
files/5679/arrows.png") center right no-repeat; } .ui-input-slider-name { width: 90px; padding: 0 10px 0 0; text-align: right; text-transform: lowercase; } .ui-input-slider-btn-set { width: 25px; background-color: #2c9fc9; border-radius: 5px; color: #fff; font-weight: bol...
...pointer; } /*************************************************************************************/ /*************************************************************************************/ /* * ui dropdown */ /* dropdown */ .ui-dropdown { height: 2em; width: 120px; font-family: "segoe ui", arial, helvetica, sans-serif; font-size: 12px; background-image: url("https://mdn.mozillademos.org/
files/6037/drop_arrow_icon.png"); background-position: right center; background-repeat: no-repeat; background-color: #359740; position: relative; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; -moz-user-select: none; -webkit-user-select: none; -ms-user-select: none; user-select: none; } .ui-dropdown:hover { cursor: pointer; background-color: #208b2...
...ui", arial, helvetica, sans-serif; line-height: 1.5em; color: #fff; -moz-user-select: none; -webkit-user-select: none; -ms-user-select: none; user-select: none; } .ui-checkbox > input { display: none; } .ui-checkbox > label { font-size: 12px; padding: 0.333em 1.666em 0.5em; height: 1em; line-height: 1em; background-color: #888; background-image: url("https://mdn.mozillademos.org/
files/5683/disabled.png"); background-position: center center; background-repeat: no-repeat; color: #fff; border-radius: 2px; font-weight: bold; float: left; } .ui-checkbox .text { padding-left: 34px; background-position: center left 10px; } .ui-checkbox .left { padding-right: 34px; padding-left: 1.666em; background-position: center right 10px; } .ui-checkbox > label:hover { cursor: poi...
...And 7 more matches
HTML attribute: accept - HTML: Hypertext Markup Language
because a given file type may be identified in more than one manner, it's useful to provide a thorough set of type specifiers when you need
files of specific type, or use the wild card to denote a type of any format is acceptable.
... for instance, there are a number of ways microsoft word
files can be identified, so a site that accepts word
files might use an <input> like this: <input type="file" id="docpicker" accept=".doc,.docx,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document"> whereas if you're accepting a media file, you may want to be include any format of that media type: <input type="file" id="soundfile" accept="audio/*"> <input type="file" id="videofile" accept="video/*"> <input type="file" id="imagefile" accept="image/*"> the accept attribute doesn't validate the types of the selected
files; it simply provides hints for browsers to guide users towards selecting the correct file types.
... examples when set on a file input type, the native file picker that opens up should only enable selecting
files of the correct file type.
...And 7 more matches
mimeTypes.rdf corruption - SVG: Scalable Vector Graphics
symptoms previously you were able to open and display svg content with mozilla, but for no apparent reason its behaviour changes and now it always pops up the "open or save file" dialog when you try to open local svg
files, and displays the "additional plugins are required to display all the media on this page" bar when you try to view html with embedded svg.
... background mozilla decides if and how it can open
files by using their media (mime) type.
... it obtains the media type for
files in various ways.
...And 7 more matches
Getting Started - Archive of obsolete content
opening the .jar
files in your archive manager of choice should result in the file being automatically detected as being a zip archive.
...skin\classic\editor editor contains
files of composer.
... skin\classic\global global contains almost all of the important css
files that define the appearance of the suite.
...And 6 more matches
Getting File Information - Archive of obsolete content
file and stream guide: [ nsiscriptableio | accessing
files | getting file information | reading from
files | writing to
files | moving, copying and deleting
files | uploading and downloading
files | working with directories ] important note: the pages from the file and stream guide use the io object (nsiscriptableio), which was not available in any released version of the platform (pending some fixes).
...other documentation on
files and i/o not using the unavailable nsiscriptableio apis: code snippets: file i/o, open and save dialogs, reading textual data, writing textual data, list of file-related error codes.
...two useful attributes
filesize and lastmodifiedtime (nsifile.attributes) provide a means of retrieving the size of a file and the time when the file was last changed.
...And 6 more matches
RDF Datasources - Archive of obsolete content
« previousnext » here, we'll look at additional datasources and how to use your own rdf
files as datasources.
...
files (rdf:
files) a view of the user's
files.
... possible
files roots nc:
filesroot top level of the
filesystem (usually the list of drives) a file url by using a file url for the ref attribute, you can select a specific directory to be returned.
...And 6 more matches
Index - MDN Web Docs Glossary: Definitions of Web-related terms
137 expando codingscripting, javascript, reference, expando expando properties are properties added to dom nodes with javascript, where those properties are not part of the object's dom specification: 138 ftp codingscripting, ftp, glossary, protocol ftp (file transfer protocol) was the standard protocol for many years for transferring
files from one host to another over the internet.
...it is based on the deflate algorithm that allows
files to be made smaller in size which allows for faster network transfers.
... gzip is commonly supported by web servers and modern browsers, meaning that servers can automatically compress
files with gzip before sending them, and browsers can uncompress
files upon receiving them.
...And 6 more matches
What is a web server? - Learn web development
on the hardware side, a web server is a computer that stores web server software and a website's component
files.
... (for example, html documents, images, css stylesheets, and javascript
files) a web server connects to the internet and supports physical data interchange with other devices connected to the web.
... on the software side, a web server includes several parts that control how web users access hosted
files.
...And 6 more matches
Getting started with Vue - Learn web development
now, you will select how we want your config
files to be managed.
... "in dedicated config
files" will put your config settings for things like eslint into their own, dedicated
files.
...select "in dedicated config
files" and push enter.
...And 6 more matches
Introducing a complete toolchain - Learn web development
netlify is a hosting service for static websites (that is, websites that entirely consist of
files that do not change in real time), which lets us deploy multiple times a day and freely hosts static sites of all kinds.
... using the command line, we can create the project, install the initial tooling, and create rudimentary configuration
files.
... getting the project code
files at this point, we'll get hold of the project's code
files (html, css, javascript, etc.), and put them in our src directory.
...And 6 more matches
Package management basics - Learn web development
if you didn't use one, you'd have to manually handle: finding all the correct package javascript
files.
... removing all the
files again if you want to remove the packages.
...you can prove this by looking in our package.json file again — you'll see that the dependencies field have been updated for us: "dependencies": { "date-fns": "^2.12.0", "parcel-bundler": "^1.12.4" } parcel has also added the
files required for someone else to pick up this project and install any dependencies that we’ve used.
...And 6 more matches
Old Thunderbird build
having the source deep in a
filesystem hierarchy can also cause problems with pymake builds on windows.
... various temporary
files, libraries, and the thunderbird executable will be found in your object directory (under comm-central/), which is prefixed with obj-.
...this will only recompile
files that changed, but it's still a long haul.
...And 6 more matches
An overview of NSS Internals
nss doesn't require the programmer to manage individual
files containing individual certificates or keys.
...in the most simple scenario, the programmer will provide a directory on your
filesystem as a parameter to the init function, and nss is designed to do the rest.
...storage consists of multiple
files: a key database file, which contains your secret keys, and a certificate database file which contains the public portion of your own certificates, the certificates of peers or cas, and a list of trust decisions (such as to not trust a built-in ca, or to explicitly trust other cas).
...And 6 more matches
FileList - Web APIs
an object of this type is returned by the
files property of the html <input> element; this lets you access the list of
files selected with the <input type="file"> element.
... it's also used for a list of
files dropped into web content when using the drag and drop api; see the datatransfer object for details on this usage.
...starting with gecko 1.9.2, if the input element's multiple attribute is true, the filelist may contain multiple
files.
...And 6 more matches
File drag and drop - Web APIs
html drag and drop interfaces enable web applications to drag and drop
files on a web page.
... this document describes how an application can accept one or more
files that are dragged from the underlying platform's file manager and dropped on a web page.
... note: html drag and drop defines two different apis to support dragging and dropping
files.
...And 6 more matches
Box-shadow generator - CSS: Cascading Style Sheets
ui", arial, helvetica, sans-serif; line-height: 1.5em; color: #fff; -moz-user-select: none; -webkit-user-select: none; -ms-user-select: none; user-select: none; } .ui-checkbox > input { display: none; } .ui-checkbox > label { font-size: 12px; padding: 0.333em 1.666em 0.5em; height: 1em; line-height: 1em; background-color: #888; background-image: url("https://mdn.mozillademos.org/
files/5683/disabled.png"); background-position: center center; background-repeat: no-repeat; color: #fff; border-radius: 3px; font-weight: bold; float: left; } .ui-checkbox .text { padding-left: 34px; background-position: center left 10px; } .ui-checkbox .left { padding-right: 34px; padding-left: 1.666em; background-position: center right 10px; } .ui-checkbox > label:hover { cursor: poi...
...nter; } .ui-checkbox > input:checked + label { background-image: url("https://mdn.mozillademos.org/
files/5681/checked.png"); background-color: #379b4a; } /* * box shadow generator tool */ body { max-width: 1000px; height: 800px; margin: 20px auto 0; font-family: "segoe ui", arial, helvetica, sans-serif; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; -moz-user-select: none; -webkit-user-select: none; -ms-user-select: none; } #container { width: 100%; padding: 2px; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; } /* container with shadows stacks */ #stack_container { height: 400px; overflow: hidden; position: relative; border: 1px solid #ccc; border-radius: 3px; -moz-box-sizing: border-...
...adius: 3px; display: block; background-position: center center; background-repeat: no-repeat; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; float: left; } #layer_manager .button:hover { background-color: #3380c4; border: 1px solid #3380c4; cursor: pointer; } #layer_manager [data-type='add'] { background-image: url("https://mdn.mozillademos.org/
files/5685/add-black.png"); } #layer_manager [data-type='add']:hover { background-image: url("https://mdn.mozillademos.org/
files/5687/add-white.png"); } #layer_manager [data-type='move-up'] { background-image: url("https://mdn.mozillademos.org/
files/5697/up-black.png"); margin-left: 5%; margin-right: 5%; } #layer_manager [data-type='move-up']:hover { background-image: url("https://mdn.mozillade...
...And 6 more matches
Making PWAs work offline with Service workers - Progressive web apps (PWAs)
installation the api allows us to add event listeners for key events we are interested in — the first one is the install event: self.addeventlistener('install', (e) => { console.log('[service worker] install'); }); in the install listener, we can initialize the cache and add
files to it for offline use.
... first, a variable for storing the cache name is created, and the app shell
files are listed in one array.
... var cachename = 'js13kpwa-v1'; var appshell
files = [ '/pwa-examples/js13kpwa/', '/pwa-examples/js13kpwa/index.html', '/pwa-examples/js13kpwa/app.js', '/pwa-examples/js13kpwa/style.css', '/pwa-examples/js13kpwa/fonts/graduate.eot', '/pwa-examples/js13kpwa/fonts/graduate.ttf', '/pwa-examples/js13kpwa/fonts/graduate.woff', '/pwa-examples/js13kpwa/favicon.ico', '/pwa-examples/js13kpwa/img/js13kgames.png', '/pwa-examples/js13kpwa/img/bg.png', '/pwa-examples/js13kpwa/icons/icon-32.png', '/pwa-examples/js13kpwa/icons/icon-64.png', '/pwa-examples/js13kpwa/icons/icon-96.png', '/pwa-examples/js13kpwa/icons/icon-128.png', '/pwa-examples/js13kpwa/icons/icon-168.png', '/pwa-examples/js13kpwa/icons/icon-192.png', '/pwa-examples/js13kpwa/icons/icon-256.png', '/pwa-example...
...And 6 more matches
jpmignore - Archive of obsolete content
use .jpmignore to ignore
files from your xpi builds created via jpm.
... using .jpmignore to ignore
files and directories 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 and directories you would like it to ignore when building a .xpi file with jpm xpi.
...And 5 more matches
Local Storage - Archive of obsolete content
we'll discuss logging in this section, but first let's look at the right (or at least, common and scalable) way of managing local
files.
... it is strongly recommended that you keep your local
files inside the firefox profile directory.
... otherwise you may run into problems if the same extension is installed in multiple pro
files.
...And 5 more matches
Creating a Window - Archive of obsolete content
« previousnext » we're going to be creating a simple find
files utility throughout this tutorial.
...the simplest xul file has the following structure: <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <window id="findfile-window" title="find
files" orient="horizontal" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <!-- other elements go here --> </window> this window will not do anything since it doesn't contain any ui elements.
...this is the syntax that xml
files use to import style sheets.
...And 5 more matches
Open and Save Dialogs - Archive of obsolete content
this would be used, for example, to hide all but .html
files.
... fp.appendfilters(nsifilepicker.filterhtml | nsifilepicker.filterimages); fp.appendfilters(nsifilepicker.filtertext | nsifilepicker.filterall); the first example will add filters for html and for image
files.
... the user will only be able to select those types of
files.
...And 5 more matches
The Chrome URL - Archive of obsolete content
« previousnext » the following section will describe how to refer to xul documents and other chrome
files.
... the chrome url xul
files can be referenced with a regular http url (or any type of url) just like html
files.
...the chrome urls are independent of where the
files might physically be located.
...And 5 more matches
Deploying XULRunner - Archive of obsolete content
the installed
files should be arranged in the following directory structure: installdir/ application.ini components/ ...
...additional application
files such as icons, etc myapplicationname.exe (this is the "stub executable"...
... xulrunner 39 and later due to mac os x code signing rules and how they interact with the design of xulrunner (see bug 1105044 for the inside scoop), starting with xulrunner 39 the xulrunner library
files are no longer able to reside in a xulrunner framework directory.
...And 5 more matches
Tips for authoring fast-loading HTML pages - Learn web development
reducing page weight through the elimination of unnecessary whitespace and comments, commonly known as minimization, and by moving inline script and css into external
files, can improve download performance with minimal need for other changes in the page structure.
... minimize the number of
files reducing the number of
files referenced in a web page lowers the number of http connections required to download a page, thereby reducing the time for these requests to be sent, and for their responses to be received.
...too much time spent querying the last modified time of the referenced
files can delay the initial display of the web page, since the browser must check the modification time for each of these
files, before rendering the page.
...And 5 more matches
Deploying our app - Learn web development
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".
... the newly-created production code is placed in a new directory called dist, which contains all the
files required to run the website, ready for you to upload to a server.
... you should now be able to run the following command in the root of your project directory to run the production build step (first quit the running process with ctrl + c if you need to): npm run build this should give you an output like the following, showing you the production
files that were created, how big they are, and how long they took to build: dist/src.99d8a31a.js.map 446.15 kb 63ms dist/src.99d8a31a.js 172.51 kb 5.55s dist/stars.7f1dd035.svg 6.31 kb 145ms dist/asteriod2.3ead4904.svg 3.51 kb 155ms dist/asteriod1.698d75e9.svg 2.9 kb 153ms dist/src.84f2edd1.css.map 2.57 kb 3ms dist/src.84f2edd1.css ...
...And 5 more matches
Creating a Language Pack
creating a langpack we will now merge the localized
files from x-testing locale with the en-us
files from the original source.
... x-testing: changed: 6 missingin
files: 6124 missing: 5 0% of entries changed this step is not necessary anymore to create the language pack, because it is included in the next command.
...you'll see that it contains the
files which in your localization were missing some entities.
...And 5 more matches
Gecko Profiler FAQ
you need deterministic pro
files that can be compared meaningfully, you need to gather enough data / samples, and you need a way to compare pro
files.
...and you’ll want to make sure the pro
files only contain data for the time range you’re interested in.
... to increase the amount of data, you should run your automated gathering procedure many times, and then combine multiple pro
files into one.
...And 5 more matches
SpiderMonkey Build Documentation
this installs the shared library to /usr/local/lib, the c header
files to /usr/local/include, and the js executable to/usr/local/bin.
...:/mozilla-build/msys/local/lib/libnspr4.a \ c:/mozilla-build/msys/local/lib/libplds4.a \ c:/mozilla-build/msys/local/lib/libplc4.a" if you get symbol loading or dynamic library errors, you can force the correct nspr to load with: path="$path;c:/mozilla-build/msys/local/lib/" ./js specifying installation directories make install puts
files in the following directories by default.
... you can override this by passing options to the configure script: what it is where it gets put configure option executables, shell scripts /usr/local/bin --bindir libraries, data /usr/local/lib --libdir architecture-independent data /usr/local/share --sharedir c header
files /usr/local/include --includedir for convenience, you can pass the configure script an option of the form --prefix=<prefixdir>, which substitutes <prefixdir> for /usr/local in all the settings above, in one step.
...And 5 more matches
Tracing JIT
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 representation lir, which is used as input to nanojit.
... nanojit/fragmento.* the nanojit/fragment.cpp and nanojit/fragmento.cpp
files define the fragment and fragmento classes.
...And 5 more matches
Setting up an update server
obtaining an update mar updates are served as mar
files.
...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.
...these are the
files that must be changed: toolkit/components/maintenanceservice/moz.build toolkit/mozapps/update/tests/moz.build firefox should otherwise be built normally.
...And 5 more matches
nsIFilePicker
widget/nsifilepicker.idlscriptable the file picker component is used to display standard user interface for selecting
files and directories, as well as for selecting destinations for, and naming, new
files.
... defaultextension astring the extension for the type of
files you want to work with.
...
files nsisimpleenumerator an enumerator of the currently selected
files.
...And 5 more matches
Index
see nsiactivitymanager.idl and nsiactivity.idl
files for source documentation.
...as such, i've always thought it would be nice to have a list of what xul, js, or other
files are that are here, what they do, and where they overlay at different points within the client.
... 56 thunderbird configuration
files config editor, configuration
files many of the tips and tricks mentioned on this site can be applied by using the built-in config editor.
...And 5 more matches
Add to iPhoto
let's take a look at two of the routines declared here: this.cfurlcreatefrom
filesystemrepresentation = this.lib.declare("cfurlcreatefrom
filesystemrepresentation", ctypes.default_abi, this.cfurlref, // returns ctypes.voidptr_t, // input: allocator ctypes.unsigned_char.ptr, // input: pointer to string c...
...the interesting things to note about the declaration of corefoundation.cfurlcreatefrom
filesystemrepresentation() are: it returns a cfurlref, which is an opaque pointer similar to the cfstringref we noted above.
...the application services api we'll be using is the launch services api, which is used to launch applications and open
files in default (or specific, in our case) applications.
...And 5 more matches
UI Tour - Firefox Developer Tools
y into three panels source list pane source pane the contents of the third pane depend on the current state of the debugger and may include the following sections: toolbar watch expressions breakpoints call stack scopes xhr breakpoints event listener breakpoints dom mutation breakpoints source list pane the source list pane lists all the javascript source
files loaded into the page, and enables you to select one to debug.
... there are several context menu options available for individual
files and folders or groups; typically viewed by right-clicking on the item.
... for
files, the following context menu options are available: copy source uri copies the full identifier of the file to the clipboard.
...And 5 more matches
FileHandle API - Web APIs
the filehandle api allows for the manipulating of
files, including creating
files and modifying their content (unlike the file api).
... because the
files manipulated through that api can be physically stored on the device, the editing part uses a turn-based locking mechanism in order to avoid race issues.
... 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.
...And 5 more matches
HTMLInputElement - Web APIs
allowdirs boolean: part of the non-standard directory upload api; indicates whether or not to allow directories and
files both to be selected in the file list.
...
files returns/accepts a filelist object, which contains a list of file objects representing the
files selected for upload.
... webkitdirectory boolean: returns the webkitdirectory attribute; if true, the file system picker interface only accepts directories instead of
files.
...And 5 more matches
File I/O - Archive of obsolete content
getting
files in special directories components.utils.import("resource://gre/modules/fileutils.jsm"); // get the "data.txt" file in the profile directory var file = fileutils.getfile("profd", ["data.txt"]); or the same without using fileutils.jsm: // get profile directory.
... profld f local settings on windows; where the network cache and fastload
files are stored.
... tmpd d the operating system's temporary
files directory (for example, /tmp on mac os x and linux).
...And 4 more matches
Chapter 6: Firefox extensions and XUL applications - Archive of obsolete content
this is because a lot of javascript
files can slow down the browser down if they’re opened for debugging, but you’ll need to lift this restriction in order to develop extensions.
... uncheck the “exclude browser
files” menu item under the debug menu (figure 1).
... fixme: figure 1: uncheck “exclude browser
files.” set up quicknote for the purposes of this explanation, we’re going to use the file-storage mechanism in quicknote1 for our debugger.
...And 4 more matches
Custom XUL Elements with XBL - Archive of obsolete content
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 binding file.
... with those 2
files properly defined, we can now use the new element.
...And 4 more matches
Frequently Asked Questions - Archive of obsolete content
to be valid the root <svg> tag in svg
files must have at least the following two "namespace bindings".
...(it doesn't mean there's an error in mozilla.) there are many different xml errors, but the most common one in svg
files is "xml parsing error: prefix not bound to a namespace".
... <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> make sure all your svg
files have these bindings.
...And 4 more matches
Venkman Introduction - Archive of obsolete content
files are listed in alphabetical order, grouped by file type.
... icon file type .js .html, .htm .xul .xml all other
files javascript function figure 6.
...
files and specific functions within them can be displayed by selecting the appropriate file or function name in the script view.
...And 4 more matches
XPJS Components Proposal - Archive of obsolete content
xjs components will 'live' in.js
files.
... just as with native component modules each of these .js
files will be expected to have the functions: nsregisterself nsgetfactory nsunregisterself (optional) nscanunload (optional) each .js file might implement one or more components.
...the xpjsmanager is in charge of loading these .js
files, helping them register themselves, and acting as an intermediary between the xpcom component manager and the js code.
...And 4 more matches
Introduction to XUL - Archive of obsolete content
mozilla gives a special meaning to xul
files; it expects to find ui descriptions within.
... for this reason, we've defined a mime type "text/xul" mapped to
files with the extension ".xul".
... (for standards purposes, we will probably need to change the the mime type to something like "text/x-xul".) these
files are processed using the same parser as "text/xml"
files (and therefore subject to xml syntax rules, as they should be).
...And 4 more matches
Adding Event Handlers - Archive of obsolete content
« previousnext » the find
files dialog so far looks quite good.
... using scripts to make the find
files dialog functional, we need to add some scripts which will execute when the user interacts with the dialog.
... you can use the script element to include scripts in xul
files.
...And 4 more matches
Adding Style Sheets - Archive of obsolete content
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.
...for installed
files, you'll have to create or modify a manifest file and install the skin.
...And 4 more matches
Using Visual Studio as your XUL IDE - Archive of obsolete content
setting the correct editor as xul
files are nothing but xml, you can use the normal xml-editor for writing xul.
...using xml schemas for validation and intellisense visual studio needs the xml schema for xul
files.
...there is also project that provides xml schema for install manifest
files (install.rdf) - installrdfschema.codeplex.com - from the same author as a xul schema.
...And 4 more matches
Mozprofile - Archive of obsolete content
mozprofile is a python tool for creating and managing pro
files for mozilla's applications (firefox, thunderbird, etc.).
... in addition to creating pro
files, mozprofile can install addons and set preferences.
...command line usage mozprofile may be used to create pro
files, set preferences in pro
files, or install addons into pro
files.
...And 4 more matches
What software do I need to build a website? - Learn web development
you'll need tools to: create and edit webpages upload
files to your web server view your website nearly all operating systems by default include a text editor and a browser, which you can use to view websites.
... as a result, you usually only need to acquire software for transferring
files to your web server.
...text editors create and modify unformatted text
files.
...And 4 more matches
Client-side storage - Learn web development
for example, you could download a batch of music
files (perhaps used by a web game or music player application), store them inside a client-side database, and play them as needed.
... the user would only have to download the music
files once — on subsequent visits they would be retrieved from the database instead.
...this can be used for things from complete sets of customer records to even complex data types like audio or video
files.
...And 4 more matches
Introduction to automated testing - Learn web development
next, you'll need some sample html, css and javascript content to test your system on — make copies of our sample index.html, main.js, and style.css
files in a subfolder with the name src inside your project folder.
... you can try your own test content if you like, but bear in mind that such tools won't work on internal js/css — you need external
files.
... var build = gulp.parallel(html,css,js); exports.html = html; exports.css = css; exports.js = js; exports.build = build; /* * define default task that can be called by just running `gulp` from cli */ exports.default = build; further ideas once this is all set up, you can run the gulp command inside your project directory, and you should get an output like this: you can then try out the
files output by your automated tasks by looking at them inside the build directory, and loading build/index.html in your web browser.
...And 4 more matches
Installing headers using EXPORTS
public headers and idl
files are copied during the export phase of the build.
... this is accomplished by setting make variables telling the build system which module the headers are for (since headers are organized by module under <tt>dist/include</tt>), and which headers need to be created from idl
files by xpidl.
... 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>.
...And 4 more matches
Reviewer Checklist
new
files have license declarations and modelines.
... new js
files should use strict mode.
...whitespace can be fixed easily in mercurial using the check
files extension.
...And 4 more matches
Index
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 the
files that you generate.
... 10 localization notes guide, internationalization, localization, mozilla localizers usually work on the localizable
files without the context of the source
files including the localized strings; it is important to add comments to the localizable
files themselves, too.
... 20 localizing xliff
files for ios oasis, translate, xliff, xml, ios firefox for ios uses the xliff xml-based file format to hold and transfer localization data.
...And 4 more matches
L10n Checks
if you want to test the localization for de, run: check-l10n-completeness -i xpi my-extension.xpi de to check all locales in an extension: check-l10n-completeness -i xpi my-extension.xpi language packs (xpis) mode l10n checks can compare two locales found in different xpi
files.
... you pass both paths to the xpi file and both paths to the locales inside the
files, e.g.: check-l10n-completeness -i xpis en-us-langpack.xpi my-langpack.xpi jar:chrome/en-us.jar!locale/ jar:chrome/my.jar!locale/my/ jar/zip file (jar) mode l10n checks can compare two locales found in different jar
files.
...you pass both paths to the directories, e.g.: check-l10n-completeness -i dir en-us/ my/
files (file) mode l10n checks can compare two
files.
...And 4 more matches
Localizing with Mozilla Translator
getting started with mozillatranslator mt uses products as groups of localization
files with a common root directory (for instance, you may have a product for thunderbird, other for seamonkey, other for dom, other for toolkit, etc.) you update your repository copy using your favorite repository tool, and then update the product(s) in mt.
... this will remove obsolete strings and
files from the internal database of mt, and will present you with a list of new and updated strings.
...after that, you export either the whole product or indvididual
files.
...And 4 more matches
NSS Code Coverage
nss - code coverage results link 2007-08-14 - solaris/sparc platform results explanation
files results from every c file are on new line.
... numbers in tested
files example: 72.69% (165/227/731) 72.69% - ratio of tested blocks and total blocks in file (generated by tcov).
... numbers in not tested
files example: not tested (0/?/878).
...And 4 more matches
NSS Tools certutil
using the certificate database tool the certificate database tool is a command-line utility that can create and modify the netscape communicator cert8.db and key3.db database
files.
...it means that cert9.db and key4.db
files may be targeted instead.
... -d directory specify the database directory containing the certificate and key database
files.
...And 4 more matches
TPS Tests
the python test runner will read a test file (in javascript format), setup one or more firefox pro
files with the necessary extensions and preferences, then launch firefox and pass the test file to the extension.
... a test file may contain an arbitrary number of sections, each involving the same or different pro
files, so that one test file may be used to test the effect of syncing and modifying a common set of data (from a single sync account) over a series of different events and clients.
...phases have an n to m relationship with pro
files, where n >= m (there can never be more phases than pro
files).
...And 4 more matches
Packaging WebLock
the chrome registry lives in a series of rdf/xml
files in the application directory of mozilla and other gecko-based browsers, where new installs, user configurable data, skins, and other information are related to one another and the application itself.
... javascript apis from the xpinstall install object download the jar in which the installable
files appear and call registration methods that tell mozilla about the new component and the ui it uses to access the weblock component.
...the
files themselves are stored in the jar file weblock.jar, which is simple a zip file with the xpi extension that sometimes also contains an internal installation file called install.js.
...And 4 more matches
Mozilla
if the bitmaps resulting from displaying the two
files in an 800x1000 window are identical, the test passes.
... omni.ja (formerly omni.jar) firefox and thunderbird achieve performance improvements by moving many of their internal parts from being standalone
files or sets of jar
files into just one jar file called omni.ja; this reduces the amount of i/o needed to load the application.
... profile manager firefox and other xulrunner applications store user settings and data in special folders, called pro
files.
...And 4 more matches
URLs - Plugins
« previousnext » this chapter describes retrieving urls and displaying them on specified target pages, posting data to an http server, uploading
files to an ftp server, and sending mail.
... file (host-specific filenames) locates
files on a specific host computer rather than an internet resource.
... ftp (file transfer protocol) locates
files and directories on internet hosts for file download.
...And 4 more matches
DirectoryReaderSync - Web APIs
it's not a big deal, because you don't really need to have the main app and the worker thread see the same javascript object; you just need them to access the same
files.
... you can do that by passing a list of
filesystem: urls—which are just strings—instead of a list of entries.
... you can also use the
filesystem: url to look up the entry with resolvelocal
filesystemurl().
...And 4 more matches
Adding captions and subtitles to HTML5 video - Developer guides
webvtt the
files that contain the actual subtitle data are simple text
files that follow a specified format, in this case the web video text tracks (webvtt) format.
... html markup as mentioned above, we need to make use of the new html5 <track> element to add our subtitle
files to the html5 video.
... we actually have our subtitles in three different languages — english, german, and spanish — so we will reference all three of the relevant vtt
files by adding <track> elements inside our html5 <video> element: <video id="video" controls preload="metadata"> <source src="video/sintel-short.mp4" type="video/mp4"> <source src="video/sintel-short.webm" type="video/webm"> <track label="english" kind="subtitles" srclang="en" src="captions/vtt/sintel-en.vtt" default> <track label="deutsch" kind="subtitles" srclang="de" src="captions/vtt/sintel-de.vtt"> <track label="español" kind="subtitles" srclang="es" src="captions/vtt/sintel-es.vtt"> </video> as you can see, each <track> element has the following attributes set: kind is given a value of subtitles, indicating the type of c...
...And 4 more matches
Configuring servers for Ogg media - HTTP
this guide covers a few server configuration changes that may be necessary for your web server to correctly serve ogg media
files.
... serve media with the correct mime type *.ogg and *.ogv
files containing video (possibly with an audio track as well, of course), should be served with the video/ogg mime type.
... *.oga and *.ogg
files containing only audio should be served with the audio/ogg mime type.
...And 4 more matches
Adding Toolbars and Toolbar Buttons - Archive of obsolete content
the way to include the file in the manifest is to add this line: style chrome://global/content/customizetoolbar.xul chrome://xulschoolhello/skin/toolbar.css if you are using xbl bindings (explained way ahead) for your toolbar items, you'll have to include the css
files for those as well, each in a new line like the one above.
...having multiple copies of these
files can be wasteful, so you may want to have a "common" directory.
... image
files use the most space in an extension package, by far.
...And 3 more matches
Handling Preferences - Archive of obsolete content
if you need to refer to the term "preference" in any of your locale
files, you must change the string depending on the operating system.
...the following
files are used: default preferences: these are stored in the directory defaults/pref in the firefox installation directory.
... note: the purpose of the defaults directory is to hold non-code
files your extension needs.
...And 3 more matches
XPCOM Objects - Archive of obsolete content
all of this documentation is generated from the one present in the firefox source
files, so it's in general very complete and well written.
... most of the time you'll need 2 source
files for a js xpcom component: the idl interface file, and the implementation js file.
...you won't need the idl or xpt
files if your components only use pre-existing firefox interfaces.
...And 3 more matches
An Interview With Douglas Bowman of Wired News - Archive of obsolete content
on october 11, 2002, wired launched a brand-new site design that uses validating xhtml for its structure and a small collection of css
files for its layout.
...the breakdown: 1 master screen media file which imports 4
files: a base file (bulk of formatting) a file for finance/table formatting color file (override colors and background images for specific color scheme) temp file (used for styles associated with temporary features and ad-related pages) 1 print media file 1 aural media file 3 master alternate style sheets which import 1 file each the 3 imported
files set alternate font size...
...by default, all links to screen media css
files are explicitly declared as "screen" media instead of "all" media.
...And 3 more matches
Repackaging Firefox - Archive of obsolete content
the pristine firefox 2 installer
files (windows .exe, mac .dmg, or linux .tar.gz) for each of the locales you need.
... xpi
files are specially crafted zip
files in disguise.
.../ko/partner.properties locale/nb-no/partner.properties locale/nl/partner.properties locale/pl/partner.properties locale/pt-br/partner.properties locale/pt-pt/partner.properties locale/ru/partner.properties locale/sk/partner.properties locale/sv-se/partner.properties locale/tr/partner.properties locale/zh-cn/partner.properties locale/zh-tw/partner.properties partner-bookmarks.xml one by one, the
files listed above are: chrome.manifest contains a specialized listing of the contents of the xpi.
...And 3 more matches
Migrate apps from Internet Explorer to Mozilla - Archive of obsolete content
mimetypes (when css
files are not applied) the most common css-related issue is that css definitions inside referenced css
files are not applied.
...the css specification states that css
files should be served with the text/css mimetype.
... mozilla will respect this and only load css
files with that mimetype if the web page is in strict standards mode.
...And 3 more matches
Additional Install Features - Archive of obsolete content
it provides some functions which can be used to examine and modify
files on disk.
... you can use these to move, copy or delete
files before or after the
files are installed.
... for example, you might want to make a backup of some
files first.
...And 3 more matches
Cross Package Overlays - Archive of obsolete content
« previousnext » this section describes how to apply overlays to
files that don't import them.
... applying overlays to other packages note: this section talks about contents.rdf which has been replaced in gecko 1.8 by manifest
files.
...below, we'll add a find
files toolbar to the browser.
...And 3 more matches
Getting started with XULRunner - Archive of obsolete content
i unzipped it to a new c:\program
files\xulrunner folder.
...first change the file extension to zip and then use your normal
filesystem's decompression tool to open it up.
... on windows, i created the root in a new c:\program
files\myapp folder, but you can create it wherever you like, using whatever os you like.
...And 3 more matches
How do I use GitHub Pages? - Learn web development
on your desktop: cd desktop/test-site when the command line is pointing inside your website directory, type the following command, which tells the git tool to turn the directory into a git repository: git init an aside on command line interfaces the best way to upload your code to github is via the command line — this is a window where you type in commands to do things like create
files and run programs, rather than clicking inside a user interface.
... creating a repo for your code next, you need to create a new repo for your
files to go in.
...your screen should look like this: click create repository; this should bring you to the following page: uploading your
files to github on the current page, you are interested in the section …or push an existing repository from the command line.
...And 3 more matches
Publishing your website - Learn web development
previous overview: getting started with the web next once you finish writing the code and organizing the
files that make up your website, you need to put it all online so people can find it.
...you put website
files on the web server.
... in addition, you will need a file transfer protocol (ftp) program (see how much does it cost: software for more details) to actually transfer the website
files over to the server.
...And 3 more matches
Creating hyperlinks - Learn web development
objective: to learn how to implement a hyperlink effectively, and link multiple
files together.
... note: a url can point to html
files, text
files, images, text documents, video and audio
files, or anything else that lives on the web.
... urls use paths to find
files.
...And 3 more matches
Fetching data from the server - Learn web development
for these examples, we'll request data out of a few different text
files and use them to populate a content area.
... this series of
files will act as our fake database; in a real application, we'd be more likely to use a server-side language like php, python, or node to request our data from a database.
... to begin this example, make a local copy of ajax-start.html and the four text
files — verse1.txt, verse2.txt, verse3.txt, and verse4.txt — in a new directory on your computer.
...And 3 more matches
What is web performance? - Learn web development
this includes the following major areas: reducing overall load time: how long does it take the
files required to render the web site to download on to the user's computer?
... this tends to be affected by latency, how big your
files are, how many
files there are, and other factors besides.
... a general strategy is to make your
files as small as possible, reduce the number of http requests made as much as possible, and employ clever loading techniques (such as preload) to make
files available sooner.
...And 3 more matches
Getting started with React - Learn web development
setting up your first react app there are many ways to use react, but we're going to use the command-line interface (cli) tool create-react-app, as mentioned earlier, which expedites the process of developing a react application by installing some packages and creating some
files for you, handling the tooling described above.
...create-react-app uses this name to make a new directory, then creates the necessary
files inside it.
... creates a structure of
files and directories that define the basic app architecture.
...And 3 more matches
TypeScript support in Svelte - Learn web development
then we'll see how to configure our project to work with typescript
files.
...you can rename most of your .js
files to .ts
files and they will just work.
...to use it from regular javascript
files, just change the file extension from .js to .ts.
...And 3 more matches
Handling common JavaScript problems - Learn web development
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.
... make your
files even smaller by minifying them before you load them onto your production server.
... library usage at a basic level tends to consist of downloading the library's
files (javascript, possibly some css or other dependencies too) and attaching them to your page (e.g.
...And 3 more matches
mach
check out the linting and analysis tools: $ ./mach lint $ ./mach static-analysis mach and mozconfigs it's possible to use mach with multiple mozconfig
files.
...to rebuild just the
files in the current directory.
... for example: $ cd devtools/client $ mach build webconsole # rebuild only the
files in the devtools/client/webconsole directory $ mach mochitest webconsole/test # run mochitests in devtools/client/webconsole/test enable tab completion to enable tab completion in bash, run the following command.
...And 3 more matches
Error codes returned by Mozilla APIs
file errors the following table lists the errors that could occur when using
files.
... while these errors can occur when using the file apis, they can also occur with other components that use
files.
...this error may be returned by various components that use
files to indicate that necessary
files are not in an expected format.
...And 3 more matches
How to get a stacktrace for a bug report
crash reports are accessible from all firefox pro
files, so if a new profile does not crash you can use it to access them through "about:crashes" as above.
... accessing crash report ids outside of firefox if you cannot load firefox at all you can find the crash report
files at this location depending on your operating system: windows : %appdata%\mozilla\firefox\crash reports\submitted\ os x : ~/library/application support/firefox/crash reports/submitted/ linux : ~/.mozilla/firefox/crash reports/submitted/ each file in this folder contains one submitted crash report id.
... crash reports
files on your computer when breakpad initially catches a crash it first writes crash report
files (e.g.
...And 3 more matches
Localization content best practices
localization
files choose good key ids the ids (names) chosen for your keys, regardless of the file format, should always be descriptive of the string, and its role in the interface (button label, title, etc.).
... add localization notes localizers usually work on the localizable
files without the context of the source
files including the localized strings; it is important to add comments to the localizable
files themselves, too.
... dtd
files <!-- localization note (entity name): {{privacy}} will be replaced at run-time by an active link.
...And 3 more matches
Localizing with Mercurial
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\.
... 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.
...And 3 more matches
Initial setup
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.
...And 3 more matches
Release phase
your official release repository now that your locale has been registered, the localization
files will live on mozilla mercurial server at hg.mozilla.org.
...otherwise, in order to be able to make any changes to the localization
files, you will need to clone the repository on your local machine and work in the local clone.
...mozilla.org/releases/l10n-central/x-testing if you haven't already cloned the remote repository, enter this command: hg clone ssh://hg.mozilla.org/releases/l10n-central/x-testing mercurial will let you know that it's cloning the repository: destination directory: x-testing requesting all changes adding changesets adding manifests adding file changes added 4 changesets with 242 changes to 239
files updating to branch default 239
files updated, 0
files merged, 0
files removed, 0
files unresolved the default push url is the same as the default pull url (i.e., ssh://hg.mozilla.org/releases/l10n-central/x-testing).
...And 3 more matches
Localization technical reviews
here is some of the criteria we use to perform technical reviews: revision attachment contains only relevant
files we run into exports that contain .xpi langpacks and other random
files.
... region.properties though locales might like to specify changes from the beginning, the region.properties
files will be reverted to en-us.
... search plugins similar to the region.properties
files, the list.txt file should be reverted to en-us and amended accordingly as the search plugin productization bugs are completed.
...And 3 more matches
about:memory
if you are using a communication channel where
files can be sent, such as bugzilla or email, click on the "measure and save..." button.
...you can also use the "load and diff..." button to get the difference between two memory report
files.
... single memory report
files can also be loaded automatically when about:memory is loaded by appending a file query string, for example: about:memory?file=/home/username/reports.json.gz this is most useful when loading memory reports
files obtained from a firefox os device.
...And 3 more matches
NSS_3.12_release_notes.html
the tar.gz or zip file expands to an nss-3.12 directory containing three subdirectories: include - nss header
files lib - nss shared libraries bin - nss tools and test programs you also need to download the nspr 4.7.1 binary distributions to get the nspr 4.7.1 header
files and shared libraries, which nss 3.12 requires.
...bug 357015: on windows, readsystem
files reads 21
files as opposed to 10
files in c:\windows\system32.
...bug 402773: verify the list of public header
files in nss 3.12 bug 403470: strsclnt + tstclnt crashes when pkix enabled.
...And 3 more matches
Enc Dec MAC Output Public Key as CSR
specify certficate request file name\n\n", "-r "); fprintf(stderr, "%-21s specify an input file name\n\n", "-i "); fprintf(stderr, "%-21s specify an output file name\n\n", "-o "); fprintf(stderr, "%-7s for encrypt, it takes as an input file and produces\n", "note :"); fprintf(stderr, "%-7s .enc and .header as intermediate output
files.\n\n", ""); fprintf(stderr, "%-7s for decrypt, it takes .enc and .header\n", ""); fprintf(stderr, "%-7s as input
files and produces as a final output file.\n\n", ""); exit(-1); } /* map option letter enumerated commad type */ static commandtype option2command(const char* c) { switch (*c) { case 'g': return gen_csr; case 'e': return...
...key * unwrap the wrapped keys * loop until eof(input): * read a buffer of ciphertext from input file, * save last block of ciphertext * decrypt ciphertext buffer using cbc and iv, * compute and check mac, then remove mac from plaintext * replace iv with saved last block of ciphertext * write the plain text to output file * close
files * report success */ secstatus rv; secitem ivitem; secitem wrappedenckeyitem; secitem wrappedmackeyitem; secitem cipheritem; secitem macitem; secitem paditem; seckeypublickey *pubkey = null; pk11symkey *enckey = null; pk11symkey ...
... */ outfile = pr_open(outfilename, pr_create_file | pr_truncate | pr_rdwr , 00660); if (!outfile) { pr_fprintf(pr_stderr, "unable to open \"%s\" for writing.\n", outfilename); return secfailure; } infilelength =
filesize(encryptedfilename); if (rv == secsuccess) { /* decrypt and remove mac */ rv = decryptandverifymac(outfile, infile, infilelength, &cipheritem, &macitem, enckey, mackey, &ivitem, &paditem); if (rv != secsuccess) { pr_fprintf(pr_stderr, "failed while decrypting and removing mac\n"); } } cleanup: if (enckey) { pk11_f...
...And 3 more matches
Utilities for nss samples
* * this function supports password extraction from
files with * multipe passwords, one for each token.
...fo *slot, int retry, void *pwdata); /* * generaterandom */ extern secstatus generaterandom(unsigned char *rbuf, int rsize); /* * filetoitem */ extern secstatus filetoitem(secitem *dst, prfiledesc *src); /* * seedfromnoisefile */ extern secstatus seedfromnoisefile(const char *noisefilename); /* *
filesize */ extern long
filesize(const char* filename); /* * readderfromfile */ extern secstatus readderfromfile(secitem *der, const char *infilename, prbool ascii); #endif /* _util_h */ util.c /* this source code form is subject to the terms of the mozilla public * license, v.
... * * this function supports password extraction from
files with * multipe passwords, one for each token.
...And 3 more matches
NSS sources building testing
in past versions, all
files were located in a directory hierarchy that started with the "mozilla" prefix.
...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.
...these can be found by looking at the
files with the .def file extension, inside the nss/lib directory hierarchy.
...And 3 more matches
nss tech note6
nss .chk
files for the fips 140 mode nss technical note: 6 in nss 3.8, we added checksum
files required for the nss softoken to operate in fips 140 mode.
... the following applies to nss 3.8 through 3.10 : on 32-bit solaris sparc (i.e., not x86, and not 64-bit sparc) and 32-bit hp-ux pa-risc (i.e., not itanium, and not 64-bit pa-risc), there are two more .chk
files: libfreebl_pure32_3.chk and libfreebl_hybrid_3.chk.
...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 .
...And 3 more matches
gtstd.html
the communicator certificate db token handles all communication with the certificate and key database
files (called certx.db and keyx.db, respectively, where x is a version number) that store certificates and keys.
...the fips 140-1 module includes a single, built-in fips 140-1 certificate db token (see figure 2.1), which handles both cryptographic operations and communication with the certx.db and keyx.db
files.
... if you are creating a server application, you must use the certificate database tool, which comes with nss, to create the certx.db and keyx.db
files and populate them with the appropriate certificates and keys.
...And 3 more matches
NSS_3.12.3_release_notes.html
the tar.gz or zip file expands to an nss-3.12.3 directory containing three subdirectories: include - nss header
files lib - nss shared libraries bin - nss tools and test programs you also need to download the nspr 4.7.4 binary distributions to get the nspr 4.7.4 header
files and shared libraries, which nss 3.12.3 requires.
...ites to tls rfc4010 bug 453364: improve pk11_cipherop error reporting (was: pk11_createcontextbysymkey returns null bug 456406: slot list leaks in symkeyutil bug 461085: rfe: export function cert_comparecerts bug 462293: crash on fork after softoken is dlclose'd on some unix platforms in nss 3.12 bug 463342: move some headers to freebl/softoken bug 463452: sql db creation does not set
files protections to 0600 bug 463678: need to add rpath to 64-bit libraries on hp-ux bug 464088: option to build nss without dbm (handy for wince) bug 464223: certutil didn't accept certificate request to sign.
... 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 466194: cert_decodetruststring should take a const char * input trusts string.
...And 3 more matches
Hacking Tips
whenever running a testcase the file "tl-data.json" and several "tl-*"
files get created in the "/tmp" directory.
...these
files contain all information to create a tracelogger graph.
...this is because firefox doesn't allow loading
files from the harddisk using httprequest, even when the file loading the file is on the harddisk.
...And 3 more matches
nsIComponentRegistrar
nsifactory afactory); void registerfactorylocation(in nscidref aclass, in string aclassname, in string acontractid, in nsifile afile, in string aloaderstr, in string atype); void unregisterfactory(in nscidref aclass, in nsifactory afactory); void unregisterfactorylocation(in nscidref aclass, in nsifile afile); methods autoregister() register a component (.manifest) file or all component
files in a directory.
...note: formerly this method would register component
files directly.
...component
files must have an associated loader and export the required symbols which this loader defines.
...And 3 more matches
nsIScriptableIO
file and stream guide: [ nsiscriptableio | accessing
files | getting file information | reading from
files | writing to
files | moving, copying and deleting
files | uploading and downloading
files | working with directories ] important note: the pages from the file and stream guide use the io object (nsiscriptableio), which was not available in any released version of the platform (pending some fixes).
...other documentation on
files and i/o not using the unavailable nsiscriptableio apis: code snippets: file i/o, open and save dialogs, reading textual data, writing textual data, list of file-related error codes.
... nsiscriptableio provides a convenient api for creating
files and streams, as well as for reading and writing data to them.
...And 3 more matches
Using nsIDirectoryService
header
files containing known keys are listed in the known locations section of this document.
...known locations the nsiproperties strings for currently defined locations can be found in: nsdirectoryservicedefs.h nsappdirectoryservicedefs.h nsxulappapi.h content formerly at http://www.mozilla.org/projects/xpco...locations.html background the way in which mozilla components locate special
files and directories has changed.
...the new method the new method uses nsidirectoryservice to locate
files and directories.
...And 3 more matches
Mail composition back end
you also have the ability to save rfc822
files to disk, should you need this data for some reason.
... createandsendmessage the createandsendmessage method will create an rfc822 message and send it all in one operation as well as providing the ability to save disk
files for later use.
...this will contain all of the relevant header information for message delivery ns
filespec *send
filespec, - the file spec for the message being sent prbool deletesendfileoncompletion, - tell the back end if it should delete the file upon successful completion prbool digest_p, - this is a flag that says that most of the documents we are attaching are t...
...And 3 more matches
HTMLInputElement.webkitdirectory - Web APIs
the htmlinputelement.webkitdirectory is a property that reflects the webkitdirectory html attribute and indicates that the <input> element should let the user select directories instead of
files.
... syntax htmlinputelement.webkitdirectory = boolvalue value a boolean; true if the <input> element should allow picking only directories or false if only
files should be selectable.
... understanding the results after the user makes a selection, each file object in
files has its file.webkitrelativepath property set to the relative path within the selected directory at which the file is located.
...And 3 more matches
Dragging and Dropping Multiple Items - Web APIs
common cases where dragging multiple items is used is when dragging multiple
files or bookmarks.
... to check if multiple
files are being dragged, check the mozitemcount property.
...the following example retrieves a set of
files being dragged and adds them to an array.
...And 3 more matches
Recommended Drag Types - Web APIs
the html drag and drop api supports dragging various types of data, including plain text, urls, html code,
files, etc.
...for instance: var dt = event.datatransfer; dt.setdata("text/html", "hello there, <strong>stranger</strong>"); dt.setdata("text/plain", "hello there, stranger"); dragging
files a local file is dragged using the application/x-moz-file type with a data value that is an nsifile object.
... multiple
files will be received during a drop as multiple items in the data transfer.
...And 3 more matches
Navigator.share() - Web APIs
files: a " frozenarray" representing the array of file to be shared.
...eloper.mozilla.org', } const btn = document.queryselector('button'); const resultpara = document.queryselector('.result'); // must be triggered some kind of "user activation" btn.addeventlistener('click', async () => { try { await navigator.share(sharedata) resultpara.textcontent = 'mdn shared successfully' } catch(err) { resultpara.textcontent = 'error: ' + err } }); sharing
files to share
files, first test for and call navigator.canshare().
... then include an array of
files in the call to navigator.share(): notice: that the sample handles feature detection by testing for navigator.canshare() rather than for navigator.share().
...And 3 more matches
Border-radius generator - CSS: Cascading Style Sheets
t { margin: 0; padding: 0; width: 50px; text-align: center; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; } .ui-input-slider-info { width: 90px; padding: 0px 10px 0px 0px; text-align: right; text-transform: lowercase; } .ui-input-slider-left, .ui-input-slider-right { width: 16px; cursor: pointer; background: url("https://mdn.mozillademos.org/
files/5679/arrows.png") center left no-repeat; } .ui-input-slider-right { background: url("https://mdn.mozillademos.org/
files/5679/arrows.png") center right no-repeat; } .ui-input-slider-name { width: 90px; padding: 0 10px 0 0; text-align: right; text-transform: lowercase; } .ui-input-slider-btn-set { width: 25px; background-color: #2c9fc9; border-radius: 5px; color: #fff; font-weight: bol...
...ui", arial, helvetica, sans-serif; line-height: 1.5em; color: #fff; -moz-user-select: none; -webkit-user-select: none; -ms-user-select: none; user-select: none; } .ui-checkbox > input { display: none; } .ui-checkbox > label { font-size: 12px; padding: 0.333em 1.666em 0.5em; height: 1em; line-height: 1em; background-color: #888; background-image: url("https://mdn.mozillademos.org/
files/5683/disabled.png"); background-position: center center; background-repeat: no-repeat; color: #fff; border-radius: 3px; font-weight: bold; float: left; } .ui-checkbox .text { padding-left: 34px; background-position: center left 10px; } .ui-checkbox .left { padding-right: 34px; padding-left: 1.666em; background-position: center right 10px; } .ui-checkbox > label:hover { cursor: poi...
...nter; } .ui-checkbox > input:checked + label { background-image: url("https://mdn.mozillademos.org/
files/5681/checked.png"); background-color: #379b4a; } body { max-width: 1000px; margin: 0 auto; font-family: "segoe ui", arial, helvetica, sans-serif; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; -moz-user-select: none; -webkit-user-select: none; -ms-user-select: none; user-select: none; } #container { width: 100%; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; } /******************************************************************************/ /******************************************************************************/ /* * preview area */ #preview { height: 500px; border: 1px solid #ccc;...
...And 3 more matches
Audio and Video Delivery - Developer guides
we can deliver audio and video on the web in a number of ways, ranging from 'static' media
files to adaptive live streams.
... the audio and video elements whether we are dealing with pre-recorded audio
files or live streams, the mechanism for making them available through the browser's <audio> and <video> elements remains pretty much the same.
... for further info see cross browser audio basics (html5 audio in detail) html video <video controls width="640" height="480" poster="initialimage.png" autoplay muted> <source src="videofile.mp4" type="video/mp4"> <!-- fallback for browsers that don't support mp4 --> <source src="videofile.webm" type="video/webm"> <!-- specifying subtitle
files --> <track src="subtitles_en.vtt" kind="subtitles" srclang="en" label="english"> <track src="subtitles_no.vtt" kind="subtitles" srclang="no" label="norwegian"> <!-- fallback for browsers that don't support video tag --> <a href="videofile.mp4">download video</a> </video> the code above creates a video player of dimensions 640x480 pixels, displaying a poster image until the video is play...
...And 3 more matches
DASH Adaptive Streaming for HTML 5 Video - HTML: Hypertext Markup Language
using dash - server side first you'll need to convert your webm video to a dash manifest with the accompanying video
files in various bit rates.
...use your existing webm file to create one audio file and multiple video
files.
..._dash_manifest -i video_320x180_500k.webm \ -f webm_dash_manifest -i video_640x360_750k.webm \ -f webm_dash_manifest -i video_1280x720_1500k.webm \ -f webm_dash_manifest -i my_audio.webm \ -c copy \ -map 0 -map 1 -map 2 -map 3 -map 4 \ -f webm_dash_manifest \ -adaptation_sets "id=0,streams=0,1,2,3 id=1,streams=4" \ my_video_manifest.mpd the -map arguments correspond to the input
files in the sequence they are given; you should have one for each file.
...And 3 more matches
The "codecs" parameter in common media types - Web media technologies
all of these file types support a variety of codecs, and those codecs may have any number of pro
files, levels, and other configuration factors.
...both video and audio tracks can be described using the codecs parameter with the following mime types: base mime types supporting the iso bmff codecs parameter mime type description audio/3gpp 3gp audio (rfc 3839: mime type registrations for 3rd generation partnership project (3gp) multimedia
files) video/3gpp 3gp video (rfc 3839: mime type registrations for 3rd generation partnership project (3gp) multimedia
files) audio/3gp2 3gp2 audio (rfc 4393: mime type registrations for 3gpp2 multimedia
files) video/3gp2 3gp2 video (rfc 4393: mime type registrations for 3gpp2 multimedia
files) audio/mp4 mp4 audio (rfc 4337: mime type registration for mpe...
...see avc pro
files for the possible values of pp.
...And 3 more matches
Appendix D: Loading Scripts - Archive of obsolete content
because there are such a diverse array of add-ons, and because the needs of developers have grown organically over time, the gecko runtime provides a number of means to dynamically load and execute javascript
files.
...these tags are generally inserted into xul overlay
files or other xul documents, after which they are automatically loaded into the context of the xul window in question and executed immediately and synchronously.
...javascript
files or urls may be loaded in this manner by first retrieving their contents into memory using an xmlhttprequest.
...And 2 more matches
Index of archived content - Archive of obsolete content
bootstrapped extensions code snippets alerts and notifications autocomplete bookmarks boxes canvas code snippets cookies customizing the download progress bar delayed execution dialogs and prompts downloading
files drag & drop embedding svg examples and demos from articles file i/o finding window handles forms related code snippets html in xul for rich tooltips html to dom isdefaultnamespace js xpcom javascript debugger service javascript timers ...
... open merging tracemonkey repo spidermonkey coding conventions autodial for windows nt automated testing tips and tricks automatic mozilla configurator enabling quicklaunch for all users how mozilla finds its configuration
files how thunderbird and firefox find their configuration
files introduction kill the xul.mfl file for good locked config settings other mozilla customization pages protecting mozilla's registry.dat file automatically handle failed asserts in debug builds blackconnect blackwood ...
...cheat sheet content states and the style system disabling interruptible reflow document loading - from load start to finding a handler documentation for bidi mozilla downloading nightly or trunk builds jss build instructions for osx 10.6 layout faq layout system overview multiple firefox pro
files repackaging firefox style system overview using microformats firefox sync code snippets javascript client api syncing custom preferences force rtl gre gre registration ...
...And 2 more matches
Installing plugins to Gecko embedding browsers on Windows - Archive of obsolete content
hkey_local_machine\software\mozilla\netscape 6 6.1\extensions\ access the plugins value and value-data pair, e.g: plugins = c:\program
files\netscape\netscape 6\plugins.
...you can access the components value and value-data pair (telling you where the components directory is) in a similar manner, e.g.: components=c:\program
files\netscape\netscape 6\components.
...however, for netscape 6.1 and netscape 6.2, xpt
files, as well as xpcom plugins, ought to go in the components directory.
...And 2 more matches
Creating a Firefox sidebar extension - Archive of obsolete content
then the registration
files are made and finally the sidebar is packed into an installable xpi file.
...here the package for the sidebar is created, the
files included are listed below.
... the extension needs to provide some special manifest
files that control how it is installed and where its chrome resources are stored.
...And 2 more matches
Drag and Drop JavaScript Wrapper - Archive of obsolete content
you can look at the contents of these
files to see how drag and drop is done at a lower level.
...the text is therefore used to insert the name of the file when
files can't be dropped directly.
...if you want to send more then one data object, (for example multiple
files) you must use an transferdataset as follows: var textobserver = { ondragstart: function (event) { var txt1 = 'hello'; var txt2 = 'there'; transferdata.data = new transferdataset(); var tmp = new transferdata(); tmp.adddataforflavour("text/unicode",txt1); transferdata.data.push(tmp); new transferdata(); tmp.adddataforflavour("text/unicode",txt2); transferdat...
...And 2 more matches
Java in Firefox Extensions - Archive of obsolete content
the following technique only works in javascript code linked from or contained in xul
files.
...[note: a simpler hello world version than that below is now available at http://brett-zamir.me/java_demo/ ] for privileges, the basic procedure is: download and include http://simile.mit.edu/repository/jav...nsionutils.jar within your extension (you can also build your own from the source
files at http://simile.mit.edu/repository/jav...xtensionutils/ ) build and add references leading to this jar and all other jars in your extension within an array of java.net.url's, pass to java.net.urlclassloader to get a class loader, and finally pass the classloader and array to a function which gives the necessary privileges: // this function will be called to give the necessary privileges to yo...
...ur jar
files // however, the policy never comes into play, because // (1) adding permissions doesn't add to the policy itself, and // (2) addurl alone does not set the grant codebase function policyadd (loader, urls) { try { //if have trouble with the policy try changing it to //edu.mit.simile.javafirefoxextensionutils.urlsetpolicy var str = 'edu.mit.simile.javafirefoxextensionutils.urlsetpolicy'; var policyclass = java.lang.class.forname( str, true, loader ); var policy = policyclass.newinstance(); policy.setouterpolicy(java.security.policy.getpolicy()); java.security.policy.setpolicy(policy); policy.addpermission(new java.security.allpermission()); for ...
...And 2 more matches
Mozilla Application Framework in Detail - Archive of obsolete content
where speed is the foremost consideration, we provide c++ libraries with multi-language interfaces for comprehensive, performant access to networking,
filesystem, content, rendering, and much more.
...file i/o, security, password management, and pro
files are also separate xpcom components that you can use in your own application development.
... other features of xpcom: xpidl, a language for defining interfaces in a language-neutral way and the xpidl compiler can create header
files, binary type libraries, documentation, and even generate stub c++ code for your component implementations.
...And 2 more matches
Porting NSPR to Unix Platforms - Archive of obsolete content
the classic nspr source
files are in <tt>mozilla/nsprpub/pr/src/threads</tt> and <tt>mozilla/nsprpub/pr/src/io</tt>.
...the pthreads source
files are in <tt>mozilla/nsprpub/pr/src/pthreads</tt>.
...there are a few new
files you need to add: <tt>mozilla/nsprpub/config/netbsd.mk</tt> the name of this file is the return value of <tt>uname -s</tt> on the platform, plus the file suffix <tt>.mk</tt>.
...And 2 more matches
File object - Archive of obsolete content
summary non-standard server-side object this object lets you work
files and directories on the local
filesystem, and create os pipelines.
...
filesystem access is implemented with nspr i/o functions, and as such shares many semantics.
...directories and pipelines are considered special
files.
...And 2 more matches
Running Tamarin performance tests - Archive of obsolete content
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 --forcerebuild force rebuild 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 --rebuildtests rebuild the tests only - do not run against vm --showtimes shows the time for each test --ascargs args to pass to asc on rebuild of test
files...
...502, use this if cannot be calculated from executable --vm2version specify version of avm2 --vmargs2 args to pass to avm2, if not specified --vmargs will be used --nooptimize do not optimize
files when compiling --perfm parse the perfm results from avm --csv= also output to csv file, filename required --csvappend append to csv file instead of overwriting --score compute and print geometric mean of scores --index= index file to use (must end with .py) --saveindex= save results to given index file name option details indexing: ...
... use --csvappend if you want to append the results to the csv file support
files testconfig.txt this file contains instructions for how the harness should handle performance tests.
...And 2 more matches
A XUL Bestiary - Archive of obsolete content
in general, chrome refers to a xul interface and all of its supporting
files; chrome means the xul content and structure, plus the css skin, plus whatever localization and platform-specific
files are part of that xul interface.
... the chrome url this concept of a chrome as an integrated, dynamic thing in some way divorced from the "appcore" is realized in the use of the chrome url to point to chunks of xul and their related
files.
...even prior to the skinning that takes place with the global skin, which is loaded in almost every xul file you see in mozilla (and whose absence from your own xul
files can make your work look strange, senseless, or invisible altogether), a xul.css file is loaded which provides some very basic presentational information for the widgets in the toolkit.
...And 2 more matches
International characters in XUL JavaScript - Archive of obsolete content
gecko 1.8, as used in firefox 1.5 and other applications, added support for non-ascii characters in javascript
files loaded from xul
files.
... this means that such script
files can use any character from virtually any language of the world.
... earlier versions always interpreted js
files loaded from xul as iso-8859-1 (latin-1), in both local and remote cases.
...And 2 more matches
Introduction - Archive of obsolete content
the actual finding of
files will not be implemented.
...however, these types of applications do not have security restrictions placed on them, so they may access local
files and read and write preferences, for example.
... for extensions, the xul
files and associated scripts and images used by an application would be packaged into a single file and downloaded and installed by the user.
...And 2 more matches
Modifying the Default Skin - Archive of obsolete content
« previousnext » as of firefox 69, you must set the toolkit.legacyuserprofilecustomizations.stylesheets preference to true in about:config in order to load userchrome.css or usercontent.css
files.
...by changing these
files, you can change the look of the xul applications.
...the file 'usercontent.css' customizes web pages, whereas 'userchrome.css' customizes chrome
files.
...And 2 more matches
XPCOM Interfaces - Archive of obsolete content
an interface would need to be created which describes properties and functions that can be performed on
files.
...for example, the nsiaddressbook is the interface for interacting with an address book, nsisound is used for playing
files and nsilocalfile is used for
files.
...
filesize the size of the file.
...And 2 more matches
XUL Coding Style Guidelines - Archive of obsolete content
to make xul
files easy to read and maintain, localization friendly, and portable across user agents, we need to have a set of coding style guidelines to ensure our objectives are achievable.
...disobeying them might not cause any parsing error for now, however, it might cause future maintenance headache: convert html
files to xul
files.
...--> <!-- 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".
...And 2 more matches
Custom app bundles for Mac OS X - Archive of obsolete content
mac os x applications are typically packaged as application bundles which are then distributed in .dmg (disk image)
files.
... info.plist (application bundle properties are specified in this xml file.) pkginfo (this is a simple text file and is created along with the info.plist file) macos/ (the macos folder will contain your xulrunner executable) xulrunner (this is the xulrunner stub) resources/ (this is where you place your xul application code and support
files) application.ini (xulrunner-related application settings) example.icns (this is the icon which will be used by your application bundle) chrome/ content/ example.xul (this directory contains your application's chrome) example.manifest defaults/ preferenc...
... the first sub-directory is called contents and within that directory you will place several
files and folders that are needed by your application bundle.
...And 2 more matches
XULRunner tips - Archive of obsolete content
themesurl", "chrome://mozapps/locale/extensions/extensions.properties"); if your application is based on gecko 2.0, you need to register a component through the new component registration because the extension manager uses fuel, namely application.restart(), to restart your xulrunner-based application after any change (installation, removal, enabling, disabling) in the extensions' list: copy
files fuelapplication.js and fuelapplication.manifest from browser/fuel/src for instance into your components/ directory tweak the line #include ../../../toolkit/components/exthelper/extapplication.js in your copy of fuelapplication.js as needed make sure to declare the fuel module and the two
files in your components/makefile.in as in browser/fuel/src/makefile.in rebuild...
... save the dom_inspector-*.xpi package to a temporary directory unzip the package copy the following
files: chrome/inspector.jar to the chrome directory of your xulrunner application components/inspector-cmdline.js to your components directory defaults/preferences/inspector.js to your preferences directory open your chrome.manifest file and add these lines: content inspector jar:inspector.jar!/content/inspector/ xpcnativewrappers=no locale inspector en-us ...
...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.
...And 2 more matches
Windows and menus in XULRunner - Archive of obsolete content
</window> notice the references to css and dtd
files.
...lns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <script src="main.js"/> <toolbox> <menubar id="menubar"> <menu id="file-menu" label="&file;"> <menupopup id="file-popup"> <menuitem label="&file.new;" oncommand="dofilenew();"/> <menuitem label="&file.open;" oncommand="dofileopen();"/> <menuitem label="&file.save;" oncommand="do
filesave();"/> <menuseparator/> <menuitem label="&file.exit;" oncommand="dofileexit();"/> </menupopup> </menu> <menu id="edit-menu" label="&edit;"> <menupopup id="edit-popup"> <menuitem label="&edit.undo;" oncommand="doeditundo();"/> <menuitem label="&edit.redo;" oncommand="doeditredo();"/> </menupopup> </menu> </menu...
...bar> <toolbar id="main-toolbar"> <toolbarbutton id="open" label="&file.open;" oncommand="dofileopen();"/> <toolbarbutton id="save" label="&file.save;" oncommand="do
filesave();"/> </toolbar> </toolbox> ...
...And 2 more matches
Theme changes in Firefox 4 - Archive of obsolete content
omni.jar firefox 4 achieves performance improvements by moving many of its internal parts from being standalone
files or sets of jar
files into just one jar file; this reduces the amount of i/o needed to load firefox.
... however, this does impact theme developers, since many of the
files that they need to pull out and work with are now in a new place.
...it's also important to note that skin
files are now split into two subfolders within the omni.jar file, and you'll need to look in both places to find all the skin resources you need.
...And 2 more matches
XUL Parser in Python - Archive of obsolete content
it also, i'm afraid, only works on the win32 platform, where the <tt>dir</tt> command it depends on gets you your xul
files.
...if you want to test this script you should change the filename "res.html" specified in the fourth line and compare different results
files.
...i guess you could get a modify date from the
files as you open them.
...And 2 more matches
Archive of obsolete content
.htaccess ( hypertext access ) file accessing : htaccess
files can be opened using any text editor, like windows notepad, vin, sublime text editor or any other.
... syntax highliting support for .htaccess
files less.
...on october 11, 2002, wired launched a brand-new site design that uses validating xhtml for its structure and a small collection of css
files for its layout.
...And 2 more matches
2D maze game with device orientation - Game development
src: the javascript
files with all the source code of the game defined inside.
... audio: the sound
files used in the game.
... ball.boot); game.state.add('preloader', ball.preloader); game.state.add('mainmenu', ball.mainmenu); game.state.add('howto', ball.howto); game.state.add('game', ball.game); game.state.start('boot'); })(); </script> </body> </html> so far we have a simple html website with some basic content in the <head> section: charset, title, css styling and the inclusion of the javascript
files.
...And 2 more matches
Plug-in Development Overview - Gecko Plugin API Reference
you can use a variety of environments to create a plug-in, but make sure that you have the necessary
files from the plugin sdk.
... working with urls the plug-in api provides methods that plug-ins can use to retrieve data from or post data to a url anywhere on the network, provide hyperlinks to other documents, post form data to cgi scripts using http, or upload
files to a remote server using ftp.
... 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.
...And 2 more matches
What text editors are available? - Learn web development
summary a website consists mostly of text
files, so for a fun, pleasant development experience you should choose your text editor wisely.
...that works great for writing notes to yourself, but when you're doing web development and writing in html, css, and javascript, you can produce some pretty large, complex
files.
...these functionalities are often helpful: search-and-replace, in one or multiple documents, based on regular expressions or other patterns as needed quickly jump to a given line view two parts of a large document separately view html as it will look in the browser select text in multiple places at once view your project's
files and directories format your code automatically with code beautifier check spelling auto-indent code based on indentation settings do i want to add extra features to my text editor?
...And 2 more matches
How much does it cost to do something on the Web? - Learn web development
for audio
files, you can find free software (audacity, wavosaur), or paying up to a few hundred dollars (sony sound forge, adobe audition).
... publishing tools you also need a way to upload
files: from your hard drive to a distant web server.
... of course, you'll need a more serious computer if you want to produce complicated designs, touch up photos, or produce audio and video
files.
...And 2 more matches
Basic native form controls - Learn web development
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.
...the types of
files that are accepted can be constrained using the accept attribute.
...And 2 more matches
Sending form data - Learn web development
a special case: sending
files sending
files with html forms is a special case.
...
files are binary data — or considered as such — whereas all other data is text data.
...in human terms, this means: "this is form data that has been encoded into url parameters." if you want to send
files, you need to take three extra steps: set the method attribute to post because file content can't be put inside url parameters.
...And 2 more matches
Index - Learn web development
21 how do you upload your
files to a web server?
... beginner, composing, guide, tools, text editor a website consists mostly of text
files, so for a fun, pleasant development experience you should choose your text editor wisely.
...for example, this css selects paragraph text, setting the color to red: 38 dealing with
files beginner, codingscripting,
files, guide, html, l10n:priority, theory, website when you are working on a website locally on your computer, you should keep all the related
files in a single folder that mirrors the published website's file structure on the server.
...And 2 more matches
Styling Vue components with CSS - Learn web development
vue has three common approaches to styling apps: external css
files.
... global styles in single file components (.vue
files).
... styling with external css
files you can include external css
files and apply them globally to your app.
...And 2 more matches
Command line options
for example, if you have multiple pro
files you can use command line configuration options to bypass the profile manager and open a specific profile.
...depending on changes between the two versions, some
files in a profile may not be downwards compatible.
...useful for dealing with multiple pro
files.
...And 2 more matches
Creating a spell check dictionary add-on
such a dictionary consists of two
files, one with a .dic and one with an .aff file extension.
...to create a dictionary add-on, simply create a zip file which contains the following
files and folders: my-dictionary.xpi install.rdf dictionaries/ locale-code.dic locale-code.aff the .dic and .aff
files must be placed in a subfolder named dictionaries within the zip file.
... both
files must have the locale code as their file name.
...And 2 more matches
Debugging on Mac OS X
if you try to do that then xcode will simply copy the source
files under the project directory rather than link to them (still the case in xcode 10?) which breaks debugging and the possibility to modify-rebuild-relaunch from inside xcode.
...now, right click on the root item, select 'add
files to "<project-name>"', select all the
files and directories in your source directory, untick "copy items if needed", then click add.
...note that subdirectories may initially appear to be empty, but they too will progressively be populated as xcode processes the sourse
files.
...And 2 more matches
Runtime Directories
default application installation and user profile directories firefox os application directory user profile directory temporary directory windows vista/7 c:\program
files\mozilla firefox\ c:\users\<username>\appdata\roaming\mozilla\firefox\ (or %appdata%\mozilla\firefox\) c:\users\<username>\appdata\local\mozilla\firefox\ (or %localappdata%\mozilla\firefox) and c:\users\<username>\appdata\local\virtualstore\program
files\mozilla firefox\ windows 2000/xp c:\program
files\mozilla firefox\ c:\documents and settings\<username>\application data\mozilla\firefox\ (or %appdata%\mozilla\firefox\) c:\documents and settings\<username>\local settings\application data\mozilla\firefox\ os x /applications/firefox.app ...
...~/library/application support/firefox/pro
files/xxxxxxxx.default/ ~/library/caches/firefox/pro
files/xxxxxxxx.default/ linux ????
... ~/.mozilla/firefox/xxxxxxxx.default/ n/d thunderbird os application directory user profile directory temporary directory windows vista/7 c:\program
files\mozilla thunderbird\ c:\users\<username>\appdata\roaming\thunderbird\ (or %appdata%\thunderbird\) c:\users\<username>\appdata\local\thunderbird\ (or %localappdata%\thunderbird\) and c:\users\<username>\appdata\local\virtualstore\program
files\mozilla thunderbird\ windows 2000/xp c:\program
files\mozilla thunderbird\ c:\documents and settings\<username>\application data\thunderbird\ (or %appdata%\thunderbird\) c:\documents and settings\<username>\local settings\application data\thunderbird\ os x /applications/thunderbird.app ~/library/thunderbird/p...
...And 2 more matches
Gecko SDK
the gecko sdk, also known as the xulrunner sdk, is a set of xpidl
files, headers and tools to develop xpcom components which can then in turn e.g.
...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 framework.
... in addition to the below versions, you can find other versions (including beta) here: xulrunner releases (
files include "sdk" in the name).
...And 2 more matches
OSFile.jsm
javascript module os.file contains primitives for manipulating
files out of the main thread.
... os.file is a new api designed for efficient, off-main thread, manipulation of
files by privileged javascript code.
... this api is intended to replace, in time, most xpcom-based manipulation of
files (nsifile, subsets of nsiioservice, etc.) by javascript code.
...And 2 more matches
XPCOMUtils.jsm
for example, if an extension named "myextension" bundles foo.jsm and bar.jsm, and foo.jsm needs to load bar.jsm, it can do so like this: components.utils.import("resource://gre/modules/xpcomutils.jsm"); xpcomutils.importrelative(this, "bar.jsm"); in other words: importrelative will only work from other code modules (such as jsm
files).
... example for (var section in xpcomutils.iterstringenumerator(iniparser.getsections())) console.log(section); post-registration callback the post-registration callback called by generatemodule() should have the following signature: postregister( nsicomponentmanager compmgr, nsifile
filespec, componentsarray ); parameters compmgr an nsicomponentmanager instance to use for managing the component.
...
filespec an nsifile instance for...
...And 2 more matches
Bootstrapping a new locale
you will need to "hg clone" the existing release branch for mozilla so you have all the
files locally for you to begin localization.
... this is done by cloning the en-us (united states english)
files into your localization.
... directories to localize if you're starting from scratch, you should have just downloaded: mozilla-1.9.x/browser/locales/ mozilla-1.9.x/dom/locales/ mozilla-1.9.x/netwerk/locales/ mozilla-1.9.x/other-licenses/branding/firefox/locales/en-us mozilla-1.9.x/security/manager/locales/ mozilla-1.9.x/toolkit/locales/ and then copied them so that the
files for localization end up in the following directories: ab-cd/browser/ ab-cd/dom/ ab-cd/netwerk/ ab-cd/other-licenses/branding/firefox/ ab-cd/security/manager/ ab-cd/toolkit/ translating to start editing, you will need a text editing application.
...And 2 more matches
Localization and Plurals
for all other properties
files that link to this page, you'll need to provide enough plural forms of the desired word, and separate them with semi-colons (;).
... to use it, list off the property
files and properties that you want to check and click the button.
... the following 3 file snippets show how to use pluralform with your .xul, .properties, .js
files.
...And 2 more matches
Localization formats
can be hard to tell what has changed .lang
files historically, mozilla has used a gettext-like file to present content for localization.
... .lang
files provide some features that differentiate it from gettext: .lang is not dependent on php/.po library, so if our webdev team sets up a site without gettext support, we still have .lang.
... (it should be noted that this is near impossibility since most sites will be set up with gettext support.) .lang
files can be easily edited in a text editor with this setup, a localizer is given a "[something].lang" file containing all the strings needing localization.
...And 2 more matches
Setting up the infrastructure
copy the shell scripts from /addons/trunk/site/app/locale/ to your locale directory: extract-po.sh will be used to extract all english strings from your application's directories specified in source_dirs, merge the resulting template (*.pot) file with the existing (already containing translations) messages.po
files for each locale (if they exist) and merge the new messages.po
files to messages.mo
files.
... by default the script looks for gettext calls in *thtml or *.php
files, so you may need to adjust that to your code.
... compile-mo.sh will only compile all locales' messages.po
files to message.mo
files.
...And 2 more matches
Fonts for Mozilla's MathML engine
you will find the stixmath-regular, stix-regular, stix-bold, stix-italic, stix-bolditalic font
files.
...if desired, you may also do the same for the other font
files.
...you will find the stixmath-regular, stix-regular, stix-bold, stix-italic, stix-bolditalic font
files.
...And 2 more matches
PR_ReadDir
do not skip any
files.
...skip hidden
files.
... on windows platforms and the mac os, this value identifies
files with the "hidden" attribute set.
...And 2 more matches
NSS Sample Code Sample1
the // wrapped keys are stored in data
files.
... int importkeys(secitem *wrappedenckey, secitem *wrappedmackey); // start the server, loading the encryption and macing keys // from
files int start(); // shut down the server.
...ver(const char *servername); ~server(); private: int getprivatekey(seckeyprivatekey **prvkey); int getpublickey(seckeypublickey **pubkey); int wrapkey(pk11symkey *key, seckeypublickey *pubkey, secitem **data); // export raw key (unwrapped) do not use int rawexportkey(pk11symkey *key, secitem **data); char *mservername; // these items represent data that might be stored // in
files or in a configuration file secitem *mwrappedenckey; secitem *mwrappedmackey; // these are the runtime keys as loaded from the
files pk11symkey *menckey; pk11symkey *mmackey; }; server::server(const char *servername) : mservername(0), mwrappedenckey(0), mwrappedmackey(0), menckey(0), mmackey(0) { // copy the server name mservername = pl_strdup(servername); } server::~server() { ...
...And 2 more matches
NSS tools : pk12util
the tool can import certificates and keys from pkcs#12
files into security databases, export certificates, and list certificates and keys.
... pk12util -i p12file [-h tokenname] [-v] [-d [sql:]directory] [-p dbprefix] [-k slotpasswordfile|-k slotpassword] [-w p12filepasswordfile|-w p12filepassword] for example: # pk12util -i /tmp/cert-
files/users.p12 -d sql:/home/my/sharednssdb enter a password which will be used to encrypt your keys.
...tion count: 1 (0x1) certificate: data: version: 3 (0x2) serial number: 13 (0xd) signature algorithm: pkcs #1 sha-1 with rsa encryption issuer: "e=personal-freemail@thawte.com,cn=thawte personal freemail c a,ou=certification services division,o=thawte consulting,l=cape t own,st=western cape,c=za" alternatively, the -r prints the certificates and then exports them into separate der binary
files.
...And 2 more matches
NSS tools : pk12util
the tool can import certificates and keys from pkcs#12
files into security databases, export certificates, and list certificates and keys.
... pk12util -i p12file [-h tokenname] [-v] [-d [sql:]directory] [-p dbprefix] [-k slotpasswordfile|-k slotpassword] [-w p12filepasswordfile|-w p12filepassword] for example: # pk12util -i /tmp/cert-
files/users.p12 -d sql:/home/my/sharednssdb enter a password which will be used to encrypt your keys.
... alternatively, the -r prints the certificates and then exports them into separate der binary
files.
...And 2 more matches
Installing Pork
prerequisites flex >2.5.4 (flex-old on ubuntu) bison gcc pork uses gcc to generate .i/.ii
files (preprocessed c/c++) for elsa to parse.
...gcc 4.3 should also work fairly well, but there may be 5 or so
files that elsa can't parse.
... hg clone http://hg.mozilla.org/rewriting-and-analysis/pork/ cd pork hg clone http://hg.mozilla.org/rewriting-and-analysis/elsa ./configure make building mozilla with mcpp to build mozilla with mcpp to generate annotated .ii
files, use the following configure command: ac_cv_visibility_hidden=no cc="gcc34 -save-temps -wp,-w0,-k" cxx="g++ -save-temps -wp,-w0,-k" cppflags=-dns_disable_literal_template $srcdir/configure --enable-debug --disable-optimize --disable-accessibility --enable-application=browser --disable-crashreporter building will probably require disabling warnings_as_errors: make warnings_as_errors= "-wp,-w...
...And 2 more matches
nsIDownloadManager
toolkit/components/downloads/public/nsidownloadmanager.idlscriptable this interface lets applications and extensions communicate with the download manager, adding and removing
files to be downloaded, fetching information about downloads, and being notified when downloads are completed.
... void removelistener(in nsidownloadprogresslistener alistener); void resumedownload(in unsigned long aid); void retrydownload(in unsigned long aid); void savestate(); obsolete since gecko 1.8 void startbatchupdate(); obsolete since gecko 1.9.1 attributes attribute type description activedownloadcount long the number of
files currently being downloaded.
... the path is dependent on two user configurable prefs set in preferences: browser.download.folderlist defines the default download location for
files: 0:
files are downloaded to the desktop by default.
...And 2 more matches
nsIToolkitProfile
inherits from: nsisupports last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) you should not create these objects yourself; to obtain them, use the nsitoolkitpro
fileservice interface to create and obtain them.
... method overview nsiprofilelock lock(out nsiprofileunlocker aunlocker); void remove(in boolean remove
files); attributes attribute type description localdir nsilocalfile the location of the profile local directory, which may be the same as the root directory.
...example: var profile = profilelist.getnext().queryinterface(ci.nsitoolkitprofile); var locker = profile.lock({}); remove() removes the profile from the registry of pro
files.
...And 2 more matches
nsIWebBrowserPersist
persist_flags_replace_existing_
files 32 replace existing
files on the disk (use with due diligence!) persist_flags_no_base_tag_modifications 64 don't modify or add base tags.
... persist_flags_cleanup_on_failure 8192 automatically cleanup after a failed or cancelled operation, deleting all created
files and directories.
...the caller is responsible for cleaning up partially written
files or directories.
...And 2 more matches
Building a Thunderbird extension 2: extension file layout
extensions are packaged and distributed in archive
files (also known as bundles), with the xpi (pronounced “zippy”) file extension.
...a content/ folder sometimes contains the actual content
files.
... these
files contain the code that makes your extension actually do something.
...And 2 more matches
Using the Mozilla symbol server
this allows debugging of those builds without forcing all users to download large debugging
files.
...the command should look like this (again, you can replace c:\symcache\ with any writable directory on your computer, if you'd prefer a different location for downloaded symbols): c:\program
files\mozilla firefox>c:\progra~1\debugg~1\symchk.exe /r c:\progra~1\mozill~1\* /s srv*c:\symcache\*https://symbols.mozilla.org/ note the \* after the mozilla directory.
... symchk: failed
files = 4 symchk: passed + ignored
files = 179 downloading symbols on linux / mac os x if you are on linux and running gdb 7.9 or newer, you can use this gdb python script to automatically fetch symbols.
...And 2 more matches
Plug-in Development Overview - Plugins
you can use a variety of environments to create a plug-in, but make sure that you have the necessary
files from the plugin sdk.
... working with urls the plug-in api provides methods that plug-ins can use to retrieve data from or post data to a url anywhere on the network, provide hyperlinks to other documents, post form data to cgi scripts using http, or upload
files to a remote server using ftp.
... 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.
...And 2 more matches
about:debugging (before Firefox 68) - Firefox Developer Tools
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 automatically, and you'll see them the next time the content script is loaded or the popup is shown.
... if you change
files that stay loaded the whole time, like background scripts, then you can pick up changes you've made by disabling and then re-enabling the add-on in the about:addons page.
...And 2 more matches
HTMLInputElement.webkitEntries - Web APIs
the read-only webkitentries property of the htmlinputelement interface contains an array of file system entries (as objects based on
filesystementry) representing
files and/or directories selected by the user using an <input> element of type file, but only if that selection was made using drag-and-drop: selecting a file in the dialog will leave the property empty (bug 1326031).
... syntax var entries = htmlinputelement.webkitentries; value an array of objects based on
filesystementry, each representing one file which is selected in the <input> element.
... more specifically,
files are represented by
filesystemfileentry objects, and, if they're allowed, directories are represented by
filesystemdirectoryentry objects.
...And 2 more matches
Variable fonts guide - CSS: Cascading Style Sheets
so you would have separate
files for 'roboto regular', 'roboto bold', and 'roboto bold italic' — meaning that you could end up with 20 or 30 different font
files to represent a complete typeface (it could be several times that for a large typeface that has different widths as well).
... in such a scenario, in order to use a typeface for typical use on a site for body copy you would need at least four
files: regular, italic, bold, and bold italic.
... if you wanted to add more weights, like a lighter one for captions or a heavier one for extra emphasis, that would mean several more
files.
...And 2 more matches
HTML documentation index - HTML: Hypertext Markup Language
note that it is recommended for styles to be defined in a separate file or
files.
... 55 <a>: the anchor element content, element, html, html text-level semantics, html:flow content, html:interactive content, html:palpable content, html:phrasing content, inline element, reference, web the html <a> element (or anchor element), with its href attribute, creates a hyperlink to web pages,
files, email addresses, locations in the same page, or anything else a url can address.
... 92 <dir>: the directory element (obsolete) directory, element, html, html lists, obsolete, reference, web, dir, lists the obsolete html directory element (<dir>) is used as a container for a directory of
files and/or folders, potentially with styles and icons applied by the user agent.
...And 2 more matches
HTTP caching - HTTP
common forms of caching entries are: successful results of a retrieval request: a 200 (ok) response to a get request containing a resource like html documents, images or
files.
...for the
files in the application that will not change, you can usually add aggressive caching.
... this includes static
files such as images, css
files and javascript
files, for example.
...And 2 more matches
HTTP Index - HTTP
6 data urls base64, guide, http, intermediate, url data urls, urls prefixed with the data: scheme, allow content creators to embed small
files inline in documents.
...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.
... 10 incomplete list of mime types audio, file types,
files, http, mime, mime types, php, reference, text, types, video here is a list of mime types, associated by type of documents, ordered by their common extensions.
...And 2 more matches
The building blocks of responsive design - Progressive web apps (PWAs)
what's more relevant to this article is that we didn't want the brick css and javascript
files being applied to the markup unless we were looking at the mobile app view.
...if you wish, you can point to multiple video
files via <source> attributes, each with their own source and mime type: <video controls> <source src="videos/720/crystal720.mp4" type="video/mp4"> <source src="videos/720/crystal720.webm" type="video/webm"> </video> but you can go one step further.
... type="video/mp4" media="all and (max-width: 480px)"> <source src="videos/320/crystal320.webm" type="video/webm" media="all and (max-width: 480px)"> <source src="videos/720/crystal720.mp4" type="video/mp4" media="all and (min-width: 481px)"> <source src="videos/720/crystal720.webm" type="video/webm" media="all and (min-width: 481px)"> </video> this allows your site to serve different video
files based on the available space, in order to optimize the user's experience.
...And 2 more matches
<image> - SVG: Scalable Vector Graphics
it can display raster image
files or other svg
files.
... the only image formats svg software must support are jpeg, png, and other svg
files.
... svg
files displayed with <image> are treated as an image: external resources aren't loaded, :visited styles aren't applied, and they cannot be interactive.
...And 2 more matches
page-mod - Archive of obsolete content
dify the document in your script: var pagemod = require("sdk/page-mod"); pagemod.pagemod({ include: "*.mozilla.org", contentscript: 'document.body.innerhtml = ' + ' "<h1>page matches ruleset</h1>";' }); you can supply the content script(s) in one of two ways: as a string literal, or an array of string literals, assigned to the contentscript option, as above as separate
files supplied in your add-on's "data" directory.
... if you supply the scripts as separate
files in the "data" directory, you specify them using with a url, typically constructed using the url() method of the self module's data object: var data = require("sdk/self").data; var pagemod = require("sdk/page-mod"); pagemod.pagemod({ include: "*.mozilla.org", contentscriptfile: data.url("my-script.js") }); var data = require("sdk/self").data; var pagemod = require("sdk/page-mod"); pagemod.pagemod({ include: "*.mozilla.org", contentscriptfile: [data.url("jquery-1.7.min.js"), data.url("my-script.js")] }); from firefox 34, you can use "./my-script.js" as an alias for self.data.url("my-script.js").
... contentstylefile lists stylesheets to attach, supplied in separate
files.
...to add multiple stylesheet
files, pass an array of urls.
Getting started (cfx) - Archive of obsolete content
next, save these three icon
files to the "data" directory: icon-16.png icon-32.png icon-64.png back at the command prompt, type: cfx run this is the sdk command to run a new instance of firefox with your add-on installed.
...you can distribute xpi
files yourself or publish them to https://addons.mozilla.org so other users can download and install them.
...an alternative development model is to use the extension auto-installer add-on: this listens for new xpi
files on a specified port and installs them automatically.
...: module.exports = function(grunt) { 'use strict'; require('matchdep').filterdev('grunt-!(cli)').foreach(grunt.loadnpmtasks); grunt.initconfig({ shell: { xpi: { command: [ 'cd pluginpath', 'cfx xpi', 'wget --post-file=pluginname.xpi http://localhost:8888/ || echo>/dev/null' ].join('&&') } }, watch: { xpi: {
files: ['pluginpath/**'], tasks: ['shell:xpi'] } } }); grunt.loadnpmtasks('grunt-contrib-watch'); grunt.loadnpmtasks('grunt-shell'); grunt.registertask('default', ['watch']); }; ...
Bootstrapped extensions - Archive of obsolete content
resourceuri nsiuri a uri pointing at the root of the add-ons
files, this may be a jar: or file: uri depending on whether the add-on is installed unpacked or not.
... js and jsm
files - using property
files to localize your .js and .jsm
files you have to use property
files.
... xul and html
files - using entities from dtd
files many times html pages are used, however they cannot be localized with dtd
files.
... there are three changes you must make: you have to change the html file's extension to be .xhtml the doctype must be defined point to a dtd file in your locale folder such as: <!doctype html system "chrome://l10n/locale/mozilla.dtd"> must add xmlns attribute to html tag for example: <html xmlns="http://www.w3.org/1999/xhtml"> if you have multiple dtd
files read on here: using multiple dtds the bare minimum needed is: file: install.rdf file: chrome.manifest file: bootstrap.js folder: locale folder: valid_locale_here file: anything.dtd the chrome.manifest file must include a definition for content for example: content name_of_your_addon ./ the chrome.manifest file must also include a line pointing to the locale, just like in the above property secti...
Compiling The npruntime Sample Plugin in Visual Studio - Archive of obsolete content
if you want to play mpeg
files).
...otherwise you'll delete
files later.
... again note that the resulting dll filename must start with "np", so either call your project like this or rename the file later delete the .cpp and .h and readme
files from the project and disk (if you did not create an empty project) copy the npruntime sample plugin source code into the dir of the new vs project and add the
files to the project using the vs gui (.cpp
files to "source
files", .h
files to "header
files", .rc file to "resource
files").
...so, add some
files first.
JavaScript Client API - Archive of obsolete content
api location the sync javascript client api is defined in
files in the services/sync/ directory of mozilla-central or similar repository.
...have a look at one of the following
files: services/sync/modules/engines/bookmarks.js services/sync/modules/engines/history.js setting up a js module the code for your custom sync engine should live in a js module.
... first off we're going to import the
files mentioned above at the top the file.
...ine() { weave.syncengine.call(this, "foo"); } fooengine.prototype = { __proto__: weave.syncengine.prototype, _recordobj: foorecord, _storeobj: foostore, _trackerobj: footracker }; as you can see, there isn't actually any new code here at all; the prototype simply defines some metadata such as the store and tracker classes to use, and the human-readable name that will be used in the log
files to identify errors and status messages coming from this engine.
Creating a Help Content Pack - Archive of obsolete content
a content pack is a packaged set of
files that describe help content.
...the content pack descriptor file outlines the framework of the contents of the pack by pointing to the
files describing the table of contents, index, and glossary rdf
files.
... the table of contents and index
files are simple tree-based outlines written in rdf.
...for example, if your glossary, index, and table of contents rdf
files are all located at chrome://myapp/locale/help/*, then you could put chrome://myapp/locale/help/ here and use only the actual file names without path when needed later.
Table Layout Regression Tests - Archive of obsolete content
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), patience and time.
... how the layout regression tests work first the url's to test are red from rtest.lst
files in various directories.
...the frame trees are dumped to separate
files in a baseline or verify directory for all url's in rtest.lst (see: nsregressiontester::dumpframemodel).
... a testcase should only contain local
files.
Running Tamarin acceptance tests - Archive of obsolete content
you may build the .abc
files build by downloading the latest asc.jar.
... can also be using in conjunction with --threads -f --forcerebuild force rebuild all test
files -q --quiet : will print a period (.) for each test run regardless of results, then print the test run summary when finished --ascargs= : additional arguments to pass to asc.jar --vmargs= : additional arguments to pass to avmshell --random : run tests in random order --timeout : max time for testrun --verify : run a verify pass instead of running abcs --verifyonly : run a -dverifyonly pass: only c...
...- you may build the .abc
files build by downloading the latest asc.jar.
...an emulator is ok for testing a few abc
files but for any consistency a real device is better.
Install script template - Archive of obsolete content
var plid = "@myplugin.com/myplugin,version=5.3"; var version = "5.3.0.0"; var mimetype = "application/x-my-plugin"; var suffix = "my"; var suffix_description = "my plugin
files"; var company_name = "mypluginco"; var plugin_description = "my exemplary plugin mine all mine"; // registry constant paths // these will be used when the win32 registry keys are written var hkey_local_machine = "hkey_local_machine"; var hkey_current_user = "hkey_current_user"; var reg_moz_path = "software\\mozillaplugins"; // my own error code in case secondary installation fails var nosec...
...f we fail here, cancel the installation // initinstall is quite an overloaded method, but i have invoked it here with three strings // which are globally defined err = initinstall(software_name, plid, version); if (err != 0) { // call initinstall again in case illegal characters in plid err = initinstall(software_name, software_name, version); if (err != 0) cancelinstall(err); } //add
files to current browser block var pluginsfolder = getfolder("plugins"); //verify disk space if(verifydiskspace(pluginsfolder, plugin_size+component_size)) { // start installing plugin shared library reseterror(); // install the plugin shared library to the current browser's plugin directory errblock1 = addfile (plid, version, plugin_file, pluginsfolder, null); if (errblock1!=0) { logcomm...
...ent("could not add " + plugin_file + " to " + pluginsfolder + ":" + errblock1); cancelinstall(errblock1); } // start installing xpt file if this is a scriptable plugin // install to the plugins directory -- this works well in mozilla 1.0 clients // in mozilla 1.0 clients, the components directory can be avoided for xpt
files errblock1 = addfile (plid, version, component_file, pluginsfolder, null); if (errblock1!=0) { logcomment("could not add " + component_file + " to " + pluginsfolder + ":" + errblock1); cancelinstall(errblock1); } } else { logcomment("cancelling current browser install due to lack of space..."); cancellinstall(); } // secondary install block, which sets up plugins and xpt in another location in addition to the current browser errblock2 = createsecon...
....my
files) * @param suffixdescription string describing suffix **/ function registerplid(rootkey, plidpath, plidid, dllabsolutepath, xptabsolutepath, plugindescription, vendor, productname, pluginversion, mimetype, suffix, suffixdescription) { var myregstatus = 0; winreg = getwinregistry(); if (winreg == null) { logcomment("moz registerplid: winreg == null"); return ...
modDateChanged - Archive of obsolete content
method of file object syntax boolean moddatechanged (
filespecobject asourcefolder, number anolddate); parameters the moddatechanged method has the following parameters: asourcefolder a
filespecobject representing the file to be queried.
... description most often, the date passed in as the second parameter in moddatechanged is the returned value from a moddate on a separate file, as in the following example, in which the dates of two
files are compared.
... example
filesource1 = getfolder("program", "file1.txt");
filesource2 = getfolder("program", "file2.txt"); err1 = file.moddate(
filesource1); // the baseline returned err2 = file.moddatechanged(
filesource1, err1); logcomment("file.moddatechanged should return 'false' = " + err2); // the reason it expects false is we're comparing // the return 'time stamp' value for // file1.txt with the actual file1.txt itself.
... err3 = file.moddatechanged(
filesource2, err1); logcomment("file.moddatechanged should return 'true' = " + err2); // the reason it expects true is we're comparing // the return 'time stamp' value for // file1.txt with another file, file2.txt, with a different // 'time stamp' value.
windowsShortcut - Archive of obsolete content
method of file object syntax int windowsshortcut( folderobject atarget, folderobject ashortcutpath, string adescription, folderobject aworkingpath, string aparams, folderobject aicon, number aiconid); parameters the windowsshortcut method has the following parameters: atarget a
filespecobject representing the absolute path (including filename) to file that the shortcut will be created for.
... ashortcutpath a
filespecobject representing the absolute path (not including filename) to where the shortcut is to be created.
... aworkingpath a
filespecobject representing the absolute path to the working dir for where atarget will is to be run from.
... aicon a
filespecobject representing the absolute path (including fiilename) to a file that contains icons.
addDirectory - Archive of obsolete content
string relativelocalpath, boolean forceupdate); public int adddirectory ( string registryname, installversion version, string xpisourcepath, object localdirspec, string relativelocalpath, boolean forceupdate); parameters the adddirectory method has the following parameters: registryname the pathname in the client version registry for the root directory of the
files that are to be installed.this parameter can be an absolute pathname (beginning with a /) or a relative pathname, (not beginning with a slash).
... xpisourcepath a string specifying the location of the directory within the xpi file.an empty string ("") causes the creation of a subdirectory node in the registry without actually unpacking any
files, which may be useful when you are updating a package that contains subcomponents that could also be updated separately.
...description the adddirectory method puts the
files in the specified directory in a temporary location.
... to move the
files and all other subcomponents to their final location, call the performinstall method after you've successfully added all subcomponents.
getFolder - Archive of obsolete content
method of install object syntax
filespecobject getfolder ( string foldername);
filespecobject getfolder ( string foldername, string subdirectory);
filespecobject getfolder ( object localdirspec, string subdirectory); parameters the getfolder method has the following parameters: foldername a string representing one of netscape's standard directories.
... localdirspec a
filespecobject representing a directory obtained by getcomponentfolder or getfolder.
... returns a
filespecobject representing one of netscape's standard directories, or null in case of error or if subdirectory refers to a file that already exists.
... "macosx picture documents" "macosx user applications" "macosx user desktop" "macosx user documents" "macosx user frameworks" "macosx user internet plugin" "macosx user preferences" "unix lib" "unix local" "windows" "win appdata" "win common
files" "win desktop" "win desktop common" "win program
files" "win programs" "win programs common" "win startmenu" "win startmenu common" "win startup" "win startup common" "win system" the "file:///" form is only valid when the subdirectory parameter is used.
The Joy of XUL - Archive of obsolete content
xul provides a clear separation among the client application definition and programmatic logic ("content" consisting of xul, xbl, and javascript), presentation ("skin" consisting of css and images), and language-specific text labels ("locale" consisting of dtds and string bundles in .properties
files).
... overlays overlays are xul
files used to describe extra content for the ui.
...in one respect, overlays are synonymous with "include"
files in other languages because an application may specify that an overlay be included in its definition.
...the netscape public license (npl) and mozilla public license (mpl) require developers who alter original work (source code
files that are provided with mozilla) to release the source code for these changes to their customers.
Persistent Data - Archive of obsolete content
this method has the advantage that it works with mozilla user pro
files, so that each user can have different settings.
...our find
files example let's add the persist attribute to some of the elements in the find
files dialog.
... <window id="findfile-window" title="find
files" persist="screenx screeny width height" orient="horizontal" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> this will cause the x and y position of the window and the width and height of the window to be saved.
... find
files example so far : source view next, we'll look at using style sheets with xul
files.
Creating a Windows Inno Setup installer for XULRunner applications - Archive of obsolete content
however, if you don't get the quickstart pack, you can later get istool from inno setup third-party
files.
...; see the documentation for details on creating inno setup script
files!
... [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: {cm:additionalicons}; flags: unchecked name: quicklaunchicon; description: {cm:createquicklaunchicon}; groupdescription: {cm:additionalicons}; flags: unchecked [
files] source: c:\develop\xulrunnerinstaller\myapp\myapp.exe; destdir: {app}; components: main; flags: ignoreversion source: c:\develop\xulrunnerinstaller\myapp\application.ini; destdir: {app}; components: main; flags: ignoreversion source: c:\develop\xulrunnerinstaller\myapp\chrome\*; excludes: .svn; destdir: {app}\chrome; components: main; flags: ignoreversion recursesubdirs createallsubdirs source: ...
...c:\develop\xulrunnerinstaller\myapp\defaults\*; excludes: .svn; destdir: {app}\defaults; components: main; flags: ignoreversion recursesubdirs createallsubdirs source: c:\develop\xulrunnerinstaller\myapp\xulrunner\*; destdir: {app}\xulrunner; components: runtime; flags: ignoreversion recursesubdirs createallsubdirs ; note: don't use "flags: ignoreversion" on any shared system
files [icons] name: {group}\my app; filename: {app}\myapp.exe name: {group}\{cm:uninstallprogram,xul explorer}; filename: {uninstallexe} name: {userdesktop}\my app; filename: {app}\myapp.exe; tasks: desktopicon name: {userappdata}\microsoft\internet explorer\quick launch\my app; filename: {app}\myapp.exe; tasks: quicklaunchicon [run] filename: {app}\myapp.exe; description: {cm:launchprogram,my app}; onlybelowversion: 0,6...
Using LDAP XPCOM with XULRunner - Archive of obsolete content
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 you copy as usual those
files in the components directory of your xul app, this can't work.
...this is due to the fact that the native ldap library
files are not found by the xulrunner process.
...create a subdirectory extensions/ldapstub in the mozilla source code directory, containing two
files, makefile.in and ldapstubloader.cpp: makefile.in: # copyright (c) 2005 benjamin smedberg <benjamin@smedbergs.us> depth = ../..
2006-10-27 - Archive of obsolete content
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.
... 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.
... peter weilbacher responded to alex's posting on the same day, stating that he is not sure what packaging system solaris 10 x86 uses but thinks that he might need to install the developer packages of x and/or xrender and freetype which should contain the libxrender.* and libfreetype.*
files that are need for the linking.
... on the same day paul reed replied to cédric's posting by stating that they would like to close the directory before major releases but that unfortunately it wasn't that easy to do because the
files must be readable, so mirrors can get the bits to serve them on the release day.
Extentsions FAQ - Archive of obsolete content
in the debug menu, uncheck exclude browser
files.
... how can i backup some of the
files before upgrade an extension and put them back afterward?
... do not store
files within the extension directory.
... storing
files within the extension directory is a no-no because it might break the multi-user support of those mozilla products, as it is possible to install extensions directly within the application directory.
Getting Started - Archive of obsolete content
because of this, you will be creating your own rss
files by hand.
...if a word processor is used, you must make sure to save your rss
files in a (pure and plain) text format.
... it is not mandatory to create rss
files in this tutorial (you can just read on), but this would be a less effective way for you to learn.
... you'll retain the information more and absorb it better if you create the rss
files yourself.
.htaccess ( hypertext access ) - Archive of obsolete content
file accessing : htaccess
files can be opened using any text editor, like windows notepad, vin, sublime text editor or any other.
... syntax highliting support for .htaccess
files less.
... common application url redirects & rewrite: htaccess
files are often used to redirect traffic to a web page to another or from traffic to a directory to another even between domains is possible.
... deny from 146.0.74.205 # blocks all access from 146.0.74.205 to the directory ssi or server side include : include external
files to each file requested by the user without the need to write include statements in the file; you can have them automatically attached to all the
files, whether at top or bottom, automatically through your .htaccess file.
Common Firefox theme issues and solutions - Archive of obsolete content
in order to work around this issue, you need to either rename any of the following
files that are in your chrome://browser/skin/ folder and fix any references to those
files, or copy them to the folder chrome://browser/skin/lion/: keyhole-circle.png toolbar.png toolbarbutton-dropmarker.png tabbrowser/alltabs-box-bkgnd-icon.png tabview/tabview.png places/toolbar.png linux linux select box fields are showing both drop arrow and spinner arrows on linux: the styling of drop d...
...to fix this issue, you need to copy the
files chrome://browser/skin/identity-icons-generic.png, chrome://browser/skin/identity-icons-https.png and chrome://browser/skin/identity-icons-https-ev.png to your browser folder.
...to fix this issue you need to copy the
files chrome://browser/skin/devtools/inspect-button.png and chrome://browser/skin/devtools/treepanel-button.png from the default theme into your browser/devetools/ folder.
...you'll probably want to copy the
files from the folder browser/devtools/ from the default theme into your theme and then modify as necessary to achieve the desired look.
Implementing game control mechanisms - Game development
setting up the environment let's start with a quick overview of the game's folder structure, javascript
files and in-game states, so we know what's happening where.
... the game's folders look like this: as you can see there are folders for images, javascript
files, fonts and sound effects.
... the src folder contains the javascript
files split as a separate states — boot.js, preloader.js, mainmenu.js and game.js — these are loaded into the index file in this exact order.
...we'll be playing mostly with the mainmenu.js and game.js
files, and we'll explain the code inside the create() and update() methods in much more detail in later articles.
Sending forms through JavaScript - Learn web development
to learn more about the filereader api, see using
files from web applications.
... if( file.dom.
files[0] ) { reader.readasbinarystring( file.dom.
files[0] ); } // if not, read the file once the user selects it.
... file.dom.addeventlistener( "change", function () { if( reader.readystate === filereader.loading ) { reader.abort(); } reader.readasbinarystring( file.dom.
files[0] ); } ); // senddata is our main function function senddata() { // if there is a selected file, wait it is read // if there is not, delay the execution of the function if( !file.binary && file.dom.
files.length > 0 ) { settimeout( senddata, 10 ); return; } // to construct our multipart form data request, // we need an xmlhttprequest instance const xhr = new xmlhttprequest(); // we need a separator to define each part of the request const boundary = "blob"; // store our body request in a string.
... let data = ""; // so, if the user has selected a file if ( file.dom.
files[0] ) { // start a new part in our body's request data += "--" + boundary + "\r\n"; // describe it as form data data += 'content-disposition: form-data; ' // define the name of the form data + 'name="' + file.dom.name + '"; ' // provide the real name of the file + 'filename="' + file.dom.
files[0].name + '"\r\n'; // and the mime type of the file data += 'content-type: ' + file.dom.
files[0].type + '\r\n'; // there's a blank line between the metadata and the data data += '\r\n'; // append the binary data to our body's request data += file.binary + '\r\n'; } // text data is simpler ...
Styling web forms - Learn web development
using the form, upload both your font
files and generate a webfont kit.
... inside the unzipped contents you will find some font
files (at the time of writing, two .woff
files and two .woff2
files; they might vary in the future.) copy these
files into a directory called fonts, in the same directory as before.
... we are using two different
files for each font to maximise browser compatibility; see our web fonts article for a lot more information.
...if the fontsquirrel output was different to what we described above, you can find the correct @font-face blocks inside your downloaded webfont kit, in the stylesheet.css file (you'll need to replace the below @font-face blocks with them, and update the paths to the font
files): @font-face { font-family: 'handwriting'; src: url('fonts/journal-webfont.woff2') format('woff2'), url('fonts/journal-webfont.woff') format('woff'); font-weight: normal; font-style: normal; } @font-face { font-family: 'typewriter'; src: url('fonts/veteran_typewriter-webfont.woff2') format('woff2'), url('fonts/veteran_typewriter-webfont.woff') format('w...
Getting started with the Web - Learn web development
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.
... publishing your website once you have finished writing the code and organizing the
files that make up your website, you need to put it all online so people can find it.
CSS performance optimization - Learn web development
to optimize the cssom construction, remove unnecessary styles, minify, compress and cache it, and split css not required at page load into additional
files to reduce css render blocking.
...by splitting the css into multiple
files based on media queries, you can prevent render blocking during download of unused css.
...by separating out the css into multiple
files, the main render-blocking file, in this case styles.css, is much smaller, reducing the time that rendering is blocked.
... will-change: opacity, transform; the font-display property applied to the @font-face rule, the font-display property defines how font
files are loaded and displayed by the browser, allowing text to appear with a fallback font while a font loads, or fails to load.
Properly configuring server MIME types - Learn web development
note: historically, firefox has loaded css
files even if they had the wrong mime type, as long as the html document that requested them was being processed in quirks mode.
... if you're using the apache web server, simply copy this sample .htaccess file to the directory that contains the
files that you want to send with the correct mime types.
... if you have an entire subdirectory of
files, just place the file in the parent directory; you need not place it in each subdirectory.
... related links incorrect mime type for css
files iana | mime media types hypertext transfer protocol — http/1.1 microsoft - 293336 - info: webcast: mime type handling in microsoft internet explorer microsoft - appendix a: mime type detection in internet explorer microsoft - security update, march 29, 2001 microsoft - security update, december 13, 2001 original document information author: bob clary, date: 20 feb 2003 ...
Beginning our React todo list - Learn web development
pre-project housekeeping create-react-app has made a few
files we won't be using at all for our project.
... then, copy and paste the following commands into your terminal to delete some unneeded
files.
... # move into the src directory of your project cd src # delete a few
files rm -- app.test.js app.css logo.svg serviceworker.js setuptests.js # move back up to the root of the project cd ..
... notes: two of the
files we’re deleting are for testing the application.
Implementing feature detection - Learn web development
start by making local copies of our css-feature-detect.html, flex-layout.css, float-layout.css, and basic-styling.css
files.
...download the latest version (see manual installation), unzip the zip file, copy the html5shiv-printshiv.min.js and html5shiv.min.js
files into your example directory, and link to one of the
files by putting the following under your <title> element: <script src="html5shiv.min.js"></script> have a look at your example css
files — you'll see that basic-styling.css handles all the styling that we want to give to every browser, whereas the other two css
files contain the css we want to selectively apply to browser depending on their support levels.
... you can look at the different effects these two
files have by manually changing the css file referred to by the second <link> element, but let's instead implement some javascript to automatically swap them as needed.
... note: if you have trouble getting this to work, check your code against our modernizr-css.html and modernizr-css.css
files (see this running live also).
Mozilla’s UAAG evaluation report
(p2) c provides stated functions 11.6 user pro
files.
... (p2) vg user pro
files are fully supported for all configuration options.
... unfortunately, switching pro
files requires the entire application to be relaunched.
... there is still very little end-user documentation for editing pro
files by hand.
Adding a new event
miscevents.h if the new event class isn't proper any header
files above, you should use this.
...i.e., you can implement new methods in the header
files directly.
...and also, if implementing a method needs to include other header
files, you should implement it in widgeteventimple.cpp too for avoiding include hell.
...if it's possible, you just need to add an entry to generated_events_webidl_
files in dom/webidl/moz.build.
SVG Guidelines
authoring guidelines a lot of svg
files (particularly those generated by svg editors) ship without being cleaned up and can contain a ton of junk that bloats the file size and slows down rendering.
... in general the best way to combat this is to first run svg
files through a linter such as svgo (see the tools section below).
... unused tags and attributes editor metadata vector editors (inkscape, adobe illustrator, sketch) usually add a bunch of metadata in svg
files while saving them.
... tools tools can help to clean svg
files.
FileUtils.jsm
the fileutils.jsm javascript code module offers utility routines dealing with
files.
... mode_wronly 0x02 corresponds to the pr_wronly parameter to pr_open mode_create 0x08 corresponds to the pr_create_file parameter to pr_open mode_append 0x10 corresponds to the pr_append parameter to pr_open mode_truncate 0x20 corresponds to the pr_truncate parameter to pr_open perms_file 0644 default permissions when creating
files.
... nsifile getfile( string key, array patharray, bool followlinks ); parameters key the nsidirectoryservice key to start from (see getting special
files for more info) patharray an array of path components to locate beneath the directory specified by key.
... nsifile getdir( string key, array patharray, bool shouldcreate, bool followlinks ); parameters key the nsidirectoryservice key to start from (see getting special
files for more info) patharray an array of path components to locate beneath the directory specified by key.
PromiseWorker.jsm
javascript
files imported into the worker scope and main thread scope which allows posting to the worker and receiving in the form of a promise.
... promiseworker module consists of two javascript
files, promiseworker.jsm and promiseworker.js.
...as well known with workers, there is a minimum of two
files required.
...the following sections tell you which content to use in your worker and main thread
files, in order to use promiseworker objects.
Patching a Localization
cd ~/localization-workdir clone the localization repository for your locale and for the version you want to patch: hg clone http://hg.mozilla.org/releases/l10n/mozilla-aurora/gl now that you have the code and your working directory, edit the dtd and properties
files to make your necessary changes.
... hg diff this command creates a patch and lists your modifications through displaying the differences in a unified patch's
files.
... alternatively, you can select specific
files for diff to evaluate and print (see below).
... the command will only print the differences found in the selected
files.
QA phase
preliminary instructions we will be using the following file directories for this example: your working directory (root)/ mozilla-aurora (en-us source, pulled from http://hg.mozilla.org/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.
... pushing to your repository there are a couple of things you should take note of before you push to your repository: make sure that your
files have been encoded in unicode without bom (byte order mark).
... adding changesets adding manifests adding file changes added 1 changesets with 2 changes to 2
files bb/acl: your_id is allowed.
...for instance, if you have finished translating all the .dtd and .properties
files in your x-testing/browser/chrome/browser/ directory, then you should run these commands: $ hg status $ hg commit -m "translated browser/chrome/browser/" $ hg outgoing $ hg push http://hg.mozilla.org/l10n-central/x-testing note that due to the distributed nature of hg, hg commit saves the changes locally (i.e., in your computer's hg repository).
Creating localizable web applications
the logic of the website should not be exposed directly in the localization
files, to avoid any accidental changes by localizers.
...gettext extracts localizable content form the source
files, thus making it impossible for localizers to accidentally change them.
...if you do, if the static uri changes, you'll have to regenerate the *.po
files to include the new msgids.
...good: image file (/img/tignish/firefox/performance-chart.png): html: (in this case, no gettext was used and the localizers worked on pure html
files) <div id="performance-chart"> <h4>firefox performance: fast — faster — <em>fastest</em></h4> <p>results of a sunspider test on a windows xp machine</p> <img src="/img/tignish/firefox/performance-chart.png" alt="firefox 2, firefox 3, firefox 3.5 performance chart" /> <ul> <li>18,148 ms</li> <li>3,669 ms</li> <li>1,524 ms!</li> </ul> </div> in the above example, not onl...
Profiling with Xperf
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 toolkit) to actually install the windows performance toolkit tools.
...check if c:\program
files\microsoft windows performance toolkit already exists.
...(again, make sure that the directories exist; if they don't, it's a silent error.) quick start all these tools will live, by default, in c:\program
files\microsoft windows performance toolkit.
...to start a trace session, launching a new firefox instance: xperf -on base xperf -start heapsession -heap -pidnewprocess "./firefox.exe -p test -no-remote" -stackwalk heapalloc+heaprealloc -buffersize 512 -minbuffers 128 -maxbuffers 512 to stop a session and merge the resulting
files: xperf -stop heapsession -d heap.etl xperf -d main.etl xperf -merge main.etl heap.etl result.etl "result.etl" will contain your merged data; you can delete main.etl and heap.etl.
NSPR release procedure
these binary distributions are jar
files, which are really zip
files, and they are published in the directory /share/builds/components.
...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.
...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.
I/O Types
directory type file descriptor types file info types network address types types used with socket options functions type used with memory-mapped i/o offset interpretation for seek functions directory type prdir file descriptor types nspr represents i/o objects, such as open
files and sockets, by file descriptors of type prfiledesc.
... prfiledesc priomethods prfileprivate prdescidentity note that the nspr documentation follows the unix convention of using the term
files to refer to many kinds of i/o objects.
... to refer specifically to the
files in a file system (that is, disk
files), this documentation uses the termnormal
files.
...different kinds of i/o objects (such as
files and sockets) have different i/o methods tables, thus implementing different behavior in response to the same i/o function call.
Encrypt Decrypt MAC Keys As Session Objects
specify noise file name [optional]\n\n", "-z "); fprintf(stderr, "%-21s specify an input file name\n\n", "-i "); fprintf(stderr, "%-21s specify an output file name\n\n", "-o "); fprintf(stderr, "%-7s for encrypt, it takes as an input file and produces\n", "note :"); fprintf(stderr, "%-7s .enc and .header as intermediate output
files.\n\n", ""); fprintf(stderr, "%-7s for decrypt, it takes .enc and .header\n", ""); fprintf(stderr, "%-7s as input
files and produces as a final output file.\n\n", ""); exit(-1); } /* * gather a cka_id */ secstatus gathercka_id(pk11symkey* key, secitem* buf) { secstatus rv = pk11_readrawattribute(pk11_typesymkey, key, cka_id, buf); if (...
...n(outfilename, pr_create_file | pr_truncate | pr_rdwr , 00660); if (!outfile) { pr_fprintf(pr_stderr, "unable to open \"%s\" for writing.\n", outfilename); return secfailure; } rv = macinit(ctxmac); if (rv != secsuccess) goto cleanup; ctxenc = decryptinit(ek, iv, ivlen, ckm_aes_cbc); filelength =
filesize(encryptedfilename); while ((ctextlen = pr_read(infile, ctext, sizeof(ctext))) > 0) { count += ctextlen; /* decrypt cipher text buffer using cbc and iv */ rv = decrypt(ctxenc, decbuf, &decbuflen, sizeof(decbuf), ctext, ctextlen); if (rv != secsuccess) { pr_fprintf(pr_stderr, "decrypt failure\n"); goto cleanup;...
...e db token * open output file * loop until eof(input): * read a buffer of ciphertext from input file, * save last block of ciphertext * decrypt ciphertext buffer using cbc and iv, * compute and check mac, then remove mac from plaintext * replace iv with saved last block of ciphertext * write the plain text to output file * close
files * report success */ secstatus rv; secitem ivitem; secitem enckeyitem; secitem mackeyitem; secitem cipheritem; secitem macitem; secitem paditem; pk11symkey *enckey = null; pk11symkey *mackey = null; /* open intermediate fil...
... * loop until eof(input) * read a buffer of plaintext from input file, * mac it, append the mac to the plaintext * encrypt it using cbc, using previously created iv, * store the last block of ciphertext as the new iv, * write the cipher text to intermediate file * close
files * report success */ secstatus rv; prfiledesc *infile; prfiledesc *headerfile; prfiledesc *encfile; unsigned char *enckeyid = (unsigned char *) "encrypt key"; unsigned char *mackeyid = (unsigned char *) "mac key"; secitem enckeyid = { siasciistring, enckeyid, pl_strlen(enckeyid) }; secitem mackeyid = { siasci...
Encrypt and decrypt MAC using token
specify noise file name [optional]\n\n", "-z "); fprintf(stderr, "%-21s specify an input file name\n\n", "-i "); fprintf(stderr, "%-21s specify an output file name\n\n", "-o "); fprintf(stderr, "%-7s for encrypt, it takes as an input file and produces\n", "note :"); fprintf(stderr, "%-7s .enc and .header as intermediate output
files.\n\n", ""); fprintf(stderr, "%-7s for decrypt, it takes .enc and .header\n", ""); fprintf(stderr, "%-7s as input
files and produces as a final output file.\n\n", ""); exit(-1); } /* * gather a cka_id */ secstatus gathercka_id(pk11symkey* key, secitem* buf) { secstatus rv = pk11_readrawattribute(pk11_typesymkey, key, cka_id, buf); if (...
...n(outfilename, pr_create_file | pr_truncate | pr_rdwr , 00660); if (!outfile) { pr_fprintf(pr_stderr, "unable to open \"%s\" for writing.\n", outfilename); return secfailure; } rv = macinit(ctxmac); if (rv != secsuccess) goto cleanup; ctxenc = decryptinit(ek, iv, ivlen, ckm_aes_cbc); filelength =
filesize(encryptedfilename); while ((ctextlen = pr_read(infile, ctext, sizeof(ctext))) > 0) { count += ctextlen; /* decrypt cipher text buffer using cbc and iv */ rv = decrypt(ctxenc, decbuf, &decbuflen, sizeof(decbuf), ctext, ctextlen); if (rv != secsuccess) { pr_fprintf(pr_stderr, "decrypt failure\n"); goto cleanup;...
...e db token * open output file * loop until eof(input): * read a buffer of ciphertext from input file, * save last block of ciphertext * decrypt ciphertext buffer using cbc and iv, * compute and check mac, then remove mac from plaintext * replace iv with saved last block of ciphertext * write the plain text to output file * close
files * report success */ secstatus rv; secitem ivitem; secitem enckeyitem; secitem mackeyitem; secitem cipheritem; secitem macitem; secitem paditem; pk11symkey *enckey = null; pk11symkey *mackey = null; /* open intermediate fil...
... * loop until eof(input) * read a buffer of plaintext from input file, * mac it, append the mac to the plaintext * encrypt it using cbc, using previously created iv, * store the last block of ciphertext as the new iv, * write the cipher text to intermediate file * close
files * report success */ secstatus rv; prfiledesc *infile; prfiledesc *headerfile; prfiledesc *encfile; unsigned char *enckeyid = (unsigned char *) "encrypt key"; unsigned char *mackeyid = (unsigned char *) "mac key"; secitem enckeyid = { siasciistring, enckeyid, pl_strlen(enckeyid) }; secitem mackeyid = { siasci...
Encrypt Decrypt_MAC_Using Token
specify noise file name [optional]\n\n", "-z "); fprintf(stderr, "%-21s specify an input file name\n\n", "-i "); fprintf(stderr, "%-21s specify an output file name\n\n", "-o "); fprintf(stderr, "%-7s for encrypt, it takes as an input file and produces\n", "note :"); fprintf(stderr, "%-7s .enc and .header as intermediate output
files.\n\n", ""); fprintf(stderr, "%-7s for decrypt, it takes .enc and .header\n", ""); fprintf(stderr, "%-7s as input
files and produces as a final output file.\n\n", ""); exit(-1); } /* * gather a cka_id.
...n(outfilename, pr_create_file | pr_truncate | pr_rdwr , 00660); if (!outfile) { pr_fprintf(pr_stderr, "unable to open \"%s\" for writing.\n", outfilename); return secfailure; } rv = macinit(ctxmac); if (rv != secsuccess) goto cleanup; ctxenc = decryptinit(ek, iv, ivlen, ckm_aes_cbc); filelength =
filesize(encryptedfilename); while ((ctextlen = pr_read(infile, ctext, sizeof(ctext))) > 0) { count += ctextlen; /* decrypt cipher text buffer using cbc and iv.
... * close
files.
... * loop until eof(input) * read a buffer of plaintext from input file, * mac it, append the mac to the plaintext * encrypt it using cbc, using previously created iv, * store the last block of ciphertext as the new iv, * write the cipher text to intermediate file * close
files * report success */ secstatus rv; prfiledesc *infile; prfiledesc *headerfile; prfiledesc *encfile; unsigned char *enckeyid = (unsigned char *) "encrypt key"; unsigned char *mackeyid = (unsigned char *) "mac key"; secitem enckeyid = { siasciistring, enckeyid, pl_strlen(enckeyid) }; secitem mackeyid = { siasci...
NSS Sample Code Sample_3_Basic Encryption and MACing
"); fprintf(stderr, "%-21s specify an input file name\n\n", "-i <ipfilename>"); fprintf(stderr, "%-21s specify an output file name\n\n", "-o <opfilename>"); fprintf(stderr, "%-7s for encrypt, it takes <ipfilename> as an input file and produces\n", "note :"); fprintf(stderr, "%-7s <ipfilename>.enc and <ipfilename>.header as intermediate output
files.\n\n", ""); fprintf(stderr, "%-7s for decrypt, it takes <ipfilename>.enc and <ipfilename>.header\n", ""); fprintf(stderr, "%-7s as input
files and produces <opfilename> as a final output file.\n\n", ""); exit(-1); } /* this source code form is subject to the terms of the mozilla public * license, v.
...n(outfilename, pr_create_file | pr_truncate | pr_rdwr , 00660); if (!outfile) { pr_fprintf(pr_stderr, "unable to open \"%s\" for writing.\n", outfilename); return secfailure; } rv = macinit(ctxmac); if (rv != secsuccess) goto cleanup; ctxenc = decryptinit(ek, iv, ivlen, ckm_aes_cbc); filelength =
filesize(encryptedfilename); while ((ctextlen = pr_read(infile, ctext, sizeof(ctext))) > 0) { count += ctextlen; /* decrypt cipher text buffer using cbc and iv */ rv = decrypt(ctxenc, decbuf, &decbuflen, sizeof(decbuf), ctext, ctextlen); if (rv != secsuccess) { pr_fprintf(pr_stderr, "decrypt failure\n"); goto cleanup;...
...the db token * open output file * loop until eof(input): * read a buffer of ciphertext from input file * save last block of ciphertext * decrypt ciphertext buffer using cbc and iv * compute and check mac, then remove mac from plaintext * replace iv with saved last block of ciphertext * write the plain text to output file * close
files * report success */ secstatus rv; secitem ivitem; secitem enckeyitem; secitem mackeyitem; secitem cipheritem; secitem macitem; secitem paditem; pk11symkey *enckey = null; pk11symkey *mackey = null; /* open intermediate fil...
... * loop until eof(input) * read a buffer of plaintext from input file * mac it, append the mac to the plaintext * encrypt it using cbc, using previously created iv * store the last block of ciphertext as the new iv * write the cipher text to intermediate file * close
files * report success */ secstatus rv; prfiledesc *infile; prfiledesc *headerfile; prfiledesc *encfile; unsigned char *enckeyid = (unsigned char *) "encrypt key"; unsigned char *mackeyid = (unsigned char *) "mac key"; secitem enckeyid = { siasciistring, enckeyid, pl_strlen(enckeyid) }; secitem mackeyid = { siasci...
NSS Sample Code Utilities_1
* * this function supports password extraction from
files with * multiple passwords, one for each token.
... in the single password * case a line would just have the password whereas in the multi- * password variant they could be of the form * * token_1_name:its_password * token_2_name:its_password * */ char *filepasswd(pk11slotinfo *slot, prbool retry, void *arg) { char* phrases, *phrase; prfiledesc *fd; print32 nb; char *pwfile = arg; int i; const long maxpwd
filesize = 4096; char* tokenname = null; int tokenlen = 0; if (!pwfile) return 0; if (retry) { return 0; /* no good retrying - the file contents will be the same */ } phrases = port_zalloc(maxpwd
filesize); if (!phrases) { return 0; /* out of memory */ } fd = pr_open(pwfile, pr_rdonly, 0); if (!fd) { fprintf(stderr, "no password file \"%s...
...\" exists.\n", pwfile); port_free(phrases); return null; } nb = pr_read(fd, phrases, maxpwd
filesize); pr_close(fd); if (nb == 0) { fprintf(stderr,"password file contains no data\n"); port_free(phrases); return null; } if (slot) { tokenname = pk11_gettokenname(slot); if (tokenname) { tokenlen = port_strlen(tokenname); } } i = 0; do { int startphrase = i; int phraselen; /* handle the windows eol case */ while (phrases[i] != '\r' && phrases[i] != '\n' && i < nb) i++; /* terminate passphrase */ phrases[i++] = '\0'; /* clean up any eol before the start of the next passphrase */ while ( (i<nb) analyze="" char="" current="...
...; prfiledesc *fd; print32 count; fd = pr_open(noisefilename, pr_rdonly, 0); if (!fd) { fprintf(stderr, "failed to open noise file."); return secfailure; } do { count = pr_read(fd,buf,sizeof(buf)); if (count > 0) { pk11_randomupdate(buf,count); } } while (count > 0); pr_close(fd); return secsuccess; } /* *
filesize */ long
filesize(const char* filename) { struct stat stbuf; stat(filename, &stbuf); return stbuf.st_size; } /* * readderfromfile */ secstatus readderfromfile(secitem *der, const char *infilename, prbool ascii) { secstatus rv = secsuccess; prfiledesc *infile = null; infile = pr_open(infilename, pr_rdonly, 0); if (!infile) { pr_fprintf(pr_stderr, "...
EncDecMAC using token object - sample 3
ecify db password file [optional]\n\n", "-f "); fprintf(stderr, "%-20s specify noise file name [optional]\n\n", "-z "); fprintf(stderr, "%-21s specify an input file name\n\n", "-i "); fprintf(stderr, "%-21s specify an output file name\n\n", "-o "); fprintf(stderr, "%-7s for encrypt, it takes as an input file and produces\n", "note :"); fprintf(stderr, "%-7s .enc and .header as intermediate output
files.\n\n", ""); fprintf(stderr, "%-7s for decrypt, it takes .enc and .header\n", ""); fprintf(stderr, "%-7s as input
files and produces as a final output file.\n\n", ""); exit(-1); } /* * gather a cka_id */ secstatus gathercka_id(pk11symkey* key, secitem* buf) { secstatus rv = pk11_readrawattribute(pk11_typesymkey, key, cka_id, buf); if (rv != secsuccess) { pr_fprintf(pr_stderr, "pk11_readrawattribut...
...*/ outfile = pr_open(outfilename, pr_create_file | pr_truncate | pr_rdwr , 00660); if (!outfile) { pr_fprintf(pr_stderr, "unable to open \"%s\" for writing.\n", outfilename); return secfailure; } rv = macinit(ctxmac); if (rv != secsuccess) goto cleanup; ctxenc = decryptinit(ek, iv, ivlen, ckm_aes_cbc); filelength =
filesize(encryptedfilename); while ((ctextlen = pr_read(infile, ctext, sizeof(ctext))) > 0) { count += ctextlen; /* decrypt cipher text buffer using cbc and iv */ rv = decrypt(ctxenc, decbuf, &decbuflen, sizeof(decbuf), ctext, ctextlen); if (rv != secsuccess) { pr_fprintf(pr_stderr, "decrypt failure\n"); goto cleanup; } if (decbuflen == 0) break; rv = macupdate(ctxmac, decbuf, decbuflen); if (rv != sec...
...eader, get iv and cka_ids of two keys from it * find those keys in the db token * open output file * loop until eof(input): * read a buffer of ciphertext from input file, * save last block of ciphertext * decrypt ciphertext buffer using cbc and iv, * compute and check mac, then remove mac from plaintext * replace iv with saved last block of ciphertext * write the plain text to output file * close
files * report success */ secstatus rv; secitem ivitem; secitem enckeyitem; secitem mackeyitem; secitem cipheritem; secitem macitem; secitem paditem; pk11symkey *enckey = null; pk11symkey *mackey = null; /* open intermediate file, read in header, get iv and cka_ids of two keys * from it */ rv = getivandckaidsfromheader(headerfilename, &ivitem, &enckeyitem, &mackeyitem); if (rv != secsuccess) { goto cle...
...* loop until eof(input) * read a buffer of plaintext from input file, * mac it, append the mac to the plaintext * encrypt it using cbc, using previously created iv, * store the last block of ciphertext as the new iv, * write the cipher text to intermediate file * close
files * report success */ secstatus rv; prfiledesc *infile; prfiledesc *headerfile; prfiledesc *encfile; unsigned char *enckeyid = (unsigned char *) "encrypt key"; unsigned char *mackeyid = (unsigned char *) "mac key"; secitem enckeyid = { siasciistring, enckeyid, pl_strlen(enckeyid) }; secitem mackeyid = { siasciistring, mackeyid, pl_strlen(mackeyid) }; secitem encckaid; secitem macckaid; unsigned cha...
NSS environment variables
3.12 sqlite_force_proxy_locking boolean (1 to enable) 1 means force always use proxy, 0 means never use proxy, null means use proxy for non-local
files only.
... 3.12.8 nsdistmode string on operating systems other than windows, this controls whether copies, absolute symlinks, or relative symlinks of the output
files should be published to mozilla/dist.
... the possible values are: copy: copies of
files are published absolute_symlink: symlinks whose targets are absolute pathnames are published if not specified, default to relative symlinks (symlinks whose targets are relative pathnames).
... on windows, copies of
files are always published.
sslintro.html
warning: some of the ssl header
files provided as part of nss 2.0 include both public apis documented in the nss 2.0 documentation set and private apis intended for internal use by the nss implementation of ssl.
...other apis that may be exposed in the header
files are not supported for application use.
... initialization initialization includes setting up configuration
files, setting global defaults, and setting up callback functions.
...sets up configuration
files and performs other tasks required to run network security services.
Renaming With Pork
convince gcc to create annotated .ii
files while compiling the analysis copy.
...note the -k,-w0 options are passed down to the mcpp preprocessor such that it can annotate
files with more precise position information.
...in the analysis copy make a list of
files to process.
...one can also run the ./renamer command directly on the .ii
files.
Creating JavaScript tests
(in fact, the test262 test suite is run as part of jstests.) practical differences between the two test suites: jstest new jstest
files should be put the code in the appropriate subdirectory of js/src/tests/non262/, or, under some scenarios, contributed directly to the test262 repository.
... jit-test new jit-test
files should be put in js/src/jit-test/tests/basic or one of the other appropriate subdirectories of jit-test/tests.
... writing a new test file have a look at the existing
files and follow what they do.
... if you are writing a jstests, additional testing functionality is provided for you in shell.js
files.
Security and the jar protocol
you may re-enable the feature if necessary by setting the network.jar.block-remote-
files preference to false.
... java archive (jar)
files are simply zip compressed bundles of
files.
... this ordinarily isn't a big deal, since site developers wouldn't put up dangerous
files and set them up to download like zip archives.
... however, if a site allows file uploads, zip
files are typically treated as relatively innocuous by web sites in that situation, since they're not executable.
XPCOM changes in Gecko 2.0
prior to gecko 2, during component registration, all binary and javascript component
files were loaded and called, asking them to register themselves.
...starting in gecko 2, however, components are registered using manifest
files, similarly to how chrome is registered.
...component manifests all component registration is now handled through manifest
files.
...xpt
files the path of any xpt
files must be listed explicitly in a manifest using an interfaces directive: interfaces components/mycomponent.xpt javascript components the registration information for javascript components is no longer located in the component itself; instead, it's located in the manifest.
An Overview of XPCOM
xpidl allows you to generate type libraries, or typelibs, which are
files with the extension .xpt.
...type libraries and c++ header
files are generated from these idl
files, and the tool that generates these
files is called the xpidl compiler.
...this is the case when, for example, clients deal with
files: each separate file is represented by a different object, and several file objects may be being used at any one time.
...these services include a cross platform file abstraction which provides uniform and powerful access to
files, directory services which maintain the location of application- and system-specific locations, memory management to ensure everyone uses the same memory allocator, and an event notification system that allows passing of simple messages.
Creating the Component Code
component registration all xpcom components - whether they're stored in shared libraries (dlls, dsos, dylibs), javascript
files, or otherwise - need to be registered before they can be used.
...for example, including nsicomponentmanager.idl without mozilla_strict_api defined will include the following headers, which are not supported across versions (unfrozen): nscomponentmanagerutils.h nscomponentmanagerobsolete.h these variables are picked up by
files that do not specify themselves as mozilla_strict_api.
...this interface is xpcom's abstraction of
files and directories.
...this parameter is useful when the component needs to know where it has been installed or registered - as, for example, when other
files must be stored or accessed relative to the component.
How to build a binary XPCOM component using Visual Studio
you can use the project as a starting point and modify the component
files to add your own functionality.
...the blank vc++ project has a bat file that will create the xpt and the h
files.
...you can take the code and create implementation h and cpp
files.
... install component: copy your xpt and dll
files to the {app}/components folder.
nsIFileProtocolHandler
should only be called on
files which are not directories.
...should only be called on
files which are directories.
...readurlfile() takes a local file and tries to interpret it as an internet shortcut (for example .url
files on windows).
...exceptions thrown ns_error_not_available the os does not support such
files.
nsIFileView
toolkit/components/filepicker/public/nsifileview.idlscriptable this interface displays a list of
files in a treebox.
... selected
files nsiarray an nsiarray of selected
files, which contains nsiarray instances.
... showhidden
files boolean if true hidden
files will be shown.
... setfilter() set the filter to be applied to the file list, for example "*.jpg" would only return jpg
files.
nsIMsgIncomingServer
ring aprompttitle, in nsimsgwindow amsgwindow, out boolean okayvalue); astring getunicharattribute(in string name); astring getunicharvalue(in string attr); boolean isnewhdrduplicate(in nsimsgdbhdr anewhdr); void onuserorhostnamechanged(in acstring oldname, in acstring newname); void performbiff(in nsimsgwindow amsgwindow); void performexpand(in nsimsgwindow amsgwindow); void remove
files(); void setboolattribute(in string name, in boolean value); void setboolvalue(in string attr, in boolean value); void setcharattribute(in string name, in acstring value); void setcharvalue(in string attr, in acstring value); void setdefaultlocalpath(in nsilocalfile adefaultlocalpath); void setfilevalue(in string relpref, in string abspref, in nsilocalfile avalue); void setfilterlist...
...ceptions thrown missing exception missing description performbiff() void performbiff( in nsimsgwindow amsgwindow ); parameters amsgwindow missing description exceptions thrown missing exception missing description performexpand() void performexpand( in nsimsgwindow amsgwindow ); parameters amsgwindow missing description exceptions thrown missing exception missing description remove
files() this is also very dangerous.
... this will remove the
files associated with this server on disk.
... void remove
files(); parameters none.
nsIZipReader
modules/libjar/nsizipreader.idlscriptable this interface provides methods for reading compressed (zip)
files.
...to create an instance, use: var zipreader = components.classes["@mozilla.org/libjar/zip-reader;1"] .createinstance(components.interfaces.nsizipreader); about character sets and code pages note: nsizipreader has a code page problem; that is, in the zip specification, filenames are supposed to use 7-bit ascii; however, most modern
filesystems use 8 bit code pages, such as utf-8.
...subsequent attempts to extract()
files or read from its input stream will result in an error.
...xpi
files are zip
files, just firefox needs the extension to be xpi.
Getting Started Guide
nscomptr is defined in the source
files: xpcom/base/nscomptr.h xpcom/base/nscomptr.cpp ...though you probably don't want to look in there, just yet.
... nsresult nscacherecord::get
filespec( nsi
filespec** a
filespec ) /* ...fills in the callers |ns
filespec*| (which the caller supplied the address of) with a copy of my member variable |m
filespec|, an |nscomptr|.
... *a
filespec = m
filespec; // the |nscomptr| should take care of the refcount here, right?
... return ns_ok; } plainly, the author believed (though perhaps with some question) that the nscomptr, m
filespec, would addref automatically as it was assigned into *a
filespec.
XPIDL
note: starting in gecko 9.0, the older xpidl utility, which was previously used to generate c++ header
files, typelib information, and so forth has been replaced with pyxpidl in the gecko sdk.
... writing xpidl interface
files xpidl closely resembles omg idl, with extended syntax to handle iids and additional types.
... constants are emitted in header
files using anonymous enums, although there is an outstanding patch that combines adjacent constants into the same anonymous enums to quiet enum mismatch warnings.
... resources (mostly outdated) some unsorted notes including a keyword list xpidl is a tool for generating c++ headers, java interfaces, xpconnect typelibs, and html documentation from xpidl
files generating xpt
files on windows a google groups post with instructions on how to use variable-length argument lists using xpidl.
XPI
xpi archives only support
files stored uncompressed or compressed using the "deflate" method.
... note: starting in gecko 2.0, xpi
files are no longer unpacked when extensions are installed.
... instead, the xpi itself is placed in the extensions directory, and
files are loaded directly out of the package.
... when xpi
files are served via http, the application/x-xpinstall mime type should be matched with the xpi file extension.
Search - Firefox Developer Tools
searching for
files to search for a particular file, press control + p (or command + p on a mac) and type the search term.
... the source pane will display a list of all matching
files as you type.
... searching in all
files you can also search for a string in all of the
files included in the currently opened project.
... if the string exists in any of the
files in the project, the search will return a list showing a list by file and line number.
Style Editor - Firefox Developer Tools
source map support web developers often create css
files using a preprocessor like sass, less, or stylus.
... these tools generate css
files from a richer and more expressive syntax.
... source maps enable the tools to map back from the generated css to the original syntax, so they can display, and allow you to edit,
files in the original syntax.
... this means that if you use, for example, sass, then the style editor will show you, and allow you to edit, sass
files, rather than the css that is generated from them: for this to work, you must: use a css preprocessor that understands the source map revision 3 proposal.
Using the CSS Typed Object Model - Web APIs
by employing short javascript snippets outputting to console.log(): :root { --maincolor: hsl(198, 43%, 42%); --black: hsl(0, 0%, 16%); --white: hsl(0,0%,97%); --unit: 1.2rem; } button { --maincolor: hsl(198, 100%, 66%); display: inline-block; padding: var(--unit) calc(var(--unit)*2); width: calc(30% + 20px); background: no-repeat 5% center url(https://mdn.mozillademos.org/
files/16793/magicwand.png) var(--maincolor); border: 4px solid var(--maincolor); border-radius: 2px; font-size: calc(var(--unit)*2); color: var(--white); cursor: pointer; transform: scale(0.95); } let's add the class to a button (a button which does nothing).
..."} console.log( transform[0].y ); // cssunitvalue {value: 0.95, unit: "number"} console.log( transform[0].z ); // cssunitvalue {value: 1, unit: "number"} console.log( transform.is2d ); // true // cssimagevalue let bgimage = allcomputedstyles.get('background-image'); console.log( bgimage ); // cssimagevalue console.log( bgimage.tostring() ); // url("https://mdn.mozillademos.org/
files/16793/magicwand.png") // cssunparsedvalue let unit = allcomputedstyles.get('--unit'); console.log( unit ) // let parsedunit = cssnumericvalue.parse( unit ); console.log( parsedunit ); console.log( parsedunit.unit ); console.log( parsedunit.value ); for this example to work, the example must be closed out here.
... let bgimage = allcomputedstyles.get('background-image'); console.log( bgimage ); // cssimagevalue console.log( bgimage.tostring() ); // url("https://mdn.mozillademos.org/
files/16793/magicwand.png") when we get() the 'background-image', a cssimagevalue is returned.
... while we used the css background shorthand property, the inherited object.prototype.tostring() method, shows we returned only the image, 'url("https://mdn.mozillademos.org/
files/16793/magicwand.png")'.
File - Web APIs
the file interface provides information about
files and allows javascript in a web page to access their content.
... file objects are generally retrieved from a filelist object returned as a result of a user selecting
files using the <input> element, from a drag and drop operation's datatransfer object, or from the mozgetasfile() api on an htmlcanvaselement.
...in particular, filereader, url.createobjecturl(), createimagebitmap(), and xmlhttprequest.send() accept both blobs and
files.
... see using
files from web applications for more information and examples.
FileReader - Web APIs
the filereader object lets web applications asynchronously read the contents of
files (or raw data buffers) stored on the user's computer, using file or blob objects to specify the file or data to read.
... file objects may be obtained from a filelist object returned as a result of a user selecting
files using the <input> element, from a drag and drop operation's datatransfer object, or from the mozgetasfile() api on an htmlcanvaselement.
...to read
files by pathname in javascript, standard ajax solutions should be used to do server-side file reading, with cors permission if reading cross-domain.
... see using
files from web applications for details and examples.
Using FormData Objects - Web APIs
from scratch you can build a formdata object yourself, instantiating it then appending fields to it by calling its append() method, like this: var formdata = new formdata(); formdata.append("username", "groucho"); formdata.append("accountnum", 123456); // number 123456 is immediately converted to a string "123456" // html file input, chosen by user formdata.append("userfile", fileinputelement.
files[0]); // javascript file-like object var content = '<a id="a"><b id="b">hey!</b></a>'; // the body of the new file...
...the file interface is based on blob, inheriting blob functionality and expanding it to support
files on the user's system.
... sending
files using a formdata object you can also send
files using formdata.
... submitting forms and uploading
files via ajax without formdata objects if you want to know how to serialize and submit a form via ajax without using formdata objects, please read this paragraph.
Sending and Receiving Binary Data - Web APIs
var
filestream = load_binary_resource(url); var abyte =
filestream.charcodeat(x) & 0xff; // throw away high-order byte (f7) the example above fetches the byte at offset x within the loaded binary data.
... the valid range for x is from 0 to
filestream.length-1.
...see also downloading
files.
... submitting forms and uploading
files please, read this paragraph.
Ajax - Developer guides
this article will explain how to use some ajax techniques, like: analyzing and manipulating the response of the server monitoring the progress of a request submitting forms and upload binary
files – in pure ajax, or using formdata objects using ajax within web workers fetch api the fetch api provides an interface for fetching resources.
... parsing and serializing xml how to parse an xml document from a string, a file or via javascript and how to serialize xml documents to strings, javascript object trees (jxon) or
files.
... filereader api the filereader api lets web applications asynchronously read the contents of
files (or raw data buffers) stored on the user's computer, using file or blob objects to specify the file or data to read.
... file objects may be obtained from a filelist object returned as a result of a user selecting
files using the <input> element, from a drag and drop operation's datatransfer object, or from the mozgetasfile() api on an htmlcanvaselement.
HTML attribute: multiple - HTML: Hypertext Markup Language
in firefox, the file input reads "no
files selected" when the attribute is present and "no file selected" when not, when no
files are selected.
... when multiple is set on the file input type, the user can select one or more
files.
... the user can choose multiple
files from the file picker in any way that their chosen platform allows (e.g.
... file input when multiple is set on the file input type, the user can select one or more
files: <form method="post" enctype="multipart/form-data"> <p> <label for="uploads"> choose the images you want to upload: </label> <input type="file" id="uploads" name="uploads" accept=".jpg, .jpeg, .png, .svg, .gif" multiple> </p> <p> <label for="text">pick a text file to upload: </label> <input type="file" id="text" name="text" accept=".txt"> </p> <p> <input t...
Preloading content with rel="preload" - HTML: Hypertext Markup Language
e source, and also live): <head> <meta charset="utf-8"> <title>js and css preload example</title> <link rel="preload" href="style.css" as="style"> <link rel="preload" href="main.js" as="script"> <link rel="stylesheet" href="style.css"> </head> <body> <h1>bouncing balls</h1> <canvas></canvas> <script src="main.js" defer></script> </body> here we preload our css and javascript
files so they will be available as soon as they are required for the rendering of the page later on.
... larger images and video
files.
... one interesting case where this applies, even if the fetch is not cross-origin, is font
files.
... this doesn't have to be limited to images, or even
files of the same type — think big!
Evolution of HTTP - HTTP
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.
... <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.
... with the help of the new http headers, the ability to transmit other documents than plain html
files has been added (thanks to the content-type header).
...this allowed any web application to provide an api to allow retrieval and modification of its data without having to update the browsers or the servers: all what is needed was embedded in the
files served by the web sites through standard http/1.1.
Compression in HTTP - HTTP
compression algorithms used for
files can be grouped into two broad categories: loss-less compression, where the compression-uncompression cycle doesn't alter the data that is recovered.
... as compression works better on a specific kind of
files, it usually provides nothing to compress them a second time.
...do not use the two following techniques for
files in a compressed format.
... as compression brings significant performance improvements, it is recommended to activate it for all
files, but already compressed ones like images, audio
files and videos.
Optimizing startup performance - Web Performance
if you need to decode asset
files (for example, decoding jpeg
files and turning them into raw texture data for later use by webgl), that's great to do in workers.
... reduce the side of your javascript
files.
... utilize resource hints (like preconnect or preload) whenever possible to indicate to the browser which
files are more critical for your application.
... data size do your best to optimize the size of your game data; smaller level
files will download and be processed faster than larger ones.
Web Performance
it can apply to a file, a file type, all
files loaded on a page, a specific metric (e.g.
... web performance basics in addition to the front end components of html, css, javascript, and media
files, there are features that can make applications slower and features that can make applications subjectively and objectively faster.
...serving different media
files based on each user agent's capability, size, and pixel density is possible.
...in this article, we'll covers methods for getting your font
files as small as possible with efficient file formats and sub setting.
Structural overview of progressive web apps - Progressive web apps (PWAs)
this script begins by importing data from the file games.js in the data directory: self.importscripts("data/games.js"); then it creates a list of all the
files that the service worker needs to cache.
... this list includes both app shell and content
files: var cachename = 'js13kpwa-v1'; var appshell
files = [ '/pwa-examples/js13kpwa/', '/pwa-examples/js13kpwa/index.html', '/pwa-examples/js13kpwa/app.js', '/pwa-examples/js13kpwa/style.css', '/pwa-examples/js13kpwa/fonts/graduate.eot', '/pwa-examples/js13kpwa/fonts/graduate.ttf', '/pwa-examples/js13kpwa/fonts/graduate.woff', '/pwa-examples/js13kpwa/favicon.ico', '/pwa-examples/js13kpwa/img/js13kgames.png', '/pwa-examples/js13kpwa/img/bg.png', '/pwa-examples/js13kpwa/icons/icon-32.png', '/pwa-examples/js13kpwa/icons/icon-64.png', '/pwa-examples/js13kpwa/icons/icon-96.png', '/pwa-examples/js13kpwa/icons/icon-128.png', '/pwa-examples/js13kpwa/icons/icon-168.png', '/pwa-examples/js13kpwa/icons/icon-192.png', '/pwa-e...
...xamples/js13kpwa/icons/icon-256.png', '/pwa-examples/js13kpwa/icons/icon-512.png' ]; var gamesimages = []; for(var i=0; i<games.length; i++) { gamesimages.push('data/img/'+games[i].slug+'.jpg'); } var contenttocache = appshell
files.concat(gamesimages); with the file list prepared, it's time to install the service worker itself.
... the service worker will actually handle caching all the listed
files.
l10n - Archive of obsolete content
note that you can't currently use localize strings appearing in content scripts or html
files, but you can share the localized strings you want by assigning it's values to a json serializable object.
...localized strings are supplied by the add-on developer in .properties
files stored in the add-ons "locale" directory.
...this enables you to write functional, localizable code without localizing any strings - just make the identifiers the default language: var _ = require("sdk/l10n").get; console.log(_("hello!")); however, this will make it more difficult to maintain your code if you have many localizations, because any changes to the identifier values break all your .properties
files.
panel - Archive of obsolete content
the add-on consists of six
files: main.js: the main add-on code, that creates the button and panel get-text.js: the content script that interacts with the panel content text-entry.html: the panel content itself, specified as html icon-16.png, icon-32.png, and icon-64.png: icons for the button in three different sizes "main.js" is saved in your add-on's lib directory, and the other
files go in your add-on's data directory...
...onshow() { textarea.focus(); }); finally, the "text-entry.html" file defines the <textarea> element: <html> <head> <style type="text/css" media="all"> textarea { margin: 10px; } body { background-color: gray; } </style> </head> <body> <textarea rows="13" cols="33" id="edit-box"></textarea> </body> </html> finally, save these three icon
files to the "data" directory: icon-16.png icon-32.png icon-64.png to learn much more about content scripts, see the working with content scripts guide.
... we've already seen that you can package html
files in your add-on's data directory and use them to define the panel's content.
widget - Archive of obsolete content
this html file, and the icon
files it references, are saved in the add-on's data directory.
... scripting trusted widget content we've already seen that you can package html
files in your add-on's data directory and use them to define the widget's content.
...in your own add-ons, you will probably want to create your content scripts in separate
files and pass their urls using the contentscriptfile property.
net/xhr - Archive of obsolete content
usage security concerns by default, the xmlhttprequest object grants full access to any protocol scheme, which means that it can be used to read from (but not write to) the host system's entire
filesystem.
... if access to the
filesystem isn't prevented, it could easily be used to access sensitive user data, though this may be inconsequential if the client can't access the network.
... possible attenuations before being exposed to unprivileged code, this object needs to be attenuated in such a way that, at the very least, it can't access the user's
filesystem.
Low-Level APIs - Archive of obsolete content
fs/path provides access to the local
filesystem with the nodejs path module api.
... io/file provides access to the local
filesystem.
... stylesheet/style modify styles using stylesheet
files or css rules.
cfx - Archive of obsolete content
so if we run the following command: cfx xpi --update-link https://example.com/addon/latest/pluginname.xpi --update-url https://example.com/addon/update_rdf/pluginname.update.rdf cfx will create two
files: an xpi file which embeds https://example.com/addon/update_rdf/pluginname.update.rdf as the value of updateurl an rdf file which embeds https://example.com/addon/latest/pluginname.xpi as the value of updatelink.
... --no-strip-xpi will force the packager to include all
files into the output xpi.
...so you just have to make up a path and name the first time, and keep using it: cfx run --profiledir=~/addon-dev/pro
files/boogaloo the path must contain at least one "/" (although you may specify just "./dir").
Extension Etiquette - Archive of obsolete content
chrome: or resource: packages, which are often defined in chrome.manifest
files.
... xpcom contract ids, which are often registered in chrome.manifest
files.
... internationalization locales always use locale dtds and property
files, even if providing your extension in one language.
Install Manifests - Archive of obsolete content
examples <em:translator>janez novak</em:translator> <em:translator>kari nordmann</em:translator> unpack a true or false value that tells the application whether the extension requires its
files be unpacked into a directory in order to work or whether the extension can be loaded direct from the xpi.
...the url of the value is urn:mozilla:extension:file:jarfile.jar where jarfile.jar is the name of the jar file that contains the chrome package's
files.
... this could also be the name of a directory that contains the chrome package's
files, un-jarred (e.g.
Installing Extensions and Themes From Web Pages - Archive of obsolete content
there are a variety of ways you can install extensions and themes from web pages, including direct linking to the xpi
files and using the installtrigger object.
...because so many sites installed extensions by direct-linking the xpi file and relying on content handling to invoke the confirmation ui, many sites are (incorrectly) doing so for theme jar
files too and wondering why they aren't auto-detected and installed.
... well, xpi is a mozilla-specific extension and so we can have special handling for it, but jar is not - not all .jar
files are firefox themes, so if you click on a .jar link you'll be shown the save as decision dialog.
Chapter 3: Introduction to XUL—How to build a more intuitive UI - Archive of obsolete content
for example, there is the mozilla amazon browser, which helps with shopping at amazon, and the presentation method in xul, a tool for writing and displaying presentations to try out the code samples in this chapter, save them as text
files with .xul extensions and drag and drop them into the firefox browser window.
...note that external dtd
files are limited to what is given in the chrome url, which will be discussed in chapter 5.
... please be aware that ordinary dtd
files on the web or in a local directory will not be opened.
Connecting to Remote Content - Archive of obsolete content
xpath is very useful for cases when you're receiving large and complex xml
files, and you only need some of the data contained in them.
... let domparser = components.classes["@mozilla.org/xmlextras/domparser;1"] .createinstance(components.interfaces.nsidomparser); let
filestream = components.classes["@mozilla.org/network/file-input-stream;1"] .createinstance(components.interfaces.nsifileinputstream); let xsltprocessor = components.classes["@mozilla.org/document-transformer;1?type=xslt"] .createinstance(components.interfaces.nsixsltprocessor); let xsldocument;
filestream.init(somexslfile, -1, 0x01, 0444); // read only // parse from t...
...he xslt stylesheet file stream xsldocument = domparser.parsefromstream(
filestream, null,
filestream.available(), "text/xml"); // import the xslt stylesheet to the xslt processor xsltprocessor.importstylesheet(xsldocument); finally, you can either use nsixsltprocessor.transformtodocument() or nsixsltprocessor.transformtofragment() methods to transform the xml document.
Getting Started with Firefox Extensions - Archive of obsolete content
xpis are simply zip
files, but firefox recognizes the xpi extension and triggers the installation process when an xpi file is loaded.
... you should see the following directory structure: xulschoolhello1 chrome.manifest install.rdf content browseroverlay.xul browseroverlay.js skin browseroverlay.css locale en-us browseroverlay.dtd browseroverlay.properties that's lots of
files for something so simple!
... in the next section, we'll inspect these
files and see what they do.
Security best practices in extensions - Archive of obsolete content
files loaded using the file protocol can access
files on the user's disk and other local devices.
...these web pages can come from a server, or come from local html
files bundled with the extension.
...if you choose to do so, beware when making edits to the bundled
files so as not to break the well thought out security architecture.
Signing an extension - Archive of obsolete content
the following instructions also apply to a theme and other xpi
files.
... sign the basic usage of the signing tool is as follows: nss-signtool \ -d (path to the directory that contains your certificate database
files) \ -k (your certificate nickname) \ -p (your certificate password) \ -x -z (output path/name of signed file) \ (path to your extension working directory that contains chrome directory, chrome.manifest file, install.rdf file, etc.) writing your password directly in the script is dangerous.
... key manager - a firefox extention that has the ability to sign xpi
files.
Locked config settings - Archive of obsolete content
putting into place locked configuration settings this feature exists for mozilla and firefox, but not for thunderbird locked settings can be put into a mozilla.cfg file in the c:\program
files\mozilla.org\mozilla directory.
...this file also needs to be "called" from c:\program
files\mozilla.org\mozilla\defaults\pref\all.js by appending the following line at the end: pref("general.config.filename", "mozilla.cfg"); note: newer versions of mozilla or firefox store the all.js file in greprefs rather than defaults\pref the moz-byteshift.pl script allows to encode...: moz-byteshift.pl -s 13 <mozilla.cfg.txt >mozilla.cfg ...
... and to decode mozilla.cfg
files: moz-byteshift.pl -s -13 <mozilla.cfg >mozilla.cfg.txt example of an unencoded file: mozilla.cfg.txt.
Conclusion - Archive of obsolete content
mozilla applications often store their css and image
files in a separate skin subdirectory within the installation directory.
... how would you modify the xpi structure and installer script to install these
files in that subdirectory?
...firefox has slightly different chrome registry requirements, so you may need to modify the contents.rdf
files.
Finding the file to modify - Archive of obsolete content
the structure layer consists of xul
files.
... each window and dialog box in mozilla is defined by a single xul file (in some cases other xul
files called overlays contribute portions of another window's structure).
... a chrome url is a url used internally by mozilla to refer to
files in the chrome subdirectory of the mozilla installation directory.
Making it into a static overlay - Archive of obsolete content
the packages are just standard zip archives of the
files to be installed along with a javascript script that performs the installation and some rdf
files that describe the components being installed for the chrome registry.
...overlays provide a way to break up a large xul file into several different
files (one that describes the overall structure of an application window and the others to implement specific portions of the window) to improve code readability, maintainability, and extensability.
...t type="application/javascript" src="chrome://navigator/content/tinderstatus.js" /> <statusbar id="status-bar"> <statusbarpanel class="statusbarpanel-iconic" id="tinderbox-status" insertbefore="offline-status" status="none"/> </statusbar> </overlay> tinderstatusoverlay.xul starts with an xml processing instruction that identifies the file as xml (all xul
files need to include this).
Creating a hybrid CD - Archive of obsolete content
many mozilla
files have long file names which makes creating the cd on a macintosh difficult because the hfs
filesystem limits the length of file names to 32 characters.
... the utility mkhybrid lets you create hybrid cds that work with all three
filesystems.
...it is used as the creator type for readme and other text
files because it can handle unix and windows linebreaks, but teachtext cannot.
Download Manager preferences - Archive of obsolete content
on windows xp sp2 and windows vista, this value also indicates whether downloaded
files trigger a security warning upon launch.
... browser.download.usedownloaddir a boolean value that indicates whether or not the user's preference is to automatically save
files into the download directory.
... preference description browser.download.dir a local folder the user may have selected for downloaded
files to be saved.
GRE Registration - Archive of obsolete content
linux on linux, registration information is kept in ini-style
files of the following form: [1.7.10] gre_path=/usr/lib/mozilla-1.7.10 feature=value feature2=value2 these ini
files can be in any of the following locations: /etc/gre.conf /etc/gre.d/*.conf ~/.gre.conf ~/.gre.d/*.conf mozilla has never officially shipped a linux gre based on the mozilla suite.
... however, some linux distributors including red hat/fedora core ship /etc/gre.d/*.conf
files with the mozilla suite rpms.
...the <tt>-register-global</tt> flag has special fallback semantics so that multiple xulrunners of the same version can be installed without overwriting registration
files.
Bundles - Archive of obsolete content
plication bundle: create file called webapp.ini that contains something like: [parameters] id=unique-app-id@unique-author-id.whatever name=webapp name uri=http://[the-url-what-you-want-to-connect-to]/ status=yes location=no sidebar=no navigation=no zip the file to [whatever].webapp double-click the webapp bundle or use prism -webapp [path-to-webapp] structure a bundle can contain the following
files.
... any other
files in the .webapp file will be ignored.
... after the .webapp file is executed the first time, these
files will be unzipped and "cached" to a local directory structure.
Merging TraceMonkey Repo - Archive of obsolete content
conflicting
files can be listed via hg resolve -l.
... 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.
...once you've resolved all the
files, all the entries in hg resolve -l will have rs next to them.
Using cross commit - Archive of obsolete content
using the script quick overview there are a couple of common ways to use cross-commit: land something simultaneously on the trunk and mozilla_1_8_branch # modify the
files (probably by applying the patch) patch -p0 < ~/caret.patch # commit on trunk and branch at once # make sure to use -m "commit message" when doing so tools/cross-commit -m "fix some sort of security bug" layout/base/nscaret.h land something on two other branches that has already landed on the trunk # update to the first branch you want to land on cvs update -rmozilla_1_8_branch layout/ba...
...se/nscaret.h # modify the
files (probably by applying the patch) patch -p0 < ~/caret.patch # commit on all the branches at once # make sure to use -m "commit message" when doing so tools/cross-commit --moz18 --branch mozilla_1_8_0_branch -m "fix some sort of security bug" layout/base/nscaret.h notes note that you must use a -m option with a cvs checkin message.
...you can list the
files/directories you want it to commit on the command line or leave them out and let it recursively troll the current directory.
XML in Mozilla - Archive of obsolete content
this feature is used mainly to localize mozilla to different languages (the ui strings are stored in external dtd
files).
...we treat xhtml documents differently depending on the mime type (or file suffix if
files are loaded from local discs).
...
files that go through the html code path are not checked for well-formedness.
isFile - Archive of obsolete content
summary returns a boolean value indicating whether the given
filespecobject is a file.
... method of file object syntax boolean isfile (
filespecobject nativefolderpath); parameters the isfile method has the following parameter: nativefolderpath a
filespecobject representing the queried file object.
... returns a boolean value indicating whether the
filespecobject is a file or not.
move - Archive of obsolete content
method of file object syntax int move(
filespecobject source,
filespecobject dest ); parameters the move method has the following parameters: source a
filespecobject representing the source file.
... dest a
filespecobject representing the target directory.
... description you must create a
filespecobject for the destination directory to pass in for this function.
addFile - Archive of obsolete content
to move this and all other
files to their final location, call the performinstall method after you've successfully added all
files.
... note: if you are installing binary
files on a macintosh, be aware that the binary format for those
files must be applesingle if the resource information is to be installed properly.
... some file transfer programs will convert apple binaries to this format on transfer if you transfer them from a macintosh to a unix/windows machine before zipping up those
files on that target system.
Adding more elements - Archive of obsolete content
« previousnext » we will conclude the discussion of boxes by adding some boxes to the find
files dialog.
... adding elements to our find
files example we will add some more elements to the find
files dialog now.
...find
files example so far source view next, we will look at how to create stacks.
Document Object Model - Archive of obsolete content
our find
files example it doesn't make sense to have the progress bar and the dummy tree data displayed when the find
files dialog is first displayed.
...however, for various reasons, including better performance, you should always put scripts in separate
files, except for short fragments which can be put directly in the event handler.
... find
files example so far: source view see also a re-introduction to javascript javascript reference next we'll learn how to modify the dom.
Groupboxes - Archive of obsolete content
example 2 : source view <groupbox flex="1"> <caption> <checkbox label="enable backups"/> </caption> <hbox> <label control="dir" value="directory:"/> <textbox id="dir" flex="1"/> </hbox> <checkbox label="compress archived
files"/> </groupbox> in this example, a checkbox has been used as a caption.
...we'll add a groupbox to the find
files dialog in the next section.
...next, we'll use what we've learned so far and add some additional elements to the find
files dialog.
Keyboard Shortcuts - Archive of obsolete content
our find
files example let's add keyboard shortcuts to the find
files dialog.
...l version="1.0" encoding="utf-8"?> <window xmlns="http://www.mozilla.org/keymaster/gat...re.is.only.xul"> <keyset> <key id="cut_cmd" modifiers="accel" key="x"/> <key id="copy_cmd" modifiers="accel" key="c"/> <key id="paste_cmd" modifiers="accel" key="v"/> <key id="close_cmd" keycode="vk_escape" oncommand="window.close();"/> </keyset> <vbox flex="1"> <toolbox> <menubar id="find
files-menubar"> <menu id="file-menu" label="file" accesskey="f"> <menupopup id="file-popup"> <menuitem label="open search..." accesskey="o"/> <menuitem label="save search..." accesskey="s"/> <menuseparator/> <menuitem label="close" accesskey="c" key="close_cmd" oncommand="window.close();"/> </menupopup> </menu> <menu id="edit-menu" label="edit" acces...
... our find
files example so far : source view next, we'll find out how to handle focus and the selection.
More Menu Features - Archive of obsolete content
<menu id="new-menu" label="new"> <menupopup id="new-popup"> <menuitem label="window"/> <menuitem label="message"/> </menupopup> </menu> <menuitem label="open"/> <menuitem label="save"/> <menuseparator/> <menuitem label="exit"/> </menupopup> </menu> </menubar> </toolbox> adding a menu to our find
files example let's add a menu to the find
files dialog.
... <toolbox> <menubar id="find
files-menubar"> <menu id="file-menu" label="file" accesskey="f"> <menupopup id="file-popup"> <menuitem label="open search..." accesskey="o"/> <menuitem label="save search..." accesskey="s"/> <menuseparator/> <menuitem label="close" accesskey="c"/> </menupopup> </menu> <menu id="edit-menu" label="edit" accesskey="e"> <menupopup id="edit-popup"> <menuitem label="cut" accesskey="t"/> <menuitem label="copy" accesskey="c"/> <menuitem label="paste" accesskey="p" disabled="true"/> </menupopup> </menu> </menubar> <toolbar id="find
files-toolbar> here we have added two menus with various c...
... our find
files example so far : source view adding checkmarks to menus many applications have menu items that have checks on them.
Progress Meters - Archive of obsolete content
you typically see it when downloading
files or when performing a lengthy operation.
... the find
files example let's add a progress meter to our find file dialog.
... we would normally put an indeterminate progress meter as we don't know how many
files we'll be searching or how long the search will take.
Toolbars - Archive of obsolete content
our find
files example let's add a toolbar to the find
files dialog.
... <vbox flex="1"> <toolbox> <toolbar id="find
files-toolbar"> <toolbarbutton id="opensearch" label="open"/> <toolbarbutton id="savesearch" label="save"/> </toolbar> </toolbox> <tabbox> a toolbar with two buttons has been added here.
... the find
files example so far: source view next, we'll find out how to add a menu bar to a window.
Trees and Templates - Archive of obsolete content
example 1 : source <tree id="my-tree" flex="1" datasources="rdf:
files" ref="nc:
filesroot" flags="dont-build-content"> <treecols> <treecol id="name" label="name" primary="true" flex="1"/> <splitter/> <treecol id="date" label="date" flex="1"/> </treecols> <template> <rule> <treechildren> <treeitem uri="rdf:*"> <treerow> <treecell label="rdf:http://home.netscape.com/nc-rdf#name"/> <tr...
...the tree should display a list of the
files in the root directory.
...sorting columns if you try the previous example, you might note that the list of
files is not sorted.
Using Spacers - Archive of obsolete content
as we've seen, the find
files window has appeared in a size that will fit the elements inside it.
... if you change the size of the find
files window, you can see that the elements have remained where they started.
... find
files example so far source view next, we will learn some additional features of buttons.
Window icons - Archive of obsolete content
starting with firefox 1.5, thunderbird 1.5, and xulrunner 1.8, you can specify an icon for a xul window by putting
files named mywindow.ico (for windows) and mywindow.xpm or mywindow16.xpm (linux), where mywindow is the id of the <window> you want to attach the icon to, in the chrome/icons/default subfolder of your bundle.
... these icons will override the global icon
files, which are located in app_dir/browser/chrome/icons/default.
...global icon
files currently take precedence and bundles are only searched for icons which are not provided by the application.
Building XULRunner with Python - Archive of obsolete content
building the batch
filestart-msvc71.bat is used to launch the build console (msys from the mingw project ).
...note this is complete and does not require the checkout of any other project specific .mozconfig
files as sometimes shown.
...don't copy any.pyo
files that exist for python modules in the application or errors will occur on the target machine.
Shipping a plugin as a Toolkit bundle - Archive of obsolete content
plugin packages should only need to package a small set of
files in the following structure in the xpi file: install.rdf plugins/ pluginlib.dll plugintypes.xpt the install.rdf file contains an install manifest that describes the plugin to the user.
...platform-specific
files gecko 1.9.2 (firefox 3.6) and earlier prior to gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1), it was possible to package multiple plugin libraries for different operating systems into a single xpi bundle.
... the unpack property is necessary to tell applications using newer versions of gecko to unpack the plugin because dlls can't be loaded from xpi
files.
Properly Using CSS and JavaScript in XHTML Documents - Archive of obsolete content
recommendations do not use inline style or script in xhtml replacing inline style and script with external
files containing the css rules and javascript is the best approach for authoring xhtml in a backwardly compatible fashion that will not break if the mime type of the content is changed from text/html to application/xhtml+xml.
...moving css and javascript into separate
files is the safe approach with regard to changes in how your xhtml is served.
... please note that for pure xhtml documents, you do not need to use the xml-stylesheet processing instruction, but should instead use link to reference external
files containing css.
Creating fancy letterheaded paper - Learn web development
save local copies of the top, bottom and logo images in the same directory as your code
files.
... project brief you have been given the
files needed to create a letterheaded paper template.
... you just need to put the
files together.
Organizing your CSS - 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 some tips and best practices for organizing stylesheets, and find out about some of the naming conventions and tools in common usage to help with css organization and team working.
...a pre-processor runs over your raw
files and turns them into a stylesheet, whereas a post-processor takes your finished stylesheet and does something to it — perhaps to optimize it in order that it will load faster.
... so for example, with partials, you could have several style
files inside a directory, say foundation/_code.scss, foundation/_lists.scss, foundation/_footer.scss, foundation/_links.scss, etc., then use the sass @use role to load them into other stylesheets: // foundation/_index.sass @use 'code' @use 'lists' @use 'footer' @use 'links' if the partials are all loaded into an index file, as implied above, you can then load that entire directory into another styles...
Getting started with CSS - Learn web development
prerequisites: basic computer literacy, basic software installed, basic knowledge of working with
files, and html basics (study introduction to html.) objective: to understand the basics of linking a css document to an html file, and be able to do simple text formatting with css.
...it contains an <em>emphasized</em> element.</p> <ul> <li>item one</li> <li>item two</li> <li>item <em>three</em></li> </ul> </body> </html> note: if you are reading this on a device or an environment where you can't easily create
files, then don't worry — live code editors are provided below to allow you to write example code right here in the page.
...using your code editor add the following to your css file: h1 { color: red; } save your html and css
files and reload the page in a web browser.
How CSS is structured - 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.
...for example, perhaps you're working with a content management system where you are blocked from modifying external css
files.
...inside the folder, copy the text below to create two
files: index.html: <!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>my css experiments</title> <link rel="stylesheet" href="styles.css"> </head> <body> <p>create your test html here</p> </body> </html> styles.css: /* create your test css here */ p { color: red; } when you find css that you want to experiment with, replace the html <body> contents w...
How do you set up a local testing server? - Learn web development
local
files vs.
... remote
files throughout most of the learning area, we tell you to just open your examples directly in a browser — this can be done by double clicking the html file, dragging and dropping it into the browser window, or choosing file > open...
... the problem with testing local
files some examples won't run if you open them as local
files.
How the Web works - Learn web development
component
files: a website is made up of many different
files, which are like the different parts of the goods you buy from the shop.
... these
files come in two main types: code
files: websites are built primarily from html, css, and javascript, though you'll meet other technologies a bit later.
...here it is", and then starts sending the website's
files to the browser as a series of small chunks called data packets (the shop gives you your goods, and you bring them back to your house).
Installing basic software - Learn web development
a version control system, to manage
files on servers, collaborate on a project with a team, share code and assets and avoid editing conflicts.
... an ftp program, used on older web hosting accounts to manage
files on servers (git is increasingly replacing ftp for this purpose).
... dealing with
files html basics css basics javascript basics publishing your website how the web works ...
The web and web standards - Learn web development
can you give me the
files i need to render bbc.co.uk"?
... "sure thing web browser — here you go" [downloads
files and renders web page] the actual syntax for http messages (called requests and responses) is not that human-readable, but this gives you the basic idea.
... minifiers, which remove all the whitespace from your code
files to make it so that they are smaller and therefore download from the server more quickly.
Responsive images - Learn web development
responsive image technologies were implemented recently to solve the problems indicated above by letting you offer the browser several image
files, either all showing the same thing but containing different numbers of pixels (resolution switching), or different images suitable for different space allocations (art direction).
... create multiple image
files of different sizes, each showing the same picture.
... resolution switching: the problem whereby you want to serve smaller image
files to narrow screen devices, as they don't need huge images like desktop displays do — and also optionally that you want to serve different resolution images to high density/low density screens.
Test your skills: Multimedia and embedding - Learn web development
add multiple sources, containing the paths to the video
files.
... the
files are called video.mp4 and video.webm, and are in a folder inside the current folder called media.
...you can write the code yourself, or use the starting point
files linked to in the above sections.
JavaScript performance - Learn web development
remove unused code split the javascript into smaller
files code-split javascript into critical and non-critical parts.
... optimize these smaller
files minification reduces the number of characters in your file, thereby reducing the number of bytes or weight of your javascript.
... battery impact conclusion while optimizing your media
files and scripts will get you very far along in terms of web performance optimization, everything that touches a web pages impacts performance.
Website security - Learn web development
while the data from post or get requests is the most common source of xss vulnerabilities, any data from the browser is potentially vulnerable, such as cookie data rendered by the browser, or user
files that are uploaded and displayed.
...the requests may simply be numerous, or they may individually consume large amounts of resource (e.g., slow reads or uploading of large
files).
...this includes, but is not limited to data in url parameters of get requests, post requests, http headers and cookies, and user-uploaded
files.
Getting started with Ember - Learn web development
as you work through this series of tutorials, you'll notice ember's opinions — such as strict naming conventions of component
files.
...ember-cli-build.js is responsible for configuring details about how your project is built — including bundling all your
files together, asset minification, and creating sourcemaps — with reasonable defaults, so you don't typically need to worry about this file.
... we will however add lines to the ember-cli-build.js file to import our shared css
files, so that they become part of our build without having to explicitly @import them into the app.css file (this would require url rewrites at build time and therefore be less efficient and more complicated to set up).
Introduction to client-side frameworks - Learn web development
all the code related to a given component can live in one file (or a couple of specific
files), so that you as a developer know exactly where to go to make changes to that component.
... modern web applications typically do not fetch and render new html
files — they load a single html shell, and continually update the dom inside it (referred to as single page apps, or spas) without navigating users to new addresses on the web.
...just as frameworks empower you to quickly write client-side javascript applications, static site generators allow you a way to quickly create html
files you would otherwise have written individually.
Browser chrome tests
since the test
files are executed in the same scope as the browser window, conflicting variable names could cause trouble while running the tests.
...
files that don't match this pattern will be ignored by the test harness.
...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].
Simple Instantbird build
having the source deep in a
filesystem hierarchy can also cause problems with pymake builds on windows.
... various temporary
files, libraries, and the instantbird executable will be found in your object directory (under comm-central/), which is prefixed with obj-.
...this will only recompile
files that changed.
Simple SeaMonkey build
if you decided on the windows 8 sdk, you also need the outlook 2010 mapi header
files from microsoft.
...even if you're on 64-bit windows, do not use the
files ending in -x64.bat.
...(moz)make will only recompile
files that changed, but it's still a long haul.
Firefox
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 pro
filesa 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 pro
files on mozilla's end-user support site.performance best practices for firefox front-end engineersthis guide will help firefox developers working on front-end code produce code which is as performant as possible—not just on its own, but in terms of its impact on other parts of firefox.
... firefox pro
files if you find yourself using multiple firefox channels—or just multiple configurations—on a regular basis, you should read how to use multiple firefox pro
files by turning firefox's profile manager and other profile management tools to your advantage.
HTTP Cache
this document only contains what cannot be found or may not be clear directly from the idl
files comments.
...dispatching to a level with a lower number is executed sooner then dispatching to higher number layers; also any loop on lower levels yields to higher levels so that scheduled deletion of 1000
files will not block opening cache entries.
... open_priority: except opening priority cache
files also file dooming happens here to prevent races read_priority: top level documents and head blocking script cache
files are open and read as the first open read: any normal priority content, such as images are open and read here write: writes are processed as last, we cache data in memory in the mean time management: level for the memory pool and cacheentry background operations close: file closing level index: index is being rebuild here evict:
files overreaching the disk space consumption limit are being evicted here note: special case for eviction - when an eviction is scheduled on the io thread, all operations pending on the open level are first merged to the open_priority level.
How to get a stacktrace with WinDbg
in the file chooser window that appears, open the firefox.exe executable in your firefox program folder (c:\program
files\mozilla firefox).
...a developer may ask you for a "minidump" or a "full memory dump", which are
files containing more information about the process.
...this is because microsoft uses internet explorer's internet & proxy settings to download the symbol
files.
PBackground
at build time the ipdl compiler automatically generates a large amount of c++ glue code from the ipdl
files.
...but some things, such as apis that need to manipulate
files or device settings (e.g.
...these are not small
files (actorsparent.cpp was over 27k lines of code as of this publication) but the logic that needs to run in the parent is very clearly separated from the dom code no matter what thread it's running on.
AddonManager
error_file_access there was an error accessing the
filesystem.
... scope_user 2 this add-on is installed somewhere specific to the current user (all pro
files of the logged-in user).
...if apath is empty then the uri to the root of the contained
files will be returned.
JavaScript OS.Constants
os.constants.path paths of well-known
files and directories.
... emfile too many open
files in the process enametoolong name too long enfile too many open
files on the system enoent no such file or directory enomem cannot allocate memory enospc no space on device enotdir is not a directory enxio device no configured or does not support operation eopnotsupp (not always available under windows)...
... exdev cross-device link opening
files unix access rights defined on all platforms but meaningful only on unix.
Examples
const {cu} = require("chrome"); const {textdecoder, textencoder, os} = cu.import("resource://gre/modules/osfile.jsm", {}); /*
files: an array of file paths */ function readtext
files(
files) { let promises = [], decoder = new textdecoder(); for (let i = 0; i <
files.length; i++) { let promise = os.file.read(
files[i]) promise = promise.then(function onsuccess(array) { return decoder.decode(array); }); promises.push(promise); } return promise.all(promises); } let folder = "/path/to/folder"; le...
...t promise = readtext
files([ os.path.join(folder, "read.me"), os.path.join(folder, "home.html") ]); promise.then( function onsuccess(
filescontent) { //
filescontent is an array of strings; each string is the content of one file.
... console.log(
filescontent); }, function onfail() { console.error("failed to load all
files"); } ); see also the ask.m.o topic: doing multiple promises in function in pareallel, how return when last done?
Using JavaScript code modules
if you're writing an extension for firefox 4 and already have a chrome.manifest with a content instruction in it, you can put the code module in your content folder and reference it like your other content
files via chrome://<yourextension>/content/<yourmodule>.jsm.
...code modules are simple javascript
files with a .js or .jsm extension.
... using chrome.manifest the easiest way for extensions and xul applications to add custom aliases is by registering an alias in the chrome manifest using a line like this: resource aliasname uri/to/
files/ for example, if the xpi for your foo extension includes a top-level modules/directory containing the bar.js module (that is, the modules/directory is a sibling to chrome.manifest and install.rdf), you could create an alias to that directory via the instruction: resource foo modules/ (don't forget the trailing slash!) you could then import the module into your javascript code via the statement: components.utils.import("resource://foo/bar.js"); programmatically addi...
JavaScript code modules
bookmarkhtmlutils.jsm provides utility functions for importing and exporting bookmarks from the old-school "bookmarks.html" style bookmark
files.
... fileutils.jsm provides helpers for dealing with
files.
... osfile.jsm allows routines to access
files.
Localization sign-off reviews
encoding some tools add bom to utf-8 encoded
files, and some change the encoding altogether.
...most bugs filed from sign-offs are caused by a tool corrupting your localization's
files.
... attach your
files to the bug.
Writing localizable code
if you want to add build processing to localized
files, be sure to request feedback from l10n@.
... use a good source directory structure be sure to put the localizable
files in the right place.
... use a good chrome directory structure for a particular module mod, a target path jar:ab-cd.jar!/locale/ab-cd/mod/foo.dtd has been widely tested and is a good place for your
files referenced as chrome://mod/locale/foo.dtd.
Investigating leaks using DMD heap scan mode
generating logs the next step is to generate a number of log
files.
... moz_disable_content_sandbox=t: this disables the content process sandbox, which is needed because the dmd and cc log
files are created directly by the child processes.
... if there are multiple
files, you'll end up with one that looks like cc-edges.$pid.log and one or more that look like cc-edges.$pid-$n.log for various values of $n.
DMD
since you cannot mark
files in /sdcard/ as executable, we will use /data/local/tmp for this purpose: adb push dmd_fennec /data/local/tmp adb shell cd /data/local/tmp chmod 755 dmd_fennec the final step is to make android use the above wrapper script while launching fennec, so that the environment variable is present when fennec starts up.
...you can analyze these
files (either gzipped or not) using dmd.py.
... dmd.py can also compute the difference between two dmd output
files, so long as those
files were produced in the same mode.
Profiling with the Gecko Profiler and Local Symbols on Windows
the profiler automatically reads symbols from the pdb
files that are generated during the build process.
... if you're building a beta or release channel version, and you want proper c++ callstacks in your pro
files, add ac_add_options --enable-profiling to your firefox .mozconfig file.
... generate the breakpad symbol
files by running ./mach buildsymbols: https://developer.mozilla.org/en/building_firefox_with_debug_symbols#breakpad_symbol_
files this will have created symbols under $objdir/dist/ , named after the binary name, architecture and version, so something like "firefox-40.0a1.en-us-win32.crashreporter-symbols.zip" point talos to this zipfile by passing its path to the --symbolspath flag.
L20n Javascript API
l20n javascript api var ctx = l20n.getcontext(); ctx.linkresource('./locales/strings.l20n'); ctx.requestlocales(); when you freeze the context by calling requestlocales, the resource
files will be retrieved, parsed and compiled.
... all io related to fetching the resource
files takes place when a context instance freezes.
...a 404 error when fetching a resource file, or recursive import statements in resource
files), context.translationerror, when there is a missing translation in one of supported locales; the context instance will try to retrieve a fallback translation from the next locale in the fallback chain, compiler.error, when l20n is unable to evaluate an entity to a string; there are two types of errors in this category: compiler.valueerror, when l20n can still try to use th...
NSPR Contributor Guide
provide descriptive documentation in your source (*.c)
files.
... alas, we have no source
files documented as we think they should be.
... generally useful platform abstractions you agree to sustain, bug fix may rely on the nspr api may not rely on any other library api new platform ports all nspr api items must be implemented platform specific headers in pr/include/md/_platformname.[h!cfg] platform specific code in pr/src/md/platform/*.c make rules in config/_platform.mk documentation the
files for nspr's documentation are maintained using a proprietary word processing system [don't ask].
NSPR Error Handling
pr_read_only_
filesystem_error attempt to write to a read-only file system.
... pr_
filesystem_mounted_error attempt to delete or rename a file object while the file system is busy.
... pr_no_more_
files_error there are no more entries in the directory.
NSS 3.12.6 release notes
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.6 requires.
...ed_record new types in sslt.h sslextensiontype new environment variables sqlite_force_proxy_locking 1 means force always use proxy, 0 means never use proxy, null means use proxy for non-local
files only.
... bug 527759: add multiple roots to nss (single patch) bug 528741: pkix_hash throws a null-argument exception on empty strings bug 530907: the peerid argument to ssl_setsockpeerid should be declared const bug 531188: decompression failure with https://livechat.merlin.pl/ bug 532417: build problem with spaces in path names bug 534943: clean up the make
files in lib/ckfw/builtins bug 534945: lib/dev does not need to include headers from lib/ckfw bug 535669: move common makefile code in if and else to the outside bug 536023: der_utctimetotime and der_generalizedtimetotime ignore all bytes after an embedded null bug 536474: add support for logging pre-master secrets bug 537356: implement new safe ssl3 & tls r...
NSS 3.35 release notes
if nss is initialized, in read-write mode with a database directory provided, it uses database
files to store certificates, key, trust, and other information.
...without a prefix, the default database type will be used (dbm in versions prior to 3.35, and sql in version 3.35 and later.) when using the sql type (either explicitly, or because of the new default), with a database directory which already contains a dbm type database, nss will automatically perform a one time migration of the information contained in the dbm
files to the newer sql
files.
... (only apis exported in *.def
files are stable apis.) new experimental functionality provided below are descriptions of experimental functionality, which might not be available in future releases of nss.
NSS Developer Tutorial
tabs are used heavily in many nss source
files.
... private headers,which may be included by
files in other directories, are in the private_exports variable.
... private headers, that are only included by
files in the same directory, are not listed in either variable.
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.
...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.
NSS tools : certutil
-d [prefix]directory specify the database directory containing the certificate and key database
files.
... add one or multiple extensions that certutil cannot encode yet, by loading their encodings from external
files.
...pqg
files are created with a separate dsa utility.
NSS tools : crlutil
-p dbprefix specify the prefix used on the nss security database
files (for example, my_cert8.db and my_key3.db).
... -d directory specify the database directory containing the certificate and key database
files.
... the nss database
files must reside in the same directory.
NSS Tools
currently, you must download the nss 3.1 source and build it to create binary
files for the nss tools.
... source, documentation, tasks/plans pk12util 1.0 import and export keys and certificates between the cert/key databases and
files in pkcs12 format.
... source, documentation, tasks/plans signtool 1.3 create digitally-signed jar archives containing
files and/or code.
NSS Tools crlutil
-p dbprefix specify the prefix used on the nss security database
files (for example, my_cert8.db and my_key3.db).
... -d directory specify the database directory containing the certificate and key database
files.
... the nss database
files must reside in the same directory.
certutil
synopsis certutil [options] arguments description the certificate database tool, certutil, is a command-line utility that can create and modify certificate and key database
files.
... -d [sql:]directory specify the database directory containing the certificate and key database
files.
...pqg
files are created with a separate dsa utility.
NSS tools : crlutil
-p dbprefix specify the prefix used on the nss security database
files (for example, my_cert8.db and my_key3.db).
... -d directory specify the database directory containing the certificate and key database
files.
... the nss database
files must reside in the same directory.
Rebranding SpiderMonkey (1.8.5)
we need to perform a recursive find and replace text operation on all
files in the current directory.
...the above command has actually changed some information we need changed back so we will re-issue the recursive find and replace text in
files command with some modifications.
...search for this text: mozjs185.pc "scroll down" a few lines until you see this line: > $@ && chmod 644 $@ that line should be modified to read back: > $brand.pc && chmod 644 $brand.pc "scroll down" a few lines until you see these lines: install:: $(pkg_config_
files) @echo pkg_config_file: $(pkg_config_
files) those two lines should be modified to read back: install:: $brand.pc @echo pkg_config_file: $brand.pc note: while it is possible to automate the manual editing process, this has been discouraged due to the fact that these
files are automatically generated and very little constant data can be depended upon.
Introduction to the JavaScript shell
load(filename1 [filename]) loads the javascript
files with the specified names.
... note: for loading non-javascript
files, use read().
...this function only works with programs loaded from
files, either using the -f flag on launching the shell, or by using the load() function.
compare-locales
ar comm-central build instructions generate: $ compare-locales ./comm-central/mail/locales/l10n.toml ./l10n/ zh-tw if you don't want to use a copy of mozilla-central in comm-central, you can run them separately: $ compare-locales -dmozilla=$pwd/mozilla-central comm-central/mail/locales/l10n.toml ./l10n/ zh-tw if you're working on multiple projects in parallel, you can also pass all the toml
files to compare-locales at once.
... to get a single result across the projects, specify the --unified flag: $ compare-locales --unified browser/locales/l10n.toml mobile/android/locales/l10n.toml ./l10n/ de cross-channel and compare-locales if you're working against the gecko-strings cross-channel repository, the toml configuration
files are in the _configs subdirectory, browser.toml, mobile_android.toml, mail.toml and calendar.toml, and suite.toml.
...the file names will be shown in a hierarchical form, so in the example above, your
files are browser.dtd in ab-cd/browser/chrome/browser and migration.dtd in another directory level deeper.
Mork
meta-dictionaries are in practice only used to change the scope of alias definitions (the '(a=c)' that you can see in
files).
...most
files will have just two dictionaries: the column scope dictionary ('c') and the value scope dictionary ('v', the default).
...for example, the message summary format
files use a table for each thread, where the meta-rows represent information about the thread in general.
Finishing the Component
copy the headers and idl
files that you need from the content/base/public source directory of the gecko build into this new directory.
...once you have these interface and header
files, you can modify the weblock class to implement the nsicontentpolicy interface.
...but it only should do this comparison for remote urls, because we don't want to block the application from loading local content that it requires, like
files it gets via the resource:// protocol.
XPCOM Stream Guide
in basic c++ programming for a console application, we usually talk about streams to access
files, or to interact with the user.
...on the other hand, we use streams to access
files within a zip archive, to store and provide data coming from websites, even to talk to other programs on the same computer through "pipes" (more on that later).
... fileutils.jsm provides apis for getting output streams for
files, with the .openfileoutputstream(file, modeflags) and .opensafefileoutputstream(file, modeflags) methods, and for closing those output streams with the .closesafefileoutputstream(inputstream) method.
Introduction to XPCOM for the DOM
next we will describe the build system, make
files, etc...
...next, we have to add nsidomfabian.idl to all the make
files of this directory.
...warning: in make
files, there is a mix of tabs and whitespaces.
NS_NewNativeLocalFile
#include "nsxpcom.h" #include "nsilocalfile.h" nsresult ns_newnativelocalfile( const nsacstring& apath, prbool afollowlinks, nsilocalfile** aresult ); parameters apath [in] a string object that specifies an absolute
filesystem path.
... this string should be encoded using ascii or the multibyte character coding corresponding to the native
filesystem.
...it is an error to pass a relative
filesystem path.
nsIAppShellService
oolean createstartupstate(in long awindowwidth, in long awindowheight); obsolete since gecko 1.8 nsixulwindow createtoplevelwindow(in nsixulwindow aparent, in nsiuri aurl, in pruint32 achromemask, in long ainitialwidth, in long ainitialheight, in nsiappshell aappshell); nsiwebnav createwindowlessbrowser (in bool aischrome) void destroyhiddenwindow(); void dopro
filestartup(in nsicmdlineservice acmdlineservice, in boolean caninteract); obsolete since gecko 1.8 void ensure1window(in nsicmdlineservice acmdlineservice); obsolete since gecko 1.8 void enterlastwindowclosingsurvivalarea(); obsolete since gecko 1.8 void exitlastwindowclosingsurvivalarea(); obsolete since gecko 1.8 void gethiddenwindowandjscontext(out nsidomwindow a...
... dopro
filestartup() obsolete since gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) starts up the profile manager with the given arguments.
... void dopro
filestartup( in nsicmdlineservice acmdlineservice, in boolean caninteract ); parameters acmdlineservice the arguments given to the program.
nsIAppStartup
to use the service: var appstartup = components.classes["@mozilla.org/toolkit/app-startup;1"] .getservice(components.interfaces.nsiappstartup); method overview void createhiddenwindow(); boolean createstartupstate(in long awindowwidth, in long awindowheight); obsolete since gecko 1.9.1 void destroyhiddenwindow(); void dopro
filestartup(in nsicmdlineservice acmdlineservice, in boolean caninteract); obsolete since gecko 1.9.1 void ensure1window(in nsicmdlineservice acmdlineservice); obsolete since gecko 1.9.1 void enterlastwindowclosingsurvivalarea(); void exitlastwindowclosingsurvivalarea(); void getstartupinfo(); void hidesplashscreen(); obsolete since gecko 1.9.1 voi...
... dopro
filestartup() obsolete since gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) starts up the profile manager with the given arguments.
... void dopro
filestartup( in nsicmdlineservice acmdlineservice, in boolean caninteract ); parameters acmdlineservice the arguments given to the program.
nsIDirectoryServiceProvider2
xpcom/io/nsidirectoryservice.idlscriptable an extension of nsidirectoryserviceprovider which allows multiple
files to be returned for the given key.
... inherits from: nsidirectoryserviceprovider last changed in gecko 0.9.6 method overview nsisimpleenumerator get
files(in string prop); methods get
files() the directory service calls this when it gets a request for a prop and the requested type is nsisimpleenumerator.
... nsisimpleenumerator get
files( in string prop ); parameters prop the symbolic name of the file list.
nsIINIParserWriter
1.0 66 introduced gecko 1.9.2 inherits from: nsisupports last changed in gecko 13.0 (firefox 13.0 / thunderbird 13.0 / seamonkey 2.10) this interface provides methods that allow writing to ini-format configuration
files.
... ini
files contain zero or more sections, denoted by a name in square brackets, followed by zero or more lines of text with a property name on the left, then an equals sign ("="), then the value of the property.
... constant value description write_utf16 0x1 windows and the nsis installer code sometimes expect ini
files to be in utf-16 encoding.
nsILocalFile
exceptions thrown ns_error_file_unrecognized_path indicates that filepath is not an absolute file path or that it contains characters that are invalid for the
filesystem.
... exceptions thrown ns_error_file_unrecognized_path indicates that filepath is not an absolute file path or that it contains characters that are invalid for the
filesystem.
...that means, you cannot deal with
files whose name contain characters outside the default code page on windows even though windows 2000 or later has no problem with them.
nsILocalFileMac
void initwithfsspec([const] in fsspecptr a
filespec); native code only!
...
filesizewithresfork print64 returns the combined size of both the data fork and the resource fork (if present) rather than just the size of the data fork as returned by get
filesize() read only.
...void initwithfsspec( [const] in fsspecptr a
filespec ); parameters a
filespec the native file spec.
nsIWindowsShellService
inherits from: nsishellservice last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview string getregistryentry(in long ahkeyconstant, in string asubkeyname, in string avaluename); obsolete since gecko 1.8 void restore
filesettings(in boolean aforallusers); obsolete since gecko 1.9 void shortcutmaintenance(); attributes attribute type description desktopbackgroundcolor unsigned long the desktop background color, visible when no background image is used, or if the background image is centered and does not fill the entire screen.
... restore
filesettings() obsolete since gecko 1.9 (firefox 3) restores system settings to what they were before firefox modified them.
... void restore
filesettings( in boolean aforallusers ); parameters aforallusers whether or not firefox should restore settings for all users on a multi-user system.
Troubleshooting XPCOM components registration
set nspr_log_modules=nsnativemoduleloader:5 set nspr_log_file=c:\path\to\logfile "c:\program
files\mozilla firefox\firefox.exe" examining this log for warning and errors may provide valuable clues why the component failed to load.
... note that even your version of msvc may matter; your test machine may not have the c runtime libraries (msvcr70.dll / msvcp70.dll for msvc 7.0, and similarly named
files for 7.1 and 8.0) available.
...it may then be necessary for the stub to locate the newer runtime libraries for the other
files it loads.
Xptcall Porting Guide
inline assembly language is used here, but it is equally valid to use separate assembly language source
files.
...these '.inc'
files are checked into cvs.
...i believe that the non-assembly parts of these
files can be copied and reused with minimal (but not zero) platform specific tweaks.
Xptcall Porting Status
notice the last 2
files (the change to mozilla\xpcom\build\makefile.win and mozilla\xpcom\build) are needed because i was unable to figure how to do a "declspecexport" from the assembler asaxp ...
... if some knows how to do that then those last 2
files won't be needed.
...this code lives in the
files where the name includes 'alpha' in the win32 directory.
pyxpidl
the pyxpidl tool suite has been built to replace the older xpidl tool which, in the past, was used to turn xpidl
files into c++ headers and xpcom typelibs (xpt
files).
...unlike xpidl, which combined all the functions into a single utility, pyxpidl is comprised of two utilities: header.py, which generates c++ headers from idl, and typelib.py, which generates xpt
files.
... generating c++ headers to generate c++ headers, use the header.py utility: sdkdir/sdk/bin/header.py --cachedir=<path> -o <outputfilename.h> <filename.idl> generating typelibs generating typelib
files is done using the typelib.py utility: sdkdir/sdk/bin/typelib.py --cachedir=<path> -o <outputfilename.xpt> <filename.idl> comparing pyxpidl to xpidl this table provides a mapping of old xpidl options to pyxpidl.
nsIMsgCloudFileProvider
remaining
filespace long long readonly: the remaining storage space available for this account in bytes.
...
filespaceused long long readonly: the total amount of space used by this account.
...this might change in the future, but as it stands, this function can simply return ns_error_not_implemented unless there are plans to call createnewaccount from the management or settings xhtml
files.
Filelink Providers
nsimsgcloudfileprovider note: cloud
files and big
files were the two temporary feature names that were used while filelink was under construction.
...see cloudfile/cloudfilecomponents.manifest for an example, as well as this document on chrome.manifest
files.
... once this is done, the field is accessible from within the implementation via the preferences api using the key mail.cloud_
files.accounts.account_key.username where account_key is the value passed into the implementations init function.
Main Windows
as such, i've always thought it would be nice to have a list of what xul, js, or other
files are that are here, what they do, and where they overlay at different points within the client.
... customizetoolbar.xul and customizetoolbarsheet.xul these are two old
files from when the original customizable toolbars were ported from firefox (phoenix at the time) to thunderbird (minotaur at the time).
...at compile time these
files are added to the toolkit directory so that their chrome addresses are in global, the same as firefox’s.
WebIDL bindings
all webidl
files should be placed in dom/webidl and added to the list in the moz.build file in that directory.
...this will produce two
files in dom/bindings in your objdir: myinterface-example.h and myinterface-example.cpp, which show a basic implementation of the interface using a class that inherits from nsisupports and has a wrapper cache.
... events simple event interfaces can be automatically generated by adding the interface file to generated_events_webidl_
files in the appropriate dom/webidl/moz.build file.
Standard OS Libraries
you just need to supply the path to appropriate
files and set up the proper types of values/arguments in the js-ctypes code.
... on linux, libraries will be typically found as .so
files.
... ctypes.void_t, cgeventref); let event = cgeventcreate(null); let cursor = cgeventgetlocation(event); cfrelease(event); components.utils.reporterror(cursor); coregraphics.close(); corefoundation.close(); resources for core foundation github :: philikon - osxtypes - javascript modules are auto-generated from the os x header
files githubgists :: noitidart / search · corefoundation - corefoundation js-ctypes snippets that can be copied and pasted to scratchpad cocoa see using objective-c from js-ctypes for more info.
ctypes.open
see: http://stackoverflow.com/questions/19382201/how-to-load-dll-from-sdk-addon-data-folder it is important to note that custom native
files cannot be loaded through chrome:// or resource:// uris.
...ents.classes['@mozilla.org/chrome/chrome-registry;1'].getservice(components.interfaces.nsichromeregistry); var chromeuri_mylib = services.io.newuri('chrome://youraddon/content/mysubfolder/mycfunctionsforunix.so', 'utf-8', null); var localfile_mylib = cr.convertchromeurl(chromeuri_mylib); var jarpath_mylib = localfile_mylib.spec; // "jar:file:///c:/users/vayeate/appdata/roaming/mozilla/firefox/pro
files/aecgxse.unnamed%20profile%201/extensions/youraddon@jetpack.xpi!/mysubfolder/mycfunctionsforunix.so" var filepath_mylib = localfilemylib.path; // "file:///c:/users/vayeate/appdata/roaming/mozilla/firefox/pro
files/aecgxse.unnamed%20profile%201/extensions/youraddon@jetpack.xpi!/mysubfolder/mycfunctionsforunix.so" if your add-on is a bootstrap add-on, then you don't need to use this method to conve...
...if addon is packed, this will be addon xpi } this can then be joined with your file name to obtain it's path like this: function startup(adata, areason) { var jarpath_folder = 'jar:' + os.path.tofileuri(adata.installpath.path) + '!/'; // if unpacked is false in install.rdf this will look like: "jar:file:///c:/users/vayeate/appdata/roaming/mozilla/firefox/pro
files/aksozfjt.unnamed%20profile%2010/extensions/asynczip@jetpack!/" var filepath_folder = adata.installpath.path; // if unpacked is set to false in install.rdf this will look like: "c:\users\vayeate\appdata\roaming\mozilla\firefox\pro
files\aksozfjt.unnamed profile 10\extensions\asynczip@jetpack" var filepath_mylib = os.path.join(filepath_folder, 'mysubfolder', 'mycfunctionsforunix.so'); v...
Plug-in Basics - Plugins
if you are browsing a page that has several embedded realaudio clips, for example, the browser will create as many instances of the realplayer plug-in as are needed (though of course playing several realaudio
files at the same time would seldom be a good idea).
... the plug-in file type depends on the platform: ms windows: .dll (dynamic link library)
files unix: .so or .dso (shared objects)
files mac os x: ppc/x86/universal loadable mach-o bundle windowed and windowless plug-ins you can write plug-ins that are drawn in their own native windows or frames on a web page.
...the basic operations of the browser, such as navigation, history, and opening
files, apply to all pages, regardless of the plug-ins in use.
Index - Firefox Developer Tools
the source pane will display a list of all matching
files as you type.
... 137 source map errors debugger, debugging, dev tools, reference, source maps, tools source maps are json
files providing a way to associate transformed sources, as seen by the browser, with their original sources, as written by the developer.
...it’s also possible to inspect variables from the generated scopes (e.g., a bundle file with all concatenated module
files).
Blob.type - Web APIs
example this example asks the user to select a number of
files, then checks each file to make sure it's one of a given set of image file types.
... var i, fileinput,
files, allowedfiletypes; // fileinput is a htmlinputelement: <input type="file" multiple id="myfileinput"> fileinput = document.getelementbyid("myfileinput"); //
files is a filelist object (simliar to nodelist)
files = fileinput.
files; // our application only allows gif, png, and jpeg images allowedfiletypes = ["image/png", "image/jpeg", "image/gif"]; for (i = 0; i <
files.length; i++) { // test if file.type is an allowed file type.
... if (allowedfiletypes.indexof(
files[i].type) > -1) { // file type matched is one of allowed file types.
Pixel manipulation with canvas - Web APIs
<canvas id="canvas" width="300" height="227" style="float:left"></canvas> <div id="color" style="width:200px;height:50px;float:left"></div> var img = new image(); img.src = 'https://mdn.mozillademos.org/
files/5397/rhino.jpg'; var canvas = document.getelementbyid('canvas'); var ctx = canvas.getcontext('2d'); img.onload = function() { ctx.drawimage(img, 0, 0); img.style.display = 'none'; }; var color = document.getelementbyid('color'); function pick(event) { var x = event.layerx; var y = event.layery; var pixel = ctx.getimagedata(x, y, 1, 1); var data = pixel.data; var rgba = 'rgba(' + dat...
... <canvas id="canvas" width="300" height="227"></canvas> <div> <input id="grayscalebtn" value="grayscale" type="button"> <input id="invertbtn" value="invert" type="button"> </div> var img = new image(); img.src = 'https://mdn.mozillademos.org/
files/5397/rhino.jpg'; img.onload = function() { draw(this); }; function draw(img) { var canvas = document.getelementbyid('canvas'); var ctx = canvas.getcontext('2d'); ctx.drawimage(img, 0, 0); img.style.display = 'none'; var imagedata = ctx.getimagedata(0, 0, canvas.width, canvas.height); var data = imagedata.data; var invert = function() { for (var i = 0; i < data.length; i += 4...
... zoom example <canvas id="canvas" width="300" height="227"></canvas> <canvas id="zoom" width="300" height="227"></canvas> <div> <label for="smoothbtn"> <input type="checkbox" name="smoothbtn" checked="checked" id="smoothbtn"> enable image smoothing </label> </div> var img = new image(); img.src = 'https://mdn.mozillademos.org/
files/5397/rhino.jpg'; img.onload = function() { draw(this); }; function draw(img) { var canvas = document.getelementbyid('canvas'); var ctx = canvas.getcontext('2d'); ctx.drawimage(img, 0, 0); img.style.display = 'none'; var zoomctx = document.getelementbyid('zoom').getcontext('2d'); var smoothbtn = document.getelementbyid('smoothbtn'); var togglesmoothing = function(event) { zoo...
Using Fetch - Web APIs
const data = { username: 'example' }; fetch('https://example.com/profile', { method: 'post', // or 'put' headers: { 'content-type': 'application/json', }, body: json.stringify(data), }) .then(response => response.json()) .then(data => { console.log('success:', data); }) .catch((error) => { console.error('error:', error); }); uploading a file
files can be uploaded using an html <input type="file" /> input element, formdata() and fetch().
... const formdata = new formdata(); const filefield = document.queryselector('input[type="file"]'); formdata.append('username', 'abc123'); formdata.append('avatar', filefield.
files[0]); fetch('https://example.com/profile/avatar', { method: 'put', body: formdata }) .then(response => response.json()) .then(result => { console.log('success:', result); }) .catch(error => { console.error('error:', error); }); uploading multiple
files files can be uploaded using an html <input type="file" multiple /> input element, formdata() and fetch().
... const formdata = new formdata(); const photos = document.queryselector('input[type="file"][multiple]'); formdata.append('title', 'my vegas vacation'); for (let i = 0; i < photos.
files.length; i++) { formdata.append('photos', photos.
files[i]); } fetch('https://example.com/posts', { method: 'post', body: formdata, }) .then(response => response.json()) .then(result => { console.log('success:', result); }) .catch(error => { console.error('error:', error); }); processing a text file line by line the chunks that are read from a response are not broken neatly at line boundaries and are uint8arrays, not strings.
HTML Drag and Drop API - Web APIs
these are convenience functions to help with dragging multiple items or non-string data (such as
files).
... function dragstart_handler(ev) { // add different types of drag data ev.datatransfer.setdata("text/plain", ev.target.innertext); ev.datatransfer.setdata("text/html", ev.target.outerhtml); ev.datatransfer.setdata("text/uri-list", ev.target.ownerdocument.location.href); } for a list of common data types used in drag-and-drop (such as text, html, links, and
files), see recommended drag types.
... examples and demos copying and moving elements with the datatransfer interface copying and moving elements with the datatransferlistitem interface dragging and dropping
files (firefox only): http://jsfiddle.net/9c2ef/ dragging and dropping
files (all browsers): https://jsbin.com/hiqasek/ a parking project using the drag and drop api: https://park.glitch.me/ (you can edit here) specifications specification status comment html living standard living standard see also drag operations dragging and dropping multiple i...
install - Web APIs
summary installs one or more xpi
files on the local machine.
... method of installtrigger object syntax int install(array xpilist [, function callbackfunc ] ) parameters the install method has the following parameters: xpilist an array of
files to be installed (see example below).
... as with the older startsoftwareupdate method, xpis installed with this method must have their own install.js
files in which the full installation is defined.
Transcoding assets for Media Source Extensions - Web APIs
getting started the first and most important step is to ensure that your
files are comprised of a container and codec that users' browsers support.
...most dash clients expect a corresponding media presentation description (mpd) manifest file, which is typically generated while generating the multiple resolution asset
files.
...to install, you'll need to build/compile the application yourself from the provided project
files/source
files, depending on your os and preferences.
Web Video Text Tracks Format (WebVTT) - Web APIs
the primary purpose of webvtt
files is to add text overlays to a <video>.
... webvtt
files the mime type of webvtt is text/vtt.
...it works in similar manner in webvtt
files as it works in html file.
ARIA Test Cases - Accessibility
reference to link example note regarding dojo/dijit test
files the main purpose of dojo's dijit test
files are for dojo developers to exercise and debug the code.
...these test
files are not specifically for testing aria.
... still, dojo's widgets implement aria, and the noted test
files could be used as an "aria test file".
-moz-image-rect - CSS: Cascading Style Sheets
#box1 { background-image: -moz-image-rect(url(https://mdn.mozillademos.org/
files/12053/firefox.png), 0%, 50%, 50%, 0%); width:133px; height:136px; position:absolute; } this is the top-left corner of the image.
... #box2 { background-image: -moz-image-rect(url(https://mdn.mozillademos.org/
files/12053/firefox.png), 0%, 100%, 50%, 50%); width:133px; height:136px; position:absolute; } this defines the top-right corner of the image.
... the other corners follow a similar pattern: #box3 { background-image: -moz-image-rect(url(https://mdn.mozillademos.org/
files/12053/firefox.png), 50%, 50%, 100%, 0%); width:133px; height:136px; position:absolute; } #box4 { background-image: -moz-image-rect(url(https://mdn.mozillademos.org/
files/12053/firefox.png), 50%, 100%, 100%, 50%); width:133px; height:136px; position:absolute; } html the html is quite simple: <div id="container" onclick="rotate()"> <div id="box1" style="left:0px;top:0px;">top left</div> <div id="box2" style="left:133px;top:0px;">top right</div> <div id="box3" style="left:0px;top:136px;">bottom left</div> <div id="box4" style="left:133px;top:136px;">bottom right</div> </div> this places the four segments of our image in a two-by-two box grid.
image() - CSS: Cascading Style Sheets
examples directionally-sensitive images <ul> <li dir="ltr">bullet is a right facing arrow on the left</li> <li dir="rtl">bullet is the same arrow, flipped to point left.</li> </ul> ul { list-style-image: image(ltr 'https://mdn.mozillademos.org/
files/16412/rightarrow.png'); } in the left-to-right list items — those with dir="ltr" set on the element itself or inheriting the directionality from an ancestor or default value for the page — the image will be used as-is.
...what cursor do you see?</div> .box:hover { cursor: image("https://mdn.mozillademos.org/
files/16411/sprite.png#xywh=32,64,16,16"); } when the user hovers over the box, the cursor will change to display the 16x16 px section of the sprite image, starting at x=32 and y=64.
... putting color on top of a background image .quarterlogo {height: 200px; width: 200px; border: 1px solid;} .quarterlogo { background-image: image(rgba(0, 0, 0, 0.25)), url("https://mdn.mozillademos.org/
files/12053/firefox.png"); background-size: 25%; background-repeat: no-repeat; } <div class="quarterlogo">if supported, a quarter of this div has a darkened logo</div> the above will put a semi-transparent black mask over the firefox logo background image.
url() - CSS: Cascading Style Sheets
/* simple usage */ url(https://example.com/images/myimg.jpg); url(data:image/png;base64,irxvb0…); url(myfont.woff); url(#idofsvgpath); /* associated properties */ background-image: url("https://mdn.mozillademos.org/
files/16761/star.gif"); list-style-image: url('../images/bullet.jpg'); content: url("pdficon.jpg"); cursor: url(mycursor.cur); border-image-source: url(/media/diamonds.png); src: url('fantasticfont.woff'); offset-path: url(#path); mask-image: url("masks.svg#mask1"); /* properties with fallbacks */ cursor: url(pointer.cur), pointer; /* associated short-hand properties */ background: url('https://mdn.m...
...ozillademos.org/
files/16761/star.gif') bottom right repeat-x blue; border-image: url("/media/diamonds.png") 30 fill / 30px / 30px space; /* as a parameter in another css function */ background-image: cross-fade(20% url(first.png), url(second.png)); mask-image: image(url(mask.png), skyblue, linear-gradient(rgba(0, 0, 0, 1.0), transparent); /* as part of a non-shorthand multiple value */ content: url(star.svg) url(star.svg) url(star.svg) url(star.svg) url(star.svg); /* at-rules */ @document url("https://www.example.com/") { ...
... formal syntax url( <string> <url-modifier>* ) examples content property html <ul> <li>item 1</li> <li>item 2</li> <li>item 3</li> </ul> css li::after { content: ' - ' url(https://mdn.mozillademos.org/
files/16761/star.gif); } result data-uri html <div class="background"></div> css .background { height: 100vh; } .background { background: yellow; background: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='90' height='45'%3e%3cpath d='m10 10h60' stroke='%2300f' stroke-width='5'/%3e%3cpath d='m10 20h60' stroke='%230f0' stroke-width='5'/%3e%3cpath d='m10 30h60' ...
Getting Started - Developer guides
it can send and receive information in various formats, including json, xml, html, and text
files.
...also, the html, xml and php
files should be placed in the same directory.
...ed data.'); let xhr = new xmlhttprequest(); xhr.open("get", "time-log.txt", true); xhr.onload = function() { updatedisplay(xhr.response); } xhr.send(); } function updatedisplay(text) { fulldata.textcontent = text; let timearray = text.split('\n'); // included because some file systems always include a blank line at the end of text
files.
<a>: The Anchor element - HTML: Hypertext Markup Language
the html <a> element (or anchor element), with its href attribute, creates a hyperlink to web pages,
files, email addresses, locations in the same page, or anything else a url can address.
...
filesystems may forbid other characters in filenames, so browsers will adjust the suggested name if necessary.
...links are not restricted to http-based urls — they can use any url scheme supported by browsers: sections of a page with fragment urls pieces of media
files with media fragments telephone numbers with tel: urls email addresses with mailto: urls while web browsers may not support other url schemes, web sites can with registerprotocolhandler() hreflang hints at the human language of the linked url.
Common MIME types - HTTP
two primary mime types are important for the role of default types: text/plain is the default value for textual
files.
...browsers pay a particular care when manipulating these
files, attempting to safeguard the user to prevent dangerous behaviors.
...this table lists some important mime types for the web: extension kind of document mime type .aac aac audio audio/aac .abw abiword document application/x-abiword .arc archive document (multiple
files embedded) application/x-freearc .avi avi: audio video interleave video/x-msvideo .azw amazon kindle ebook format application/vnd.amazon.ebook .bin any kind of binary data application/octet-stream .bmp windows os/2 bitmap graphics image/bmp .bz bzip archive application/x-bzip .bz2 bzip2 archive application/x-bzip2 .csh c-shell scri...
Authoring MathML - MathML
pros: this is very easy setup: only a few javascript and css
files to upload and/or a link to add to your document header.
...the installation is similar: download and copy the relevant javascript and css
files on your web site and reference them in your page header (see the copy-me.html file from the zip archive for an example).
...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 ...
Digital audio concepts - Web media technologies
most audio
files use 16-bit signed integers for each sample, but others use 32-bit floating-point values or 24-bit or 32-bit integers.
... while recording or generating multi-channel audio
files, the channels are assembled into a series of audio frames, each consisting of one sample for each of the audio's channels.
... some codecs offer special pro
files which are specifically intended for particular usage scenarios, such as voip; these pro
files may also include by default restrictions to the audio frequency bandwidth.
Progressive loading - Progressive web apps (PWAs)
to fix that we can, for example, add defer to javascript
files: <script src="app.js" defer></script> they will be downloaded and executed after the document itself has been parsed, so it won't block rendering the html structure.
... we can also split css
files and add media types to them: <link rel="stylesheet" href="style.css"> <link rel="stylesheet" href="print.css" media="print"> this will tell the browser to load them only when the condition is met.
... conclusion less
files to load initially, smaller
files split into modules, use of placeholders, and loading more content on demand — this will help achieve faster initial load times, which brings benefits to the app creator and offers a smoother experience to the user.
SVG documentation index - SVG: Scalable Vector Graphics
289 tools for svg intermediate, needsupdate, svg, tools now that we covered the basics of the svg internals, we will take a look at some tools to work with svg
files.
... 294 <a> element, reference, svg, svg container the <a> svg element creates a hyperlink to other web pages,
files, locations in the same page, email addresses, or any other url.
...it can display raster image
files or other svg
files.
Namespaces crash course - SVG: Scalable Vector Graphics
the fact that doctype declarations (usually) match the content in single content type
files is merely coincidental.
...age> element using script: var svg_ns = 'http://www.w3.org/2000/svg'; var xlink_ns = 'http://www.w3.org/1999/xlink'; var image = document.createelementns(svg_ns, 'image'); image.setattributens(null, 'width', '100'); image.setattributens(null, 'height', '100'); image.setattributens(xlink_ns, 'xlink:href', 'flower.png'); conclusion make sure you always declare the namespaces you use in your xml
files.
...it's a good idea to use a template that includes all the commonly used namespace declarations when creating new svg
files.
Subresource Integrity - Web security
how subresource integrity helps using content delivery networks (cdns) to host
files such as scripts and stylesheets that are shared among multiple sites can improve site performance and conserve bandwidth.
... however, using cdns also comes with a risk, in that if an attacker gains control of a cdn, the attacker can inject arbitrary malicious content into
files on the cdn (or replace the
files completely) and thus can also potentially attack all sites that fetch
files from that cdn.
... subresource integrity enables you to mitigate some risks of attacks such as this, by ensuring that the
files your web application or web document fetches (from a cdn or anywhere) have been delivered without a third-party having injected any additional content into those
files — and without any other changes of any kind at all having been made to those
files.
Content Scripts - Archive of obsolete content
low-level apis, but can't access web content directly content scripts can't use the sdk's apis (no access to globals exports, require) but can access web content sdk apis that use content scripts, like page-mod and tabs, provide functions that enable the add-on's main code to load content scripts into web pages content scripts can be loaded in as strings, but are more often stored as separate
files under the add-on's "data" directory.
...so to emit a message from a content script: self.port.emit("mycontentscriptmessage", mycontentscriptmessagepayload); to receive a message from the add-on code: self.port.on("myaddonmessage", function(myaddonmessagepayload) { // handle the message }); note that the global self object is completely different from the self module, which provides an api for an add-on to access its data
files and id.
Two Types of Scripts - Archive of obsolete content
content scripts may be supplied as literal strings or maintained in separate
files and referenced by filename.
... if they are stored in separate
files you should store them under the data directory under your add-on's root.
page-worker - Archive of obsolete content
in your own add-ons, you will probably want to create your content scripts in separate
files and pass their urls using the contentscriptfile property.
... scripting trusted page content we've already seen that you can package html
files in your add-on's data directory and load them using page-worker.
system - Archive of obsolete content
for the full list of "special" directories and their ids, see "getting_
files in special directories".
... for example: // get firefox profile path var profilepath = require('sdk/system').pathfor('profd'); // get os temp
files directory (/tmp) var temps = require('sdk/system').pathfor('tmpd'); // get os desktop path for an active user (~/desktop on linux // or c:\documents and settings\username\desktop on windows).
ui - Archive of obsolete content
this document can refer to bundled css and javascript
files, and your main add-on can communicate with a frame script using message passing.
...this document can refer to bundled css and javascript
files, and your main add-on can communicate with a frame script using message passing.
platform/xpcom - Archive of obsolete content
autoregister(path) register a component (.manifest) file or all component
files in a directory.
... parameters path : string path to a component file to be registered or a directory containing component
files to be registered.
Storing annotations - Archive of obsolete content
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.
Display a Popup - Archive of obsolete content
the add-on consists of seven
files: package.json: created when you run jpm init index.js: the main add-on code, that creates the button and panel get-text.js: the content script that interacts with the panel content text-entry.html: the panel content itself, specified as html icon-16.png, icon-32.png, and icon-64.png: icons for the button in three different sizes the "index.js" looks like this: var data = require("sdk/se...
... textarea.focus(); }); finally, the "text-entry.html" file defines the <textarea> element: <html> <head> <style type="text/css" media="all"> textarea { margin: 10px; } body { background-color: gray; } </style> </head> <body> <textarea rows="13" cols="33" id="edit-box"></textarea> </body> </html> finally, save these three icon
files to the "data" directory: icon-16.png icon-32.png icon-64.png try it out: "index.js" is saved in the top level, and the other five
files go in your add-on's data directory: my-addon/ data/ get-text.js icon-16.png icon-32.png icon-64.png text-entry.html index.js run the add-on, click the button, and yo...
Getting Started (jpm) - Archive of obsolete content
next, create a directory called "data" in your add-on's root, mkdir data and save these three icon
files to the "data" directory: icon-16.png icon-32.png icon-64.png back at the command prompt, type: jpm run this is the jpm command to run a new instance of firefox with your add-on installed.
...you can distribute xpi
files yourself or publish them to https://addons.mozilla.org so other users can download and install them.
Drag & Drop - Archive of obsolete content
dropping
files onto an xul application it's possible to setup drag and drop events to handle dropping
files from external applications or os file managers onto your xul-based application.
...next, setup the handlers so that
files can be dropped on the application: function _dragover(aevent) { var dragservice = components.classes["@mozilla.org/widget/dragservice;1"].getservice(components.interfaces.nsidragservice); var dragsession = dragservice.getcurrentsession(); var supported = dragsession.isdataflavorsupported("text/x-moz-url"); if (!supported) supported = dragsession.isdataflavorsupported("application/x-moz-file"); if (supported) dragsession.candrop = true; } function _dragdrop(aevent) { var dragservice = components.classe...
Preferences - Archive of obsolete content
ibpref, but it's equivalent) where the default values are read from all mozilla-based applications read (application directory)/defaults/preferences/*.js in addition to that, recent versions of toolkit applications (firefox 1.0, thunderbird 1.0, and the like but not the mozilla suite) read extension defaults -- usually located in (profile folder)/extensions/(id)/defaults/preferences/ these
files use simple javascript-like syntax.
... to add a default value for a preference, you should add a line like this to your default preferences file: pref("extensions.extensionname.preferencename", false); how to install an extension's defaults
files for mozilla suite (not firefox and thunderbird), copy them to (appdir)/defaults/pref in your install script.
Code snippets - Archive of obsolete content
xml file i/o code used to read, write and process
files drag & drop code used to setup and handle drag and drop events dialogs code used to display and process dialog boxes alerts and notifications modal and non-modal ways to notify users preferences code used to read, write, and modify preferences js xpcom code used to define and call xpcom components in javascript running applications code used to run other applications <canvas> relate...
... downloading
files code to download
files, images, and to monitor download progress password manager code used to read and write passwords to/from the integrated password manager bookmarks code used to read and write bookmarks javascript debugger service code used to interact with the javascript debugger service svg general general information and utilities svg animation animate svg using javascript ...
Displaying web content in an extension without security issues - Archive of obsolete content
the issue that is commonly overlooked here is that the rss feed could contain some malicious javascript code and it would then execute with the privileges of the extension — meaning that it would get full access to the browser (cookies, history etc) and to user’s
files.
...for example, "chrome://foo/content/foo.xhtml" will have full privileges, "http://example.com/foo.xhtml" will be allowed to access example.com, "file:///c:/foo.xhtml" will be allowed to read
files from disk (with some restrictions).
Migrating from Internal Linkage to Frozen Linkage - Archive of obsolete content
instead of passing getter_copies(astring) to a method expecting a character pointer out parameter, you will need to use a temporary variable and copy the result.missing headers some headers are included from idl
files only when mozilla_internal_api is defined (actually, they shouldn't be there at all).
...in order to use this interface in your code, you will need to get the idl
files from the source (via cvs, from a tarball, or using lxr).
Appendix A: Add-on Performance - Archive of obsolete content
this is evident when opening a firefox profile that has many add-ons installed; some pro
files can take minutes to load, which is a serious inconvenience for users that gives them a negative view of firefox.
...most add-ons use the load event handler in the main overlay to initialize their objects and sometimes read
files or even fetch remote data.
Add-ons - Archive of obsolete content
extensions use a directory structure which can provide chrome, components, and other
files to extend the functionality of an xul program.
...well, xul overlays and windows, jsm
files, chrome & resource mappings with localization, default preferences, but no xpcom components of your own.
List of Mozilla-Based Applications - Archive of obsolete content
est version of ibm lotus notes and sametime can embed xul applications lucidor e-book reader lx-office accounting tool looks like it makes at least some use of xul maavis simple ui & communications for accessibility framework designed for elderly people with dementia but other applications mac os x operating system makes use of some mpl
files such as libsecurity_asn1 maemo browser browser for maemo internet tablet development name is microb magooclient business process management tool uses mozilla rhino mantra security tool mccoy secure update tool for add-ons xulrunner application mediacoder media converter transcoder for video, audio, and even devices such a...
...d on songbird quickstaf gui client for software testing automation framework uses xulrunner qutecom phone software previously named openwengo redcar text editor seems to use xulrunner red hat directory server server product uses nss red hat certificate system server product uses nss regex renamer tool to rename
files sameplace im client scenari platform application suite for designing publishing chains script it android development platform uses mozilla rhino, develop directly on your android device seamonkey suite a volunteer community legally backed by mozilla foundation with 2.5 million downloads secure browser browser that uses ...
Using content preferences - Archive of obsolete content
browser.zoom.sitespecific toolkit.zoommanager.zoomvalues zoom.maxpercent and zoom.minpercent browser.download.lastdir path of a
filesystem directory related about:config preferences: browser.download.lastdir the last directory for any site use downloadlastdir.jsm for access to these preferences.
... browser.upload.lastdir path of a
filesystem directory this preference is stored and retrieved automatically by file upload controls.
ActiveX Control for Hosting Netscape Plug-ins in IE - Archive of obsolete content
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.
... package it there is a subdirectory named cab/ which contains a script and a readme.txt for producing your own signed cab
files.
Kill the XUL.mfl file for good - Archive of obsolete content
this is meant to speed up the operation of mozilla, however in a
fileserver based environment, this can be problematic: at several megabytes a pop, these
files will take up a considerable amount of space, because each user has his own...
... loading these
files from the server, and storing them back slows down the network, thus it may actually be faster without than with xul.mfl occasionnally gets corrupted, needing a manual intervention to wipe it out, before mozilla again works correctly.
Creating a Release Tag - Archive of obsolete content
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.
...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.
Download Manager improvements in Firefox 3 - Archive of obsolete content
download manager interfaces nsidownloadmanager gives applications and extensions access to the download manager, allowing them to add and remove
files to the download list, retrieve information about past and present downloads, and request notifications as to the progress of downloads.
... nsidownload describes a file in the download queue; these
files may currently be queued for download, actively being downloaded, or finished being downloaded.
Drag and Drop - Archive of obsolete content
for example, dragging
files to other directories, or dragging an icon to another window to open the document it refers to.
...an array is used because you might want to drag several objects at once, such as a set of
files.
Embedding Mozilla in a Java Application using JavaXPCOM - Archive of obsolete content
it implements the iappfilelocprovider interface, and tells xpcom where to find certain
files and directories.
... } else if (aprop.equals("mozbind") || aprop.equals("curprocd") || aprop.equals("comsd") || aprop.equals("profd")) { file = libxulpath; if (aprop.equals("comsd")) { file = new file(file, "components"); } } return file; } public file[] get
files(string aprop) { file[]
files = null; if (aprop.equals("apluginsdl")) {
files = new file[1];
files[0] = new file(libxulpath, "plugins"); } return
files; } } calling xpcom ui from another thread appstartup.run() enters the main event loop and will stay there until the application exits.
Isp Data - Archive of obsolete content
introduction these
files allow for adding to the new account wizard a new option, and help with, among other things, deployment of custom thunderbird.
... tools needed the
files are simple text
files, in utf-8 encoding, so use your favorite modern text editor.
Makefile.mozextension.2 - Archive of obsolete content
ame=testworld #~ project_id={xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx} project_id=test@testworld.ext project_version=1.0 project_desc="a $(project_name) project with advanced features" project_author=author name # mkdir=$(shell which mkdir) mkdir=/bin/mkdir zipprog=/usr/bin/zip shell = /bin/sh noop = $(shell) -c true noecho = @ rm_rf=rm -f cp=/bin/cp -i .phony: all all :: make_structure make_
files $(noecho) $(noop) package:: make_xpi $(noecho) $(noop) #install :: make_xpi make_install # $(noecho) $(noop) clean :: make_clean $(noecho) $(noop) make_structure: @$(mkdir) $(project) || { echo "creating directory failed; it probably exists.
... make_
files: chrome.manifest install.rdf overlay.xul overlay.js overlay.dtd $(noecho) $(noop) make_clean: rm -rf $(project) # this may be a bit too old ?!
Prism - Archive of obsolete content
prism supports a simple styling system that allows the user to add css
files to the webapp bundle.
...using configuration
files and webapp scripting, the host window can be modified.
Priority Content - Archive of obsolete content
keller mostly completed*: rich-text editing in mozilla 1.3 "mostly completed" means i'm waiting for a location to store example and source
files which are required for demoing the information in the articles.
... migrators: joel coreson note: the article links some external example
files, not sure how to migrate them (perhaps via "upload file" function that's normally used for images?) also check if any extra
files live in the article's directory --jens.b 14:07, 26 apr 2005 (pdt) dependant on: mostly completed*: class xbdesignmode / devedge - joel coreson please put completed articles on the devedge page instead.
Hacking wiki - Archive of obsolete content
for anonymous access use: svn co http://svn.mozilla.org/projects/deve...lla.org/trunk/ to see the skins properly, you'll need to also check out <tt>mozilla-org/css</tt> to get the css
files needed: export cvsroot=:pserver:anonymous@cvs-mirror.mozilla.org:/www cvs login cvs co mozilla-org/css (when prompted to enter a password, type <tt>anonymous</tt>) setting up copy the contents of the <tt>trunk</tt> folder and the <tt>css</tt> folder (note: the folder itself) into the <tt>www</tt> directory on your server.
...the <tt>css</tt> folder contains
files that are supposed to be in the <tt>/css</tt> directory of the site.) to get a working install, you need to configure mediawiki.
Reading textual data - Archive of obsolete content
this article describes how to read textual data from streams,
files and sockets.
...
files and network sockets contain bytes, not characters - to give these bytes a meaning, you need to know the character encoding.
Venkman Internals - Archive of obsolete content
to obtain the antecedent
files: doc.getelementsbytagname("script"); then extract the urls from the src attributes.
... scriptwrapper newsgroup, 2002, rgrinda here is a bit more information about how venkman tracks
files and functions...
Using Breakpoints in Venkman - Archive of obsolete content
(note: by default, venkman hides
files file that appear to be part of the browser core; this includes extensions.
... to debug an extension, uncheck "exclude browser
files" on the debug menu and your installed extension
files should appear in the loaded scripts list.) venkman also indicates that one or more breakpoints have been set in the loaded scripts view, where red dots appear next to the
files in which breakpoints have been set, along with the line number where the function begins whose code is being stopped.
Elements - Archive of obsolete content
default encoding in xml documents (including xbl
files) is utf-8.
... note: the normal same-origin policy is used for web sites; they can only link to xbl
files on the same domain, or within the chrome.
Mac stub installer - Archive of obsolete content
adding a package involves a few steps: add a section named for your <component> to the packages-mac manifest that describes which
files from dist belong to which module.
...and finally it will do the copying of
files from dist per the directives in packages-mac if your module's section has some file entries.
Unix stub installer - Archive of obsolete content
copy the installer.ini and config.ini
files over into the src2 directory.
... adding a package involves a few steps: add a section named for your <component> to the packages-unix manifest that describes which
files from dist belong to which module.
Install Wizards (aka: Stub Installers) - Archive of obsolete content
it contains some
files to be installed and the install script, usually named install.js, which contains javascript directives for actions to take during an install including adding
files and directories, removing old or obsolete
files and directories, executing command line tools, etc.
... the xpinstall engine processes installer packages by reading instructions from their install scripts to extract
files and take other install actions.
copy - Archive of obsolete content
method of file object syntax int copy(
filespecobject source,
filespecobject dest ) parameters the copy method has the following parameters: source a
filespecobject object reprsenting the file to be copied.
... dest a
filespecobject object representing the destination directory.
dirCreate - Archive of obsolete content
method of file object syntax int dircreate(
filespecobject dirtocreate ); parameters the dircreate method has the following parameters: dirtocreate a
filespecobject representing the pathname of the directory to create.
...description the input parameter is a
filespecobject that you have already created with the install object's getfolder method.
dirGetParent - Archive of obsolete content
method of file object syntax
filespecobject dirgetparent(
filespecobject fileordir ); parameters the dirgetparent method has the following parameters: fileordir a
filespecobject representing the pathname of the file or directory whose parent is being requested.
... returns a
filespecobject if successful; null if not successful.
isDirectory - Archive of obsolete content
summary returns a boolean value indicating whether the specified
filespecobject is a directory.
... method of file object syntax boolean isdirectory (
filespecobject nativefolderpath ); parameters the isdirectory method has the following parameters: nativefolderpath a
filespecobject representing the queried directory.
macAlias - Archive of obsolete content
method of file object syntax int macalias(
filespecobject destdir, string filename,
filespecobject aliasdir, string aliasname ); parameters the macalias method has the following parameters: destdir a
filespecobject that represents the directory into which the program file will be installed.
... aliasdir a
filespecobject that represents the directory into which the alias file will be installed (e.g.,"mac desktop").
modDate - Archive of obsolete content
method of file object syntax double moddate (
filespecobject nativefolderpath ); parameters the moddate method has the following parameters: nativefolderpath a
filespecobject representing the queried file.
... example f = getfolder("program");
filesource = getfolder(f, "myfile.txt"); err = file.moddate(
filesource); see moddatechanged for an example of comparing the dates of two
files.
registerChrome - Archive of obsolete content
srcdir srcdir is a
filespecobject representing the source destination of the installation.
...
filespecobjects like that required by this function are created using the getfolder method on the install object.
Install Object - Archive of obsolete content
add the
files to the installation add
files to the installation by calling getfolder to get file objects and passing those object refs to addfile as many times as necessary.
... perform installation check that the
files have been added successfully (e.g., by checking the error return codes from many of the main installation methods, and go ahead with the install if everything is in order: performorcancel(); function performorcancel() { if (0 == getlasterror()) performinstall(); else cancelinstall(); } for complete script examples, see script examples.
Return Codes - Archive of obsolete content
reboot_needed 999 the
files were installed, but one or more components were in use.
...on windows nt, you may only need to restart the application as long as you did not replace operating system
files.
writeString - Archive of obsolete content
description the writestring method is similar to the windows api function writeprivatepro
filestring.
...unlike the writeprivatepro
filestring function, this method does not support using a null key to delete an entire section.
TOC - Archive of obsolete content
file and stream guide: [ nsiscriptableio | accessing
files | getting file information | reading from
files | writing to
files | moving, copying and deleting
files | uploading and downloading
files | working with directories ] important note: the pages from the file and stream guide use the io object (nsiscriptableio), which was not available in any released version of the platform (pending some fixes).
...other documentation on
files and i/o not using the unavailable nsiscriptableio apis: code snippets: file i/o, open and save dialogs, reading textual data, writing textual data, list of file-related error codes.
SQLite Templates - Archive of obsolete content
the second method involves using a special url form: profile:filename.sqlite this form with the 'profile' prefix is used to refer to
files in the profile directory.
...sqlite
files typically have the 'sqlite' extension.
Adding Buttons - Archive of obsolete content
we'll start by creating a simple find button for the find
files utility.
...the code to add is shown in red below: <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <window id="findfile-window" title="find
files" orient="horizontal" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <button id="find-button" label="find"/> <button id="cancel-button" label="cancel"/> </window> you'll notice that the cancel button was added also.
Adding HTML Elements - Archive of obsolete content
you should avoid using html elements in xul
files if you can.
...here is an example as it might be added to the find file window: <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <window id="findfile-window" title="find
files" orient="horizontal" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> then, you can use html tags as you would normally, keeping in mind the following: you must add a html: prefix to the beginning of each tag, assuming you declared the html namespace as above.
Element Positioning - Archive of obsolete content
our find
files dialog let's add some of these styles to the find
files dialog.
... find
files example so far: source view next, a summary and some additional details of the box model are described.
Input Controls - Archive of obsolete content
our find
files example let's add a search entry field to the find file dialog.
...seamonkey or waterfox and remote-xul-manager from https://github.com/jvillalobos/remote-xul-manager find
files example so far : source view in the next section, we will look at some elements for entering and selecting numbers.
Popup Menus - Archive of obsolete content
the example below demonstrates creating a back button with a popup menu: example 3 : source view <popupset> <menupopup id="backpopup" position="after_start"> <menuitem label="page 1"/> <menuitem label="page 2"/> </menupopup> </popupset> <button label="pop me up" popup="backpopup"/> our find
files example let's add a simple popup menu to the find
files dialog.
... our find
files example so far : source view next, we'll look at how to create scrolling menus.
Splitters - Archive of obsolete content
our find
files example let's see what the find file dialog looks like with a splitter in it.
... normal state: collapsed state: find
files example so far : source view next, we'll find out how to create toolbars.
Tabboxes - Archive of obsolete content
adding tabs to our find
files dialog let's add a second panel to the find
files dialog.
... find
files example so far : source view next, we'll look at how to create grids of content.
Trees - Archive of obsolete content
add a tree to our find
files example let's add a tree to the find
files window where the results of the search would be displayed.
... find
files example so far : source view next, we'll learn how to create more advanced trees.
XUL Tutorial - Archive of obsolete content
introduction introduction xul structure the chrome url manifest
files simple elements creating a window adding buttons adding labels and images input controls numeric controls list controls progress meters adding html elements using spacers more button features the box model the box model element positioning box model details groupboxes adding more elements more layout elements stacks and decks stack positioning tabboxes grids content panels splitters toolbars and menus toolbars simple menu bars more menu features popup menus scrolling menus events and scripts adding event han...
... box objects xpcom interfaces xpcom examples trees trees more tree features tree selection custom tree views tree view details tree box objects rdf and templates introduction to rdf templates trees and templates rdf datasources advanced rules persistent data skins and locales adding style sheets styling a tree modifying the default skin creating a skin skinning xul
files by hand localization property
files bindings introduction to xbl anonymous content xbl attribute inheritance adding properties adding methods adding event handlers xbl inheritance creating reusable content using css and xbl xbl example specialized window types features of a window creating dialogs open and save dialogs creating a wizard more wizards overlays cross packag...
Using Remote XUL - Archive of obsolete content
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.
...xbl
files sometimes contain references to the default application stylesheet, and when they do their widgets inherit that style even if we don't specify a stylesheet.
stringbundle - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] an element which can be used to load localized resources from property
files.
...(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related xul property
files ...
XULRunner 1.8.0.1 Release Notes - Archive of obsolete content
the following directory is recommended: c:\program
files\mozilla xulrunner\1.8.0.1 .
... windows run the following command from the start menu -> run or from a command prompt: "c:\program
files\mozilla xulrunner\1.8.0.1\xulrunner\xulrunner.exe" --install-app "c:\documents and settings\user\desktop\myapplication.xpi" the application will be installed to c:\program
files\vendorname\applicationname mac os x run the following command in a command prompt: /library/frameworks/xul.framework/xulrunner-bin --install-app ~/desktop/myapplication.xpi the application will be installed to /applicat...
XULRunner 1.8.0.4 Release Notes - Archive of obsolete content
the following directory is recommended: c:\program
files\mozilla xulrunner\1.8.0.4 .
... windows run the following command from the start menu -> run or from a command prompt: "c:\program
files\mozilla xulrunner\1.8.0.4\xulrunner\xulrunner.exe" --install-app "c:\documents and settings\user\desktop\myapplication.xpi" the application will be installed to c:\program
files\vendorname\applicationname mac os x run the following command in a command prompt: /library/frameworks/xul.framework/xulrunner-bin --install-app ~/desktop/myapplication.xpi the application will be installed to /app...
XULRunner 1.9.1 Release Notes - Archive of obsolete content
the following directory is recommended: c:\program
files\mozilla xulrunner\1.9.1 .
... windows run the following command from the start menu -> run or from a command prompt: "c:\program
files\mozilla xulrunner\1.9.1\xulrunner\xulrunner.exe" --install-app "c:\documents and settings\user\desktop\myapplication.xpi" the application will be installed to c:\program
files\vendorname\applicationname mac os x run the following command in a command prompt: /library/frameworks/xul.framework/xulrunner-bin --install-app ~/desktop/myapplication.xpi the application will be installed to /applicatio...
XULRunner 1.9.2 Release Notes - Archive of obsolete content
the following directory is recommended: c:\program
files\mozilla xulrunner\1.9.2 .
... windows run the following command from the start menu -> run or from a command prompt: "c:\program
files\mozilla xulrunner\1.9.2\xulrunner\xulrunner.exe" --install-app "c:\documents and settings\user\desktop\myapplication.xpi" the application will be installed to c:\program
files\vendorname\applicationname mac os x run the following command in a command prompt: /library/frameworks/xul.framework/xulrunner-bin --install-app ~/desktop/myapplication.xpi the application will be installed to /applicatio...
XULRunner 1.9 Release Notes - Archive of obsolete content
the following directory is recommended: c:\program
files\mozilla xulrunner\1.9 .
... windows run the following command from the start menu -> run or from a command prompt: "c:\program
files\mozilla xulrunner\1.9\xulrunner\xulrunner.exe" --install-app "c:\documents and settings\user\desktop\myapplication.xpi" the application will be installed to c:\program
files\vendorname\applicationname mac os x run the following command in a command prompt: /library/frameworks/xul.framework/xulrunner-bin --install-app ~/desktop/myapplication.xpi the application will be installed to /applica...
XULRunner 2.0 Release Notes - Archive of obsolete content
the following directory is recommended: c:\program
files\mozilla xulrunner\2.0 .
... windows run the following command from the start menu -> run or from a command prompt: "c:\program
files\mozilla xulrunner\2.0\xulrunner\xulrunner.exe" --install-app "c:\documents and settings\user\desktop\myapplication.xpi" the application will be installed to c:\program
files\vendorname\applicationname mac os x run the following command in a command prompt: /library/frameworks/xul.framework/xulrunner-bin --install-app ~/desktop/myapplication.xpi the application will be installed to /applications...
Application Update - Archive of obsolete content
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 that correctly describes an update your application, or rather xulrunner, will download the update, verify it with the hash and
filesize and install.
CommandLine - Archive of obsolete content
(aiid.equals(nsimodule) || aiid.equals(nsisupports)) return this; throw components.results.ns_error_no_interface; }, /* nsimodule */ getclassobject : function mod_gch(acompmgr, acid, aiid) { if (acid.equals(class_id)) return apphandler.queryinterface(aiid); throw components.results.ns_error_failure; }, registerself : function mod_regself(acompmgr, a
filespec, alocation, atype) { var compreg = acompmgr.queryinterface(nsicomponentregistrar); compreg.registerfactorylocation(class_id, class_name, contract_id, a
filespec, alocation, atype); var catman = components.classes["@mozilla.org/categorymanager;1"] .getservice(nsicategorymanager); catman.addcategoryentry("command-l...
...ueryinterface(nsicomponentregistrar); compreg.unregisterfactorylocation(class_id, alocation); var catman = components.classes["@mozilla.org/categorymanager;1"] .getservice(nsicategorymanager); catman.deletecategoryentry("command-line-handler", cld_category); }, canunload : function (acompmgr) { return true; } }; function nsgetmodule(acompmgr, a
filespec) { return apphandlermodule; } create an observer that will get notified when arguments change: chrome/content/cmdline.js function commandlineobserver() { this.register(); } commandlineobserver.prototype = { observe: function(asubject, atopic, adata) { var cmdline = asubject.queryinterface(components.interfaces.nsicommandline); var test = cmdline.handleflagwithparam("test", f...
Debugging a XULRunner Application - Archive of obsolete content
troubleshooting x-jsd is not a registered protocol if the message "x-jsd is not a registered protocol" appears when trying to open *.js
files in venkman, then add an empty file called .autoreg in the same directory as your xulrunner binary.
... if your pages are not in the loaded script window, uncheck the menu item "debug\exclude browser
files" and find them in open windows tab when opening a js file in venkman, the code is unformatted and i get the following error in the jsconsole...
XUL Explorer - Archive of obsolete content
the xul can be loaded from and saved to
files.
... extensions support extension testing using firefox extension test mode venkman support dom inspector support future: support more “best practice” checks such as: more a11y checks, strings in dtds and so on - xul checker allow users to add snippets on the fly add sidebars for more functionality - property sidebar and project sidebar support wizards to generate common projects - xul
files, js xpcom, and xulrunner applications for more detailed information, see the xul_explorer:planning#feature_planning_for_xul_explorer.
ant script to assemble an extension - Archive of obsolete content
the current page in your blogmarks"/> xpi file is created after "chrome/blogmark.jar" is created, which is then stuffed into "blogmark.xpi" <target name="createxpi" depends="createjar" description="assemble the final build blogmark.xpi"> <zip destfile="blogmark-${version}.xpi"> <zip
fileset dir="." includes="chrome/blogmark.jar" /> <zip
fileset dir="." includes="install.rdf" /> </zip> </target> everything inside the chrome directory is zipped into chrome/blogmark.jar <target name="createjar" depends="templates" description="assemble the jar"> <jar destfile="chrome/blogmark.jar"> <f...
...ileset dir="chrome/"> <include name="**/*"/> <exclude name="**/*~"/> <exclude name="**/*.tpl.*"/> <exclude name="blogmark.jar"/> </
fileset> </jar> </target> <target name="templates" description="generate
files from templates."> <copy file="chrome/content/blogmark/contents.rdf.tpl.xml" tofile="chrome/content/blogmark/contents.rdf" overwrite="true"> <filterchain> <replacetokens> <token key="version" value="${version}"/> <token key="des...
Gecko Compatibility Handbook - Archive of obsolete content
incorrect use of xml empty tag notation many authors have taken to using xml empty tag notation (<tag />) in their html
files.
... web server configuration problems incorrectly specified mime types many web servers have incorrectly specified mime types for
files.
Mozilla release FAQ - Archive of obsolete content
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 make
files (on unix), you might not be using gnu make.
...go dig through the make
files in config and remove the offending portions, and see if that fixes things.
2006-10-20 - Archive of obsolete content
he has already "studied" the make
files but has had no success in achieving his goal.
... benjamin smedberg mentioned in his post that jan vávra needs to add the extension
files to the packaging manifest, which is used to create the installer.
2006-11-10 - Archive of obsolete content
latvian pellcheck dictionary for ff2.0 newest openoffice dictionary
files for ff 2.0 spell-checker is available.
... discussions help about firefox 3 a discussion on how to syncronise mozilla_1_8_branch with the trunk, which tag should be used to check-in
files on trunk, and when
files will be pulled from trunk to create another branch (mozilla_1_9_branch?) for firefox 3.
The First Install Problem - Archive of obsolete content
unless gecko does a pre-emptive scan upon startup for desirable plugins that are not in the browser's plugins directory first, the best way to solve this problem is to encourage plugin vendors to leave dlls (and xpt
files, if applicable) in a location that gecko can discover at runtime.
... example: [hkey_local_machine\software\mozillaplugins\]\@mycompany.com/myapplication,version=5.01\mimetypes\application/x-myapp] description=myapplication plugin for app
files "suffixes" -- this will be a semi-colon concatenated list of supported suffixes.
Tamarin Tracing Build Documentation - Archive of obsolete content
use the following command to create a copy of the tamarin repository: $ hg clone http://hg.mozilla.org/tamarin-tracing tamarin-tracing building tamarin building tamarin will create all the libraries for the avmplus and garbage collector (mmgc), and create a standalone executable, avmshell, for executing
files in the abc file format.
... $ make cppflags=-davmplus_verbose windows mobile to build for arm: $ python ../configure.py --target=arm-windows --enable-shell; make to build for thumb: $ python ../configure.py --target=thumb-windows --enable-shell; make platform-specific builds project
files for specific platforms/ides (microsoft visual studio, xcode, etc) are included in the source tree under tamarin-tracing/platform, but are not formally supported.
Theme changes in Firefox 2 - Archive of obsolete content
browser changes requiring theme updates there are a number of changed and deleted
files in the browser that may require you to make changes to your theme.
... note: this css may be moved out into a separate file that will be referenced by both
files in the future.
Using SSH to connect to CVS - Archive of obsolete content
once you have entered a passphrase, ssh-keygen will create two
files, ~/.ssh/id_dsa and ~/.ssh/id_dsa.pub do not sendid_dsa.
...if you wish to keep your previous pserver trees, you'll need to update the root
files in each cvs subdirectory in your tree.
Troubleshooting XForms Forms - Archive of obsolete content
if your are loading your file directly from the
filesystem, make sure that has .xhtml or .xml as the file ending.
... if you are loading the form from a server, make sure that it serves the
files as either application/xhtml+xml or text/xml.
Index - Game development
18 building up a basic demo with playcanvas 3d, animation, beginner, canvas, games, playcanvas, tutorial, webgl, camera, lighting, rendering of course, it depends on your approach — designers may favor the online editor while programmers will prefer having the full control over the coding environment and will probably use the engine's source
files.
...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.
Audio for Web games - Game development
we can apply the same principle to audio so that rather than having a bunch of small audio
files that take time to load and play, we have one larger audio file containing all the smaller audio snippets we need.
...your
files may be slightly longer than they strictly need to be, but silence compresses well.
Visual-js game engine - Game development
ect and click open application 6) open your server folder : install node.js modules one way - use windows bat-s file (in server root folder with prefix install_ ) second way - open cmd terminal and enter next command : npm install mysql npm install delivery npm install express npm install mkdirp npm install socket.io npm install nodemailer@0.7.0 very easy installation and project
files generator .
... visual-js works direct with project
files , no need for build .
CDN - MDN Web Docs Glossary: Definitions of Web-related terms
cdns are used widely for delivering stylesheets and javascript
files (static assets) of libraries like bootstrap, jquery etc.
... using cdn for those library
files is preferable for a number of reasons: serving libraries' static assets over cdn lowers the request burden on an organization's own servers.
Code splitting - MDN Web Docs Glossary: Definitions of Web-related terms
as an application grows in complexity or is simply maintained, css and javascripts
files or bundles grow in byte size, especially as the number and size of included third-party libraries increases.
... to prevent the requirement of downloading ginormous
files, scripts can be split into multiple smaller
files.
Gzip compression - MDN Web Docs Glossary: Definitions of Web-related terms
it is based on the deflate algorithm that allows
files to be made smaller in size which allows for faster network transfers.
... gzip is commonly supported by web servers and modern browsers, meaning that servers can automatically compress
files with gzip before sending them, and browsers can uncompress
files upon receiving them.
SCM - MDN Web Docs Glossary: Definitions of Web-related terms
usually it refers to the use of software to handle versioning of source
files.
... a programmer can modify source code
files without being afraid of editing out useful stuff, because a scm keeps track of how the source code has changed and who made the changes.
Tree shaking - MDN Web Docs Glossary: Definitions of Web-related terms
it relies on the import and export statements in es2015 to detect if code modules are exported and imported for use between javascript
files.
... in modern javascript applications, we use module bundlers (e.g., webpack or rollup) to automatically remove dead code when bundling multiple javascript
files into single
files.
WAI-ARIA basics - Learn web development
you can try taking a copy of our original
files (see index.html and style.css), or navigating to our website-aria-roles example (see it live), which has a structure like this: <header> <h1>...</h1> <nav role="navigation"> <ul>...</ul> <form role="search"> <!-- search form --> </form> </nav> </header> <main> <article role="article">...</article> <aside role="complementary">...</aside> </main> <footer>...</footer>...
... at this point, take a copy of our form-validation.html and validation.js
files, and save them in a local directory.
Advanced styling effects - Learn web development
lend-mode — here we'll show a couple of simple <div>s, so you can compare the original with the blended version: <div> </div> <div class="multiply"> </div> now some css — we are adding to the <div> one background image and a green background color: div { width: 250px; height: 130px; padding: 10px; margin: 10px; display: inline-block; background: url(https://mdn.mozillademos.org/
files/13090/colorful-heart.png) no-repeat center 20px; background-color: green; } .multiply { background-blend-mode: multiply; } the result we get is this — you can see the original on the left, and the multiply blend mode on the right: mix-blend-mode now let's look at mix-blend-mode.
...ss="multiply-mix"> </div> <div> </div> </article> here's the css we'll style this with: article { width: 280px; height: 180px; margin: 10px; position: relative; display: inline-block; } div { width: 250px; height: 130px; padding: 10px; margin: 10px; } article div:first-child { position: absolute; top: 10px; left: 0; background: url(https://mdn.mozillademos.org/
files/13090/colorful-heart.png) no-repeat center 20px; background-color: green; } article div:last-child { background-color: purple; position: absolute; bottom: -10px; right: 0; z-index: -1; } .multiply-mix { mix-blend-mode: multiply; } this gives us the following results: you can see here that the multiply mix blend has blended together not only the two background images, but also ...
Styling tables - Learn web development
to start with, make a local copy of the sample markup, download both images (noise and leopardskin), and put the three resulting
files in a working directory somewhere on your local computer.
... next, create a new file called style.css and save it in the same directory as your other
files.
CSS building blocks - Learn web development
just looking at it, consuming the content.) a basic work environment set up as detailed in installing basic software, and an understanding of how to create and manage
files, as detailed in dealing with
files.
... note: if you are working on a computer/tablet/another device 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.
CSS first steps - Learn web development
looking at it, consuming the content.) a basic work environment set up as detailed in installing basic software, and an understanding of how to create and manage
files, as detailed in dealing with
files.
... note: if you are working on a computer/tablet/other device 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.
Using CSS generated content - Learn web development
if you specify content in your stylesheet that requires translation, you have to put those parts of your stylesheet in different
files and arrange for them to be linked with the appropriate language versions of your doucment.
... this rule adds a space and an icon after every link that has the class glossary: html <a href="developer.mozilla.org" class="glossary">developer.mozilla.org</a> css a.glossary::after { content: " " url("https://mdn.mozillademos.org/
files/16322/glossary-icon.gif"); } ...
How do I start to design my website? - Learn web development
rather than go through a long explanation, let's go back to our example with this table: goals things to do let people hear your music record music prepare some audio
files usable online (could you do this with existing web services?) give people access to your music on some part of your website talk about your music write a few articles to start the discussion define how articles should look publish those articles on the website (how to do this?) meet other musicians provide ways for people to co...
...mail?) define how people will find those contact channels from your website sell goodies create the goodies store the goodies find a way to handle shipping find a way to handle payment make a mechanism on your site for people to place orders teach music through videos record video lessons prepare video
files viewable online (again, could you do this with existing web services?) give people access to your videos on some part of your website two things to notice.
Test your skills: Advanced styling - Learn web development
we've made one available in the same directory as our html
files — see search-24px.png — plus a <div> element after the search input to help you attach it, should you need it.
...you can write the code yourself, or use the starting point
files linked to in the above sections.
CSS basics - Learn web development
(if you haven't been following our project, pause here to read dealing with
files and html basics.) open your index.html file.
... dealing with
files html basics css basics javascript basics publishing your website how the web works ...
HTML basics - Learn web development
let's revisit the code we put into our index.html example (which we first met in the dealing with
files article): <!doctype html> <html> <head> <meta charset="utf-8"> <title>my test page</title> </head> <body> <img src="images/firefox-icon.png" alt="my test image"> </body> </html> here, we have the following: <!doctype html> — the doctype.
... dealing with
files html basics css basics javascript basics publishing your website how the web works ...
JavaScript basics - Learn web development
add this code to the main.js file: const myheading = document.queryselector('h1'); myheading.textcontent = 'hello world!'; make sure the html and javascript
files are saved.
...javascript from the earlier exercise.) let myimage = document.queryselector('img'); myimage.onclick = function() { let mysrc = myimage.getattribute('src'); if(mysrc === 'images/firefox-icon.png') { myimage.setattribute('src','images/firefox2.png'); } else { myimage.setattribute('src','images/firefox-icon.png'); } } save all
files and load index.html in the browser.
Use JavaScript within a webpage - Learn web development
linking an external script usually, you'll be writing scripts in their own .js
files.
... <script> window.addeventlistener('load', function () { console.log('this function is executed once the page is fully loaded'); }); </script> that's convenient when you just need a small bit of javascript, but if you keep javascript in separate
files you'll find it easier to focus on your work write self-sufficient html write structured javascript applications use scripting accessibly accessibility is a major issue in any software development.
Introduction to HTML - Learn web development
you should have a basic work environment set up (as detailed in installing basic software), and understand how to create and manage
files (as detailed in dealing with
files).
... note: if you are working on a computer/tablet/other devices that doesn't let you create your own
files, you can try out (most of) the code examples in an online coding program such as jsbin or glitch.
Adding vector graphics to the Web - Learn web development
moreover, vector image
files are much lighter than their raster equivalents, because they only need to hold a handful of algorithms, rather than information on every pixel in the image individually.
... note: in inkscape, save your
files as plain svg to save space.
HTML table basics - Learn web development
first, make a local copy of our dogs-table.html and minimal-table.css
files in a new directory on your local machine.
... first, make a local copy of our animals-table.html and minimal-table.css
files in a new directory on your local machine.
Third-party APIs - Learn web development
note: you might want to just get all our code examples at once, in which case you can then just search the repo for the example
files you need in each section.
...if you've already cloned the examples repository, you'll already have a copy of these
files, which you can find in the javascript/apis/third-party-apis/nytimes directory.
What is JavaScript? - Learn web development
this is generally a good thing in terms of organizing your code and making it reusable across multiple html
files.
...for example, maybe you have some game data
files to load, which will be needed when the game actually begins, but for now you just want to get on with showing the game intro, titles, and lobby, without them being blocked by script loading.
Multimedia: video - Learn web development
this is a useful option for some small or moderately sized
files.
...video
files are relatively large compared to other website
files, and always worthy of attention.
Introduction to the server side - Learn web development
requests for static resources are handled in the same way as for static sites (static resources are any
files that don't change —typically: css, javascript, images, pre-created pdf
files etc).
... server-side programming allows us to instead store the information in a database and dynamically construct and return html and other types of
files (e.g.
Ember resources and troubleshooting - Learn web development
in any default ember project, there will be two main javascript
files, vendor.js and {app-name}.js.
... both of these
files are generated with sourcemaps, so when you open the vendor.js or {app-name}.js to search for relevant code, when a debugger is placed, the sourcemap will be loaded and the breakpoint will be placed in the pre-transpiled code for easier correlation to your project code.
Routing in Ember - Learn web development
to do this you’ll need to enter the following commands into your terminal, inside the root directory of your app: ember generate route index ember generate route completed ember generate route active the second and third commands should have not only generated new
files, but also updated an existing file, app/router.js.
...add the following below the existing getters: get completed() { return this.todos.filter(todo => todo.iscompleted); } models now we need to add models to our route javascript
files to allow us to easily return specific data sets to display in those models.
Ember app structure and componentization - Learn web development
enter the following command into your terminal: ember generate component header these will generate some new
files, as shown in the resulting terminal output: installing component create app/components/header.hbs skip app/components/header.js tip to add a class, run `ember generate component-class header` installing component-test create tests/integration/components/header-test.js header.hbs is the template file where we’ll include the html structure for just that component.
...enter the following lines into your terminal, one by one: ember generate component todo-list ember generate component todo ember generate component footer you’ll now see the following inside your todomvc/app/components directory: now that we have all of our component structure
files, we can cut and paste the html for each component out of the application.hbs file and into each of those components, and then re-write the application.hbs to reflect our new abstractions.
React resources - Learn web development
create-react-app makes it possible to import css
files into javascript modules, so that css is only sent to your user when the corresponding component is rendered.
... state and lifecycle in the react docs intro to react in the react docs read about javascript classes at mdn testing create-react-app provides some tools for testing your application out of the box — you may have deleted the relevant
files earlier in the tutorial.
Strategies for carrying out testing - Learn web development
when running tests, it can also be a good idea to: set up a separate browser profile where possible, with browser extensions and other such things disabled, and run your tests in that profile (see use the profile manager to create and remove firefox pro
files and share chrome with others or add personas, for example).
...private browsing in firefox, incognito mode in chrome) so things like cookies and temp
files are not saved.
Gecko info for Windows accessibility vendors
compiling the .idl
files to use these interfaces, you'll need to get the isimpledomnode.idl, isimpledomtext.idl and isimpledomdocument.idl file.
... you must make a header
files for them, by running these commands: midl isimpledomnode.idl midl isimpledomtext.idl midl isimpledomdocument.idl that will generate isimpledomnode.h and isimpledomdocument.h, which define the interfaces.
Android-specific test suites
however, the existing configuration can be tweaked and the set of
files checked can be modified.
...however, the existing configuration can be tweaked and the set of
files checked can be modified.
Capturing a minidump
minidumps are
files created by various windows tools which record the complete state of a program as it's running, or as it was at the moment of a crash.
...in the file chooser window that appears, open the firefox.exe executable in your firefox program folder (c:\program
files\mozilla firefox).
ESLint
in order to help people write standard-compliant code from the start and avoid wasting time during code reviews, a set of eslint configuration
files have been added to the code base so that javascript can be analyzed automatically.
... understanding rules and errors not all
files are linted currently eslint runs on: .js .jsx .jsm .xml .html .xhtml additionally, some directories and
files are ignored, see the .eslintignore file handling errors if your code fails an eslint rule, you'll get an error similar to this: /gecko/toolkit/mozapps/installer/js-compare-ast.js 18:39 error 'snarf' is not defined.
Gecko Logging
rotate:n this limits the produced log
files' size.
... we rotate four log
files with .0, .1, .2, .3 extensions.
Index
143 multiple firefox pro
files beginner, firefox, guide, intro, pro
files, 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 pro
files on mozilla's end-user support site.
Embedding Tips
normally it provide some functionality that is required from lots of places such as looking up preference settings, creating new windows, locating
files, displaying prompt or password dialog boxes and so on.
... how do i specify alternate locations for pro
files?
Roll your own browser: An embedding how-to
one of the requirements of building a sdk is the ability to identify and package up required
files.
...contained within this directory are a couple of make
files: basebrowser-unix basebrowser-win the xpinstall packager follows the same format.
How to implement a custom autocomplete search component
utocompletesearchfactory = { singleton: null, createinstance: function (aouter, aiid) { if (aouter != null) throw components.results.ns_error_no_aggregation; if (this.singleton == null) this.singleton = new simpleautocompletesearch(); return this.singleton.queryinterface(aiid); } }; // module var simpleautocompletesearchmodule = { registerself: function(acompmgr, a
filespec, alocation, atype) { acompmgr = acompmgr.queryinterface(components.interfaces.nsicomponentregistrar); acompmgr.registerfactorylocation(class_id, class_name, contract_id, a
filespec, alocation, atype); }, unregisterself: function(acompmgr, alocation, atype) { acompmgr = acompmgr.queryinterface(components.interfaces.nsicomponentregistrar); acompmgr.unregisterfactorylocation(c...
...bject: function(acompmgr, acid, aiid) { if (!aiid.equals(components.interfaces.nsifactory)) throw components.results.ns_error_not_implemented; if (acid.equals(class_id)) return simpleautocompletesearchfactory; throw components.results.ns_error_no_interface; }, canunload: function(acompmgr) { return true; } }; // module initialization function nsgetmodule(acompmgr, a
filespec) { return simpleautocompletesearchmodule; } starting in gecko 2.0, component registration has been changed, so you need to make the following changes: add an nsgetfactory() function: function nsgetfactory(cid) { if (cid.tostring().touppercase() != class_id.tostring().touppercase()) { throw components.results.ns_error_factory_not_registered; } return si...
Extending a Protocol
to be sure, ipdl looks like a crazy mix of webidl, c++ header
files, and es6.
... let's implement the .cpp
files, starting with windowglobalparent.cpp.
Implementing Download Resuming
introduction various protocols support getting partial
files.
... note: in versions of firefox prior to 3.0 alpha 7, nsiwebbrowserpersist cannot append to existing
files (as opposed to overwriting them), and is therefore not usable for this task (see bug 129921).
Addon
size read only integer the size of the add-on's
files in bytes.
... getdatadirectory() requires gecko 32.0(firefox 32.0 / thunderbird 32.0 / seamonkey 2.29) returns the path of the preferred directory, within the current profile, where an add-on should store data
files.
Download
temporary
files or part
files may still exist even if they are expected to be deleted, until the stopped property becomes true.
...until the cancellation process finishes, temporary
files or part
files may still exist even if they are expected to be deleted.
DownloadTarget
for downloads of multiple
files, such as downloading a web page and its required media to disk, the meaning of this property is undefined.
... it currently indicates the size of the main file (such as the html document) rather than the sum of all of the
files' sizes, but you must not rely upon this behavior, as it is subject to change.
Localization notes
localizers usually work on the localizable
files without the context of the source
files including the localized strings; it is important to add comments to the localizable
files themselves, too.
...dtd
files <!-- localization note (entity name): comment --> properties
files # localization note (key): comment file-wide comments should use the same format, be at the top of the file (after the license header, though) and just drop the (entity name/key) reference.
Localizing extension descriptions
if you do not currently have them, create localized properties
files.
... add the following line to each of your localization properties
files (where extension_id matches your extension id (<em:id> from install.rdf) and localized_description is the description of your extension that you want to appear in the given language): extensions.extension_id.description=localized_description if you do not currently have one, create a default preferences file.
Localizing with Pontoon
resource selector (homepage) switches between project resources to localize, like subpages or localization
files.
... user menu allows for user-specific tasks, like commiting to repository, downloading
files and signing out.
What every Mozilla translator should know
for every branch and every locale, there is a separate repository for localization
files committed by the localizers.
... some branch/release names identified: mozilla source + en-us localization
files for [ab-cd] locale corresponding firefox version branches in hg mozilla-central l10n-central firefox.next (trunk) mozilla-1.9.2 l10n-mozilla-1.9.2 firefox 3.6 mozilla-1.9.1 l10n-mozilla-1.9.1 firefox 3.5 and, on the former revision control system, cvs: cvs trunk (the default branch) -> firefox/thunderbird 3.0.x branch mozilla_1_8_branch -> firefox/thunderbird 2.0 branch mozilla cross-reference mozilla cross-reference is a web site mirroring the content of the hg server.
Fonts for Mozilla 2.0's MathML engine
the fonts may be installed by extracting the font
files (which have the .otf extension) from the zip archive, then following instructions for microsoft windows, or copying the
files to a ~/library/fonts folder on mac os x, or to a ~/.fonts/ directory (which may need to be created) on unix/linux systems.
...an get these fonts from the mathml-fonts add-on ; the xpi is just a zip archive that you can fetch and extract for example with the following command: wget https://addons.mozilla.org/firefox/downloads/latest/367848/addon-367848-latest.xpi -o mathml-fonts.zip; \ unzip mathml-fonts.zip -d mathml-fonts then copy the mathml-fonts/resource/ directory somewhere on your web site and ensure that the woff
files are served with the correct mime type.
Mozilla DOM Hacking Guide
for us, it is: 1225 dom_classinfo_map_entry(nsidomhtmldomimplementation) add the new interface to the make
files, manifests, etc.
... #include the relevant
files to make it build, tweak the make
files, etc.
Mozilla Development Strategies
if you are blocked, but have something worth checking in, check in using #ifdef, prefs, or "alternative"
files sometimes you'll work on something, but you can't land it because something else is blocking you.
... for c++, use #define, #ifdef, #else and #endif for xul / js, and you're doing something major, add your new
files to the tree and then have it be a simple jar.mn patch to enable it.
GC and CC logs
on desktop firefox you can override the default location of the log
files by setting the moz_cc_log_directory environment variable.
...on firefox for android you can use the cc-dump extension to save the
files to /sdcard.
TraceMalloc
also, your javascript can call the following dom window methods: tracemallocdisable() - turn off tracing, first flushing any buffered log events for all log
files.
... tracemallocchangelogfd(logfd) - change the current log file to the one identified by logfd, returning the previous fd (so you can maintain a number of open
files; keep their fds in a js array!).
nglayout.debug.disable_xul_cache
during development of xul applications, it’s convenient to disable the xul cache so that changes you make to
files on disk take effect the next time the window or dialog is loaded (instead of the next time mozilla starts).
... possible values and their effects: true: do not cache parsed xul documents and do not save the cache to the xul fastload file on exit; re-read the source
files each time the window or dialog needs to be displayed.
Patches and pushes
" template="http://ff.search.yahoo.com/gossip?output=fxjson&command={searchterms}" />*** <url type="text/html" method="get" template="http://search.yahoo.com/search"> <param name="p" value="{searchterms}"/> <param name="ei" value="utf-8"/> <mozparam name="fr" condition="pref" pref="yahoo-fr" /> </url> <searchform>http://search.yahoo.com/</searchform> </searchplugin> create xml
files for each search plugin preference following the above example.
...for example: hg ci -m "bug 654321, copied the comment from the doc without reading, r=nobody" path-to-changed-
files close the bug, copying the url to your change in the closing comment.
Installing JSHydra
cd $home/jshydra hg clone http://hg.mozilla.org/users/pidgeot18_gmail.com/jshydra/ cd jshydra ./configure make # run jshydra tests make check processing input
files jshydra requires the
files it processes to be correct js
files.
... converting html, xul, or xbl
files into a readable js equivalent is a work in progress, as is accounting for the preprocessing that mozilla
files sometimes use.
Localization Use Cases
0 : 1; var sizeinfo =
filesizeformatter.getreadable
filesize(size, fixeddigits); var _ = navigator.mozl10n.get; element.textcontent = _(l10nid, { size: sizeinfo.size, unit: _('byteunit-' + sizeinfo.unit) }); } the function is used like so: // application storage updateappfreespace: function storage_updateappfreespace() { var self = this; this.getfreespace(this.appstorage, function(freespace) { devic...
...in l20n, localization
files can be asymmetrical and have more entities that the source language.
AsyncTestUtils extended framework
(see the bottom of this page for links to the source
files.) count: 10 the number of messages that should be in the set.
... messages and folders move messages to a folder yield async_move_messages(asynmessageset, adestfolder); trash messages (move them to the trash folder) yield async_trash_messages(asynmessageset); empty the trash folder yield async_empty_trash(); delete messages (without moving them to the trash folder) yield async_delete_messages(asynmessageset); implementation details the following
files make up the framework: asynctestutils.js: core async testing logic.
Leak And Bloat Tests
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.
...code locations the
files specific to leak and bloat testing are be stored in: http://mxr.mozilla.org/comm-central/source/mailnews/test/performance these
files consist of: overlays (used to provide the hooks for the javascript): bloat/bloataddroverlay.xul bloat/bloatcomposeoverlay.xul bloat/bloatmainoverlay.xul javascript
files (used to drive the tests): bloat/bloataddroverlay.js bloat/bloatcomposeoverlay.js bloat/bloatmainoverlay.js preference settings (used to provide a defined profile, see below): common/mailnewstestprefs.js python scripts (used to set up the profile and run the test): bloat/setupbloattest.py bloat/runtest.py common/setupcommonmailnews.p...
NSPR's Position On Abrupt Thread Termination
the process abstraction is then responsible for closing all open
files and reclaiming all storage that may have been allocated during the process' lifetime.
...when called, the process exits, closing
files and reclaiming the process' storage.
Optimizing Applications For NSPR
these declarations are hidden in the <tt>pr_extern()</tt> declarations in nspr's header
files.
... os/2 the os/2 port is not functional in its current state due to the requirement to remove some
files that could not be shipped under the npl.
PRIOMethods
not all functions in the methods table are implemented for all types of
files.
... for example, the seek method is implemented for normal
files but not for sockets.
NSS_3.11.10_release_notes.html
the tar.gz or zip file expands to an nss-3.11.10 directory containing three subdirectories: include - nss header
files lib - nss shared libraries bin - nss tools and test programs you also need to download the nspr 4.7.1 binary distributions to get the nspr 4.7.1 header
files and shared libraries, which nss 3.11.10 requires.
...tions certificate authority root to nss bug 431621: add diginotar root ca root to nss bug 431772: add network solutions and diginotar root certs to nss bug 442912: fix nssckbi version number on 3.11 branch bug 443045: 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.
NSS 3.28.3 release notes
compatibility nss 3.28.3 shared libraries are backward compatible with most older nss 3.x shared libraries, but depending on your application, may be incompatible, if you application has been compiled against header
files of versions 3.28, 3.28.1, or 3.28.2.
... if you had compiled your application against header
files of nss 3.28, nss 3.28.1 or nss 3.28.2, it it recommended that you recompile your application against nss 3.28.3, at the time you upgrade to nss 3.28.3.
NSS 3.29.1 release notes
compatibility nss 3.29.1 shared libraries are backward compatible with most older nss 3.x shared libraries, but depending on your application, may be incompatible, if you application has been compiled against header
files of versions 3.28, 3.28.1, 3.28.2 nss 3.29.1.
... if you had compiled your application against header
files of nss 3.28, nss 3.28.1, nss 3.28.2 or nss 3.29, it it recommended that you recompile your application against nss 3.29.1 (or nss 3.28.3), at the time you upgrade to nss 3.29.1 (or nss 3.28.3).
NSS 3.52 release notes
bug 1630458 - fix problem of gyp msvc builds not producing debug symbol
files.
... bug 1465613 - fix issue where testlib makefile build produced extraneous object
files.
NSS 3.53 release notes
notable changes in nss 3.53 when using the make
files, nss can be built in parallel, speeding up those builds to more similar performance as the build.sh/ninja/gyp system.
... bug 1561331 - additional modular inverse test bug 1629553 - rework and cleanup gmake builds bug 1438431 - remove mkdepend and "depend" make target bug 290526 - support parallel building of nss when using the make
files bug 1636206 - hacl* update after changes in libintvector.h bug 1636058 - fix building nss on debian s390x, mips64el, and riscv64 bug 1622033 - add option to build without seed this bugzilla query returns all the bugs fixed in nss 3.53: https://bugzilla.mozilla.org/buglist.cgi?resolution=fixed&classification=components&query_format=advanced&product=nss&target_milestone=3.53 compatibility n...
nss tech note3
certusageobjectsigner ........ used to verify signatures on
files of executable code, e.g.
... jar
files.
Migration to HG
for nspr, "mozilla/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.
NSS tools : ssltab
if the tool detects a certificate chain, it saves the der-encoded certificates into
files in the current directory.
... the
files are named cert.0x, where x is the sequence number of the certificate.
NSS tools : ssltap
if the tool detects a certificate chain, it saves the der-encoded certificates into
files in the current directory.
... the
files are named cert.0x, where x is the sequence number of the certificate.
OLD SSL Reference
the sample code and make
files are available via lxr in the sslsamples directory.
...additional types are described with the functions that use them or in the header
files.
NSS Tools pk12util
the tool allows you to import certificates and keys from pkcs #12
files into nss or export them and also list certificates and keys in such
files.
... -p prefix specify the prefix used on the cert8.db and key3.db
files (for example, my_cert8.db and my_key3.db).
NSS Tools ssltap
if the tool detects a certificate chain, it saves the der-encoded certificates into
files in the current directory.
... the
files are named cert.0x, where x is the sequence number of the certificate.
NSS tools : ssltap
if the tool detects a certificate chain, it saves the der-encoded certificates into
files in the current directory.
... the
files are named cert.0x, where x is the sequence number of the certificate.
Network Security Services
for information on downloading nss releases as tar
files, see download pki source.
... additional information using the window.crypto object from javascript delegation of http download for ocsp tls cipher suite discovery nss certificate download specification fips mode - an explanation format of key log
files view all nss-related articles on mdn planning information on nss planning can be found at wiki.mozilla.org, including: fips validation nss roadmap page nss improvement project community view mozilla security forums...
Rhino Debugger
opening scripts you may select the file->open menu item on the menu bar to load javascript scripts contained in
files.
... running scripts you may select the file->run menu item on the menu bar to execute javascript scripts contained in
files.
Rhino Examples
the programs may be specified as
files on the command line or by typing interactively while the shell is running.
...the file class - an advanced example file.java extends scriptableobject to provide a means of reading and writing
files from javascript.
Small Footprint
this change saves 47,984 bytes of class
files.
... 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.
Rhino JavaScript compiler
overview the javascript compiler translates javascript source into java class
files.
... the resulting java class
files can then be loaded and executed at another time, providing a convenient method for transferring javascript, and for avoiding translation cost.
Rhino overview
rhino contains all the features of javascript 1.7 allows direct scripting of java a javascript shell for executing javascript scripts a javascript compiler to transform javascript source
files into java class
files a javascript debugger for scripts executed with rhino language the javascript language itself is standardized by standard ecma-262 ecmascript: a general purpose, cross-platform programming language.
...if other properties
files with extensions corresponding to the current locale exist, they will be used instead.
The JavaScript Runtime
compilation of javascript source to class
files is supported.
... it is possible to specify the class
files as well as the packages to generate into.
Getting SpiderMonkey source code
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.
... 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.
Shell global objects
load(['foo.js' ...]) load
files named by string arguments.
... loadrelativetoscript(['foo.js' ...]) load
files named by string arguments.
Secure Development Guidelines
indows ‘\’ would work too int openfile(char *file) { handle fh; if (strstr(file, “\”)) return -1; fh = createfilea(file, ...); writefile(fh, data, sizeofdata, null, null); } could be a normal file, directory, device, or link directory traversal (../../../../) file i/o: file permissions should be set correctly be sure not to make world-writable
files sensitive
files shouldn’t be world readable file i/o: file descriptors and handles could be a race if instances of fh are shared between threads fh inheritence: default in unix, needs to be set in windows int main(int argc, char **argv, char **envp) { int fd = open("/etc/shadow", o_rdwr); setreuid(getuid(), getuid()); excve("/bin/sh", argv, envp); } suid root applica...
...the operating system if the os allows opening more fds, then fd_set can hold could overflow fd_set file i/o: file descriptors and handles good solution: dynamically allocate fd_set structs int main(void) { int i, fd; fd_set fdset; for( i = 0; i < 2000; i++) { fd = open("/dev/null", o_rdwr); } fd_set(fd, &fdset); } file i/o: race conditions operating on
files can often lead to race conditions since the file system is shared with other processes you check the state of a file at one point in time and immediately after the state might have changed most file name operations suffer from these race conditions, but not when performed on file descriptors file i/o: race conditions consider the following example int main(int argc, char **argv) { c...
Signing Mozilla apps for Mac OS X
the folder will fail to validate if any of these cases occur (there may be other cases not listed here): if any
files that were included in the signature have been removed or modified if any
files have been added to a folder that should have all
files signed the coderesources file this file is located in your application's bundle at contents/_codesignature/coderesources.
...once the application bundle is signed, this file will contain the hashes/checksums of all
files that are included in the signature.
Places Developer Guide
this is mainly for use by extensions that sync bookmark data between different pro
files.
...this is mainly for use by extensions that sync bookmark data between different pro
files.
XML Extras
normally your
files should reside on a webserver so this shouldn't pose a problem (there you do not need that line either).
...file new bugs for additional documentation contributions, either specifically aimed at javascript developers or to complete & clarify the javadoc-style comments in the idl
files.
XPCOM glue
for xulrunner 1.9, on linux you should use either the .pc
files.
... linux and mac: make sure the gecko libraries are listed after your object (.o)
files on the link line.
How to build an XPCOM component in JavaScript
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.
...depth = @depth@ topsrcdir = @top_srcdir@ srcdir = @srcdir@ vpath = @srcdir@ include $(depth)/config/autoconf.mk # module specifies where header
files from this makefile are installed # use dom if your component implements a dom api module = dom # name of the typelib xpidl_module = dom_apps # set to 1 if the module should be part of the gecko runtime common to all applications gre_module = 1 # the idl sources xpidlsrcs = \ helloworld.idl \ $(null) include $(topsrcdir)/config/rules.mk xpidl_flags += \ -i$(topsrcdir)/dom/interfaces/base \ -i$(topsrcdir)/dom/interfaces...
nsIRegistry
try { st.first(); do { var data = st.currentitem(); if( data instanceof ci.nsiregistrynode ) print("nsiregistrynode: " + data.nameutf8 + " (" + data.key + ")"); st.next(); } while( components.lastresult == 0 ); } catch(e) {} now, the output is something like: pro
files (344) pro
files/default (530) pro
files/foo (1046) pro
files/bar (1518) the number inside the parenthesis is the "key." you can use this key with the rest of the nsiregistry api (see mxr).
...js> rs.getstringutf8(530, "directory") // 530: key corresponding with pro
files/default the output is something like: /home/lion/.mozilla/default/awp83kud.slt boo-yah!
HOWTO
using js modules and non-ui javascript chrome
files problem you want to write a javascript file, and run it in xpcshell.
...maybe it even uses javascript
files from chrome:// urls.
Profiling XPCShell
but sometimes, venkman gives too much noise (because it also pro
files chrome code).
...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!) ...
XPCShell Reference
you can specify multiple js
files to execute by using multiple -f arguments, and the scripts will be executed in the order encountered.
...if that file is found, it is executed before any other js
files specified.
nsLocalFile
example code function get
filesize(path) { var file = components.classes["@mozilla.org/file/local;1"].
... createinstance(components.interfaces.nsilocalfile); file.initwithpath(path); return file.
filesize; } see also components, nsicomponentmanager ...
NS_NewLocalFile
#include "nsxpcom.h" #include "nsilocalfile.h" nsresult ns_newlocalfile( const nsastring& apath, prbool afollowlinks, nsilocalfile** aresult ); parameters apath [in] a utf-16 string object that specifies an absolute
filesystem path.
...it is an error to pass a relative
filesystem path.
nsCStringEncoding
ns_cstring_encoding_native_
filesystem conversion from utf-16 to the native
filesystem charset may result in a loss of information.
...the native
filesystem charset applies to strings passed to the "native" method variants on nsifile and nsilocalfile.
nsIBrowserHistory
an empty value for this parameter means local
files and anything else without a hostname.
... you can also pass in the localized "(local
files)" title given to you by a history query to remove all history information for local
files.
nsIDOMFileList
the nsidomfilelist interface contains a list of nsidomfile objects describing the
files selected by the user for a "file" input field on a web form.
... gecko 1.9.2 note starting in gecko 1.9.2, this is also used by the datatransfer object to support dragging and dropping
files into web applications.
nsIDOMFileReader
last changed in gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) inherits from: nsisupports implemented by: @mozilla.org/
files/filereader;1.
... to create an instance, use: var filereader = components.classes["@mozilla.org/
files/filereader;1"].createinstance(components.interfaces.nsidomfilereader); this interface implements the dom filereader object; see that documentation for details.
nsIDirectoryIterator
xpcom/obsolete/nsi
filespec.idlscriptable please add a summary to this article.
... last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) inherits from: nsisupports method overview void init(in nsi
filespec parent, in boolean resolvesymlink); boolean exist(); void next(); attributes attribute type description currentspec nsi
filespec init() void init( in nsi
filespec parent, in boolean resolvesymlink ); parameters parent resolvesymlink exist() boolean exists(); next() void next(); ...
nsIEnvironment
examples windows this example gets the path to the porgram
files directory on windows.
... var nsienvironment = components.classes["@mozilla.org/process/environment;1"].getservice(components.interfaces.nsienvironment); var pathtoprogram
files = nsienvironment.get("program
files"); //for me this returns "c:\program
files" ...
nsIInstallLocation
any nsifile operations that assume a directory and plain
files will fail in firefox 4, unless you specify <em:unpack>.
... itemlocations nsidirectoryenumerator an enumeration of nsi
files for: locations that contain items potential dropped-in xpis note: this enumeration resolves text links to the directories they refer to.
nsIMsgFolder
imsgdatabase getmsgdatabase(in nsimsgwindow msgwindow); void setmsgdatabase(in nsimsgdatabase msgdatabase); nsimsgdatabase getdbfolderinfoanddb(out nsidbfolderinfo folderinfo); nsimsgdbhdr getmessageheader(in nsmsgkey msgkey); boolean shouldstoremsgoffline(in nsmsgkey msgkey); boolean hasmsgoffline(in nsmsgkey msgkey); nsiinputstream getoffline
filestream(in nsmsgkey msgkey, out pruint32 offset, out pruint32 size); void downloadmessagesforoffline(in nsisupportsarray messages, in nsimsgwindow window); nsimsgfolder getchildwithuri(in acstring uri, in boolean deep, in boolean caseinsensitive); void downloadallforoffline(in nsiurllistener listener, in nsimsgwindow window); void enablenotifications(in long notif...
...w); setmsgdatabase() void setmsgdatabase(in nsimsgdatabase msgdatabase); getdbfolderinfoanddb() nsimsgdatabase getdbfolderinfoanddb(out nsidbfolderinfo folderinfo); getmessageheader() nsimsgdbhdr getmessageheader(in nsmsgkey msgkey); shouldstoremsgoffline() boolean shouldstoremsgoffline(in nsmsgkey msgkey); hasmsgoffline() boolean hasmsgoffline(in nsmsgkey msgkey); getoffline
filestream() nsiinputstream getoffline
filestream(in nsmsgkey msgkey, out pruint32 offset, out pruint32 size); downloadmessagesforoffline() void downloadmessagesforoffline(in nsisupportsarray messages, in nsimsgwindow window); getchildwithuri() nsimsgfolder getchildwithuri(in acstring uri...
nsIMsgMessageService
upports adisplayconsumer, in nsimsgwindow amsgwindow, in nsiurllistener aurllistener, in string acharsetoverride, out nsiuri aurl); void openattachment(in string acontenttype, in string afilename, in string aurl, in string amessageuri, in nsisupports adisplayconsumer, in nsimsgwindow amsgwindow, in nsiurllistener aurllistener); void savemessagetodisk(in string amessageuri, in nsi
filespec afile, in boolean ageneratedummyenvelope, in nsiurllistener aurllistener, out nsiuri aurl, in boolean canonicallineending, in nsimsgwindow amsgwindow); void geturlforuri(in string amessageuri, out nsiuri aurl, in nsimsgwindow amsgwindow); void displaymessageforprinting(in string amessageuri, in nsisupports adisplayconsumer, in nsimsgwindow amsgwindow, in nsiurllistener aurlli...
... void savemessagetodisk(in string amessageuri, in nsi
filespec afile, in boolean ageneratedummyenvelope, in nsiurllistener aurllistener, out nsiuri aurl, in boolean canonicallineending, in nsimsgwindow amsgwindow); parameters amessageuri url representing the message to spool out to disk.
Component; nsIPrefBranch
interfaces currently supported are: nsilocalfile nsisupportsstring (unichar) (removed as of gecko 58 in favor of getstringpref) nsipreflocalizedstring (localized unichar) nsi
filespec (deprecated - to be removed eventually) avalue the xpcom object into which to the complex preference value should be retrieved.
...interfaces currently supported are: nsilocalfile nsisupportsstring (unichar) (removed as of gecko 58 in favor of setstringpref) nsipreflocalizedstring (localized unichar) nsi
filespec (deprecated - to be removed eventually) avalue the xpcom object from which to set the complex preference value.
nsIProfileLock
localdirectory nsilocalfile a directory corresponding to the main profile directory, which exists for the purpose of storing data on the local
filesystem, including cache
files or other data
files that may not represent critical user data.
... see also profile management nsitoolkitpro
fileservice nsitoolkitprofile nsiprofileunlocker ...
nsIStringBundleService
see also code snippets : miscellaneous : using string bundles from javascript how to localize html pages, xul
files, and js/jsm
files from bootstrapped add-ons.
... the localizing js/jsm
files uses the nsistringbundleservice: bootstrapped extensions :: localization (l10n) nsistringbundle ...
XPCOM Interface Reference
erappservicensiexternalprotocolservicensiexternalurlhandlerservicensiftpchannelnsiftpeventsinknsifactorynsifavicondatacallbacknsifaviconservicensifeednsifeedcontainernsifeedelementbasensifeedentrynsifeedgeneratornsifeedpersonnsifeedprocessornsifeedprogresslistenernsifeedresultnsifeedresultlistenernsifeedtextconstructnsifilensifileinputstreamnsifileoutputstreamnsifilepickernsifileprotocolhandlernsi
filespecnsi
filestreamsnsifileurlnsifileutilitiesnsifileviewnsifocusmanagernsiformhistory2nsiframeloadernsiframeloaderownernsiframemessagelistenernsiframemessagemanagernsiframescriptloadernsigsettingscollectionnsigsettingsservicensigeolocationprovidernsigeolocationupdatensiglobalhistorynsiglobalhistory2nsiglobalhistory3nsihtmleditornsihttpheaderlistenernsihapticfeedbacknsihttpactivitydistributornsihttpa...
...nsitaskbarpreviewnsitaskbarpreviewbuttonnsitaskbarpreviewcontrollernsitaskbarprogressnsitaskbartabpreviewnsitaskbarwindowpreviewnsitelemetrynsitextinputprocessornsitextinputprocessorcallbacknsitextinputprocessornotificationnsithreadnsithreadeventfilternsithreadinternalnsithreadmanagernsithreadobservernsithreadpoolnsithreadpoollistenernsitimernsitimercallbacknsitoolkitnsitoolkitprofilensitoolkitpro
fileservicensitraceablechannelnsitransactionnsitransactionlistnsitransactionlistenernsitransactionmanagernsitransferablensitransportnsitransporteventsinknsitransportsecurityinfonsitreeboxobjectnsitreecolumnnsitreecolumnsnsitreecontentviewnsitreeselectionnsitreeviewnsiurinsiurifixupnsiurifixupinfonsiurlnsiurlformatternsiurlparsernsiutf8converterservicensiutf8stringenumeratornsiuuidgeneratornsiupdatensiu...
XPCOM Interface Reference by grouping
dler nsicommandlinerunner component nsicomponentmanager preferences nsicontentprefobserver nsicontentprefservice nsicomponentregistrar internationalization nsibidikeyboard nsilocale io
filesystem nsidirectoryenumerator nsidirectoryiterator nsidirectoryservice nsidirectoryserviceprovider nsidirectoryserviceprovider2 nsidirindex nsidirindexlistener nsidirindexparser nsifile nsilocalfile stream nsiasyncinputstream ...
... nsiioservice nsistandardurl user nsiprompt nsipromptservice zipfile nsizipentry nsizipreader nsizipreadercache nsizipwriter file nsifilepicker nsifileprotocolhandler nsi
filespec nsi
filestreams nsifileutilities nsifileview memory nsimemory network channel nsichannel nsichanneleventsink nsirequest nsirequestobserver nsiresumablechannel nsidnsservice ...
Setting HTTP request headers
n-modify-request", false); return; } }, queryinterface: function (iid) { if (iid.equals(components.interfaces.nsiobserver) || iid.equals(components.interfaces.nsisupports)) return this; components.returncode = components.results.ns_error_no_interface; return null; }, }; var mymodule = { registerself: function (compmgr,
filespec, location, type) { var compmgr = compmgr.queryinterface(components.interfaces.nsicomponentregistrar); compmgr.registerfactorylocation(this.mycid, this.myname, this.myprogid,
filespec, location, ...
...mponents.interfaces.nsifactory)) throw components.results.ns_error_no_interface; return this; }, createinstance: function (outer, iid) { log("----------------------------> createinstance"); return new myhttplistener(); } }, canunload: function(compmgr) { return true; } }; function nsgetmodule(compmgr,
filespec) { return mymodule; } privacy and security good practice a use case for setting specific a http request header is to have a specific web site be able to check if a specific plugin / addon / extension is installed.
Storage
storage inspector extension makes it easy to view any sqlite database
files in the current profile.
... sqlite manager extension helps manage sqlite database
files on your computer.
xpidl
xpidl is a tool for generating xpcom interface information, based on xpidl interface description
files.
... it generates: c++ header
files (.h), with a commented template for full c++ implementation of the interface xpconnect typelib
files (.xpt), with runtime type information to dynamically call xpcom objects through xpconnect note: starting in gecko 9.0, xpidl has been replaced with pyxpidl in the gecko sdk.
Test-Info
each task generates one or more json-formatted data
files providing detailed information on tests run in continuous integration, typically broken down by bugzilla component.
... data
files are typically consumed by dashboards, like www.arewefissionyet.com.
Autoconfiguration in Thunderbird
in the apache configuration
files, that means something like: listen 10.2.3.4:80 (of course, you use a public ip address that you own) <virtualhost 10.2.3.4:80> #must be the first and only virtual host with this ip!
... all config
files must be served as content-type: text/xml (or application/xml), otherwise the file will be ignored.
Creating a gloda message query
more constraints can be found in the three js
files given further below.
... from https://developer.mozilla.org/docs/mozilla/thunderbird/thunderbird_extensions/demo_addon, demo3, it seems that the attributename given in these
files is the constraintname to be used (e.g.
MailNews fakeserver
the other two components are specific to the protocol type and found under similar
files in the same directory (e.g., smtpd.js).
...for xpcshell tests in mailnews/news, all
files in mailnews/news/test/postings/auto-add are automatically added based on the newsgroups header.
Building a Thunderbird extension 1: introduction
the tutorial has the following pages: introduction (this page) the extension
filesystem (setting up your local system) install manifest (the install.rdf file that contains meta-information about the extension) chrome manifest (list of packages and overlays) xul (the xml user interface language that is used to modify the thunderbird user interface) adding javascript (explains how to add some simple javascript to your thunderbird extension) installing locally (enabling the e...
... file archive utility: any utility that is capable of creating archive
files can be used.
Using MAPI with Thunderbird's Windows 7 developer builds
mapi (messaging application programming interface) is a windows feature that allows applications to send
files via a system's default mail application.
...(be sure to copy - not move - these
files.) in the uninstall sub-directory of the bin directory, run these two commands: helper.exe /setasdefaultappglobal helper.exe /setasdefaultappuser create an elevated shell and register the mapi proxy.dll as a com server.
Using COM from js-ctypes
ishellitem ifileoperation ishelllink & ipersistfile - create shortcut
files.
... example a - based on bugzilla :: bug 738501 - attachement 608538 exmaple b - based on example a ishelllink & ipersistfile & ipropertystore - uses ipropertystore to set and get the system.usermodelapp.id on shortcut
files.
DOM Inspector internals - Firefox Developer Tools
ization 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 make
files.sh almost all the interesting stuff is in resources/content/.
...if we imagine a tree structure obtained by connecting overlays as children to the
files they overlay, while ignoring any overlays used for host integration, we can visualize the host-agnostic overlay tree for a given file.
How to - Firefox Developer Tools
save a profile to save a profile, click the link labeled "save" in the recordings pane: load a profile to load a profile, click "import..." and choose the file: clear all loaded pro
files to clear all loaded pro
files, click "clear".
... if you do this, you'll lose any loaded pro
files that you have not saved.
View Source - Firefox Developer Tools
this mishighlighting can be seen by viewing the source of firefox chrome
files (such as xul documents).
... however, this shouldn't be a problem in practice when viewing typical xml
files.
Blob.size - Web APIs
example this example uses an <input> element of type file to ask the user for a group of
files, then iterates over those
files outputting their names and lengths in bytes.
... // fileinput is a htmlinputelement: <input type="file" multiple id="myfileinput"> var fileinput = document.getelementbyid("myfileinput"); //
files is a filelist object (simliar to nodelist) var
files = fileinput.
files; for (var i = 0; i <
files.length; i++) { console.log(
files[i].name + " has a size of " +
files[i].size + " bytes"); } specifications specification status comment file apithe definition of 'blob.size' in that specification.
Body.arrayBuffer() - Web APIs
nction(response) { return response.arraybuffer(); }).then(function(buffer) { audioctx.decodeaudiodata(buffer, function(decodeddata) { source.buffer = decodeddata; source.connect(audioctx.destination); }); }); }; // wire up buttons to stop and play audio play.onclick = function() { getdata(); source.start(0); play.setattribute('disabled', 'disabled'); } reading
files the response() constructor accepts
files and blobs, so it may be used to read a file into other formats.
... function readfile(file) { return new response(file).arraybuffer(); } <input type="file" onchange="readfile(this.
files[0])"> specifications specification status comment fetchthe definition of 'arraybuffer()' in that specification.
CanvasPattern.setTransform() - Web APIs
html <canvas id="canvas"></canvas> <svg id="svg1"></svg> javascript var canvas = document.getelementbyid('canvas'); var ctx = canvas.getcontext('2d'); var svg1 = document.getelementbyid('svg1'); var matrix = svg1.createsvgmatrix(); var img = new image(); img.src = 'https://mdn.mozillademos.org/
files/222/canvas_createpattern.png'; img.onload = function() { var pattern = ctx.createpattern(img, 'repeat'); pattern.settransform(matrix.rotate(-45).scale(1.5)); ctx.fillstyle = pattern; ctx.fillrect(0, 0, 400, 400); }; note that newer browser versions started to support dommatrix as an input to settransform(), so for example you could replace the svgmatrix in the above example with the fo...
...ayable code <canvas id="canvas" width="400" height="200" class="playable-canvas"></canvas> <svg id="svg1" style="display:none"></svg> <div class="playable-buttons"> <input id="edit" type="button" value="edit" /> <input id="reset" type="button" value="reset" /> </div> <textarea id="code" class="playable-code" style="height:120px"> var img = new image(); img.src = 'https://mdn.mozillademos.org/
files/222/canvas_createpattern.png'; img.onload = function() { var pattern = ctx.createpattern(img, 'repeat'); pattern.settransform(matrix.rotate(-45).scale(1.5)); ctx.fillstyle = pattern; ctx.fillrect(0, 0, 400, 400); };</textarea> var canvas = document.getelementbyid('canvas'); var ctx = canvas.getcontext('2d'); var textarea = document.getelementbyid('code'); var reset = document.getelement...
Basic animations - Web APIs
var sun = new image(); var moon = new image(); var earth = new image(); function init() { sun.src = 'https://mdn.mozillademos.org/
files/1456/canvas_sun.png'; moon.src = 'https://mdn.mozillademos.org/
files/1443/canvas_moon.png'; earth.src = 'https://mdn.mozillademos.org/
files/1429/canvas_earth.png'; window.requestanimationframe(draw); } function draw() { var ctx = document.getelementbyid('canvas').getcontext('2d'); ctx.globalcompositeoperation = 'destination-over'; ctx.clearrect(0, 0, 300, 300); // clear canvas ct...
... img.src = 'https://mdn.mozillademos.org/
files/4553/capitan_meadows,_yosemite_national_park.jpg'; var canvasxsize = 800; var canvasysize = 200; var speed = 30; // lower is faster var scale = 1.05; var y = -4.5; // vertical offset // main program var dx = 0.75; var imgw; var imgh; var x = 0; var clearx; var cleary; var ctx; img.onload = function() { imgw = img.width * scale; imgh = img.height * scale; if (imgw > canvasxsize) { ...
Using images - Web APIs
h="180" height="150"></canvas> </body> </html> function draw() { var ctx = document.getelementbyid('canvas').getcontext('2d'); var img = new image(); img.onload = function() { ctx.drawimage(img, 0, 0); ctx.beginpath(); ctx.moveto(30, 96); ctx.lineto(70, 66); ctx.lineto(103, 76); ctx.lineto(170, 15); ctx.stroke(); }; img.src = 'https://mdn.mozillademos.org/
files/5395/backdrop.png'; } the resulting graph looks like this: screenshotlive sample scaling the second variant of the drawimage() method adds two new parameters and lets us place scaled images on the canvas.
...pple.com/samples/6e/d8d545e955.jpg"></td> <td><img src="https://udn.realityripple.com/samples/b7/86ecdc3e8d.jpg"></td> </tr> </table> <img id="frame" src="https://udn.realityripple.com/samples/57/952c634159.png" width="132" height="150"> </body> </html> and here's some css to make things look nice: body { background: 0 -100px repeat-x url(https://mdn.mozillademos.org/
files/5415/bg_gallery.png) #4f191a; margin: 10px; } img { display: none; } table { margin: 0 auto; } td { padding: 15px; } tying it all together is the javascript to draw our framed images: function draw() { // loop through all images for (var i = 0; i < document.images.length; i++) { // don't add a canvas for the frame image if (document.images[i].getattribute('id') != 'fra...
DataTransfer.mozItemCount - Web APIs
this can be used, for example, to get the number of
files being dragged.
... function drop_handler(event) { var
files = []; var dt = event.datatransfer; for (var i = 0; i < dt.mozitemcount; i++)
files.push(dt.mozgetdataat("application/x-moz-file", i)); } specifications this property is not defined in any web standard.
DataTransfer - Web APIs
datatransfer.
files contains a list of all the local
files available on the data transfer.
... if the drag operation doesn't involve dragging
files, this property is an empty list.
DataTransferItem - Web APIs
datatransferitem.webkitgetasentry() returns an object based on
filesystementry representing the selected file's entry in its file system.
... this will generally be either a
filesystemfileentry or
filesystemdirectoryentry object.
Event.msConvertURL() - Web APIs
the msconverturl method instructs the html paste operation on how to modify the src attribute that corresponds to each file in the clipboarddata.
files collection, allowing otherwise inaccessible
files to be converted to blob or data uris.
... example var bloblist = []; document.getelementbyid("pastezone").addeventlistener('paste', handlepaste, false); function handlepaste(evt) { var filelist = window.clipboarddata.
files; // note that window.datatransfer.
files is not applicable.
File.getAsDataURL() - Web APIs
syntax var url = instanceoffile.getasdataurl(); returns a string representing a data: url example // fileinput is a htmlinputelement: <input type="file" id="myfileinput" multiple> var fileinput = document.getelementbyid("myfileinput"); //
files is a filelist object (similar to nodelist) var
files = fileinput.
files; // array with acceptable file types var accept = ["image/png"]; // img is a htmlimgelement: <img id="myimg"> var img = document.getelementbyid("myimg"); // if we accept the first selected file type if (accept.indexof(
files[0].mediatype) > -1) { // display the image // same as <img src="data:image/png,<imagedata>"> im...
...g.src =
files[0].getasdataurl(); } specification not part of any specification.
File.lastModified - Web APIs
files without a known last modified date return the current date.
... example reading from file input <input type="file" multiple id="fileinput"> const fileinput = document.queryselector('#fileinput'); fileinput.addeventlistener('change', (event) => { //
files is a filelist object (similar to nodelist) const
files = event.target.
files; for (let file of
files) { const date = new date(file.lastmodified); console.log(`${file.name} has a last modified date of ${date}`); } }); try the results out below: dynamically created
files if a file is created dynamically, the last modified time can be supplied in the new file() constructor function.
File.lastModifiedDate - Web APIs
files without a known last modified date returns the current date .
... example // fileinput is a htmlinputelement: <input type="file" multiple id="myfileinput"> var fileinput = document.getelementbyid("myfileinput"); //
files is a filelist object (simliar to nodelist) var
files = fileinput.
files; for (var i = 0; i <
files.length; i++) { alert(
files[i].name + " has a last modified date of " +
files[i].lastmodifieddate); } reduced time precision to offer protection against timing attacks and fingerprinting, the precision of somefile.lastmodifieddate.gettime() might get rounded depending on browser settings.
File.webkitRelativePath - Web APIs
when the change event occurs, a list of all
files contained within the selected directory hierarchies is generated and displayed.
... html content <input type="file" id="filepicker" name="filelist" webkitdirectory multiple /> <ul id="listing"></ul> javascript content document.getelementbyid("filepicker").addeventlistener("change", function(event) { let output = document.getelementbyid("listing"); let
files = event.target.
files; for (let i=0; i<
files.length; i++) { let item = document.createelement("li"); item.innerhtml =
files[i].webkitrelativepath; output.appendchild(item); }; }, false); result specifications specification status comment file and directory entries apithe definition of 'webkitrelativepath' in that specification.
FileError - Web APIs
just start chrome with the --allow-file-access-from-
files flag.
... security_err 2 access to the
files were denied for one of the following reasons: the
files might be unsafe for access within a web application.
FileReader.readAsDataURL() - Web APIs
example html <input type="file" onchange="previewfile()"><br> <img src="" height="200" alt="image preview..."> javascript function previewfile() { const preview = document.queryselector('img'); const file = document.queryselector('input[type=file]').
files[0]; const reader = new filereader(); reader.addeventlistener("load", function () { // convert image file to base64 string preview.src = reader.result; }, false); if (file) { reader.readasdataurl(file); } } live result example reading multiple
files html <input id="browse" type="file" onchange="preview
files()" multiple> <div id="preview"></div> javascript function p...
...review
files() { var preview = document.queryselector('#preview'); var
files = document.queryselector('input[type=file]').
files; function readandpreview(file) { // make sure `file.name` matches our extensions criteria if ( /\.(jpe?g|png|gif)$/i.test(file.name) ) { var reader = new filereader(); reader.addeventlistener("load", function () { var image = new image(); image.height = 100; image.title = file.name; image.src = this.result; preview.appendchild( image ); }, false); reader.readasdataurl(file); } } if (
files) { [].foreach.call(
files, readandpreview); } } note: the filereader() constructor was not supported by internet explorer for versions before 10.
FormData.append() - Web APIs
example the following line creates an empty formdata object: var formdata = new formdata(); // currently empty you can add key/value pairs to this using formdata.append: formdata.append('username', 'chris'); formdata.append('userpic', myfileinput.
files[0], 'chris.jpg'); as with regular form data, you can append multiple values with the same name.
... for example (and being compatible with php's naming conventions by adding [] to the name): formdata.append('userpic[]', myfileinput.
files[0], 'chris1.jpg'); formdata.append('userpic[]', myfileinput.
files[1], 'chris2.jpg'); this technique makes it simpler to process multi-file uploads because the resultant data structure is more conducive to looping.
HTMLInputElement.mozGetFileNameArray() - Web APIs
the htmlinputelement.mozgetfilenamearray() method returns an array of the names of the
files that were selected by the user on an html input element.
... example var num
files = 0; var filearray = {}; inputelement.mozgetfilenamearray(num
files, filearray); ...
IndexedDB API - Web APIs
indexeddb is a low-level api for client-side storage of significant amounts of structured data, including
files/blobs.
... storing images and
files in indexeddb specifications specification status comment indexed database api draft recommendation indexed database api 2.0 recommendation initial definition ...
Key Values - Web APIs
keycode_tv_audio_description_mix_up (253) "tvcontentsmenu" displays or hides the media contents available for playback (this may be a channel guide showing the currently airing programs, or a list of media
files to play).
... vk_next_favorite_channel "nextuserprofile" cycles to the next saved user profile, if this feature is supported and multiple pro
files exist.
MediaConfiguration - Web APIs
the mediaconfiguration mediacapabilities dictionary of the media capabilities api describes how media and audio
files must be configured, or defined, to be passed as a parameter of the mediacapabilities.encodinginfo() and mediacapabilities.encodinginfo() methods.
... media-source: for media source
files.
MediaSource.isTypeSupported() - Web APIs
all web apis that work with media
files use a "no/maybe/probably" approach (or, in this case, "no or probably") when determining if a media type can be used.
... this is because media
files are complex, intricate constructs with far too many subtle variations to be absolutely certain of anything until you actually use the contents of the media.
Web Audio API best practices - Web APIs
loading sounds/
files there are four main ways to load sound with the web audio api and it can be a little confusing as to which one you should use.
... when working with
files, you are looking at either the grabbing the file from an htmlmediaelement (i.e.
Web Audio API - Web APIs
these could be either computed mathematically (such as oscillatornode), or they can be recordings from sound/video
files (like audiobuffersourcenode and mediaelementaudiosourcenode) and audio streams (mediastreamaudiosourcenode).
... in fact, sound
files are just recordings of sound intensities themselves, which come in from microphones or electric instruments, and get mixed down into a single, complicated wave.
Web APIs
xture_filter_anisotropic eckeygenparams eckeyimportparams ecdhkeyderiveparams ecdsaparams effecttiming element elementcssinlinestyle elementtraversal errorevent event eventlistener eventsource eventtarget extendableevent extendablemessageevent f featurepolicy federatedcredential fetchevent file fileentrysync fileerror fileexception filelist filereader filereadersync filerequest
filesystem
filesystemdirectoryentry
filesystemdirectoryreader
filesystementry
filesystementrysync
filesystemfileentry
filesystemflags
filesystemsync focusevent fontface fontfaceset fontfacesetloadevent formdata formdataentryvalue formdataevent fullscreenoptions g gainnode gamepad gamepadbutton gamepadevent gamepadhapticactuator geolocation geolocationcoordinates geolocationpositi...
...ebitmap imagebitmaprenderingcontext imagecapture imagedata index inputdevicecapabilities inputevent installevent installtrigger intersectionobserver intersectionobserverentry interventionreportbody k keyboard keyboardevent keyboardlayoutmap keyframeeffect keyframeeffectoptions l largestcontentfulpaint layoutshift layoutshiftattribution linearaccelerationsensor linkstyle local
filesystem local
filesystemsync localmediastream location lock lockmanager lockedfile m midiaccess midiconnectionevent midiinput midiinputmap midimessageevent midioutputmap mscandidatewindowhide mscandidatewindowshow mscandidatewindowupdate msgestureevent msgraphicstrust msmanipulationevent msrangecollection mssitemodeevent magnetometer mathmlelement mediacapabilities mediacapabilitiesinfo ...
Using the progressbar role - Accessibility
examples example 1: basic progressbar with percentage values <div role="progressbar" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100">20 %</div> example 2: using aria-valuetext <div role="progressbar" aria-valuenow="20" aria-valuemin="0" aria-valuetext="step 2: copying
files...
... " aria-valuemax="100"> step 2: copying
files...
@font-face - CSS: Cascading Style Sheets
font mime types format mime type truetype font/ttf opentype font/otf web open font format font/woff web open font format 2 font/woff2 notes web fonts are subject to the same domain restriction (font
files must be on the same domain as the page using them), unless http access controls are used to relax this restriction.
...ng> | <custom-ident>+ examples specifying a downloadable font this example simply specifies a downloadable font to use, applying it to the entire body of the document: view the live example <html> <head> <title>web font sample</title> <style type="text/css" media="screen, print"> @font-face { font-family: "bitstream vera serif bold"; src: url("https://mdn.mozillademos.org/
files/2468/verasebd.ttf"); } body { font-family: "bitstream vera serif bold", serif } </style> </head> <body> this is bitstream vera serif bold.
Using CSS gradients - CSS: Cascading Style Sheets
because gradients are dynamically generated, they can negate the need for the raster image
files that traditionally were used to achieve similar effects.
... <div class="layered-image"></div> div { width: 300px; height: 150px; } .layered-image { background: linear-gradient(to right, transparent, mistyrose), url("https://mdn.mozillademos.org/
files/15525/critters.png"); } stacked gradients you can even stack gradients with other gradients.
background-attachment - CSS: Cascading Style Sheets
</p> css p { background-image: url("https://mdn.mozillademos.org/
files/12057/starsolid.gif"); background-attachment: fixed; } result multiple background images this property supports multiple background images.
...</p> css p { background-image: url("https://mdn.mozillademos.org/
files/12057/starsolid.gif"), url("https://mdn.mozillademos.org/
files/12059/startransparent.gif"); background-attachment: fixed, scroll; background-repeat: no-repeat, repeat-y; } result specifications specification status comment css backgrounds and borders module level 3the definition of 'background-attachment' in that specification.
background-image - CSS: Cascading Style Sheets
to specify multiple background images, supply multiple values, separated by a comma: background-image: linear-gradient(to bottom, rgba(255,255,0,0.5), rgba(0,0,255,0.5)), url('https://mdn.mozillademos.org/
files/7693/catfront.png'); values none is a keyword denoting the absence of images.
... </p> <p>and no more.</p> </div> css p { font-size: 1.5em; color: #fe7f88; background-image: none; background-color: transparent; } div { background-image: url("https://mdn.mozillademos.org/
files/6457/mdn_logo_only_color.png"); } .catsandstars { background-image: url("https://mdn.mozillademos.org/
files/11991/startransparent.gif"), url("https://mdn.mozillademos.org/
files/7693/catfront.png"); background-color: transparent; } result specifications specification status comment css backgrounds and borders module level 3the definition of 'backg...
background-position - CSS: Cascading Style Sheets
ampleone">example one</div> <div class="exampletwo">example two</div> <div class="examplethree">example three</div> css /* shared among all <div>s */ div { background-color: #ffee99; background-repeat: no-repeat; width: 300px; height: 80px; margin-bottom: 12px; } /* these examples use the `background` shorthand property */ .exampleone { background: url("https://mdn.mozillademos.org/
files/11987/startransparent.gif") #ffee99 2.5cm bottom no-repeat; } .exampletwo { background: url("https://mdn.mozillademos.org/
files/11987/startransparent.gif") #ffee99 left 4em bottom 1em no-repeat; } /* multiple background images: each image is matched with the corresponding position, from first specified to last.
... */ .examplethree { background-image: url("https://mdn.mozillademos.org/
files/11987/startransparent.gif"), url("https://mdn.mozillademos.org/
files/7693/catfront.png"); background-position: 0px 0px, right 3em bottom 2em; } result specifications specification status comment css backgrounds and borders module level 3the definition of 'background-position' in that specification.
background-repeat - CSS: Cascading Style Sheets
peat-y <div class="four"></div> </li> <li>space <div class="five"></div> </li> <li>round <div class="six"></div> </li> <li>repeat-x, repeat-y (multiple images) <div class="seven"></div> </li> </ol> css /* shared for all divs in example */ ol, li { margin: 0; padding: 0; } li { margin-bottom: 12px; } div { background-image: url(https://mdn.mozillademos.org/
files/12005/starsolid.gif); width: 160px; height: 70px; } /* background repeats */ .one { background-repeat: no-repeat; } .two { background-repeat: repeat; } .three { background-repeat: repeat-x; } .four { background-repeat: repeat-y; } .five { background-repeat: space; } .six { background-repeat: round; } /* multiple images */ .seven { background-image: url(https://mdn.mozilla...
...demos.org/
files/12005/starsolid.gif), url(https://developer.cdn.mozilla.net/media/redesign/img/favicon32.png); background-repeat: repeat-x, repeat-y; height: 144px; } result in this example, each list item is matched with a different value of background-repeat.
content - CSS: Cascading Style Sheets
mozilla home page</a></li> <li><a id="mdn" href="https://developer.mozilla.org/"> mozilla developer network</a></li> </ul> css a { text-decoration: none; border-bottom: 3px dotted navy; } a::after { content: " (" attr(id) ")"; } #moz::before { content: url("https://mozorg.cdn.mozilla.net/media/img/favicon.ico"); } #mdn::before { content: url("https://mdn.mozillademos.org/
files/7691/mdn-favicon16.png"); } li { margin: 1em; } result element replacement this example replaces an element's content with an image.
... html <div id="replaced">mozilla</div> css #replaced { content: url("https://mdn.mozillademos.org/
files/12668/mdn.svg"); } #replaced::after { /* will not show if element replacement is supported */ content: " (" attr(id) ")"; } result specifications specification status comment css generated content module level 3the definition of 'content' in that specification.
Constraint validation - Developer guides
here is the html part: <label for="fs">select a file smaller than 75 kb : </label> <input type="file" id="fs"> this displays: the javascript reads the file selected, uses the file.size() method to get its size, compares it to the (hard coded) limit, and calls the constraint api to inform the browser if there is a violation: function check
filesize() { var fs = document.getelementbyid("fs"); var
files = fs.
files; // if there is (at least) one file selected if (
files.length > 0) { if (
files[0].size > 75 * 1024) { // check the constraint fs.setcustomvalidity("the selected file must not be larger than 75 kb"); return; } } // no custom constraint violation fs.setcustomvalidity(""); } finally we hook th...
...e method with the correct event: window.onload = function () { document.getelementbyid("fs").onchange = check
filesize; } you can see a live example of the file size constraint validation.
HTML5 - Developer guides
using
files from web applications support for the new html5 file api has been added to gecko, making it possible for web applications to access local
files selected by the user.
... this includes support for selecting multiple
files using the <input> of type file html element's new multiple attribute.
Allowing cross-origin use of images and canvas - HTML: Hypertext Markup Language
web server configuration the first thing we need is a server that's configured to host images with the access-control-allow-origin header configured to permit cross-origin access to image
files.
...consider the html5 boilerplate apache server configuration file for cors images, shown below: <ifmodule mod_setenvif.c> <ifmodule mod_headers.c> <
filesmatch "\.(bmp|cur|gif|ico|jpe?g|png|svgz?|webp)$"> setenvif origin ":" is_cors header set access-control-allow-origin "*" env=is_cors </
filesmatch> </ifmodule> </ifmodule> in short, this configures the server to allow graphic
files (those with the extensions ".bmp", ".cur", ".gif", ".ico", ".jpg", ".jpeg", ".png", ".svg", ".svgz", and ".webp") to be accessed cross-origin from anywhere on the internet.
<applet>: The Embed Java Applet element - HTML: Hypertext Markup Language
archive this attribute refers to an archived or compressed version of the applet and its associated class
files, which might help reduce download time.
... codebase this attribute gives the absolute or relative url of the directory where applets' .class
files referenced by the code attribute are stored.
<video>: The Video Embed element - HTML: Hypertext Markup Language
you can play audio
files using a <video> element.
... addtype video/ogg .ogm addtype video/ogg .ogv addtype video/ogg .ogg if you serve your videos as webm, you can fix this problem for the apache web server by adding the extension used by your video
files (".webm" is the most common one) to the mime type "video/webm" via the "mime.types" file in "/etc/apache" or via the "addtype" configuration directive in httpd.conf.
HTML elements reference - HTML: Hypertext Markup Language
element description <a> the html <a> element (or anchor element), with its href attribute, creates a hyperlink to web pages,
files, email addresses, locations in the same page, or anything else a url can address.
... <dir> the obsolete html directory element (<dir>) is used as a container for a directory of
files and/or folders, potentially with styles and icons applied by the user agent.
HTTP conditional requests - HTTP
integrity of a partial download partial downloading of
files is a functionality of http that allows to resume previous operations, saving bandwidth and time, by keeping the already obtained information: a server supporting partial downloads broadcasts this by sending the accept-ranges header.
...the client first reads the original
files, modifies them, and finally pushes them to the server: unfortunately, things get a little inaccurate as soon as we take into account concurrency.
Cache-Control - HTTP
examples preventing caching to disable caching of a resource, you can send the following response header: good: cache-control: no-store bad: cache-control: private,no-cache,no-store,max-age=0,must-revalidate,pre-check=0,post-check=0 caching static assets for the
files in the application that will not change, you can usually add aggressive caching by sending the response header below.
... this includes static
files that are served by the application such as images, css
files and javascript
files, for example.
CSP: base-uri - HTTP
filesystem: allows
filesystem: uris to be used as a content source.
...some browsers specifically exclude blob and
filesystem from source directives.
CSP: child-src - HTTP
filesystem: allows
filesystem: uris to be used as a content source.
...some browsers specifically exclude blob and
filesystem from source directives.
CSP: connect-src - HTTP
filesystem: allows
filesystem: uris to be used as a content source.
...some browsers specifically exclude blob and
filesystem from source directives.
CSP: default-src - HTTP
filesystem: allows
filesystem: uris to be used as a content source.
...some browsers specifically exclude blob and
filesystem from source directives.
CSP: font-src - HTTP
filesystem: allows
filesystem: uris to be used as a content source.
...some browsers specifically exclude blob and
filesystem from source directives.
CSP: form-action - HTTP
filesystem: allows
filesystem: uris to be used as a content source.
...some browsers specifically exclude blob and
filesystem from source directives.
HTTP Messages - HTTP
they provide http messages through config
files (for proxies or servers), apis (for browsers), or other interfaces.
... the http/2 binary framing mechanism has been designed to not require any alteration of the apis or config
files applied: it is broadly transparent to the user.
Codecs used by WebRTC - Web media technologies
below are the video codecs which are required in any fully webrtc-compliant browser, as well as the pro
files which are required and the browsers which actually meet the requirement.
... specifying and configuring codecs getting the supported codecs because a given browser and platform may have different availability among the potential codecs—and may have multiple pro
files or levels supported for a given codec—the first step when configuring codecs for an rtcpeerconnection is to get the list of available codecs.
Web media technologies
these can be used invisibly as a destination for more complex media, or with visible controls for user-controlled playback of audio
files.
...it can be used to simply present video
files, or as a destination for streamed video content.
Performance fundamentals - Web Performance
simply downloading large
files can take longer, even over a fast network, because mobile hardware is sometimes too slow to take advantage of all the available bandwidth.
...if so, edit the static
files to remove any private information, then send them to others for help (submit a bugzilla report, for example, or host it on a server and share the url).
Progressive web app structure - Progressive web apps (PWAs)
.slug+'.jpg'; var options = { body: notifbody, icon: notifimg } var notif = new notification(notiftitle, options); settimeout(randomnotification, 30000); } the service worker the last file we will quickly look at is the service worker: sw.js — it first imports data from the games.js file: self.importscripts('data/games.js'); next, it creates a list of all the
files to be cached, both from the app shell and the content: var cachename = 'js13kpwa-v1'; var appshell
files = [ '/pwa-examples/js13kpwa/', '/pwa-examples/js13kpwa/index.html', '/pwa-examples/js13kpwa/app.js', '/pwa-examples/js13kpwa/style.css', '/pwa-examples/js13kpwa/fonts/graduate.eot', '/pwa-examples/js13kpwa/fonts/graduate.ttf', '/pwa-examples/js13kpwa/fonts/graduate.woff', '/pwa...
...icons/icon-96.png', '/pwa-examples/js13kpwa/icons/icon-128.png', '/pwa-examples/js13kpwa/icons/icon-168.png', '/pwa-examples/js13kpwa/icons/icon-192.png', '/pwa-examples/js13kpwa/icons/icon-256.png', '/pwa-examples/js13kpwa/icons/icon-512.png' ]; var gamesimages = []; for(var i=0; i<games.length; i++) { gamesimages.push('data/img/'+games[i].slug+'.jpg'); } var contenttocache = appshell
files.concat(gamesimages); the next block installs the service worker, which then actually caches all the
files contained in the above list: self.addeventlistener('install', function(e) { console.log('[service worker] install'); e.waituntil( caches.open(cachename).then(function(cache) { console.log('[service worker] caching all: app shell and content'); return cache.addall(content...
How to make PWAs re-engageable using Notifications and Push - Progressive web apps (PWAs)
push example push needs the server part to work, so we're not able to include it in the js13kpwa example hosted on github pages, as it offers hosting of static
files only.
... this demo consists of three
files: index.js, which contains the source code of our app server.js, which contains the server part (written in node.js) service-worker.js, which contains the service worker-specific code.
Media - Progressive web apps (PWAs)
these are ways of separating styling rules for different media types into different
files.
... so far, all the style rules in this tutorial have been specified in
files.
in - SVG: Scalable Vector Graphics
--> <feblend in="backgroundimage" in2="sourcegraphic" mode="multiply"/> </filter> </defs> <image xlink:href="https://developer.mozilla.org/
files/6457/mdn_logo_only_color.png" x="10%" y="10%" width="80%" height="80%"/> <circle cx="50%" cy="40%" r="40%" fill="#c00" style="filter:url(#backgroundmultiply);" /> </svg> <svg style="width:200px; height:200px; display: inline;" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <defs> <filter id="imagemultiply"> <!-- this is a workaround.
... --> <feimage xlink:href="https://developer.mozilla.org/
files/6457/mdn_logo_only_color.png" x="10%" y="10%" width="80%" height="80%"/> <feblend in2="sourcegraphic" mode="multiply"/> </filter> </defs> <circle cx="50%" cy="40%" r="40%" fill="#c00" style="filter:url(#imagemultiply);"/> </svg> </div> result specifications specification status comment filter effects module level 1the definition of 'in' in that specification.
Tools for SVG - SVG: Scalable Vector Graphics
« previous now that we covered the basics of the svg internals, we will take a look at some tools to work with svg
files.
... batik offers a viewer (squiggle), a rasterizer for png output, an svg pretty printer to format svg
files, and a truetype-to-svg-font converter.
SVG: Scalable Vector Graphics
svg images and their related behaviors are defined in xml text
files, which means they can be searched, indexed, scripted, and compressed.
...with proper libraries, svg
files can even be localized on-the-fly.
Securing your site - Web security
this article explains some of those and shows how to configure your server to serve
files with the correct mime types.
...you can ignore specific ips, restrict access to certain areas of website, protect different
files, protect against image hotlinking, and a lot more.
Index - XSLT: Extensible Stylesheet Language Transformations
these are the same
files used in the generating html example in the xslt in netscape gecko article.
... 12 setting parameters xslt while running transformations using precoded .xsl and .xml
files is quite useful, configuring the .xsl file from javascript may be even more useful.
Basic Example - XSLT: Extensible Stylesheet Language Transformations
these are the same
files used in the generating html example in the xslt in netscape gecko article.
...late> <xsl:template match="myns:body"> <xsl:copy> <xsl:apply-templates select="@*|node()"/> </xsl:copy> </xsl:template> <xsl:template match="@*|node()"> <xsl:copy> <xsl:apply-templates select="@*|node()"/> </xsl:copy> </xsl:template> </xsl:stylesheet> the example loads using synchronous xmlhttprequest both the .xsl (xslstylesheet) and the .xml (xmldoc)
files into memory.
Virtualenv
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).
Declaring types
for example, to create a type for an array of c standard i/o file pointers (perhaps for tracking a number of active
files on disk): const file = new ctypes.structtype("file").ptr; // create file as a file * type const filearray = new ctypes.arraytype(file); // create a filearray type in this example, file is an opaque pointer we can use to refer to c file records, as defined in stdio.h.
Streams - Plugins
seekable streams support random access (for example, local
files or http servers that support byte-range requests).
Gecko Plugin API Reference - Plugins
much data the plug-in can accept writing the stream to the plug-in sending the stream in random-access mode sending the stream in file mode sending a stream creating a stream pushing data into the stream deleting the stream example of sending a stream urls getting urls getting the url and displaying the page posting urls posting data to an http server uploading
files to an ftp server sending mail memory allocating and freeing memory mac os flushing memory (mac os only) version, ui, and status information displaying a status line message getting agent information getting the current version finding out if a feature exists reloading a plug-in plug-in side plug-in api this chapter describes methods in the plug-in api that ar...
Browser Toolbox - Firefox Developer Tools
you will be presented with a dialog like this (it can be removed by setting the devtools.debugger.prompt-connection property to false): click ok, and the browser toolbox will open in its own window: you'll be able to inspect the browser's chrome windows and see, and be able to debug, all the javascript
files loaded by the browser itself and by any add-ons that are running.
Access debugging in add-ons - Firefox Developer Tools
window.addeventlistener("debugger:editorunloaded") relevant
files: chrome://browser/content/devtools/debugger-controller.js chrome://browser/content/devtools/debugger-toolbar.js chrome://browser/content/devtools/debugger-view.js chrome://browser/content/devtools/debugger-panes.js unfortunately there is not yet any api to evaluate watches/expressions within the debugged scope, or highlight elements on the page that are referenced as variables in the debu...
How to - Firefox Developer Tools
access debugging in add-onsbreaking on exceptionsdebug eval sourcesdisable breakpointsexamine, modify, and watch variableshighlight and inspect dom nodesignore a sourceopen the debuggerpretty-print a minified
filesearchset a breakpointset a conditional breakpointset watch expressionsstep through codeuse a source mapuse watchpoints ...
Debugger keyboard shortcuts - Firefox Developer Tools
command windows macos linux close current file ctrl + w cmd + w ctrl + w search for a string in the current file ctrl + f cmd + f ctrl + f search for a string in all
files ctrl + shift + f cmd + shift + f ctrl + shift + f find next in the current file ctrl + g cmd + g ctrl + g search for scripts by name ctrl + p cmd + p ctrl + p resume execution when at a breakpoint f8 f8 1 f8 step over f10 f10 1 f10 step into f11 f11 1 f11 step out shift + f11 shift + f11 1 shift + f11 toggle breakpoint on the currently selected line ctrl + b cmd + b ctrl + b toggle conditional breakpoint on the currently ...
All keyboard shortcuts - Firefox Developer Tools
enter return enter debugger command windows macos linux close current file ctrl + w cmd + w ctrl + w search for a string in the current file ctrl + f cmd + f ctrl + f search for a string in all
files ctrl + shift + f cmd + shift + f ctrl + shift + f find next in the current file ctrl + g cmd + g ctrl + g search for scripts by name ctrl + p cmd + p ctrl + p resume execution when at a breakpoint f8 f8 1 f8 step over f10 f10 1 f10 step into f11 f11 1 f11 step out shift + f11 shift + ...
DataTransfer.clearData() - Web APIs
this method does not remove
files from the drag operation, so it's possible for there still to be an entry with the type "
files" left in the object's datatransfer.types list if there are any
files included in the drag.
Document - Web APIs
internet explorer notes microsoft defines some non-standard properties: document.
filesize* returns size in bytes of the document.
How to create a DOM tree - Web APIs
dom trees can be queried using xpath expressions, converted to strings or written to a local or remote
files using xmlserializer (without having to first convert to a string), posted to a web server (via xmlhttprequest), transformed using xslt, xlink, converted to a javascript object through a jxon algorithm, etc.
ErrorEvent - Web APIs
the errorevent interface represents events providing information related to errors in scripts or in
files.
File.getAsBinary() - Web APIs
example // fileinput is an htmlinputelement: <input type="file" id="myfileinput" multiple> var fileinput = document.getelementbyid("myfileinput"); //
files is a filelist object (similar to nodelist) var
files = fileinput.
files; // object for allowed media types var accept = { binary : ["image/png", "image/jpeg"], text : ["text/plain", "text/css", "application/xml", "text/html"] }; var file; for (var i = 0; i <
files.length; i++) { file =
files[i]; // if file type could be detected if (file !== null) { if (accept.binary.indexof(fi...
File.getAsText() - Web APIs
example // fileinput is a htmlinputelement: <input type="file" id="myfileinput" multiple> var fileinput = document.getelementbyid("myfileinput"); //
files is a filelist object (similar to nodelist) var
files = fileinput.
files; // object for allowed media types var accept = { binary : ["image/png", "image/jpeg"], text : ["text/plain", "text/css", "application/xml", "text/html"] }; var file; for (var i = 0; i <
files.length; i++) { file =
files[i]; // if file type could be detected if (file !== null) { if (accept.text.indexof(file...
File.name - Web APIs
example <input type="file" multiple onchange="processselected
files(this)"> function processselected
files(fileinput) { var
files = fileinput.
files; for (var i = 0; i <
files.length; i++) { alert("filename " +
files[i].name); } } try the results out below: specifications specification status comment file apithe definition of 'name' in that specification.
File.type - Web APIs
syntax var name = file.type; value a string, containing the media type(mime) indicating the type of the file, for example "image/png" for png images example <input type="file" multiple onchange="showtype(this)"> function showtype(fileinput) { var
files = fileinput.
files; for (var i = 0; i <
files.length; i++) { var name =
files[i].name; var type =
files[i].type; alert("filename: " + name + " , type: " + type); } } note: based on the current implementation, browsers won't actually read the bytestream of a file to determine its media type.
FileException - Web APIs
security_err 2 access to the
files were denied for one of the following reasons: the
files might be unsafe for access within a web application.
FileReader: abort event - Web APIs
ddeventlistener('loadstart', handleevent); reader.addeventlistener('load', handleevent); reader.addeventlistener('loadend', handleevent); reader.addeventlistener('progress', handleevent); reader.addeventlistener('error', handleevent); reader.addeventlistener('abort', handleevent); } function handleselected(e) { eventlog.textcontent = ''; const selectedfile = fileinput.
files[0]; if (selectedfile) { addlisteners(reader); reader.readasdataurl(selectedfile); } reader.abort(); } fileinput.addeventlistener('change', handleselected); result specifications specification status file api working draft ...
FileReader: error event - Web APIs
bubbles no cancelable no interface progressevent event handler property filereader.onerror examples const fileinput = document.queryselector('input[type="file"]'); const reader = new filereader(); function handleselected(e) { const selectedfile = fileinput.
files[0]; if (selectedfile) { reader.addeventlistener('error', () => { console.error(`error occurred reading file: ${selectedfile.name}`); }); reader.addeventlistener('load', () => { console.error(`file: ${selectedfile.name} read successfully`); }); reader.readasdataurl(selectedfile); } } fileinput.addeventlistener('change', ha...
FileReader: load event - Web APIs
ddeventlistener('loadstart', handleevent); reader.addeventlistener('load', handleevent); reader.addeventlistener('loadend', handleevent); reader.addeventlistener('progress', handleevent); reader.addeventlistener('error', handleevent); reader.addeventlistener('abort', handleevent); } function handleselected(e) { eventlog.textcontent = ''; const selectedfile = fileinput.
files[0]; if (selectedfile) { addlisteners(reader); reader.readasdataurl(selectedfile); } } fileinput.addeventlistener('change', handleselected); result specifications specification status file api working draft ...
FileReader: loadend event - Web APIs
ddeventlistener('loadstart', handleevent); reader.addeventlistener('load', handleevent); reader.addeventlistener('loadend', handleevent); reader.addeventlistener('progress', handleevent); reader.addeventlistener('error', handleevent); reader.addeventlistener('abort', handleevent); } function handleselected(e) { eventlog.textcontent = ''; const selectedfile = fileinput.
files[0]; if (selectedfile) { addlisteners(reader); reader.readasdataurl(selectedfile); } } fileinput.addeventlistener('change', handleselected); result specifications specification status file api working draft ...
FileReader: loadstart event - Web APIs
ddeventlistener('loadstart', handleevent); reader.addeventlistener('load', handleevent); reader.addeventlistener('loadend', handleevent); reader.addeventlistener('progress', handleevent); reader.addeventlistener('error', handleevent); reader.addeventlistener('abort', handleevent); } function handleselected(e) { eventlog.textcontent = ''; const selectedfile = fileinput.
files[0]; if (selectedfile) { addlisteners(reader); reader.readasdataurl(selectedfile); } } fileinput.addeventlistener('change', handleselected); result specifications specification status file api working draft ...
onerror - Web APIs
the filereader onerror handler receives an event object, not an error object, as a parameter, but an error can be accessed from the filereader object, as instanceoffilereader.error // callback from a <input type="file" onchange="onchange(event)"> function onchange(event) { var file = event.target.
files[0]; var reader = new filereader(); reader.onerror = function(event) { alert("failed to read file!\n\n" + reader.error); reader.abort(); // (...does this do anything useful in an onerror handler?) }; reader.readastext(file); } ...
FileReader.onload - Web APIs
example // callback from a <input type="file" onchange="onchange(event)"> function onchange(event) { var file = event.target.
files[0]; var reader = new filereader(); reader.onload = function(e) { // the file's text will be printed here console.log(e.target.result) }; reader.readastext(file); } ...
FileReader: progress event - Web APIs
ddeventlistener('loadstart', handleevent); reader.addeventlistener('load', handleevent); reader.addeventlistener('loadend', handleevent); reader.addeventlistener('progress', handleevent); reader.addeventlistener('error', handleevent); reader.addeventlistener('abort', handleevent); } function handleselected(e) { eventlog.textcontent = ''; const selectedfile = fileinput.
files[0]; if (selectedfile) { addlisteners(reader); reader.readasdataurl(selectedfile); } } fileinput.addeventlistener('change', handleselected); result specifications specification status file api working draft ...
FileReader.result - Web APIs
var fileinput = document.queryselector('input[type="file"]'); function read(callback) { var file = fileinput.
files.item(0); var reader = new filereader(); reader.onload = function() { callback(reader.result); } reader.readastext(file); } specifications specification status comment file apithe definition of 'result' in that specification.
FileRequest - Web APIs
specifications specification status comment
filesystem api editor's draft draft proposal.
FormData.set() - Web APIs
example the following line creates an empty formdata object: var formdata = new formdata(); // currently empty you can set key/value pairs on this using formdata.set: formdata.set('username', 'chris'); formdata.set('userpic', myfileinput.
files[0], 'chris.jpg'); if the sent value is different than string or blob it will be automatically converted to string: formdata.set('name', 72); formdata.get('name'); // "72" specifications specification status comment xmlhttprequestthe definition of 'set()' in that specification.
HTMLFormElement - Web APIs
e="radio" name="pet" value="dog"> dog</label></p> </fieldset> <fieldset> <legend>owned vehicles</legend> <p><label><input type="checkbox" name="vehicle" value="bike">i have a bike</label></p> <p><label><input type="checkbox" name="vehicle" value="car">i have a car</label></p> </fieldset> <p><button>submit</button></p> </form> </body> </html> submitting forms and uploading
files using xmlhttprequest if you want to know how to serialize and submit a form using the xmlhttprequest api, please read this paragraph.
HTMLHeadElement - Web APIs
htmlheadelement.profile is a domstring representing the uris of one or more metadata pro
files (white space separated).
HTMLImageElement.alt - Web APIs
<div class="container"> <div class="left-margin"> <img src="/
files/16861/margin-flourish.svg" alt=""> </div> <div class="contents"> <p>lorem ipsum dolor sit amet, consectetur adipiscing elit.
HTMLImageElement.crossOrigin - Web APIs
const imageurl = "https://mdn.mozillademos.org/
files/16797/clock-demo-400px.png"; const container = document.queryselector(".container"); function loadimage(url) { const image = new image(200, 200); image.addeventlistener("load", () => container.prepend(image) ); image.addeventlistener("error", () => { const errmsg = document.createelement("output"); errmsg.value = `error loading image at ${url}`; container.append(errmsg);...
HTMLImageElement.currentSrc - Web APIs
html <img src="/
files/16797/clock-demo-400px.png" alt="clock" srcset="/
files/16864/clock-demo-200px.png 200w, /
files/16797/clock-demo-400px.png 400w" sizes="(max-width: 400px) 50%, 90%"> javascript var clockimage = document.queryselector("img"); let p = document.createelement("p"); if (!clockimage.currentsrc.endswith("200px.png")) { p.innertext = "using the 200px image."; } else { p.innertext ...
HTMLImageElement.height - Web APIs
<p>image height: <span class="size">?</span>px (resize to update)</p> <img src="/
files/17373/clock-demo-200px.png" alt="clock" srcset="/
files/17373/clock-demo-200px.png 200w, /
files/17374/clock-demo-400px.png 400w" sizes="(max-width: 400px) 200px, 300px"> javascript the javascript code looks at the height to determine the height of the image given the width at which it's currently drawn.
HTMLImageElement.naturalHeight - Web APIs
html <div class="box"> <img src="/
files/16797/clock-demo-400px.png" class="image"> </div> <div class="output"> </div> the html features a 400x398 pixel image which is placed inside a <div>.
HTMLImageElement.naturalWidth - Web APIs
html <div class="box"> <img src="/
files/16797/clock-demo-400px.png" class="image"> </div> <div class="output"> </div> the html features a 400x398 pixel image which is placed inside a <div>.
HTMLImageElement.sizes - Web APIs
award-winning stuff, i'm sure.</p> <img src="/
files/16870/new-york-skyline-wide.jpg" srcset="/
files/16870/new-york-skyline-wide.jpg 3724w, /
files/16869/new-york-skyline-4by3.jpg 1961w, /
files/16871/new-york-skyline-tall.jpg 1060w" sizes="((min-width: 50em) and (max-width: 60em)) 50em, ((min-width: 30em) and (max-width: 50em)) 30em, (max-width: 30em) 20em"> <p>then there's ev...
HTMLImageElement.srcset - Web APIs
<div class="box"> <img src="/
files/16797/clock-demo-200px.png" alt="clock" srcset="/
files/16864/clock-demo-200px.png 1x, /
files/16797/clock-demo-400px.png 2x"> </div> css the css simply specifies that the image and its surrounding box should be 200 pixels square and should have a simple border around it.
HTMLImageElement.width - Web APIs
<p>image width: <span class="size">?</span>px (resize to update)</p> <img src="/
files/16864/clock-demo-200px.png" alt="clock" srcset="/
files/16864/clock-demo-200px.png 200w, /
files/16797/clock-demo-400px.png 400w" sizes="(max-width: 400px) 200px, 400px"> javascript the javascript code looks at the width to determine the width of the image at the moment.
HTMLInputElement.multiple - Web APIs
example // fileinput is a <input type=file multiple> let fileinput = document.getelementbyid('myfileinput'); if (fileinput.multiple == true) { for (let i = 0; i < fileinput.
files.length; i++) { // loop fileinput.
files } // only one file available } else { let file = fileinput.
files.item(0); } ...
HTMLScriptElement - Web APIs
javascript
files should be served with the application/javascript mime type, but browsers are lenient and block them only if the script is served with an image type (image/*), video type (video/*), audio type (audio/*), or text/csv.
Ajax navigation example - Web APIs
to see how it works, please create the following
files (or git clone https://github.com/giabao/mdn-ajax-nav-example.git ): note: for fully integrating the <form> elements within this mechanism, please take a look at the paragraph submitting forms and uploading
files.
IDBDatabase - Web APIs
idbdatabase.createmutablefile() creates a file handle, allowing
files to be stored inside an indexeddb database.
WebGLRenderingContext.vertexAttribPointer() - Web APIs
however, if you are designing the format yourself, or your geometry is in text
files (like wavefront .obj
files) and must be converted into an arraybuffer at runtime, you have free choice on how to structure the memory.
WebGL by example - Web APIs
miscellaneous advanced examples video textures this example demonstrates how to use video
files as textures.
WebGL best practices - Web APIs
it also adds additional compression that makes basis universal compressed texture
files much smaller than regular compressed textures over-the-wire, more comparable to jpeg.
WebXR Device API - Web APIs
using webxr input pro
files a guide to interpreting the json data provided by the webxr input pro
files registry, which can be used to determine what options and controls are available on the user's available input devices.
Advanced techniques: Creating and sequencing audio - Web APIs
et's create another async function to set up the sample — we can combine the two async functions in a nice promise pattern to perform further actions when this file is loaded and buffered: async function setupsample() { const filepath = 'dtmf.mp3'; const sample = await getfile(audioctx, filepath); return sample; } note: you can easily modify the above function to take an array of
files and loop over them to load more than one sample.
Using Web Workers - Web APIs
in this section we'll discuss the javascript found in our basic shared worker example (run shared worker): this is very similar to the basic dedicated worker example, except that it has two functions available handled by different script
files: multiplying two numbers, or squaring a number.
XMLDocument.load() - Web APIs
(to test this functionality, create the
files on your local disk or on a webserver rather than loading the load.html file from the lxr-generated page, which will serve the text.xml file as html.) specifications old w3c working draft of the dom level 3 load & save module ...
XMLHttpRequest: abort event - Web APIs
ntlistener('progress', handleevent); xhr.addeventlistener('error', handleevent); xhr.addeventlistener('abort', handleevent); } function runxhr(url) { log.textcontent = ''; const xhr = new xmlhttprequest(); addlisteners(xhr); xhr.open("get", url); xhr.send(); return xhr; } xhrbuttonsuccess.addeventlistener('click', () => { runxhr('https://mdn.mozillademos.org/
files/16553/dgszyjnxcaipwzy.jpg'); }); xhrbuttonerror.addeventlistener('click', () => { runxhr('https://somewhere.org/i-dont-exist'); }); xhrbuttonabort.addeventlistener('click', () => { runxhr('https://mdn.mozillademos.org/
files/16553/dgszyjnxcaipwzy.jpg').abort(); }); result specifications specification status comment xmlhttprequest living standard ...
XMLHttpRequest: error event - Web APIs
ntlistener('progress', handleevent); xhr.addeventlistener('error', handleevent); xhr.addeventlistener('abort', handleevent); } function runxhr(url) { log.textcontent = ''; const xhr = new xmlhttprequest(); addlisteners(xhr); xhr.open("get", url); xhr.send(); return xhr; } xhrbuttonsuccess.addeventlistener('click', () => { runxhr('https://mdn.mozillademos.org/
files/16553/dgszyjnxcaipwzy.jpg'); }); xhrbuttonerror.addeventlistener('click', () => { runxhr('https://somewhere.org/i-dont-exist'); }); xhrbuttonabort.addeventlistener('click', () => { runxhr('https://mdn.mozillademos.org/
files/16553/dgszyjnxcaipwzy.jpg').abort(); }); result specifications specification status comment xmlhttprequest living standard ...
XMLHttpRequest: load event - Web APIs
ntlistener('progress', handleevent); xhr.addeventlistener('error', handleevent); xhr.addeventlistener('abort', handleevent); } function runxhr(url) { log.textcontent = ''; const xhr = new xmlhttprequest(); addlisteners(xhr); xhr.open("get", url); xhr.send(); return xhr; } xhrbuttonsuccess.addeventlistener('click', () => { runxhr('https://mdn.mozillademos.org/
files/16553/dgszyjnxcaipwzy.jpg'); }); xhrbuttonerror.addeventlistener('click', () => { runxhr('https://somewhere.org/i-dont-exist'); }); xhrbuttonabort.addeventlistener('click', () => { runxhr('https://mdn.mozillademos.org/
files/16553/dgszyjnxcaipwzy.jpg').abort(); }); result specifications specification status comment xmlhttprequest living standard ...
XMLHttpRequest: loadend event - Web APIs
ntlistener('progress', handleevent); xhr.addeventlistener('error', handleevent); xhr.addeventlistener('abort', handleevent); } function runxhr(url) { log.textcontent = ''; const xhr = new xmlhttprequest(); addlisteners(xhr); xhr.open("get", url); xhr.send(); return xhr; } xhrbuttonsuccess.addeventlistener('click', () => { runxhr('https://mdn.mozillademos.org/
files/16553/dgszyjnxcaipwzy.jpg'); }); xhrbuttonerror.addeventlistener('click', () => { runxhr('https://somewhere.org/i-dont-exist'); }); xhrbuttonabort.addeventlistener('click', () => { runxhr('https://mdn.mozillademos.org/
files/16553/dgszyjnxcaipwzy.jpg').abort(); }); result specifications specification status comment xmlhttprequest living standard ...
XMLHttpRequest: loadstart event - Web APIs
ntlistener('progress', handleevent); xhr.addeventlistener('error', handleevent); xhr.addeventlistener('abort', handleevent); } function runxhr(url) { log.textcontent = ''; const xhr = new xmlhttprequest(); addlisteners(xhr); xhr.open("get", url); xhr.send(); return xhr; } xhrbuttonsuccess.addeventlistener('click', () => { runxhr('https://mdn.mozillademos.org/
files/16553/dgszyjnxcaipwzy.jpg'); }); xhrbuttonerror.addeventlistener('click', () => { runxhr('https://somewhere.org/i-dont-exist'); }); xhrbuttonabort.addeventlistener('click', () => { runxhr('https://mdn.mozillademos.org/
files/16553/dgszyjnxcaipwzy.jpg').abort(); }); result specifications specification status comment xmlhttprequest living standard ...
XMLHttpRequest.onreadystatechange - Web APIs
examples const xhr = new xmlhttprequest(), method = "get", url = "https://developer.mozilla.org/"; xhr.open(method, url, true); xhr.onreadystatechange = function () { // in local
files, status is 0 upon success in mozilla firefox if(xhr.readystate === xmlhttprequest.done) { var status = xhr.status; if (status === 0 || (status >= 200 && status < 400)) { // the request has been completed successfully console.log(xhr.responsetext); } else { // oh no!
XMLHttpRequest: progress event - Web APIs
ntlistener('progress', handleevent); xhr.addeventlistener('error', handleevent); xhr.addeventlistener('abort', handleevent); } function runxhr(url) { log.textcontent = ''; const xhr = new xmlhttprequest(); addlisteners(xhr); xhr.open("get", url); xhr.send(); return xhr; } xhrbuttonsuccess.addeventlistener('click', () => { runxhr('https://mdn.mozillademos.org/
files/16553/dgszyjnxcaipwzy.jpg'); }); xhrbuttonerror.addeventlistener('click', () => { runxhr('https://somewhere.org/i-dont-exist'); }); xhrbuttonabort.addeventlistener('click', () => { runxhr('https://mdn.mozillademos.org/
files/16553/dgszyjnxcaipwzy.jpg').abort(); }); result specifications specification status comment xmlhttprequest living standard ...
XRInputSource - Web APIs
pro
filesread only an array of domstring objects, each specifying the name of an input profile describing the preferred visual representation and behavior of this input source.
Using multiple backgrounds - CSS: Cascading Style Sheets
example in this example, three backgrounds are stacked: the firefox logo, an image of bubbles, and a linear gradient: html <div class="multi-bg-example"></div> css .multi-bg-example { width: 100%; height: 400px; background-image: url(https://mdn.mozillademos.org/
files/11305/firefox.png), url(https://mdn.mozillademos.org/
files/11307/bubbles.png), linear-gradient(to right, rgba(30, 75, 115, 1), rgba(255, 255, 255, 0)); background-repeat: no-repeat, no-repeat, no-repeat; background-position: bottom right, left, right; } result (if image does not appear in codepen, click the 'tidy' button in the css section) as you can ...
background-blend-mode - CSS: Cascading Style Sheets
olor-dodge</option> <option>color-burn</option> <option>hard-light</option> <option>soft-light</option> <option>difference</option> <option>exclusion</option> <option>hue</option> <option>saturation</option> <option>color</option> <option>luminosity</option> </select> #div { width: 300px; height: 300px; background: url('https://mdn.mozillademos.org/
files/8543/br.png'),url('https://mdn.mozillademos.org/
files/8545/tr.png'); background-blend-mode: screen; } document.getelementbyid("select").onchange = function(event) { document.getelementbyid("div").style.backgroundblendmode = document.getelementbyid("select").selectedoptions[0].innerhtml; } console.log(document.getelementbyid('div')); specifications specification status ...
background - CSS: Cascading Style Sheets
th-percentage>{1,2}<color-stop-angle> = <angle-percentage>{1,2}<angle-percentage> = <angle> | <percentage> examples setting backgrounds with color keywords and images html <p class="topbanner"> starry sky<br/> twinkle twinkle<br/> starry sky </p> <p class="warning">here is a paragraph<p> css .warning { background: pink; } .topbanner { background: url("https://mdn.mozillademos.org/
files/11983/starsolid.gif") #99f repeat-y fixed; } result specifications specification status comment css backgrounds and borders module level 3the definition of 'background' in that specification.
border-image-repeat - CSS: Cascading Style Sheets
it also applies to ::first-letter.inheritednocomputed valueas specifiedanimation typediscrete formal syntax [ stretch | repeat | round | space ]{1,2} examples repeating border images css #bordered { width: 12rem; margin-bottom: 1rem; padding: 1rem; border: 40px solid; border-image: url("https://mdn.mozillademos.org/
files/4127/border.png") 27; border-image-repeat: stretch; /* can be changed in the live sample */ } html <div id="bordered">you can try out various border repetition rules on me!</div> <select id="repetition"> <option value="stretch">stretch</option> <option value="repeat">repeat</option> <option value="round">round</option> <option value="space">space</option> <option value="stretch ...
cross-fade() - CSS: Cascading Style Sheets
e>?<angular-color-hint> = <angle-percentage>where <color-stop-length> = <length-percentage>{1,2}<color-stop-angle> = <angle-percentage>{1,2}<angle-percentage> = <angle> | <percentage> examples older syntax for cross-fade html <div class="crossfade"></div> css .crossfade { width: 300px; height: 300px; background-image: -webkit-cross-fade( url('https://mdn.mozillademos.org/
files/8543/br.png'), url('https://mdn.mozillademos.org/
files/8545/tr.png'), 75%); background-image: cross-fade( url('https://mdn.mozillademos.org/
files/8543/br.png'), url('https://mdn.mozillademos.org/
files/8545/tr.png'), 75%); } result specifications specification status comment css images module level 4the definition of 'cro...
font-stretch - CSS: Cascading Style Sheets
ss="normal">an elephantine lizard</p> <p class="expanded">an elephantine lizard</p> </div> css /* this example uses the league mono variable font, developed by tyler finck (https://www.tylerfinck.com/) and used here under the terms of the sil open font license, version 1.1: http://scripts.sil.org/cms/scripts/page.php?item_id=ofl_web */ @font-face { src: url('https://mdn.mozillademos.org/
files/16014/leaguemonovariable.ttf'); font-family:'leaguemonovariable'; font-style: normal; font-stretch: 1% 500%; /* required by chrome */ } .container { border: 10px solid #f5f9fa; padding: 0 1rem; font: 1.5rem 'leaguemonovariable', sans-serif; } .condensed { font-stretch: 50%; } .normal { font-stretch: 100%; } .expanded { font-stretch: 200%; } result specifications ...
font-style - CSS: Cascading Style Sheets
would not be wonderful to meet a megalosaurus, forty feet long or so, waddling like an elephantine lizard up holborn hill.</p> </div> css /* amstelvaralpha-vf is created by david berlow (https://github.com/typenetwork/amstelvar) and is used here under the terms of its license: https://github.com/typenetwork/amstelvar/blob/master/ofl.txt */ @font-face { src: url('https://mdn.mozillademos.org/
files/16044/amstelvaralpha-vf.ttf'); font-family:'amstelvaralpha'; font-style: normal; } label { font: 1rem monospace; } .container { max-height: 150px; overflow: scroll; } .sample { font: 2rem 'amstelvaralpha', sans-serif; } html, body { max-height: 100vh; max-width: 100vw; overflow: hidden; } body { display: flex; flex-direction: column; } header { margin-bottom: 1.5r...
font-variant-numeric - CSS: Cascading Style Sheets
tml <p class="ordinal">1st, 2nd, 3rd, 4th, 5th</p> css /* this example uses the source sans pro opentype font, developed by adobe and used here under the terms of the sil open font license, version 1.1: http://scripts.sil.org/cms/scripts/page.php?item_id=ofl_web */ @font-face { font-family: "source sans pro"; font-style: normal; font-weight: 400; src: url("https://mdn.mozillademos.org/
files/15757/sourcesanspro-regular.otf") format("opentype"); } .ordinal { font-variant-numeric: ordinal; font-family: "source sans pro"; } result specifications specification status comment css fonts module level 3the definition of 'font-variant-numeric' in that specification.
font-weight - CSS: Cascading Style Sheets
">...it would not be wonderful to meet a megalosaurus, forty feet long or so, waddling like an elephantine lizard up holborn hill.</p> </div> css /* mutator sans is created by letterror (https://github.com/letterror/mutatorsans) and is used here under the terms of its license: https://github.com/letterror/mutatorsans/blob/master/license */ @font-face { src: url('https://mdn.mozillademos.org/
files/16011/mutatorsans.ttf'); font-family:'mutatorsans'; font-style: normal; } label { font: 1rem monospace; white-space: nowrap; } .container { max-height: 150px; overflow-y: auto; } .sample { text-transform: uppercase; font: 1.5rem 'mutatorsans', sans-serif; } html, body { max-height: 100vh; max-width: 100vw; overflow: hidden; } body { display: flex; flex-direction: ...
image-set() - CSS: Cascading Style Sheets
resolution can be used as a proxy for
filesize — a user agent on a slow mobile connection with a high-resolution screen may prefer to receive lower-resolution images rather than waiting for a higher resolution image to load.
list-style-image - CSS: Cascading Style Sheets
formal definition initial valuenoneapplies tolist itemsinheritedyescomputed valuenone or the image with its uri made absoluteanimation typediscrete formal syntax <url> | none examples setting list item images html <ul> <li>item 1</li> <li>item 2</li> </ul> css ul { list-style-image: url("https://mdn.mozillademos.org/
files/11981/starsolid.gif"); } result specifications specification status comment css lists module level 3the definition of 'list-style-image' in that specification.
list-style-position - CSS: Cascading Style Sheets
2-4</li> </ul> <ul class="inside-img">list 3 <li>list item 3-1</li> <li>list item 3-2</li> <li>list item 3-3</li> <li>list item 3-4</li> </ul> css .inside { list-style-position: inside; list-style-type: square; } .outside { list-style-position: outside; list-style-type: circle; } .inside-img { list-style-position: inside; list-style-image: url("https://mdn.mozillademos.org/
files/11979/starsolid.gif"); } result specifications specification status comment css lists module level 3the definition of 'list-style-position' in that specification.
mask-clip - CSS: Cascading Style Sheets
-clip ]#where <geometry-box> = <shape-box> | fill-box | stroke-box | view-boxwhere <shape-box> = <box> | margin-boxwhere <box> = border-box | padding-box | content-box examples clipping a mask to the border box css #masked { width: 100px; height: 100px; background-color: #8cffa0; margin: 20px; border: 20px solid #8ca0ff; padding: 20px; mask-image: url(https://mdn.mozillademos.org/
files/12668/mdn.svg); mask-size: 100% 100%; mask-clip: border-box; /* can be changed in the live sample */ } html <div id="masked"> </div> <select id="clipbox"> <option value="content-box">content-box</option> <option value="padding-box">padding-box</option> <option value="border-box" selected>border-box</option> <option value="margin-box">margin-box</option> <option value="fill-box">...
mask-composite - CSS: Cascading Style Sheets
ements excluding the defs element and all graphics elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax <compositing-operator>#where <compositing-operator> = add | subtract | intersect | exclude examples compositing mask layers with addition css #masked { width: 100px; height: 100px; background-color: #8cffa0; mask-image: url(https://mdn.mozillademos.org/
files/12668/mdn.svg), url(https://mdn.mozillademos.org/
files/12676/star.svg); mask-size: 100% 100%; mask-composite: add; /* can be changed in the live sample */ } html <div id="masked"> </div> <select id="compositemode"> <option value="add">add</option> <option value="subtract">subtract</option> <option value="intersect">intersect</option> <option value="exclude">exclude</...
mask-image - CSS: Cascading Style Sheets
stop-angle>?<angular-color-hint> = <angle-percentage>where <color-stop-length> = <length-percentage>{1,2}<color-stop-angle> = <angle-percentage>{1,2}<angle-percentage> = <angle> | <percentage> examples setting a mask image with a url html <div id="masked"></div> css #masked { width: 100px; height: 100px; background-color: #8cffa0; -webkit-mask-image: url(https://mdn.mozillademos.org/
files/12676/star.svg); mask-image: url(https://mdn.mozillademos.org/
files/12676/star.svg); } result specifications specification status comment css masking module level 1the definition of 'mask-image' in that specification.
mask-mode - CSS: Cascading Style Sheets
ies to container elements excluding the defs element and all graphics elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax <masking-mode>#where <masking-mode> = alpha | luminance | match-source examples using alpha mask mode css #masked { width: 227px; height: 200px; background: blue linear-gradient(red, blue); mask-image: url(https://mdn.mozillademos.org/
files/12668/mdn.svg); mask-mode: alpha; /* can be changed in the live sample */ } html <div id="masked"> </div> <select id="maskmode"> <option value="alpha">alpha</option> <option value="luminance">luminance</option> <option value="match-source">match-source</option> </select> javascript var maskmode = document.getelementbyid("maskmode"); maskmode.addeventlistener("change", function (evt...
mask-origin - CSS: Cascading Style Sheets
etry-box>#where <geometry-box> = <shape-box> | fill-box | stroke-box | view-boxwhere <shape-box> = <box> | margin-boxwhere <box> = border-box | padding-box | content-box examples setting mask origin to border-box css #masked { width: 100px; height: 100px; margin: 10px; border: 10px solid blue; background-color: #8cffa0; padding: 10px; mask-image: url(https://mdn.mozillademos.org/
files/12676/star.svg); mask-origin: border-box; /* can be changed in the live sample */ } html <div id="masked"> </div> <select id="origin"> <option value="content-box">content-box</option> <option value="padding-box">padding-box</option> <option value="border-box" selected>border-box</option> <option value="margin-box">margin-box</option> <option value="fill-box">fill-box</option> <o...
mask-position - CSS: Cascading Style Sheets
| [ [ left | right ] <length-percentage> ] && [ [ top | bottom ] <length-percentage> ] ]where <length-percentage> = <length> | <percentage> examples setting mask position css #wrapper { border: 1px solid black; width: 250px; height: 250px; } #masked { width: 250px; height: 250px; background: blue linear-gradient(red, blue); mask-image: url(https://mdn.mozillademos.org/
files/12676/star.svg); mask-repeat: no-repeat; mask-position: top right; /* can be changed in the live sample */ margin-bottom: 10px; } html <div id="wrapper"> <div id="masked"> </div> </div> <select id="maskposition"> <option value="top">top</option> <option value="center">center</option> <option value="bottom">bottom</option> <option value="top right" selected>top right</option>...
mask-repeat - CSS: Cascading Style Sheets
ntsinheritednocomputed valueconsists of two keywords, one per dimensionanimation typediscrete formal syntax <repeat-style>#where <repeat-style> = repeat-x | repeat-y | [ repeat | space | round | no-repeat ]{1,2} examples setting repeat for a single mask css #masked { width: 250px; height: 250px; background: blue linear-gradient(red, blue); mask-image: url(https://mdn.mozillademos.org/
files/12676/star.svg); mask-repeat: repeat; /* can be changed in the live sample */ margin-bottom: 10px; } html content <div id="masked"> </div> <select id="repetition"> <option value="repeat-x">repeat-x</option> <option value="repeat-y">repeat-y</option> <option value="repeat" selected>repeat</option> <option value="space">space</option> <option value="round">round</option> <option...
mask-size - CSS: Cascading Style Sheets
able list of simple list of length, percentage, or calc formal syntax <bg-size>#where <bg-size> = [ <length-percentage> | auto ]{1,2} | cover | containwhere <length-percentage> = <length> | <percentage> examples setting mask size as a percentage css #masked { width: 200px; height: 200px; background: blue linear-gradient(red, blue); -webkit-mask-image: url(https://mdn.mozillademos.org/
files/12668/mdn.svg); mask-image: url(https://mdn.mozillademos.org/
files/12668/mdn.svg); -webkit-mask-size: 50%; mask-size: 50%; /* can be changed in the live sample */ margin-bottom: 10px; } html <div id="masked"> </div> <select id="masksize"> <option value="auto">auto</option> <option value="40% 80%">40% 80%</option> <option value="50%" selected>50%</option> <option value="200px 1...
Demos of open web technologies
games ioquake3 (source code) kai 'opua (source code) web apis notifications api html5 notifications (source code) web audio api web audio fireworks oscope.js - javascript oscilloscope html5 web audio showcase (source code) html5 audio visualizer (source code) graphical filter editor and visualizer (source code) file api slide my text - presentation from plain text
files web workers web worker fractals photo editor coral generator raytracer hotcold touch typing ...
divisor - SVG: Scalable Vector Graphics
0 420 200" xmlns="http://www.w3.org/2000/svg"> <filter id="convolvematrix1" x="0" y="0" width="100%" height="100%"> <feconvolvematrix kernelmatrix="1 2 0 0 0 0 0 0 -1" divisor="1"/> </filter> <filter id="convolvematrix2" x="0" y="0" width="100%" height="100%"> <feconvolvematrix kernelmatrix="1 2 0 0 0 0 0 0 -1" divisor="8"/> </filter> <image xlink:href="//developer.mozilla.org/
files/6457/mdn_logo_only_color.png" width="200" height="200" style="filter:url(#convolvematrix1);"/> <image xlink:href="//developer.mozilla.org/
files/6457/mdn_logo_only_color.png" width="200" height="200" style="filter:url(#convolvematrix2); transform:translatex(220px);"/> </svg> usage notes value <number> default value sum of all values in kernelmatrix or 1 i...
href - SVG: Scalable Vector Graphics
value <url> default value none animatable yes example html, body, svg { height: 100%; } <svg viewbox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"> <image href="/
files/2917/fxlogo.png" x="0" y="0" height="100" width="100"/> </svg> lineargradient for <lineargradient>, href defines url referring to a template gradient element; to be valid, the reference must be to a different <lineargradient> or <radialgradient> element.
k1 - SVG: Scalable Vector Graphics
w3.org/2000/svg"> <filter id="composite1" x="0" y="0" width="100%" height="100%"> <fecomposite in2="sourcegraphic" operator="arithmetic" k1="1" k2="0" k3="0" k4="0" /> </filter> <filter id="composite2" x="0" y="0" width="100%" height="100%"> <fecomposite in2="sourcegraphic" operator="arithmetic" k1="10" k2="0" k3="0" k4="0" /> </filter> <image href="https://mdn.mozillademos.org/
files/12668/mdn.svg" x="0" y="0" width="200" height="200" style="filter: url(#composite1);" /> <image href="https://mdn.mozillademos.org/
files/12668/mdn.svg" x="0" y="0" width="200" height="200" style="filter: url(#composite2); transform: translatex(220px);" /> </svg> usage notes value <number> default value 0 animatable yes specifications ...
k2 - SVG: Scalable Vector Graphics
w3.org/2000/svg"> <filter id="composite1" x="0" y="0" width="100%" height="100%"> <fecomposite in2="sourcegraphic" operator="arithmetic" k1="1" k2="1" k3="0" k4="0" /> </filter> <filter id="composite2" x="0" y="0" width="100%" height="100%"> <fecomposite in2="sourcegraphic" operator="arithmetic" k1="1" k2="10" k3="0" k4="0" /> </filter> <image href="https://mdn.mozillademos.org/
files/12668/mdn.svg" x="0" y="0" width="200" height="200" style="filter: url(#composite1);" /> <image href="https://mdn.mozillademos.org/
files/12668/mdn.svg" x="0" y="0" width="200" height="200" style="filter: url(#composite2); transform: translatex(220px);" /> </svg> usage notes value <number> default value 0 animatable yes specifications ...
k3 - SVG: Scalable Vector Graphics
w3.org/2000/svg"> <filter id="composite1" x="0" y="0" width="100%" height="100%"> <fecomposite in2="sourcegraphic" operator="arithmetic" k1="1" k2="0" k3="1" k4="0" /> </filter> <filter id="composite2" x="0" y="0" width="100%" height="100%"> <fecomposite in2="sourcegraphic" operator="arithmetic" k1="1" k2="0" k3="10" k4="0" /> </filter> <image href="https://mdn.mozillademos.org/
files/12668/mdn.svg" x="0" y="0" width="200" height="200" style="filter: url(#composite1);" /> <image href="https://mdn.mozillademos.org/
files/12668/mdn.svg" x="0" y="0" width="200" height="200" style="filter: url(#composite2); transform: translatex(220px);" /> </svg> usage notes value <number> default value 0 animatable yes specifications ...
k4 - SVG: Scalable Vector Graphics
.org/2000/svg"> <filter id="composite1" x="0" y="0" width="100%" height="100%"> <fecomposite in2="sourcegraphic" operator="arithmetic" k1="1" k2="0" k3="0" k4="0" /> </filter> <filter id="composite2" x="0" y="0" width="100%" height="100%"> <fecomposite in2="sourcegraphic" operator="arithmetic" k1="10" k2="0" k3="0" k4="0.3" /> </filter> <image href="https://mdn.mozillademos.org/
files/12668/mdn.svg" x="0" y="0" width="200" height="200" style="filter: url(#composite1);" /> <image href="https://mdn.mozillademos.org/
files/12668/mdn.svg" x="0" y="0" width="200" height="200" style="filter: url(#composite2); transform: translatex(220px);" /> </svg> usage notes value <number> default value 0 animatable yes specifications ...
kernelMatrix - SVG: Scalable Vector Graphics
00%; } <svg viewbox="0 0 420 200" xmlns="http://www.w3.org/2000/svg"> <filter id="convolvematrix1" x="0" y="0" width="100%" height="100%"> <feconvolvematrix kernelmatrix="1 1 0 0 0 0 0 0 -1"/> </filter> <filter id="convolvematrix2" x="0" y="0" width="100%" height="100%"> <feconvolvematrix kernelmatrix="-1 0 0 0 0 0 0 0 1"/> </filter> <image xlink:href="//developer.mozilla.org/
files/6457/mdn_logo_only_color.png" width="200" height="200" style="filter:url(#convolvematrix1);"/> <image xlink:href="//developer.mozilla.org/
files/6457/mdn_logo_only_color.png" width="200" height="200" style="filter:url(#convolvematrix2); transform:translatex(220px);"/> </svg> usage notes value <list of numbers> default value none animatable yes...
mode - SVG: Scalable Vector Graphics
y="1"/> <feblend in="sourcegraphic" in2="floodfill" mode="multiply"/> </filter> <filter id="blending2" x="0" y="0" width="100%" height="100%"> <feflood result="floodfill" x="0" y="0" width="100%" height="100%" flood-color="seagreen" flood-opacity="1"/> <feblend in="sourcegraphic" in2="floodfill" mode="color-dodge"/> </filter> <image xlink:href="//developer.mozilla.org/
files/6457/mdn_logo_only_color.png" width="200" height="200" style="filter:url(#blending1);"/> <image xlink:href="//developer.mozilla.org/
files/6457/mdn_logo_only_color.png" width="200" height="200" style="filter:url(#blending2); transform:translatex(220px);"/> </svg> usage notes value <blend-mode> default value normal animatable yes for a d...
preserveAlpha - SVG: Scalable Vector Graphics
tp://www.w3.org/2000/svg"> <filter id="convolvematrix1" x="0" y="0" width="100%" height="100%"> <feconvolvematrix kernelmatrix="1 -1 2 0 0 0 0 0 -2" preservealpha="true"/> </filter> <filter id="convolvematrix2" x="0" y="0" width="100%" height="100%"> <feconvolvematrix kernelmatrix="1 -1 2 0 0 0 0 0 -2" preservealpha="false"/> </filter> <image xlink:href="//developer.mozilla.org/
files/6457/mdn_logo_only_color.png" width="200" height="200" style="filter:url(#convolvematrix1);"/> <image xlink:href="//developer.mozilla.org/
files/6457/mdn_logo_only_color.png" width="200" height="200" style="filter:url(#convolvematrix2); transform:translatex(220px);"/> </svg> usage notes default value false value true | false animatable yes ...
xChannelSelector - SVG: Scalable Vector Graphics
only one element is using this attribute: <fedisplacementmap> html, body, svg { height: 100%; } <svg viewbox="0 0 440 160" xmlns="http://www.w3.org/2000/svg"> <filter id="displacementfilter"> <feimage xlink:href="https://mdn.mozillademos.org/
files/12668/mdn.svg" x="0" y="0" width="100%" height="100%" result="abc"/> <fedisplacementmap in2="abc" in="sourcegraphic" scale="30" xchannelselector="r"/> </filter> <filter id="displacementfilter2"> <feimage xlink:href="https://mdn.mozillademos.org/
files/12668/mdn.svg" x="0" y="0" width="100%" height="100%" result="abc"/> <fedisplacementmap in2="abc" in="sourcegraphic" sc...
yChannelSelector - SVG: Scalable Vector Graphics
only one element is using this attribute: <fedisplacementmap> html, body, svg { height: 100%; } <svg viewbox="0 0 440 160" xmlns="http://www.w3.org/2000/svg"> <filter id="displacementfilter"> <feimage xlink:href="https://mdn.mozillademos.org/
files/12668/mdn.svg" x="0" y="0" width="100%" height="100%" result="abc"/> <fedisplacementmap in2="abc" in="sourcegraphic" scale="30" ychannelselector="r"/> </filter> <filter id="displacementfilter2"> <feimage xlink:href="https://mdn.mozillademos.org/
files/12668/mdn.svg" x="0" y="0" width="100%" height="100%" result="abc"/> <fedisplacementmap in2="abc" in="sourcegraphic" sc...
<feBlend> - SVG: Scalable Vector Graphics
"200" height="200" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <defs> <filter id="spotlight"> <feflood result="floodfill" x="0" y="0" width="100%" height="100%" flood-color="green" flood-opacity="1"/> <feblend in="sourcegraphic" in2="floodfill" mode="multiply"/> </filter> </defs> <image xlink:href="//developer.mozilla.org/
files/6457/mdn_logo_only_color.png" x="10%" y="10%" width="80%" height="80%" style="filter:url(#spotlight);"/> </svg> result specifications specification status comment filter effects module level 1the definition of '<feblend>' in that specification.
<feConvolveMatrix> - SVG: Scalable Vector Graphics
example svg <svg width="200" height="200" viewbox="0 0 200 200" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <defs> <filter id="emboss"> <feconvolvematrix kernelmatrix="3 0 0 0 0 0 0 0 -3"/> </filter> </defs> <image xlink:href="/
files/12668/mdn.svg" x="0" y="0" height="200" width="200" style="filter:url(#emboss);" /> </svg> result specifications specification status comment filter effects module level 1the definition of '<feconvolvematrix>' in that specification.
<feImage> - SVG: Scalable Vector Graphics
example svg <svg viewbox="0 0 200 200" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <defs> <filter id="image"> <feimage xlink:href="/
files/6457/mdn_logo_only_color.png"/> </filter> </defs> <rect x="10%" y="10%" width="80%" height="80%" style="filter:url(#image);"/> </svg> result specifications specification status comment filter effects module level 1the definition of '<feimage>' in that specification.
<fePointLight> - SVG: Scalable Vector Graphics
"> <defs> <filter id="spotlight"> <fespecularlighting result="spotlight" specularconstant="1.5" specularexponent="80" lighting-color="#fff"> <fepointlight x="50" y="50" z="220"/> </fespecularlighting> <fecomposite in="sourcegraphic" in2="spotlight" operator="arithmetic" k1="0" k2="1" k3="1" k4="0"/> </filter> </defs> <image xlink:href="/
files/6457/mdn_logo_only_color.png" x="10%" y="10%" width="80%" height="80%" style="filter:url(#spotlight);"/> </svg> result specifications specification status comment filter effects module level 1the definition of '<fepointlight>' in that specification.
<feSpotLight> - SVG: Scalable Vector Graphics
ilter id="spotlight"> <fespecularlighting result="spotlight" specularconstant="1.5" specularexponent="4" lighting-color="#fff"> <fespotlight x="600" y="600" z="400" limitingconeangle="5.5" /> </fespecularlighting> <fecomposite in="sourcegraphic" in2="spotlight" operator="out" k1="0" k2="1" k3="1" k4="0"/> </filter> </defs> <image xlink:href="/
files/6457/mdn_logo_only_color.png" x="10%" y="10%" width="80%" height="80%" style="filter:url(#spotlight);"/> </svg> result specifications specification status comment filter effects module level 1the definition of '<fespotlight>' in that specification.
<feTile> - SVG: Scalable Vector Graphics
example svg <svg width="200" height="200" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <defs> <filter id="tile" x="0" y="0" width="100%" height="100%"> <fetile in="sourcegraphic" x="50" y="50" width="100" height="100" /> <fetile/> </filter> </defs> <image xlink:href="/
files/6457/mdn_logo_only_color.png" x="10%" y="10%" width="80%" height="80%" style="filter:url(#tile);"/> </svg> result specifications specification status comment filter effects module level 1the definition of '<fetile>' in that specification.
Transport Layer Security - Web security
to assist you in configuring your site, mozilla provides a helpful tls configuration generator that will generate configuration
files for the following web servers: apache nginx lighttpd haproxy amazon web services cloudformation elastic load balancer using the configurator is a recommended way to create the configuration to meet your needs; then copy and paste it into the appropriate file on your server and restart the server to pick up the changes.
Index - WebAssembly
this article explains a little bit about how it works, and how to use available tools to covert text format
files to the .wasm assembly format.