Search completed in 1.01 seconds.
265 results for "unix":
Your results are loading. Please wait...
Porting NSPR to Unix Platforms - Archive of obsolete content
on other platforms, you may need to do extra work to deal with their idiosyncrasies. porting instructions you can use different threading packages to implement nspr threads. ...
...on other platforms, you may need to do extra work to deal with their idiosyncrasies. porting instructions you can use different threading packages to implement nspr threads. ...
...on other platforms, you may need to do extra work to deal with their idiosyncrasies. porting instructions you can use different threading packages to implement nspr threads. ...
...And 5 more matches
Unix stub installer - Archive of obsolete content
copy the installer.ini and config.ini files over into the src2 directory. if you don't want the installer to download then grab a nightly "full" installer, say from <ftp://ftp.mozilla.org/pub/mozilla/ni...gnu-sea.tar.gz>. then untar and gunzip this to /tmp. ...
...copy the xpi directory into the src2 directory you are debugging from. run the installer from the src2 directory by either using the mozilla-installer shell script or the mozilla-installer-bin binary with the appropriate flags. if you need to use gdb to debug the installer run it by typing "gdb mozilla-installer-bin" on the shell prompt. how we get setup to debug the xpinstall engine from the unix stub installer? build your entire mozilla tree (which should build the installer in the src2 directory as well). go to mozilla/xpinstall/packager/unix. on the shell prompt type "perl deliver.pl". now you will find an installer *and* the xpcom.xpi and other debug xpis delivered to mozilla/installer/raw. debug using "gdb mozilla-installer-bin" and set a breakpoint at xpi_init(). you can step...
...mozilla/xpinstall/packager/unix. on the shell prompt type "perl deliver.pl". now you will find an installer *and* the xpcom.xpi and other debug xpis delivered to mozilla/installer/raw. debug using "gdb mozilla-installer-bin" and set a breakpoint at xpi_init(). you can step into the xpinstall engine through the xpistub once the xpistub dll is loaded. how do i add an installer package to the unix installer? ...
...And 4 more matches
Index - Web APIs
Web › API › Index
astext() api, file api, files, method, non-standard, obsolete, reference, référence(2) the getastext method provides the file's data interpreted as text using a given encoding. 1321 file.lastmodified api, file api, files, property, reference the file.lastmodified read-only property provides the last modified date of the file as the number of milliseconds since the unix epoch (january 1, 1970 at midnight). files without a known last modified date return the current date. 1322 file.lastmodifieddate api, deprecated, file, file api, files, property, read-only, reference, lastmodifieddate the file.lastmodifieddate read-only property returns the last modified date of the file. files without a known last modified date returns the current date . ...
...get a performancetiming object describing your page using the window.performance.timing property. 3055 performancetiming.connectend api, backwards compatibility, deprecated, navigation timing, performancetiming, property, read-only, legacy the legacy performancetiming.connectend read-only property returns an unsigned long long representing the moment, in miliseconds since the unix epoch, where the connection is opened network. if the transport layer reports an error and the connection establishment is started again, the last connection establisment end time is given. if a persistent connection is used, the value will be the same as performancetiming.fetchstart. a connection is considered as opened when all secure connection handshake, or socks authentication, is terminated...
...as opened when all secure connection handshake, or socks authentication, is terminated. 3056 performancetiming.connectstart api, backwards compatibility, deprecated, html, navigation timing, performancetiming, property, read-only, legacy the legacy performancetiming.connectstart read-only property returns an unsigned long long representing the moment, in miliseconds since the unix epoch, where the request to open a connection is sent to the network. if the transport layer reports an error and the connection establishment is started again, the last connection establisment start time is given. if a persistent connection is used, the value will be the same as performancetiming.fetchstart. 3057 performancetiming.domcomplete api, backwards compatibility, deprecat...
...And 19 more matches
Drawing and Event Handling - Plugins
on mac os, window is a pointer to an np_port. the x and y fields specify the top-left corner of the p...
...on mac os, window is a pointer to an np_port. the x and y fields specify the top-left corner of the plug-in relative to the page. the width and height fields specify the dimensions ...
...on mac os, window is a pointer to an np_port. the x and y fields specify the top-left corner of the plug-in relative to the page. the width and height fields specify the dimensions of the plug-in area. these values should not be modified by the plug-in. ...
...And 13 more matches
MCD, Mission Control Desktop, AKA AutoConfig - Archive of obsolete content
ux version, only the environment variables (var env_*) are different! versions tested this configuration was validated on linux with mozilla 1.4, 1.6 and 1.7, and on windows with mozilla 1.4, 1.5, 1.7. debugging - bugzilla run time messages note: the presence of var env_mozdebug=getenv("mozilla_debug")allows user to print debugging messages if mozilla_debug is defined in either the shell for unix (export mozilla_debug=1) or in the command.com environment in windows (set mozilla_debug=1). blank space bug i noticed a problem which is due to be corrected in mozilla 1.8 i think... here's the report and workaround: bug 229271. to fix, add the following: start_pos += search_key.length; //start start_pos +=1; //end to function getldapvalue() in autoconfig/preffcalls.js. doc...
...then autoconfig doesn't work properly, i've opened a bug on this: bug 270623. the workaround is chmod 755 greprefs! cgi base config file there has been a issue about the use of autoadmin.global_config_url, see bug 206294. mail folders implementing that solution, we encounter difficulties with mail folder. our first idea was to use local mail folders from home directory of the current user. in unix that would have been $home/nsmail/..., in windows it would have been a samba mount of that same unix path (ex: u:\nsmail ; with u: = samba mount: \\samba-server\%username). unfortunately file system writes and/or mail format differs between windows and unix, and folders soon become unreadable or even corrupted when read/written from one system to the other. that's why we finally decided to use i...
...names are defined so that netscape.cfg doesn't need to be changed after imaging the computers at every change we need to do. ldap web server list subtree $ ldapsearch -x * -b "ou=browser,ou=information,dc=int-evry, dc=fr" cn -lll dn: ou=browser,ou=information,dc=int-evry,dc=fr dn: sn=http_server,ou=browser,ou=information,dc=int-evry, dc=fr cn: web1.int-evry.fr cn: web2.int-evry.fr dn: sn=http_unix_file, ou=browser,ou=information,dc=int-evry, dc=fr cn: /browser/config_file_unix.jsc dn: sn=http_win_file, ou=browser,ou=information,dc=int-evry, dc=fr cn: /browser/config_file_win.jsc netscape.cfg here we select an operational ldap server simply by testing a ldap query, to make sure that our ldap queries for setting preferences will be answered. {again, i am not fluent in javascript. there s...
...And 9 more matches
Mozilla release FAQ - Archive of obsolete content
the mozilla newsgroups are intended to be used by people who will be working with mozilla, either in an organizational fashion, suggesting features, or coding. visit netscape's website for h...
...ttp the w3's html 4.0 definition building mozilla i get x error when trying to build mozilla - what's wrong? first, make sure that you have the latest release of the mozilla source. secondly, ensure that you have fully read the build instructions for your platform. ...
...ying to build mozilla - what's wrong? ...
...And 9 more matches
Command line crash course - Learn web development
s of programs that are available that can get you to a terminal. the next images show the command prompts available in windows — there’s a good range of options from the "cmd" program to "powershell" — which can be run from the start menu by typing the program name. and below, you can see the macos terminal application. ...
...ptions from the "cmd" program to "powershell" — which can be run from the start menu by typing the program name. and below, you can see the macos terminal application. how do you access the terminal? ...
... how do you access the terminal? ...
...And 8 more matches
OS.File for the main thread
promise<file> open( in string path, [optional] in object mode, [optional] in object options ) arguments path the full native name of the file to open. modeoptional the ...
...pening mode for the file, as an object that may contain a subset of the following fields: read if true, the file will be opened for reading. depending on other fields, it may also be opened for writing. write if true, the file will be opened for writing. depending on other fields, it may also be opened for reading. prior to gecko 27, unless create or truncate are set or explicit unixflags are given, the file will be opened for appending on unix/linux. however, the file is not opened for appending on windows. see bug 924858. starting with gecko 27, you may use the append flag instead. for an example using append see here. truncate | trunc if true, the file will be opened for writing. if the file does not exist, it will be created. if the file exists, its contents wil...
...f .setposition(0, pos_end) is executed before each write. the default is true, i.e. opening a file for appending. specify append: false to open the file in regular mode. optionsoptional platform-specific options for opening the file. for advanced users only. most users will never have need of these options. to specify options, pass an object that may contain some of the following flags: unixflags (ignored under non-unix platforms) if specified, file opening flags, as per libc function open. if unspecified, build these flags from the contents of mode. you can build these flags from values os.constants.libc.o_*. unixmode (ignored under non-unix platforms) if specified, file creation mode, as per libc function open. if unspecified, files are created with a default mode of 0600 (fi...
...And 8 more matches
Index
e specify script file that will be used to control crl generation/modification. see crl-cript-file format below. if options -m|-g is used and -c crl-script-file is not specified, crlutil will read script data from standard input. -d directory specify the database directory containing the certificate and key database files. on unix the certificate database tool defaults to $home/.netscape (that is, ~/.netscape). on windows nt the default is the current directory. the nss database files must reside in the same directory. -i crl-import-file specify the file which contains the crl to import -f password-file specify a file that will automatically supply the passw...
.../setup.exe { executable relativepath { %temp%/setup.exe } } win32/setup.hlp { relativepath { %temp%/setup.hlp } } win32/setup.cab { relativepath { %temp%/setup.cab } } } } win95::x86 { equivalentplatform {winnt::x86} } sunos:5.5.1:sparc { modulename { "example unix module" } modulefile { unix/fort.so } defaultmechanismflags{0x0001} cipherenableflags{0x0001} files { unix/fort.so { relativepath{%root%/lib/fort.so} absolutepath{/usr/local/netscape/lib/fort.so} filepermissions{555} } xplat/instr.html { relativepath{%root%/docs/inst.html} ab...
...d for the current platform. platforms (required) gives a list of platforms. each entry in the list is itself a key-value pair: the key is the name of the platform and the value list contains various attributes of the platform. the platform string is in the format system name:os release:architecture. the installer obtains these values from nspr. ...
...And 6 more matches
Xptcall Porting Status
what is this? ...
...ver@mozilla.org> is the best contact regarding 'nix (unix, linux, finux, etc.) ports of xptcall. ...
...egcs 1.1. he notes that the vtbl scheme is different. he is hoping that others will help test the changes using these two comp...
...And 6 more matches
nsIFile
d. the value of this attribute is the number of bytes corresponding to the data represented by the symbolic link. any meta data, such as a resource fork on the mac, is not included in the measurement of the file size. read only. followlinks prbool determines whether or not the nsifile will automatically resolve symbolic links. by default, this value is false on all non-unix systems. as of mozilla 1.7, this attribute is ignored on unix systems. lastmodifiedtime print64 this attribute exposes the time when the file referenced by this nsifile was last modified. the value of this attribute is milliseconds since midnight (00:00:00), january 1, 1970 greenwich mean time (gmt). changing the last modified time of a nsifile operates on the underly...
...l when this nsifile references the top of the volume. for example, c:\ does not have a parent. read only. path astring this attribute exposes the full platform-specific path of the nsifile (including the leafname). read only. example, this could return "/home/user/foo.txt" or "c:\images\my.jpeg" permissions unsigned long the value of this attribute is a unix-style file permission mask for this nsifile. changing the permissions of a nsifile operates on the underlying filesystem. as of gecko 1.7, changing the permissions of a non-existent file has undefined behavior. permissionsoflink unsigned long the value of this attribute is a unix-style file permission mask for this nsifile. unlike permissions, this attribute correspon...
...ry in the file system corresponding to the file path represented by this nsifile. this method will create any path segments that do not already exist. void create( in unsigned long type, in unsigned long permissions ); parameters type this specifies the type of file system object to be made. the only two types at this time are file and directory which are defined above. permissions a unix-style file permissions value. for example, the octal value 0600 may be used to limit read and write access to the current user of the system. this parameter may be ignored on systems that do not support file permissions. exceptions thrown ns_error_file_already_exists indicates that the file or directory already exists. ns_error_file_unknown_type indicates that the value of "type" does not...
...And 5 more matches
Index - Archive of obsolete content
browsers to advertise their capabilities to security tools. 604 plug-n-hack tools supported security, plugnhack 605 plugin architecture add-ons, developing mozilla, needstechnicalreview, needsupdate, plugins this page contains some notes on how plugins work internally in gecko. it is mainly of interest to gecko developers. 606 porting nspr to unix platforms nspr last modified 16 july 1998 607 priority content update: i've removed documents from this list that have been migrated into the wiki. the list of completed documents is available through the devedge page. 608 prism prism prism is a simple xulrunner-based browser that hosts web applications without the normal web browser user inter...
...cts with xpinstall. a xpi file typically contains the resources to be installed (in this case the barley.jar we want to have installed in the mozilla/bin/chrome/ directory) and an install script that guides the installation process. 706 install wizards (aka: stub installers) xpinstall no summary! 707 mac stub installer xpinstall no summary! 708 unix stub installer xpinstall no summary! 709 windows stub installer xpinstall no summary! 710 learn xpi installer scripting by example xpinstall, xpinstall_api_reference this article uses the installer script from browser.xpi install package as the basis for discussing xpi installations in general. this installer script is relatively short, but it e...
... xpinstall, xpinstall_api_reference this article uses the installer script from browser.xpi install package as the basis for discussing xpi installations in general. this installer script is relatively short, but it exercises most of the important features of the xpinstall api, and it can easily be used as a template for other more general software installations. in this article, we use the unix install file, but the installers for all the platforms are quite similar, and you can easily take what you learn here and apply it to installations on any platform that mozilla supports. 711 installer script no summary! 712 using xpinstall to install plugins add-ons, plugins, xpinstall, xpinstall_api_reference no summary! 713 install script te...
...And 4 more matches
Mozilla's Section 508 Compliance
ist of section 508 bugs in mozilla's seamonkey application suite. some of them are fairly minor. the following is provided for informational purposes only and is not a legally binding voluntary product accessibility template (vpat). here are the section 508 requirements and how far along mozilla seamonkey rv1.8a4 is with each one: requirement windows linux/unix mac os requirement windows linux/unix mac os (a) when software is designed to run on a system that has a keyboard, product functions shall be executable from a keyboard where the function itself or the result of performing a function can be discerned textually. mostly complete. ...
... developer. complete. (c) a well-defined on-screen indication of the current focus shall be provided that moves among interactive interface elements as the input focus changes. the focus shall be programmatically exposed so that assistive technology can track focus and focus changes. complete. we expose focus programmatically via msaa (windows) and atk (linux/unix). incomplete, we show focus but need to expose it programmatically by supporting carbon/cocoa accessibility. (d) sufficient information about a user interface element including the identity, operation and state of the element shall be available to assistive technology. when an image represents a program element, the information conveyed by the image must also be avai...
...user interface element including the identity, operation and state of the element shall be available to assistive technology. when an image represents a program element, the information conveyed by the image must also be available in text. complete. we expose this information to assistive technology via microsoft active accessibility (msaa) (windows) and accessibility toolkit (atk) (linux/unix). incomplete. no development efforts have made made to utilize cocoa or carbon accessibility apis. (e) when bitmap images are used to identify controls, status indicators, or other programmatic elements, the meaning assigned to those images shall be consistent throughout an application's performance. complete. requirement windows...
...And 3 more matches
OS.File.Info
global object os.file.info methods object tom...
... global object os.file.info methods object tomsg(in os.file.info value) os.f...
...other error } } ) example: determining the owner of a file let promise = os.file.stat() promise.then( function onsuccess(info) { if ("unixowner" in info) { // info.unixowner holds the owner of the file } else { // information is not available on this platform } } ); evolution of this example bug 802534 will introduce the ability to check whether field unixowner appears in os.file.info.prototype, which will make it possible to write faster code. global object os.file.info methods object tomsg(in os.file.info value) os.file.tomsg convert an instance of os.file.info to a form that can be serialized and transmitted between threads or processes. object tomsg( in os.file.info value ) arguments returns an object with the same fi...
...And 3 more matches
ctypes.open
at the heart of js-ctypes is the ctypes.open() function. this must be called before any work can commence. there are two options: custom native file (dll, so, dylib, etc.) standard os libraries custom native file for this method, a native file must be created. a native file for use on unix systems is an so file, which is created and a c function called add() is written. int add(int a, int b) { return a + b; } to make this a shared library, a native file which can be loaded and used from js-ctypes, compile it with these commands: gcc -fpic -c mycfuntionsforunix.c gcc -shared -o mycfuntionsforunix.so mycfuntionsforunix.o a file named mycfuntionsforunix.so is successfully created. this native file can be placed in any folder of an addon and then loaded from js-ctypes. they can als...
.../ or resource:// uris. they must be accessed through a local file path (file://) or a jar path (jar:). if the addon is an unpacked addon, such as bootstrap or add-on sdk addons, the jar path must be used. therefore, the path has to be converted and then the converted path is used for loading with ctypes.open. ...
...ated at chrome://youraddon/content/mysubfolder/mycfunctionsforunix.so then it is converted to a file uri like this: components.utils.import("resource://gre/modules/services.jsm"); var cr = components.classes['@mozilla.org/chrome/chrome-registry;1'].getservice(components.interfaces.nsichromeregistry); var chromeuri_mylib = services.io.newuri('chrome://youraddon/content/mysubfolder/mycfunctionsforunix.so', 'utf-8', null); var localfile_mylib = cr.convertchromeurl(chromeuri_mylib); var jarpath_mylib = localfile_mylib.spec; // "jar:file:///c:/users/vayeate/appdata/roaming/mozilla/firefox/profiles/aecgxse.unnamed%20profile%201/extensions/youraddon@jetpack.xpi!/mysubfolder/mycfunctionsforunix.so" var filepath_mylib = localfilemylib.path; // "file:///c:/users/vayeate/appdata/roaming/mozilla/firefox...
...And 3 more matches
JavaScript OS.Shared - Archive of obsolete content
d contains tools to interact with the operating system (and, more generally, in c) in javascript. all these tools are designed to be used with js-ctypes. for the moment, module os.shared is accessible only from chrome workers. ...
...ith the operating system (and, more generally, in c) in javascript. all these tools are designed to be used with js-ctypes. for the moment, module os.shared is accessible only from chrome workers. ...
... generally, in c) in javascript. all these tools are designed to be used with js-ctypes. for the moment, module os.shared is accessible only from chrome workers. ...
...And 2 more matches
NPN_GetValue - Archive of obsolete content
o query the browser for information. syntax #include <npapi.h> nperror npn_getvalue(npp instance, npnvariable variable, void *value); parameters this function has the following parameters: instance pointer to the current plug-in instance. variable information the call gets. ...
...h> nperror npn_getvalue(npp instance, npnvariable variable, void *value); parameters this function has the following parameters: instance pointer to the current plug-in instance. variable information the call gets. ...
..., void *value); parameters this function has the following parameters: instance pointer to the current plug-in instance. variable information the call gets. ...
...And 2 more matches
Mozilla accessibility architecture
platform accessibility apis. accessibility apis are used by 3rd party software like screen readers, screen magnifiers, and voice dictation software, which need information about document content and ui controls, as well as important events like changes of focus. mozilla supports two accessibility apis: microsoft active accessibility (msaa) on windows and accessibility tool kit (atk) on linux and unix. ...
...readers of this document should be familiar with interfaces, the w3c dom, xul and the concept of a layout object tree. 2. accessible nodes and interfaces every node in the dom tree could be important to 3rd party assistive technology. ...
...ries because it is not currently used in windows. we will not rule out the possibility of supporting some of the rich atk interfaces on windows. the toolkit-specific classes then use these xpcom interfaces to gather information about the objects they want to expose, make any necessary changes, and then expose the information using microsoft com on windows, or through gtk2's atk api's on linux and unix. the assistive technology can then use this information in a number of ways. it can read in an entire document at once, look only pieces of a document related to recent events, or traverse the accessibility object model based on screen position. accessible tree contains only a subset of nodes from the dom tree not all dom nodes are exposed through accessibility api toolkits -- only those objects ...
...And 2 more matches
NSS Tools modutil
curity module database tool's interactive prompts so it can be run from a script. use this option only after manually testing each planned operation to check for warnings and to ensure that bypassing the prompts will cause no security lapses or loss of database integrity. arguments -dbdir directory specify the database directory in which to access or create security module database files. on unix, the security module database tool defaults to the user's netscape directory. windows nt has no default directory, so -dbdir must be used to specify a directory. -dbprefix prefix specify the prefix used on the cert8.db and key3.db files (for example, my_cert8.db and my_key3.db). this option is provided as a special case. changing the names of the certificate and key databases is not recommende...
...001} files { win32/setup.exe { executable relativepath { %temp%/setup.exe } } win32/setup.hlp { relativepath { %temp%/setup.hlp } } win32/setup.cab { relativepath { %temp%/setup.cab } } } } win95::x86 { equivalentplatform {winnt::x86} } sunos:5.5.1:sparc { modulename { "fortezza unix module" } modulefile { unix/fort.so } defaultmechanismflags{0x0001} cipherenableflags{0x0001} files { unix/fort.so { relativepath{%root%/lib/fort.so} absolutepath{/usr/local/netscape/lib/fort.so} filepermissions{555} } xplat/instr.html { relativepath{%root%/docs/inst.html} absolutepath{/usr/local/ne...
...y is the name of the platform and the value list contains various attributes of the platform. the modulename, modulefile, and files attributes must be specified for each platform unless an equivalentplatform attribute is specified. the platform string is in the following format: system name:os release:architecture. the installer obtains these values from nspr. ...
...And 2 more matches
Adding Toolbars and Toolbar Buttons - Archive of obsolete content
stems. if you want your toolbar to look right on all systems, you should consider having different icon sets for each. you should also consider using a graphic designer for this work, as it takes a lot of attention to detail to make good icons. ...
...this makes it easy to keep the themes separate and to make changes to one of them without having to worry about the rest. on the other hand, it is often the case that there are multiple images and css sheets that are the same for all systems. ...
...this makes it easy to keep the themes separate and to make changes to one of them without having to worry about the rest. on the other hand, it is often the case that there are multiple images and css sheets that are the same for all systems. for example, your extension logo icon will probably be the same. ...
...e in an extension package, by far. most extensions are a few hundred kilobytes in size or smaller. if your file is getting too big, you should look into optimizing your images. given the way manifest files work, we have found that the best solution is to have a separate package name for os-specific skin files. skin xulschoolhello classic/1.0 skin/all/ skin xulschoolhello-os classic/1.0 skin/unix/ skin xulschoolhello-os classic/1.0 skin/win/ os=winnt skin xulschoolhello-os classic/1.0 skin/mac/ os=darwin all we did here is add a new entry for "common" styles that points to the all directory. the os-specific entries now use a different package name: xulschoolhello-os. now you just need to be careful about when to use chrome://xulschoolhello/skin/ and when to use chrome://xulschoolh...
Using gdb on wimpy computers - Archive of obsolete content
copying" to see the conditions. there is absolutely no warranty for gdb. type "show warranty" for details. this gdb was configured as "i386-redhat-linux"... (gdb) b main breakpoint 1 at 0x804ec45: file nsapprunner.cpp, line 811. (gdb) r starting program: /home/blizzard/src/mozilla/mozilla/dist/bin/./mozilla-bin breakpoint 1, main (argc=1, argv=0xbffff894) at nsapprunner.cpp:811 811 installunixsignalhandlers(argv[0]); (gdb) set auto-solib-add 0 (gdb) c continuing. nsnativecomponentloader: autoregistering begins. [...] it's easy to define a function for gdb to do this for you automatically. you can add this function to the .gdbinit file in your home directory: def prun tbreak main run set auto-solib-add 0 end how do i load shared libraries? if you have turned of...
...b has a command to load libraries while the program is running. this is the sharedlibrary command. it can be shortened to shar when used in gdb. the argument to the command is a regular expression for the libraries to be loaded. here's what it looks like in the 4.18 version of the debugger: ^c program received signal sigint, interrupt. 0x404ccdeb in __sigsuspend (set=0xbf5ffbc0) at ../sysdeps/unix/sysv/linux/sigsuspend.c:48 48 ../sysdeps/unix/sysv/linux/sigsuspend.c: no such file or directory. current language: auto; currently c (gdb) shar glib reading symbols from /usr/lib/libglib-1.2.so.0...done. (gdb) here's what it looks like in a version 5.x of the debugger ( yet unreleased ): ^c program received signal sigint, interrupt. [switching to thread 2051 (runnable)] 0x404ccdeb in __si...
...current language: auto; currently c (gdb) shar gtk reading symbols from /usr/lib/libgtk-1.2.so.0...done. loaded symbols for /usr/lib/libgtk-1.2.so.0 reading symbols from /usr/lib/gtk/themes/engines/libthinice.so...done. ...
...rectory. current language: auto; currently c (gdb) shar glib reading symbols from /usr/lib/libglib-1.2.so.0...done. (gdb) here's what it looks like in a version 5.x of the debugger ( yet unreleased ): ^c program received signal sigint, interrupt. [switching to thread 2051 (runnable)] 0x404ccdeb in __sigsuspend (set=0xbf5ffbac) at ../sysdeps/unix/sysv/linux/sigsuspend.c:48 48 ../sysdeps/unix/sysv/linux/sigsuspend.c: no such file or directory. current language: auto; currently c (gdb) shar gtk reading symbols from /usr/lib/libgtk-1.2.so.0...done. loaded symbols for /usr/lib/libgtk-1.2.so.0 reading symbols from /usr/lib/gtk/themes/engines/libthinice.so...done. loaded symbols for /usr/lib/gtk/themes/engines/libthinice.so (gdb) as you see above, it's possible to load more than one libr...
NPWindow - Archive of obsolete content
o which the plug-in instance can draw. syntax typedef struct _npwindow { void* window; /* platform specific handle */ uint32_t x; /* coordinates of top left corner */ uint32_t y; /* relative to a netscape page */ uint32_t width; /* maximum window size */ uint32_t height; nprect cliprect; /* clipping rectangle coordinates */ #ifdef xp_unix void * ws_info; /* platform-dependent additional data */ #endif /* xp_unix */ npwindowtype type; /* window or drawable target */ } npwindow; fields the data structure has the following fields: window platform-specific handle to a native window element in the netscape window hierarchy on windows (hwnd) and unix (x window id). mac os: window is a pointer to an np_port. x, y ...
...fied by the plug-in. cliprect clipping rectangle of the plug-in; the origin is the top left corner of the drawable or window. clipping to the cliprect prevents the plug-in from overwriting the status bar, scroll bars, and other page elements when partially scrolled off the screen. mac os: cliprect is the rectangle in port coordinates to which the plug-in should clip its drawing. ws_info unix: contains information about the plug-in's unix window environment; points to an npsetwindowcallbackstruct. type npwindowtype value that specifies whether the npwindow instance represents a window or a drawable. values: npwindowtypewindow: indicates that the window field holds a platform-specific handle to a window (as in navigator 2.0 and navigator 3.0). the plug-in is considered windowe...
...owtypewindow: indicates that the window field holds a platform-specific handle to a window (as in navigator 2.0 and navigator 3.0). the plug-in is considered windowed. npwindowtypedrawable: indicates that the plugin is windowless. ...
...the x, y, height, and width coordinates of npwindow specify the position and size of this area. the browser calls npp_setvalue whenever the drawable changes. a windowed plug-in is drawn into a native window (or portion of a native window) on a web page. ...
NSPR's Position On Abrupt Thread Termination
this memo describes my position on a facility that is currently under discussion for inclusion in the netscape portable runtime (nspr); the ability of a thread to abruptly exit. i resist including this function in nspr because it results in bad programming practice and unsupportable programs. threads are not processes. abrupt termination has been available in the unix/c environment for some time (exit()), and i assume that the basic semantics defined there are applicable here. in that environment, exit() may be called and any time, and results in the calling thread's immediate termination. in the situation where it was defined (unix), which has only a single thread of execution, that is equivalent to terminating the process. the process abstraction is then responsible for closing al...
...osing all open files and reclaiming all storage that may have been allocated during the process' lifetime. this practice does not extend to threads. threads run within the confines of a process (or similar abstractions in other environments). threads are lightweight because they do not maintain the full protection domain provided by a process. so in a threaded environment, what is the parallel to unix' exit()? nspr has defined a function, callable by any thread within a process at any time, called pr_processexit(). this is identical to unix exit() and was so named in an effort to make the obvious even more so. when called, the process exits, closing files and reclaiming the process' storage. certain people have been disappointed when nspr did not provide a functional equivalent to exit just a ...
...ot function. this is not all that difficult (though having done it a number of times to already existing code, i will admit it isn't much fun either). the implementation of either strategy within the nspr runtime is not difficult. that is not what this memo is about. this is about providing an api that coaxes people to do the right thing in as many ways as possible. ...
...but threads are not processes. ...
Optimizing Applications For NSPR
e casual client may not encounter a need to know the details of the shortcomings to the level described here, but if and when clients become more sophisticated, these issues will certainly surface. this memo is by no way complete. multiplatform do not call any blocking system call from a local thread. the only exception to this rule is the <tt>select()</tt> and <tt>poll()</tt> system calls on unix, both of which nspr has overridden to make sure they are aware of the nspr local threads. in the combined (mxn) model, which includes nt, irix (sprocs), and pthreads-user, the primordial thread is always a local thread. therefore, if you call a blocking system call from the primordial thread, it is going to block more than just the primordial thread and the system may not function correctly. on ...
...he software linked into the application is not ported to the nspr api, the application may fail because of threads being preempted during critical sections. to disable thread preemption call <tt>pr_disableclockinterrupts()</tt>during initialization. interrupting threads (via <tt>pr_interrupt()</tt>) on threads blocked in i/o functions is implemented to various degrees on different platforms. the unix based platforms all implement the function though there may be up to a 5 second delay in processing the request. the mechanism used to implement <tt>pr_interrupt()</tt> on the pthreads versions of nspr is flawed. no failure attributable to the flaw has shown up in any tests or products - yet. the specific area surrounding pthread's continuation thread has been both observed and empirically prove...
...m with this restriction in mind. pr_interrupt is implemented except for <tt>pr_connect()</tt>. irix the irix (classic) implementation has a known race condition in creating new threads. if the spawned thread establishes and exits before the parent thread is resumed, the parent will be left with an invalid pointer to the child. the problem has a solution that will be available soon. digital unix digital unix (aka, osf1) requires the latest patches for the pthreads library. the changes are not evident until one tries to do thread suspension (<tt>pr_suspendall()</tt>) which is in preparation for garbage collection. digital unix is the main platform used for nspr's prototype use of ipv6. there are some conflicts between the patches needed to use ipv6 and those needed for pthreads. the ip...
... linux the pthreads version of linux (which is not the default) uses the same signals that nspr uses to suspend threads in preparation for garbage collection. no solution in hand. ...
NSS tools : modutil
ample module" } modulefile { win32/fort32.dll } defaultmechanismflags{0x0001} defaultcipherflags{0x0001} files { win32/setup.exe { executable relativepath { %temp%/setup.exe } } win32/setup.hlp { relativepath { %temp%/setup.hlp } } win32/setup.cab { relativepath { %temp%/setup.cab } } } } win95::x86 { equivalentplatform {winnt::x86} } sunos:5.5.1:sparc { modulename { "example unix module" } modulefile { unix/fort.so } defaultmechanismflags{0x0001} cipherenableflags{0x0001} files { unix/fort.so { relativepath{%root%/lib/fort.so} absolutepath{/usr/local/netscape/lib/fort.so} filepermissions{555} } xplat/instr.html { relativepath{%root%/docs/inst.html} absolutepath{/usr/local/netscape/docs/inst.html} filepermissions{555} } } } irix:6.2:mips { equivalentplatf...
...tes are used for the current platform. platforms (required) gives a list of platforms. each entry in the list is itself a key-value pair: the key is the name of the platform and the value list contains various attributes of the platform. the platform string is in the format system name:os release:architecture. the installer obtains these values from nspr. ...
...atform string is in the format system name:os release:architecture. the installer obtains these values from nspr. os release is an empty string on non-unix operating systems. nspr supports these platforms: o aix (rs6000) o bsdi (x86) o freebsd (x86) o hpux (hppa1.1) o irix (mips) o linux (ppc, alpha, x86) o macos (powerpc) o ncr (x86) o nec (mips) o os2 (x86) o osf (alpha) o reliantunix (mips) o sco (x86) o solaris (sparc) o sony (mips) o sunos (sparc) o unixware (x86) o win16 (x86) o win95 (x86) o winnt (x86) for example: irix:6.2:mips sunos:5.5.1:sparc linux:2.0.32:x86 win95::x86 the module information is defined independently for each platform in the modulename, modulefile, and files attributes. these attributes must be given unless an equivalentplatform attri...
... installation. typically, this string is used for a setup program provided by a module vendor, such as a self-extracting setup executable. more than one file can be specified as executable, in which case the files are run in the order in which they are specified in the script file. filepermissions sets permissions on any referenced files in a string of octal digits, according to the standard unix format. this string is a bitwise or. user read: 0400 user write: 0200 user execute: 0100 group read: 0040 group write: 0020 group execute: 0010 other read: 0004 other write: 0002 other execute: 0001 some platforms may not understand these permissions. they are applied only insofar as they make sense for the current platform. if this attribute is omitted, a default of 777 is assumed. ...
sslfnc.html
he lifetime in seconds of an ssl3 session. the minimum timeout value is 5 seconds and the maximum is 24 hours. values outside this range are replaced by the server default value of 24 hours. directory a pointer to a string specifying the pathname of the directory that will contain the session cache. if a null value is passed, the server default value is used: /tmp (unix) or \\temp (nt). returns the function returns one of these values: if successful, secsuccess. if unsuccessful, secfailure. use pr_geterror to obtain error code. description if you are writing an application that will use ssl sockets that handshake as a server, you must call ssl_configserversessionidcache to configure additional session caches for server sessions. if...
... causes the server default value to be used in the server cache. the values that you pass affect only the server cache, not the client cache. initializing multi-processing with a shared ssl server cache to start a multi-processing application, the initial parent process calls ssl_configmpserversidcache, and then creates child processes, by one of these methods: call fork and then exec (unix) call createprocess (win32) call pr_createprocess (both unix and win32) it is essential that the parent allow the child to inherit the file descriptors. win32's createprocess takes an argument that tells it whether or not to permit files to be inherited; this argument must be true. when a new child that has been created by either createprocess or exec begins, it may have inherited file...
...he lifetime in seconds of an ssl3 session. the minimum timeout value is 5 seconds and the maximum is 24 hours. values outside this range are replaced by the server default value of 24 hours. directory a pointer to a string specifying the pathname of the directory that will contain the session cache. if a null value is passed, the server default value is used: /tmp (unix) or \\temp (nt). returns the function returns one of these values: if successful, secsuccess. if unsuccessful, secfailure. use pr_geterror to obtain error code. description this function is identical to ssl_configserversessionidcache, except that it is for use with applications that use multiple processes. you must use one or the other of these functions to create a...
...ltiple processes (instead of, or in addition to, multiple threads), and all of the processes appear to be on the same server (same ip address and port number), then those processes must share a common ssl session cache. the common parent of all the processes must call this function to create the cache before creating the other processes. an application uses multiple processesonly if it uses the unix function fork, or the win32 function createprocess. this is not the same as using multiple threads or multiple processors. note that an ssl server that uses fortezza hardware devices is limited to a single process. it can use multiple threads, and thereby make use of multiple processors, but this must all be done from a single process. this function creates two caches: theserver session id cach...
NSS tools : modutil
Mozilla › Projects › NSS › tools › modutil
/setup.exe { executable relativepath { %temp%/setup.exe } } win32/setup.hlp { relativepath { %temp%/setup.hlp } } win32/setup.cab { relativepath { %temp%/setup.cab } } } } win95::x86 { equivalentplatform {winnt::x86} } sunos:5.5.1:sparc { modulename { "example unix module" } modulefile { unix/fort.so } defaultmechanismflags{0x0001} cipherenableflags{0x0001} files { unix/fort.so { relativepath{%root%/lib/fort.so} absolutepath{/usr/local/netscape/lib/fort.so} filepermissions{555} } xplat/instr.html { relativepath{%root%/docs/inst.html} ab...
...d for the current platform. platforms (required) gives a list of platforms. each entry in the list is itself a key-value pair: the key is the name of the platform and the value list contains various attributes of the platform. the platform string is in the format system name:os release:architecture. the installer obtains these values from nspr. ...
...ure. the installer obtains these values from nspr. os release is an empty string on non-unix operating systems. nspr supports these platforms: o aix (rs6000) o bsdi (x86) o freebsd (x86) o hpux (hppa1.1) o irix (mips) o linux (ppc, alpha, x86) o macos (powerpc) o ncr (x86) o nec (mips) o os2 (x86) o osf (alpha) o reliantunix (mips) o sco (x86) o solaris (sparc) o sony (mips) o sunos (sparc) o unixware (x86) o win16 (x86) o win95 (x86) o winnt (x86) for example: irix:6.2:mips sunos:5.5.1:sparc linux:2.0.32:x86 win95::x86 the module information is defined independently for each platform in the modulename, modulefile, and files attributes. these attributes ...
...on. typically, this string is used for a setup program provided by a module vendor, such as a self-extracting setup executable. more than one file can be specified as executable, in which case the files are run in the order in which they are specified in the script file. filepermissions sets permissions on any referenced files in a string of octal digits, according to the standard unix format. this string is a bitwise or. user read: 0400 user write: 0200 user execute: 0100 group read: 0040 group write: 0020 group execute: 0010 other read: 0004 other write: 0002 other execute: 0001 some platforms may not understand these permissions. they are applied o...
NSS tools : signtool
on is not used with either the -j or the -z option, the default compression value used by both the -j and -z options is 6. -d certdir specifies your certificate database directory; that is, the directory in which you placed your key3.db and cert7.db files. to specify the current directory, use "-d." (including the period). the unix version of signtool assumes ~/.netscape unless told otherwise. the nt version of signtool always requires the use of the -d option to specify where the database files are located. -e extension tells signtool to sign only files with the given extension; for example, use -e".class" to sign only java class files. note that with netscape sig...
...tes a new private-public key pair and corresponding object-signing certificate with the given nickname. the newly generated keys and certificate are installed into the key and certificate databases in the directory specified by the -d option. with the nt version of netscape signing tool, you must use the -d option with the -g option. with the unix version of netscape signing tool, omitting the -d option causes the tool to install the keys and certificate in the communicator key and certificate databases. if you are installing the keys and certificate in the communicator databases, you must exit communicator before using this option; otherwise, you risk corrupting the databases. in all ...
... the signtool option -g generates a new public-private key pair and certificate. it takes the nickname of the new certificate as an argument. the newly generated keys and certificate are installed into the key and certificate databases in the directory specified by the -d option. with the nt version of netscape signing tool, you must use the -d option with the -g option. with the unix version of netscape signing tool, omitting the -d option causes the tool to install the keys and certificate in the communicator key and certificate databases. in all cases, the certificate is also output to a file named x509.cacert, which has the mime-type application/x-x509-ca-cert. certificates contain standard information about the entity they identify, such as the common n...
...netscape internal fips pkcs #11 module (this module is interna...
AT APIs Support
ntation is in progress still. but in the meantime it more up-to-date and contains more details than existed analogues for at-spi and msaa this documentation explains how makers of screen readers, voice dictation packages, onscreen keyboards, magnification software and other assitive technologies can support gecko-based software. we provide for them the support of these products on windows, linux/unix and os x platforms. accessible gecko gecko is a rendering engine that firefox, seamonkey, netscape and yelp use. gecko can render a variety of content, not just html and supports key web standards such as cascading style sheets, javascript and the w3c dom. gecko also handles the users keystrokes and mouse clicks. gecko is the core architecture that we are adding accessibility to, in order to su...
...lient content window, plus the context menu. on windows platform mfcembed testing client - this is a very simple package, great for testing basic html accessibility with your products and the gecko rendering engine (please contact us for a copy). k-meleon - light, ultra-fast and more advanced (fully configurable) gecko-based web browser available on the windows platform on linux/unix platform yelp help viewer - the help viewer in gnome evolution email - provides integrated mail, addressbook and calendaring functionality to users of the gnome desktop. on mac platform camino - web browser for os x xul applications xul applications make full use of the gecko architecture, not only for html content, but also for the entire user interface. widgets such...
...atform we support msaa (microsoft active accessibility) and iaccessible2 on windows. also we expose ms com interfaces isimpledom* to provide an access to dom tree. iaccessible2 is a set of interfaces that overlay the msaa (iaccessible) and dom (isimpledom*) interface support. any object that supports iaccessible will also support iaccessible2 and possibly any of the other ia2 interfaces. linux/unix platform we support atk/at-spi interfaces on linux. mac platform we currently support only a subset of universal access. the rest of the mozilla universal access support is in progress. accessible web standards gecko exposes the number of xml languages including html to at. refer to accessible web specifications page to learn what and how markup languages are exposed. at apis implementation...
... msaa support as well atk/at-spi accerciser - interactive python accessibility explorer for the gnome desktop gecko dom inspector has an ability to test gecko accessibility layer, supports base features. firebug screen readers here's a list of screen readers we are oriented to in the first place. windows platform jaws windows eyes nvda linux/unix platform orca os x platform voiceover contacts please discuss accessibility issues on the mozilla accessibility groups or on the mozilla accessibility irc channel. ...
Finding window handles - Archive of obsolete content
is obtained and then it is focused. run the snippets below from the scratchpad in environment > browser. ...
...the string is made into an actual gdkwindow* like this: var gdkwindow = ctypes.structtype('gdkwindow'); var gdkwindowptrstring = basewindow.nativehandle; var gdkwinptr = gdkwindow.ptr(ctypes.uint64(gdkwindowptrstring)); working with gdkwindow* gdkwindow* to xid var gdkwindow = ctypes...
...the string is made into an actual gdkwindow* like this: var gdkwindow = ctypes.structtype('gdkwindow'); var gdkwindowptrstring = basewindow.nativehandle; var gdkwinptr = gdkwindow.ptr(ctypes.uint64(gdkwindowptrstring)); working with gdkwindow* gdkwindow* to xid var gdkwindow = ctypes.structtype(...
File object - Archive of obsolete content
and want to include the file object, you may need to perform minor makefile surgery. summary non-standard server-side object this object lets you work files and directories on the local filesystem, and create os pipelines. creating a pipeline involves spawning arbitrary processes; this means that giving a script access to the file object is exactly equivalent to giving the script access to the unix shell or dos command interpreter. filesystem access is implemented with nspr i/o functions, and as such shares many semantics. pipelines are implemented with the popen() system call. there is currently no support for p2open()-like semantics. here is the original proposal for this object, and a status update from december 1998: http://www.mozilla.org/js/js-file-object.html created by the file ...
... are considered special files. pipelines either begin or end with the pipe (|) symbol. description filenames are specified as strings that have an implementation defined format. use of standard "file:" urls is encouraged. if no argument is supplied to the constructor, the current working directory is the file object that is returned. examples of possible prefix strings are "/" to indicate the unix root directory, "c:" to specify a windows drive letter, and "file:" to indicate a file url. when a file is constructed, leading and trailing spaces are removed from the filename, so new file(" abc.txt ") just creates a file called abc.txt. filenames starting and ending with the pipe symbol (|) are interpreted as pipes. readable pipelines (i.e. pipe to programs generating output on stdout) b...
...rties static properties file.input a file object that represents the standard input (stdin). file.currentdir a file object that represents the standard output (stdout). file.currentdir a file object that represents the standard error (stderr). file.currentdir a file object referring to the current directory; this property may be set. file.separator the system name separator (slash on unix). instance properties file.length the length of the file in bytes, or the number of entries in the directory. note: calculating the length of the directory is very expensive. file.parent the directory containing the file. file.path the canonical path to the file. file.name the name of the file. file.isdirectory true if the file is a directory. file.isfile true if the file is a fil...
NPAPI plugin reference - Archive of obsolete content
pi that are provided by the browser; these allow call back to the browser to request information, tell the browser to repaint part of the window, and so forth. the names of all of these methods begin with npn_ to indicate that they are implemented by the browser and called by the plug-in. np_getmimedescription np_getmimedescription returns a supported mime type list for your plugin. it works on unix (linux) and macos. on windows you have to define supported mimetypes in the dll resource file. np_getvalue allows the browser to query the plug-in for information. np_initialize provides global initialization for a plug-in. np_port contains information required by the window field of an npwindow structure. np_shutdown provides global deinitialization for a plug-in. npanycallbackstruct c...
...ark: hence the name "npp_write" is misleading - just think of:"data_arrived") npp_writeready determines maximum number of bytes that the plug-in can consume. npprint contains information the plug-in needs to print itself in full-page or embedded mode. npprintcallbackstruct contains information required by the platformprint field of the npembedprint structure during embedded mode printing on unix systems. nppvariable see npn_setvalue. nprect represents a rectangular area of a plug-in's content area. npregion represents a platform-defined region of a page. npsaveddata block of instance information saved after the plug-in instance is deleted; can be returned to the plug-in to restore the data in future instances of the plug-in. npsetwindowcallbackstruct contains information about ...
...variable see npn_setvalue. nprect represents a rectangular area of a plug-in's content area. npregion represents a platform-defined region of a page. npsaveddata block of instance information saved after the plug-in instance is deleted; can be returned to the plug-in to restore the data in future instances of the plug-in. npsetwindowcallbackstruct contains information about the plug-in's unix window environment. npstream represents a stream of data either produced by the browser and consumed by the plug-in, or produced by the plug-in and consumed by the browser. npstring npstring is a struct that holds a pointer to a sequence of 8-bit units (nputf8) making up a utf-8 string, and the number of 8-bit units in the utf-8 string. nputf8 nputf8 is a byte representing an 8-bit unit of ...
Accessibility Features in Firefox
evolving standards for making these web applications accessible. companies such as yahoo! have announced they are already working with the technology their new richer interfaces accessible with this new technology. developers, please see our dhtml accessibility documentation and get involved in writing tools and websites using this new technology. sun contributes code to improve accessibility on unix a similar story occurred at sun microsystems. sun needed an accessible web browser for unix, specifically for solaris. again, rather than develop a brand new web browser, it made more sense to contribute fixes that make firefox accessible on unix. thanks to sun's efforts we already have excellent support for the gnome onscreen keyboard (gok). meanwhile, ibm has joined sun's effort to make firefo...
... that's the great thing about the open firefox community model and source code license -- anyone can contribute, and everyone benefits. ...
... that's the great thing about the open firefox community model and source code license -- anyone can contribute, and everyone benefits. downloads, support and more information firefox information and downloads general online support and community forums accessibility newsgroup for users. can also be accessed as a mailing list. ...
CSUN Firefox Materials
changing to become more interactive and less like a bunch of plain documents. firefox is currently the only browser to support the new evolving standards for making these web applications accessible. companies such as yahoo! have announced they are already working with the technology their new richer interfaces accessible with this new technology. sun contributes code to improve accessibility on unix a similar story occurred at sun microsystems. sun needed an accessible web browser for unix, specifically for solaris. again, rather than develop a brand new web browser, it made more sense to contribute fixes that make firefox accessible on unix. thanks to sun's efforts we already have excellent support for the gok onscreen keyboard. meanwhile, ibm has joined sun's effort to make firefox as scre...
...that's the great thing about the open firefox community model and source code license -- anyone can contribute, and everyone benefits. ...
...that's the great thing about the open firefox community model and source code license -- anyone can contribute, and everyone benefits. ...
JavaScript OS.Constants
e path to the programs subdirectory in the user's start menu. macuserlibdir the path to the user's library directory. maclocalapplicationsdir the path to the local applications directory. os.constants.libc constants for interacting with libc. useful mostly for using js-ctypes to interact with the following platforms: macos x; android; linux; other variants of unix. os.constants.libc is available on all platforms, although some constants are not defined everywhere. before using a constant, you should check that it is defined. error values eacces permission denied eagain resource temporarily unavailable ebadf bad file descriptor eexist file exists efault bad address efbig file too la...
... eoverflow (not always available under windows) value too large to be stored in datatype. eperm operation not permitted erange result too large etimedout (not always available under windows) operation timed out. ewouldblock (not always available under windows) operation would block. exdev cross-device link opening files unix access rights defined on all platforms but meaningful only on unix. s_irwxu current user can read, write, execute the file. equivalent to s_irusr | s_iwusr | s_ixusr. s_irusr current user can read the file. s_iwusr current user can write (modify) the file. s_ixusr current user can execute the file. s_irwxg current group of the current ...
...write (modify) the file. s_ixgrp current group of the current user can execute the file. s_irwxo all other users can read, write, execute the file. equivalent to s_iroth | s_iwoth | s_ixoth. s_iroth all other users can read the file. s_iwoth all other users can write (modify) the file. s_ixoth all other users can execute the file. unix opening mode o_append open the file for appending. o_creat create the file if it does not exist yet. o_directory (linux only) succeed only of the file is a directory. o_evtonly descriptor requested for event notifications only. o_excl raise an error if o_creat is set and the file exists. o_exlock atomically obtain an exclusi...
Localizing with Mercurial
ercurial successfully! more details for more details on installing hg on mac osx, refer to the instructions on mercurial's download page. configuring mercurial once you've installed mercurial, you'll need to configure it before you can use it successfully. your mercurial configuration is contained within a config file which you must create yourself. your config file is called either ~/.hgrc (unix systems) or mercurial.ini (windows), depending on your operating system. your config file should have the following settings: [ui] username = your real name <user@example.com> merge = internal:merge [defaults] commit = -v [diff] git = 1 showfunc = 1 unified = 8 to configure hg, follow these steps: create a new file in your favorite text editor. copy the settings above and paste them into...
...on your operating system. your config file should have the following settings: [ui] username = your real name <user@example.com> merge = internal:merge [defaults] commit = -v [diff] git = 1 showfunc = 1 unified = 8 to configure hg, follow these steps: create a new file in your favorite text editor. copy the settings above and paste them into your new file. save the file as either .hgrc (unix systems) or mercurial.ini (windows) and save it in either $home/ or c:\mozilla-build\hg\ or c:\program files\mercurial\. now that you've installed and configured mercurial, here are a few tasks you can do without hg commit access priviledges. cloning and updating repositories there are a couple of repostiories that contain en-us source files that most locales will want to deal with. mozill...
...can do with hg without needing account priviledges is creating l10n patches of your work for someone else to commit to your remote l10n repo on the mozilla servers. doing this ensures that your dashboards are always accurate, as they look at your remote repo. here's how to create a l10n patch with hg and the mq extension: enable mq by adding hg.ext = to your mercurial config file (~/.hgrc on unix-like systems or mercurial.ini on windows) under the [extensions] section. open your command line tool and navigate to your l10n directory. inside your l10n directory, init your repo with mq by running hg init --mq. to create a new patch, run hg qnew -m "your commit message" patch-name.patch. the commit message should take the form of "bug 123456 - change this thing to work better by doing some...
Named Shared Memory
the chapter describes the nspr api for named shared memory. shared memory allows multiple processes to access one or more common shared memory regions, using it as an interprocess communication channel. the nspr shared memory api provides a cross-platform named shared-memory interface that is modeled on similar constructs in the unix and windows operating systems. shared memory protocol named shared memory functions shared memory protocol using named shared memory functions pr_opensharedmemory creates the shared memory segment, if it does not already exist, or opens a connection with the existing shared memory segment if it already exists. pr_attachsharedmemory should be called following pr_opensharedmemory to map the memory segment to an address in the application's address space. p...
...in a process. following a call to pr_closesharedmemory, the prsharedmemory object is invalid and cannot be reused. pr_deletesharedmemory should be called before process termination. after you call pr_deletesharedmemory, any further use of the shared memory associated with the name may cause unpredictable results. filenames the name passed to pr_opensharedmemory should be a valid filename for a unix platform. pr_opensharedmemory creates file using the name passed in. some platforms may mangle the name before creating the file and the shared memory. the unix implementation may use sysv ipc shared memory, posix shared memory, or memory mapped files; the filename may be used to define the namespace. on windows, the name is significant, but there is no file associated with the name. no assumpti...
...ry resources different platforms have limits on both the number and size of shared memory resources. the default system limits on some platforms may be smaller than your requirements. these limits may be adjusted on some platforms either via boot-time options or by setting the size of the system paging space to accommodate more and/or larger shared memory segment(s). security considerations on unix platforms, depending on implementation, contents of the backing store for the shared memory can be exposed via the file system. set permissions and or access controls at create and attach time to ensure you get the desired security. on windows platforms, no special security measures are provided. named shared memory functions pr_opensharedmemory pr_attachsharedmemory pr_detachsharedmemory ...
Introduction to Network Security Services
shows a simplified view of the relationships among the three shared libraries listed above and nspr, which provides low-level cross platform support for operations such as threading and i/o. ...
...r, which provides low-level cross platform support for operations such as threading and i/o. ...
...ore nss libraries and nspr naming conventions and special libraries windows and unix use different naming conventions for static and dynamic libraries: windows unix static .lib .a dynamic .dll .so or .sl in addition, windows has "import" libraries that bind to dynamic libraries. so the nss library has the following forms: libnss3.so - unix shared library libnss3.sl - hp-ux shared library libnss.a - unix static library nss3.dll - windows shared library nss3.lib - windows import library binding to nss3.dll nss.lib - windows static library nss, ssl, and s/mime have all of the above forms. the following static libaries aren't included in any shared libraries libcrmf.a/crmf.lib provides an api for crmf operations. libjar.a/j...
getFile
is is contents/resources. this change was required in order to comply with apple's new gatekeeper v2 rules; without this change, firefox would not work on any mac os x newer than 10.9.4. ns_gre_component_dir "grecomsd" platform-specific locations some symbolic names represent platform-specific locations. the following sections cover these. available on both mac and unix these locations are available on both mac os x and unix implementations of gecko. c constant string value notes ns_os_system_dir "sysd" available on mac os x only these locations are supported only on mac os x versions of gecko. c constant string value notes ns_mac_desktop_dir ns_os_desktop_dir ns_mac_trash_dir...
...deprecated these locations have been deprecated and should no longer be used...
...n_programs_dir "cmprgs" ns_win_common_startup_dir "cmstrt" ns_win_common_desktop_directory "cmdeskp" ns_win_appdata_dir "appdata" ns_win_local_appdata_dir "localappdata" ns_win_printhood "prnthd" ns_win_cookies_dir "cookd" available on unix only these locations are supported only on unix builds of firefox os. c constant string value notes ns_unix_local_dir "locl" ns_unix_lib_dir "libd" ns_unix_home_dir ns_os_home_dir the following locations are provided only on os/2 builds of gecko. deprecated these locations have been deprecated and should no longer be used. c constant string value notes ...
Standard OS Libraries
inapi_abi, ctypes.bool, point.ptr ); /* use it like this */ var point = point(); var ret = getcursorpos(point.address()); components.utils.reporterror(ret); components.utils.reporterror(point); lib.close(); resources for winapi githubgists :: noitidart / search · winapi - winapi js-ctypes snippets that can be copied and pasted to scratchpad com see using com from js-ctypes. unix unix based operating systems are linux, *bsd, solaris, etc. there is a star/asterik ("*") before "bsd" because this means the bsd family such as freebsd, openbsd (who by the way made ssh), netbsd, etc. gtk+ and qt are graphic frameworks, the graphic stack under unix is xorg (x11/x). gtk+ builds over x11. xorg is being re-written at the moment, it is known as wayland. wayland is not considered s...
...untu work a little differently but we'll revisit this topic later in this article (did you know they have a *special* firefox build for ubuntu?). so des are a stack over wms. there is also a layer known as shell, gnomeshell is the shell used in gnome 3, it is the outter shell. gtk+ is the framework used under firefox (and other mozilla applications like thunderbird). the other framework used in unix systems is qt. firefox is officially supported only for gtk+ at the moment, therefore gtk+ is required for firefox to run. attempting to install firefox on a a non-gtk+ based linux build such as kaosx, which is qt based (details on kaosx at the time of this writing: kdelibs version 4.1.4.3, qt version 4.8.6, 64bit) would install gtk+ libraries along with it in order to enable firefox to work on t...
...n_undermouse.tostring()); console.info('x:', x, x.tostring()); console.info('y:', y, y.tostring()); console.info('mask:', mask, mask.tostring()); gdk.close(); gdk3.close(); gtk+ the gtk+ toolkit can also be used. the list of the exposed symbols/functions can be found here: gnome developer :: gtk+ reference manual. example: ... // placeholder - example soon to come x11 x11 runs primarily on unix® and unix-like operating systems like linux, all of the bsd variants, sun solaris both native 32 and 64 bit support, solaris x86, mac os x (via darwin) as well as other platforms like os/2 and cygwin. there are updates that happen to x11; at the time of this writing, the latest version is 4.4.0. information on all releases can be found on its official page x11 resources. syntax and variable type...
places/bookmarks - Archive of obsolete content
. unsorted this is a constant, default group on the firefox platform, the unsorted bookmarks group. it can be used in queries or specifying the parent of a bookmark item, but it cannot be modified. bookmark properties title the bookmark's title. url the bookmark's url. group the group instance that the bookmark lives under. index the index of the bookmark within its group. updated a unix timestamp indicating when the bookmark was last updated on the platform. tags a set of tags that the bookmark is tagged with. group properties title the bookmark group's title. group the group instance that the bookmark group lives under. index the index of the bookmark group within its group. updated a unix timestamp indicating when the bookmark was last updated on the platform. sep...
... placesemitter the placesemitter is not exported from the module, but returned from the save and search functions. ...
Setting Up a Development Environment - Archive of obsolete content
a .kpf or .komodoproject file in an example you download, this is a komodo project file. we recommend git and github for source control, but any decent software configuration management system will do. to package xpi files, we use make. we chose make because this is the same system used by mozilla to build firefox, and it is available for all operating systems. make is a default tool in most unix-based systems. it can be installed on mac os x as part of the xcode tools package, and on windows with cygwin. in cygwin installations you'll have to explicitly check the make and zip utilities from the long list of packages to download and install. also make sure that make is in the executable system path. after setting up make, you should be able to open a command line window, run "make -ver",...
...ou'll have to build the sdk yourself from the mozilla source. good luck with that. you should also set up your environment so that xpidl.exe (or just xpidl on other systems) is in the default executable path, and also add a variable called gecko_sdk, that points to your sdk build: export gecko_sdk=/path/to/your/sdk our build system should pick it up from there. to make it work in komodo in unix-based systems, we add the command to the .bash_login file in the home directory, and we modify the commands to this: bash -c ". ~/.bash_login; make" an example project with xpcom components is included in the xpcom section. there is also a mention about building c++ xpcom, which is something much more complicated. signing extensions in order to provide additional security for your users, ...
The Essentials of an Extension - Archive of obsolete content
refox needs this to distinguish your extension from other extensions, so it is required that you have an id that is unique. there are two accepted standards for add-on ids. one is the email-like format in the hello world example, which should be something like <project-name>@<yourdomain>. the other standard practice is to use a generated uuid string, which is extremely unlikely to be duplicated. unix-based systems have a command line tool called uuidgen that generates uuids. there are also downloadable tools for all platforms that generate them. the enclosing brackets are just notation, and they're just common practice. as long as your id has some uniqueness to it, it's ok to use either form. <em:name>xul school hello world</em:name> <em:description>welcome to xul school!</em:description> ...
... chrome registration page. notably, we can have entries that are os-specific. this is important because the appearance of the browser is very different for each operating system. if our extension needed to look differently on different systems, we could change the manifest file so that it looks like this: content xulschoolhello content/ skin xulschoolhello classic/1.0 skin/unix/ skin xulschoolhello classic/1.0 skin/mac/ os=darwin skin xulschoolhello classic/1.0 skin/win/ os=winnt locale xulschoolhello en-us locale/ this way we can have separate skins for windows, mac os x, and linux (plus other unix-like systems), each defined in a separate directory. since most other systems are unix-based, the "unix" skin is the default, with no flags. the c...
Setting up an extension development environment - Archive of obsolete content
ile dev, if you don't have the dev profile already created, the profile selection window opens, where you can create it. in the following example, the described command starts a new instance of firefox, with a profile called dev; even if an instance of firefox is already running. ...
... when you enable these preferences. accessing firefox development preferences to change preference settings in firefox or seamonkey, type about:config in the location bar. you can also use the extension developer's extension, which provides a menu interface for firefox settings. accessing thunderbird development preferences to change preference settings in thunderbird, open the "preferences" (unix) or "options" (windows) interface. on the "advanced" page, select the "general" tab then click the "config editor" button. recommended development preferences not all preferences are defined by default, and are therefore not listed by default. you will have to create new (boolean) entries for them. for more information about mozilla preferences, refer to the mozillazine article on "about:config...
Index of archived content - Archive of obsolete content
new security model for web services new skin notes overview of how downloads work plug-n-hack plug-n-hack get involved plug-n-hack phase1 plug-n-hack phase2 plug-n-hack tools supported plugin architecture porting nspr to unix platforms priority content prism blogposts build bundlelibrary bundles configuration extensions faq hostwindow installer scripting styling proxy ui pydom rdf api ...
...nkman internals venkman introduction video presentations when to use ifdefs writing textual data xml in mozilla xpinstall creating xpi installer modules install wizards (aka: stub installers) mac stub installer unix stub installer windows stub installer learn xpi installer scripting by example installer script using xpinstall to install plugins install script template xpinstall api r...
Source code directories overview - Archive of obsolete content
ce code and other special tools for building this module. there are also platform dependent subdirectories which contain source code for specific platforms. windows contains source code for windows 95, windows 98 and windows nt 4.0. mac contains source code for macos: both the powerpc and 68000 versions. gtk contains source code for gtk (a.k.a. the gimp toolkit) which runs on x-windows on unix. ...
...m dependent subdirectories which contain source code for specific platforms. windows contains source code for windows 95, windows 98 and windows nt 4.0. mac contains source code for macos: both the powerpc and 68000 versions. gtk contains source code for gtk (a.k.a. the gimp toolkit) which runs on x-windows on unix. motif contains source code for motif, a toolkit which runs on x-windows on unix. os2 contains source code for os/2 warp. rhapsody contains source code for mac os x server (which is based on nextstep which is based on x-windows on unix) using yellow box (cocoa). beos contains source code for beos. qt contains source code for the qt toolkit, a c class library which runs on x-windows on unix, windows 95, windows 98 and window nt 4.0. photon contains source code for photon,...
Creating a Firefox sidebar extension - Archive of obsolete content
and they should appear. deployment now that we have a sidebar it is time to make it available to the world. installation requires the creation of an xpi file which is identified as extension in firefox. the xpi is a zip file containing the content, locale and manifest files. the content, locale and skin folders are packed into emptysidebar.jar, which should be created in the chrome folder. on unix systems: ~/src/emptysidebar$ cd chrome ~/src/emptysidebar/chrome$ zip -r emptysidebar.jar content/ locale/ on windows systems, use a zip tool to create emptysidebar.zip and then rename to emptysidebar.jar. since we are packaging the extension with a jar file, we need to update the chrome.manifest file to take to jar file into consideration: example 7. chrome.manifest content emptysidebar j...
...mptysidebar jar:chrome/emptysidebar.jar!/content/ locale emptysidebar en-us jar:chrome/emptysidebar.jar!/locale/ skin emptysidebar classic/1.0 jar:chrome/emptysidebar.jar!/skin/ overlay chrome://browser/content/browser.xul chrome://emptysidebar/content/firefoxoverlay.xul finally, create the xpi file. this is a zip file containing the jar file in the chrome folder and the manifest files. on unix systems: ~/src/emptysidebar/chrome$ cd .. ~/src/emptysidebar$ zip emptysidebar.xpi install.rdf chrome.manifest chrome/emptysidebar.jar open firefox and browse to the folder containing emptysidebar.xpi. click on the file and the extension installation window pops up. after a restart of firefox, the sidebar is installed. you can download the empty sidebar project to use as a basis for your own ...
Making a Mozilla installation modifiable - Archive of obsolete content
using an unzip utility, then edit mozilla's registry of ui files to use the extracted files instead of the original jar archives. the archives are stored within the chrome subdirectory of the mozilla installation directory. use your unzip utility to extract all files in that directory with a .jar extension. make sure you extract them into the same (chrome) directory in which they are located. ...
...extract only the one appropriate for your platform. after extracting the files we will modify the mozilla chrome registry to use the extracted files instead of the original jar archives. the chrome registry is a file that lists each major mozilla component and where in the chrome directory its ui files are located. ...
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. ...
...~/party/ cdrecord -v speed=2 dev=0,6,0 ~/party.iso its also handy to be able to mount an image file to test it. mount ~/party.iso /mnt/cdrom -t iso9660 -o loop=/dev/loop3,blocksize=1024 umount /mnt/cdrom here is the hfs mapping that i used. the creator "moss" is for netscape 4.x and "mozz" is used for mozilla. it is used as the creator type for readme and other text files because it can handle unix and windows linebreaks, but teachtext cannot. # example filename mapping file used by mkhybrid for hfs # # extn xlate creator type comment .hqx ascii 'sitx' 'text' "binhex file" .zip raw 'sitx' 'zip ' "zip file" .gz raw 'sitx' 'zip ' "gzip file" .tgz raw 'sitx' 'zip ' "tar.gz gzip file" .tar raw 'sitx' 'tarf' "tar file" .t...
Creating a Help Content Pack - Archive of obsolete content
pecifies the platforms to which the information stored in the referenced data sources applies. this attribute is useful when some of your help contents only apply to one specific platform. if this attribute is omitted, the information in the data sources applies to all platforms. the attribute is a space-separated list of platform strings. strings recognized from 1.8 onward are win, mac, os2, and unix; more will be added as required. unrecognized strings are ignored during parsing. an example of how to use this attribute follows: <!-- assumptions: win-toc.rdf contains windows- and os/2-specific info, unix-toc.rdf contains linux- and mac-specific info. --> <rdf:li> <rdf:description nc:panelid="toc" ...
...ains linux- and mac-specific info. --> <rdf:li> <rdf:description nc:panelid="toc" nc:platform="win os2" nc:datasources="win-toc.rdf"/> </rdf:li> <rdf:li> <rdf:description nc:panelid="toc" nc:platform="unix mac" nc:datasources="unix-toc.rdf"/> </rdf:li> there's one final element to add inside rdf:seq to complete the content pack descriptor file: an element to describe the help viewer's search function. search automatically goes through all of the elements in the table of contents, index, and glossary, but you might wish to have search go through...
Helper Apps (and a bit of Save As) - Archive of obsolete content
file and put up an error dialog. launching a helper application this is delegated to the nspiexternalapplauncher (also implemented by the nsexternalhelperapphandler): windows: launch either directly via nsiprocess or via the ::shellexecute() method depending on where the mimeinfo came from. last-ditch check for executable files here. mac: use the launchwithdoc() method on nsilocalfilemac. unix: launch directly via nsiprocess. security considerations multiple checks for whether a file is executable (on windows) to keep from launching such files via ::shellexecute(). checks happen in onstartrequest, in the helper app dialog, and as a last ditch in the launching code. limitations of nsimimeinfo no way to say "do whatever the os default is." no support for command-line arguments. ...
...checks for whether a file is executable (on windows) to keep from launching such files via ::shellexecute(). checks happen in onstartrequest, in the helper app dialog, and as a last ditch in the launching code. limitations of nsimimeinfo no way to say "do whatever the os default is." no support for command-line arguments. no support for multiple commands connected by pipes (mostly useful on unix). ongoing work support synchronous dialogs, not just asynchronous ones (fixes many issues related to pre-downloading, content-decoding, etc). reworking the nsimimeservice api to improve the quality of the mimeinfo we get. reworking the helper app dialog to save user choices better. gnome integration for unix. future work fix the deficiencies in nsimimeinfo. better support for mailcap ...
Modularization techniques - Archive of obsolete content
od (for an example of this, see nssample2.cpp). a dll can export two additional functions for self registration and unregistration. extern "c" ns_export nsresult nsregisterself(const char *path); extern "c" ns_export nsresult nsunregisterself(const char *path); this allows a dll to register and unregister all its factories. a simple program called regfactory.exe (on windows) or regfactory (on unix) can be used to register self-registering dlls. reference counting basics reference counting is a critical part of modularity picture. there are a number of basic reference counting rules to remember. here's a quick summary. out parameters functions that return a new interface should call addref() on that interface before returning it. nsresult getfoo(ifoo **afoores) { if (afoores == null)...
...interface. there are mechanisms for declaring interfaces in c, but they're pretty gruesome and compiler dependent, and we're trying to make this as light weight as possible. why not com? the only platform for which com support is currently widely available is windows. microsoft ships a com extension for the macintosh, but it's generally only installed with internet explorer or microsoft office. unix support for com is scarce. why not com on windows? because it's not a cross platform solution, and that's what we need. we're going to make every effort to make our interfaces compatible with com on platforms that support it, so it may not matter. but no promises, yet. what are the major differences? instead of microsoft's midl compiler, we are using a corba-compliant idl compiler, xpidl. it ...
Standalone XPCOM - Archive of obsolete content
res of xpcom. the contents of this standalone xpcom in general are: nspr : mozilla/nsprpub xpcom : mozilla/xpcom note 1: xpcom apis are not frozen yet. by xpcom 1.0 release they will be. note 2: xpcom standalone differs from the xpcom built with mozilla. hence cannot be used with the mozilla browser. building standalone xpcom here are the instructions for building the standalone xpcom on unix or windows: step 1 : pull the sources cvs -z 3 co mozilla/client.mk cd mozilla gmake -f client.mk pull_all build_modules=xpcom step 2 : build xpcom standalone ./configure --enable-standalone-modules=xpcom --enable-application=standalone gmake testing standalone xpcom xpcom/sample contains a sample application and a component. this should get built by default. nstestsample is the...
...-f client.mk pull_all build_modules=xpcom step 2 : build xpcom standalone ./configure --enable-standalone-modules=xpcom --enable-application=standalone gmake testing standalone xpcom xpcom/sample contains a sample application and a component. this should get built by default. nstestsample is the sample application. this should have been installed in your bin/ directory. libsample.so (unix) is the sample component implementation that the sample application will try to instantiate. this should have been installed in your bin/components directory to run the test, cd to your bin/ directory setenv ld_library_path . ./nstestsample warning: mozilla_five_home not set. nsnativecomponentloader: autoregistering begins. nsnativecomponentloader: autoregistering succeeded inital ...
Creating XPI Installer Modules - Archive of obsolete content
ubdirectories: mozilla now installs both the compressed and uncompressed versions of the ui, though you can change this when you build mozilla yourself. chrome/ us/ us.jar chatzilla/ chatzilla.jar chrome.rdf chromelist.txt classic/ classic.jar comm/ comm.jar content-packs/ content-packs.jar embed-sample/ embed-sample.jar en-us/ en-us.jar en-mac/ en-mac.jar en-unix/ en-unix.jar en-win/ en-win.jar help/ help.jar inspector/ inspector.jar installed-chrome.txt messenger/ messenger.jar ... in addition to these jar files, there are also several new rdf files. these new files represent a redesign of the way that the mozilla ui is packaged and installed. though the chrome directory still includes subdirectories of uncompressed files by defaul...
... message like the following: when you click ok, mozilla installs the new package. exit mozilla and restart it with mozilla -chrome chrome://barley/content and the new package displays. the resources are installed in the mozilla/bin/chrome/ directory, and the xpi itself can be redistributed for installation on other machines. notes note: zip there exist a lot of zip archivers/unarchivers. for unix, you can either use the preinstalled zip tool, or e.g. 7-zip (free software). for windows, you can e.g. use 7-zip (free software), or winzip (commercial). see also jar packaging the jar file specification original document information author(s): ian oeschger original document: creating new packages for mozilla last updated date: march 8, 2003 copyright information: co...
Install Wizards (aka: Stub Installers) - Archive of obsolete content
the stub installer calls some glue code: xpistub which resides at: < http://lxr.mozilla.org/seamonkey/sou...pinstall/stub/>...
...he code that calls the xpinstall engine through xpistub the libxpnet code that is statically linked in the stub installers are written in code native to the platform using native widget toolkits including the windows api for windows, the mac toolbox for the mac, and gtk for the unix version. to learn more about the three platform-specific versions of the stub installer follow the links below: unix stub installer mac stub installer windows stub installer what do we mean by xpistub? the xpinstall engine is not called directly by the stub installer. the stub installer calls some glue code: xpistub which resides at: < http://lxr.mozilla.org/seamonkey/sou...pinstall/stub/> this "glue" code initialized xpcom and registers the xpinstall engine and requisite components to prepare for use by t...
getFolder - Archive of obsolete content
plugin" "macosx local preferences" "macosx movie documents" "macosx music documents" "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" ...
...rtup" "win startup common" "win system" the "file:///" form is only valid when the subdirectory parameter is used. it must be in file: url format minus the "file:///" part. for example, mydir = getfolder("file:///", "c|/mysoftco/somedir"); note that forward slashes are used, regardless of the platform. the folders whose names start with "win", "mac", or "unix" are specific to those platforms. you should be careful about using one of those directories, as it makes your installation platform-specific. example to get an object representing the standard plug-ins directory, you would use this call: plugindir = getfolder("plugins"); ...
NPAPI plugin developer guide - Archive of obsolete content
s the default plug-in using html to display plug-ins plug-in display modes using the object element for plug-in display nesting rules for html elements using the appropriate attributes using the embed element for plug-in display using custom embed attributes plug-in references plug-in development overview writing plug-ins registering plug-ins ms windows unix mac os x drawing a plug-in instance handling memory sending and receiving streams working with urls getting version and ui information displaying messages on the status line making plug-ins scriptable building plug-ins building, platforms, and compilers building carbonized plug-ins for mac os x type libraries installing plug-ins native installers xpi plu...
...ns installations plug-in installation and the windows registry initialization and destruction initialization instance creation instance destruction shutdown initialize and shutdown example drawing and event handling the npwindow structure drawing plug-ins printing the plug-in setting the window getting information windowed plug-ins mac os windows unix event handling for windowed plug-ins windowless plug-ins specifying that a plug-in is windowless invalidating the drawing area forcing a paint message making a plug-in opaque making a plug-in transparent creating pop-up menus and dialog boxes event handling for windowless plug-ins streams receiving a stream telling the plug-in when a stream is created ...
NPN_SetValue - Archive of obsolete content
. returns if successful, the function should return nperr_no_error. if unsuccessful, the function should return the most relevant npapi error code. for possible values, see error codes. description a good place to set plugin operation mode such as windowless mode is npp_new, so the browser knows right away what mode the plugin is designed to operate in. nppvpluginwindowbool (windows and unix) specifies that the plugin operates in windowed mode. the alternative is windowless where no window messages are sent to the plugin as there is no window associated with it. in windowless mode all the browser to plugin communications related to drawing, mouse, and keyboard input are accomplished via npp_handleevent. to set windowless operation, call npn_setvalue with nppvpluginwindowbool as the v...
...plugin as there is no window associated with it. in windowless mode all the browser to plugin communications related to drawing, mouse, and keyboard input are accomplished via npp_handleevent. to set windowless operation, call npn_setvalue with nppvpluginwindowbool as the variable parameter and false as the value parameter. by default, plugins are windowed. nppvplugintransparentbool (windows and unix) specifies that a plugin is either opaque or transparent. to specify an opaque mode, the plugin calls npn_setvalue with nppvplugintransparentbool for the variable parameter and false for the value parameter. to specify a transparent mode, the value parameter should be set to true. nppvjavascriptpushcallerbool sets whether you are pushing or popping the appropriate jscontext off the stack (see th...
NPP_SetWindow - Archive of obsolete content
pi.h> nperror npp_setwindow(npp instance, npwindow *window); parameters the function has the following parameters: instance pointer to the current plug-in instance. must be embedded or full-screen. window pointer to the window into which the instance draws. the window structure contains a window handle and values for top left corner, width, height, and clipping rectangle (see note on unix below). returns if successful, the function returns nperr_no_error. if unsuccessful, the plug-in is not loaded and the function returns an error code. for possible values, see error codes. description the browser calls npp_setwindow after creating the instance to allow drawing to begin. subsequent calls to npp_setwindow indicate changes in size or position; these calls pass the same npwi...
...any additional graphics operations on the window and should free any associated resources. the data structure passed in npp_setwindow is an npwindow object, which contains the coordinates of the instance's area and various platform-specific data. this window is valid for the life of the instance, or until npp_setwindow is called again with a different value. for windowed plug-ins on windows and unix, the window parameter contains a handle to a subwindow of the browser window hierarchy. on mac os, this field points to an np_port structure. for windowless plug-ins, it is a platform-specific handle to a drawable. before setting the window parameter to point to a new window, it is a good idea to compare the information about the new window to the previous window (if one existed) to account for ...
NP_GetMIMEDescription - Archive of obsolete content
np_getmimedescription returns a supported mime type list for your plugin. it works on unix (linux) and macos. on windows you have to define supported mimetypes in the dll resource file. each mime type description should be separated by a semicolon (;). each mime type description contains the mime type, an extensions list and a short description. ...
...ur plugin. it works on unix (linux) and macos. on windows you have to define supported mimetypes in the dll resource file. each mime type description should be separated by a semicolon (;). each mime type description contains the mime type, an extensions list and a short description. ...
0.90 - Archive of obsolete content
Archive › RSS › Version › 0.90
rather than for syndication. specification the original ...
...rather than for syndication. specification the original rss 0.90 specification has disappeared from its original location: http:/...
Browser Detection and Cross Browser Support - Archive of obsolete content
i strongly advise everyon...
... problems caused by inappropriate browser detection excluding unknown browsers if you only provide tests for specific browsers in your detectio...
Plug-in Development Overview - Gecko Plugin API Reference
se internet mail extensions (mime) part one: format of internet message bodies" rfc-2046: "multipurpose internet mail extensions (mime) part two: media types" rfc-4288: "media type specifications and registration procedures" there are some variations to how plug-ins are handled on different platforms. the following sections describe platform-specific discovery and registration: ms windows unix mac os x ms windows on windows, plug-ins are found according to the section how gecko finds plug-ins. to determine the mime types and file extensions that the plug-in handles, the browser normally uses the content of the registry entries for the plug-in described below in installation using the registry. but when the plug-in is loaded from a well-known directory, a different method must be ...
... and file extensions strings, multiple values are separated by the "|" character, for example: video/quicktime|audio/aiff|image/jpeg the version stamp will be loaded only if it has been created with the language set to "us english" and the character set to "windows multilingual" in your development environment. the resource code for this language and character set combination is 040904e4. unix on unix, plug-ins are found according to the section how gecko finds plug-ins. to determine the mime types and file extensions that the plug-in handles, the browser loads each library and calls into the np_getmimedescription entry point. this exported c function should return a string containing the type, extension list, and type description separated by colons. each mime types should be separa...
Chrome registration
inary-component component/mylib.so abi=linux_x86-gcc3 see xpcom abi for more details. platform (platform-specific packages) some packages are marked with a special flag indicating that they are platform specific. some parts of content, skin, and locales may be different based on the platform being run. these packages contain three different sets of files, for windows and os/2, macintosh, and unix-like platforms. for example, the order of the "ok" and "cancel" buttons in a dialog is different, as well as the names of some items. the "platform" modifier is only parsed for content registration; it is not recognized for locale or skin registration. however, it applies to content, locale, and skin parts of the package, when specified. to indicate that a package is platform-specific, add the ...
...of the package, when specified. to indicate that a package is platform-specific, add the "platform" modifier to the "content" line after the path, for example: content global-platform jar:toolkit.jar!/toolkit/content/global-platform/ platform once that is specified in your manifest you then ensure that under the directory global-platform are subdirectories win (windows/os2), mac (os9/osx), or unix (everything else). anything residing outside of these subdirectories will be ignored. process in electrolysis registrations can be set to only apply in either the main process or any content processes. the "process" flag selects between these two. this can allow you to register different components for the same contract id or ensure a component can only be loaded in the main process. note: ex...
Command line options
t are not permanently disabled in the extension manager data source). remote control -remote remote_command this feature was removed in firefox 36.0, restored in 36.0.1 and removed again in 39.0. see bug 1080319. execute the specified remote_command in an already running application process. firefox -remote "openurl(www.mozilla.org, new-tab)" this option is only available on x-windows unix platforms. miscellaneous -attach-console write messages for the debugging console into the window which launched the application instead of opening a new window for the debugging messages. only supported on the windows operating system. -console start application with a debugging console. note: windows only. -h or -help or -? print the list of all available command line options. note t...
...opening. firefox, thunderbird3.x and seamonkey2.x only. -v or -version print application version. note that on windows this only works with a redirection such as |more (bug 355889). this option is available only in a command console. x11 options these options are only available for an application build for and running atop the x11/x.org display and window system to be found on linux and other unix-based systems. --class=wm_class set the wm_class resource class of the x11 windows created by the application. --display=display set the x display to use. --g-fatal-warnings make all warnings fatal. --sync make x calls synchronous. other options need to be documented -print-xpcom-dir -print-xpcom-dirlist -kill -killall -f -ftimeout -fwait -unsetdefaultmail gtk options -no-dee...
Roll your own browser: An embedding how-to
should not need to, and should not, use embedding/config. what bits do i need? one of the requirements of building a sdk is the ability to identify and package up required files. like that isn't totally obvious, nonetheless it has to be done. here is that effort. i have created a directory under embedding called config. contained within this directory are a couple of makefiles: basebrowser-unix basebrowser-win the xpinstall packager follows the same format. however in our case, we only have one named xpi package. after the build is done, you can change directory into mozilla/embedding/config, and do a make. this will produce a directory in dist named embed. it should include all of the base support that you need to get a web browser started up. included is the sample test applicati...
...state's komodo: development environment, based on mozilla's xul. (screenshot) marbrow : mac port of x2web (ja, ko) embedding mozilla. mozilla examples ppembed: standard mozilla sample application implemented with metroworks' powerplant. camino: a project aimed at delivering a best-of-breed browser on the mac os x platform. camino uses cocoazilla, a variant of fizzilla that consists of a unix back end wed to a cocoa front end. java examples java webclient: provides a browser-neutral java api that enables generic web browsing capability. browserg!: a java application that uses webclient for html rendering and surfing capabilities. if you find any missing item, please send me an email. original document information author(s): doug turner original document: , , and last...
Dynamic Library Linking
the library handle when you are done. platform notes to use the dynamic library loading functions on some platforms, certain environment variables must be set at run time, and you may need to link your executable programs using special linker options. this section summarizes these platform idiosyncrasies. for more information, consult the man pages for ld and dlopen (or shl_load on hp-ux) for unix, and the loadlibrary documentation for win32. dynamic library search path exporting symbols from the main executable program dynamic library search path the dynamic library search path is the list of directories in which to look for a dynamic library. each platform has its own standard directories in which to look for dynamic libraries, plus a customizable list of directories specified by ...
...for win32. dynamic library search path exporting symbols from the main executable program dynamic library search path the dynamic library search path is the list of directories in which to look for a dynamic library. each platform has its own standard directories in which to look for dynamic libraries, plus a customizable list of directories specified by an environment variable. on most unix systems, this environment variable is ld_library_path. these systems typically use dlopen to load a dynamic library. hp-ux uses shl_load to load dynamic libraries, and the environment variable specifying the dynamic library search path is shlib_path. moreover, the executable program must be linked with the +s option so that it will search for shared libraries in the directories specified by shli...
I/O Functions
ons that operate on pathnames functions that act on file descriptors directory i/o functions socket manipulation functions converting between host and network addresses memory-mapped i/o functions anonymous pipe function polling functions pollable events manipulating layers functions that operate on pathnames a file or directory in a file system is specified by its pathname. nspr uses unix-style pathnames, which are null-terminated character strings. only the ascii character set is supported. the forward slash (/) separates the directories in a pathname. nspr converts the slashes in a pathname to the directory separator of the native os--for example, backslash (\) on windows and colon (:) on mac os--before passing it to the native system calls. some file systems also differentiate...
...etoption pr_setsocketoption converting between host and network addresses pr_ntohs pr_ntohl pr_htons pr_htonl pr_familyinet memory-mapped i/o functions the memory-mapped i/o functions allow sections of a file to be mapped to memory regions, allowing read-write accesses to the file to be accomplished by normal memory accesses. memory-mapped i/o functions are currently implemented for unix, linux, mac os x, and win32 only. pr_createfilemap pr_memmap pr_memunmap pr_closefilemap anonymous pipe function pr_createpipe polling functions this section describes two of the most important polling functions provided by nspr: pr_poll pr_getconnectstatus pollable events a pollable event is a special kind of file descriptor. the only i/o operation you can perform on a pol...
Introduction to NSPR
hread synchronization, i/o, interval timing, atomic operations, and several other low-level services in a platform-independent manner. this chapter introduces key nspr programming concepts and illustrates them with sample code. the current implementation of nspr allows developers to compile a single source code base on macintosh (ppc), win32 (nt 3.51, nt 4.0, win'95), and over twenty versions of unix. nspr does not provide a platform for porting existing code. it must be used from the beginning of a software project. nspr naming conventions naming of nspr types, functions, and macros follows the following conventions: types exported by nspr begin with pr and are followed by intercap-style declarations, like this: print, prfiledesc function definitions begin with pr_ and are followed by...
...d may be of higher priority, of the same priority, or even the same thread. it will not be a thread of lower priority. some operating systems cannot be made preemptable (for example, mac os and win 16). this puts them at some risk in supporting arbitrary code, even if the code is interpreted (java). other systems are not thread-aware, and their runtime libraries not thread-safe (most versions of unix). these systems can support local level thread abstractions that can be made preemptable, but run the risk of library corruption (libc). still other operating systems have a native notion of threads, and their libraries are thread-aware and support locking. however, if local threads are also present, and they are preemptable, they are subject to deadlock. at this time, the only safe solutions are...
Using JSS
Mozilla › Projects › NSS › JSS › Using JSS
if you built jss from source, it is in mozilla/dist/<platform>/lib. if you are downloading binaries, get it from http://ftp.mozilla.org/pub/mozilla.org/security/jss/releases/. jss classes if you built jss from source, the compiled jss classes are in mozilla/dist/classes[_dbg]. you can put this directory in your classpath to run applications locally; or, you can package the class files i...
...ecurity/jss/releases/. setup your runtime environment you need to set some environment variables before building and running java applications with jss. classpath include the path containing the jss classes you built, or the path to jss42.jar. (the path to jss34.jar ends with the string "/jss42.jar". it is not just the directory that contains jss42.jar.) ld_library_path (unix) / path (windows) include the path to the nspr, nss, and jss shared libraries. initialize jss in your application before calling any jss methods, you must initialize jss by calling one of the cryptomanager.initialize methods. see the javadoc for more details. ...
NSS_3.12_release_notes.html
destroy data pointed by certvaloutparam array in case of error bug 426450: pkix_pl_hashtable_remove leaks hashtable key object bug 429230: memory leak in pkix_checkcert function bug 392696: fix copyright boilerplate in all new pkix code bug 300928: integrate libpkix to nss bug 303457: extensions newly supported in libpkix must be marked supported bug 331096: nss softoken must detect forks on all unix-ish platforms bug 390710: certnameconstraintstemplate is incorrect bug 416928: der decode error on this policy extension bug 375019: cache-enable pkix_ocspchecker_check bug 391454: libpkix does not honor nss's override trust flags bug 403682: cert_pkixverifycert never succeeds bug 324744: add generation of policy extensions to certutil bug 390973: add long option names to secu_parsecommandline bu...
...uld init nss read-only for some options bug 350948: freebl macro change can give 1% improvement in rsa performance on amd64 bug 352439: reference leaks in modutil bug 369144: certutil needs option to generate subjectkeyid extension bug 391771: pk11_config_name and pk11_config_strings leaked on shutdown bug 401194: crash in lg_findobjects on win64 bug 405652: in the tls clienthello message the gmt_unix_time is incorrect bug 424917: performance regression with studio 12 compiler bug 391770: ocsp_global.monitor is leaked on shutdown bug 403687: move pkix functions to certvfypkix.c, turn off ev_test_hack bug 428105: cert_setocsptimeout is not defined in any public header file bug 213359: enhance pk12util to extract certs from p12 file bug 329067: nss encodes cert distinguished name attributes with...
NSS 3.37 release notes
he npn protocol, which had already been disabled in a previous release, has been fully removed. nss allows servers now to register alpn handling callbacks to select a protocol. nss supports opening sql databases in read-only mode. nss now requires the sqlite apis of version 3.5.0 or newer. ...
...lite apis of version 3.5.0 or newer. starting with nss version 3.31, an alternative implementation for rng seeding on the linux/unix platform was available (bug 1346735), which performed seeding exclusively based on /dev/urandom. this alternative implementation is selected at build time by defining the seed_only_dev_urandom symbol. (the classic implementation for rng seeding on the linux/unix platform, which may use additional sources for the default seeding, is still available and will be used if seed_only_dev_urandom is undefined.) with nss 3.37, this alternative implementation for linux/unix can be selected in "make" builds by defining the environment variable nss_seed_only_dev_urandom. with nss 3.37, this alternative implementation for linux has been enhanced to use the glib...
gtstd.html
server. verifying the server and client certificates when you have finished setting up the server and client certificate databases, verify that the client and server certificates are valid, as follows: >certutil -v -d server_db -u v -n myco.mcom.org certutil: certificate is valid >certutil -v -d client_db -u c -n "joe client" certutil: certificate is valid building nss programs on unix, use the gnu utility gmake to run the makefile. on windows nt, use the nmake utility that comes with visual c++. if you create your own makefiles, be sure to include the libraries in the same order that they are listed in the sample makefiles. in addition, you must use the following compiler flags: solaris flags: -c -o -kpic -dsvr4 -dsysv -d__svr4 -d__svr4__ -dsolaris -d_reentrant -dsolaris2_5...
... gmake to run the makefile. on windows nt, use the nmake utility that comes with visual c++. ...
Rebranding SpiderMonkey (1.8.5)
elease configure this build of spidermonkey with the desired options. for example: ../configure --enable-ctypes --with-system-nspr note: your desired configuration may be different. the only required part in this step is the ../configure command. so far, so good. now for the tricky parts. we need to perform a recursive find and replace text operation on all files in the current directory. in the unix world we would issue the following command: find ./ -type f -exec sed -i "s/mozjs185/$brand/" {} \; windows users: notepad++ can be used to perform the recursive find and replace text operation. if you have failed to insert your brand name in any of the previous steps where it is called for, you must delete this build directory and restart this process from the beginning. this time paying carefu...
...een succesfully built and installed to libdir as specified in ./config/autoconf.mk. a pkgconfig file has also been installed for your library at libdir/pkgconfig/$brand.pc. you may wish to manually edit this file. it describes your library package. the script file js-config has not been modified either and still points to mozjs185. if this is not desirable, you can issue the following command on unix systems: sed -i "s/mozjs185/$brand/" /usr/bin/js-config which performs a simple text replacement of mozjs185 with your branding on the js-config script. you may need administrative rights to run the above command. ...
NS_NewLocalFile
ol afollowlinks, nsilocalfile** aresult ); parameters apath [in] a utf-16 string object that specifies an absolute filesystem path. this path does not need to reference an existing file. it is an error to pass a relative filesystem path. afollowlinks [in] this attribute will determine if the nsilocalfile instance will automatically resolve symbolic links. this parameter has no effect on unix systems. on windows, passing true causes shortcuts to be automatically resolved, and on macos, passing true causes finder aliases to be automatically resolved. aresult [out] a reference to the newly created nsilocalfile instance. return values the ns_newlocalfile function returns ns_ok if successful. otherwise, it returns an error code. ns_error_file_unrecognized_path indicates that the ...
...nder aliases to be automatically resolved. aresult [out] a reference to the newly created nsilocalfile instance. return values the ns_newlocalfile function returns ns_ok if successful. otherwise, it returns an error code. ns_error_file_unrecognized_path indicates that the specified path is invalid. this error is returned if a relative file path is passed to ns_newlocalfile. remarks on unix systems, the prefix "~/" is supported as a shorthand for the user's home directory. example code // create a local file that references c:\foo.txt nsresult rv; nscomptr<nsilocalfile> file; rv = ns_newlocalfile(nsembedstring(l"c:\\foo.txt"), pr_false, getter_addrefs(file)); if (ns_failed(rv)) return rv; note: gcc requires the -fshort-wchar option to compile this example ...
NS_NewNativeLocalFile
olute filesystem path. this string should be encoded using ascii or the multibyte character coding corresponding to the native filesystem. this path does not need to reference an existing file. it is an error to pass a relative filesystem path. afollowlinks [in] this attribute will determine if the nsilocalfile instance will automatically resolve symbolic links. this parameter has no effect on unix systems. on windows, passing true causes shortcuts to be automatically resolved, and on macos, passing true causes finder aliases to be automatically resolved. aresult [out] a reference to the newly created nsilocalfile instance. return values the ns_newnativelocalfile function returns ns_ok if successful. otherwise, it returns an error code. ns_error_file_unrecognized_path indicates tha...
... to be automatically resolved. aresult [out] a reference to the newly created nsilocalfile instance. return values the ns_newnativelocalfile function returns ns_ok if successful. otherwise, it returns an error code. ns_error_file_unrecognized_path indicates that the specified path is invalid. this error is returned if a relative file path is passed to ns_newnativelocalfile. remarks on unix systems, the prefix "~/" is supported as a shorthand for the user's home directory. if you use this function on windows 2000 or later, you would not be able to handle file names containing characters outside the default code page even though the os has no problem dealing with them. do not use this function (on windows) unless it is guaranteed that the full path involved is always ascii. example...
nsILocalFile
ing relativedesc); attributes attribute type description diskspaceavailable print64 the number of bytes available to non-superuser on the disk volume containing the nsilocalfile. read only. followlinks prbool determines whether or not the nsilocalfile will automatically resolve symbolic links. by default, this value is false on all non-unix systems. as of mozilla 1.7, this attribute is ignored on unix systems. persistentdescriptor acstring on some platforms, the value of nsifile.path may be insufficient to uniquely identify the file on the local file system. the persistent descriptor is intended to be used whenever a nsilocalfile needs to be serialized to disk and later recovered. this string is not intended for ...
... file prior to each write. pr_truncate if the file exists, its length is truncated to 0. pr_sync if set, each write will wait for both the file data and file status to be physically updated. pr_excl with pr_create_file, if the file does not exist, the file is created. if the file already exists, no action and null is returned. delete_on_close file will be deleted when closed. mode a unix-style file permissions value. for example, the octal value 0600 may be used to limit read and write access to the current user of the system. this parameter may be ignored on systems that do not support file permissions. return value if the file is successfully opened, returns a pointer to the prfiledesc created for the newly opened file. returns a null pointer if the open failed. example #i...
Add to iPhoto
type for this), a pointer to the unicode string to copy into the new string object (ctypes.jschar.ptr), and the length of the unicode string in characters. cfurl the cfurl type is used to describe a url. it differs from a string in that it offers url-specific methods for managing the content, and includes methods for converting between urls and file system routine data formats such as fsref and unix pathnames. we use a few of these routines because the launch services routine we'll be using to launch iphoto and pass it the image to import uses cfurl for the file references. let's take a look at two of the routines declared here: this.cfurlcreatefromfilesystemrepresentation = this.lib.declare("cfurlcreatefromfilesystemrepresentation", ctypes.default_abi, ...
...the interesting things to note about the declaration of corefoundation.cfurlcreatefromfilesystemrepresentation() are: it returns a cfurlref, which is an opaque pointer similar to the cfstringref we noted above. the pathname is specified as a value of type ctypes.unsigned_char.ptr, which is a pointer to an unsigned character. "file system representation" strings on mac os...
Plug-in Basics - Plugins
c platform on which the browser is running. it is a code library, rather than an application or an applet, and runs only from the browser. although plug-ins are platform-specific, the plug-in api is designed to provide the maximum degree of flexibility and to be functionally consistent across all platforms. this guide notes platform-specific differences in coding for the ms windows, mac os x, and unix platforms. you can use the plug-in api to write plug-ins that are media type driven and provide high performance by taking advantage of native code. plug-ins give you an opportunity to seamlessly integrate platform-dependent code and enhance the gecko core functionality by providing support for new data types. the plug-in file type depends on the platform: ms windows: .dll (dynamic link libr...
... you can use the plug-in api to write plug-ins that are media type driven and provide high performance by taking advantage of native code. plug-ins give you an opportunity to seamlessly integrate platform-dependent code and enhance the gecko core functionality by providing support for new data types. 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. alternatively, you can write plug-ins that do not require a window to draw into. using windowless plug-ins extends the possibilities for web page design and functionality. note, howeve...
Plug-in Development Overview - Plugins
se internet mail extensions (mime) part one: format of internet message bodies" rfc-2046: "multipurpose internet mail extensions (mime) part two: media types" rfc-4288: "media type specifications and registration procedures" there are some variations to how plug-ins are handled on different platforms. the following sections describe platform-specific discovery and registration: ms windows unix mac os x ms windows on windows, plug-ins are found according to the section how gecko finds plug-ins. to determine the mime types and file extensions that the plug-in handles, the browser normally uses the content of the registry entries for the plug-in described below in installation using the registry. but when the plug-in is loaded from a well-known directory, a different method must be ...
... and file extensions strings, multiple values are separated by the "|" character, for example: video/quicktime|audio/aiff|image/jpeg the version stamp will be loaded only if it has been created with the language set to "us english" and the character set to "windows multilingual" in your development environment. the resource code for this language and character set combination is 040904e4. unix on unix, plug-ins are found according to the section how gecko finds plug-ins. to determine the mime types and file extensions that the plug-in handles, the browser loads each library and calls into the np_getmimedescription entry point. this exported c function should return a string containing the type, extension list, and type description separated by colons. each mime types should be separa...
Gecko Plugin API Reference - Plugins
s the default plug-in using html to display plug-ins plug-in display modes using the object element for plug-in display nesting rules for html elements using the appropriate attributes using the embed element for plug-in display using custom embed attributes plug-in references plug-in development overview writing plug-ins registering plug-ins ms windows unix mac os x drawing a plug-in instance handling memory sending and receiving streams working with urls getting version and ui information displaying messages on the status line making plug-ins scriptable building plug-ins building, platforms, and compilers building carbonized plug-ins for mac os x type libraries installing plug-ins native installers xpi plu...
...ns installations plug-in installation and the windows registry initialization and destruction initialization instance creation instance destruction shutdown initialize and shutdown example drawing and event handling the npwindow structure drawing plug-ins printing the plug-in setting the window getting information windowed plug-ins mac os windows unix event handling for windowed plug-ins windowless plug-ins specifying that a plug-in is windowless invalidating the drawing area forcing a paint message making a plug-in opaque making a plug-in transparent creating pop-up menus and dialog boxes event handling for windowless plug-ins streams receiving a stream telling the plug-in when a stream is created ...
Localizations and character encodings - Developer guides
to use a region-specific encoding that wasn't able to represent all of unicode. firefox needs a fallback encoding that it uses for non-conforming legacy content that doesn't declare its encoding. for most locales, the fallback encoding is windows-1252 (often called iso-8859-1), which was the encoding emitted by most windows applications in the 1990s and a superset of the encoding emitted by most unix applications in the 1990s as a deployed in the america has and in western europe. however, there are locales where web publishing was common already in the 1990s but the windows-1252 encoding was not suitable for the local language. in these locales, legacy content that doesn't declare its encoding is typically encoded using a legacy encoding other than windows-1252. in order to work with legacy ...
...euristic detection among multiple legacy encodings was introduced to web browsers. this has then had the effect that web authors have depended on heuristic detection being present, so firefox still has heuristic detection in these locales. finding canonical encoding names the text below refers to canonical names of encodings. the canonical names are the values to the right of the equals sign in unixcharset.properties. specifying the fallback encoding as of firefox 28, this section is obsolete, since the preference intl.charset.default no longer exists. the mapping from locales onto fallback encodings is now built into gecko itself. the fallback encoding is specified by the preference intl.charset.default in intl.properties. it should be set to the canonical name of the legacy encoding tha...
Data URLs - HTTP
-text encoding schemes that represent binary data in an ascii string format by translating it into a radix-64 representation. by consisting only in ascii characters, base64 strings are generally url-safe, and that's why they can be used to encode data in data urls. encoding in javascript the web apis have native methods to encode or decode to base64: base64 encoding and decoding. encoding on a unix system base64 encoding of a file or string on linux and mac os x systems can be achieved using the command-line base64 (or, as an alternative, the uuencode utility with -m argument). echo -n hello|base64 # outputs to console: agvsbg8= echo -n hello>a.txt base64 a.txt # outputs to console: agvsbg8= base64 a.txt>b.txt # outputs to file b.txt: agvsbg8= encoding on microsoft windows encoding o...
...rnative, the uuencode utility with -m argument). echo -n hello|base64 # outputs to console: agvsbg8= echo -n hello>a.txt base64 a.txt # outputs to console: agvsbg8= base64 a.txt>b.txt # outputs to file b.txt: agvsbg8= encoding on microsoft windows encoding on windows can be done through powershell or some dedicated tool. it can even be done via bash base64 utility (see section encoding on a unix system) if wsl is activated. [convert]::tobase64string([text.encoding]::utf8.getbytes("hello")) # outputs to console: agvsbg8= bash -c "echo -n hello`|base64" # outputs to console: agvsbg8= # the backtick (`) is used to escape the piping (|) character here common problems this section describes problems that commonly occur when creating and using data urls. data:text/html,lots of text...<p>...
Content-Encoding - HTTP
en header name no syntax content-encoding: gzip content-encoding: compress content-encoding: deflate content-encoding: identity content-encoding: br // multiple, in the order in which they were applied content-encoding: gzip, identity content-encoding: deflate, gzip directives gzip a format using the lempel-ziv coding (lz77), with a 32-bit crc. ...
...te, gzip directives gzip a format using the lempel-ziv coding (lz77), with a 32-bit crc. this is the original format of the unix gzip program. the http/1.1 standard also recommends that the servers supporting this content-encoding should recognize x-gzip as an alias, for compatibility purposes. compress a format using the lempel-ziv-welch (lzw) algorithm. the value name was taken from the unix compress program, which implemented this algorithm. like the compress program, which has disappeared from most unix distributions, this content-encoding is not used by many browsers today, partly because of a patent issue (it expired in 2003). deflate using the zlib structure (defined in rfc 1950) with the deflate compression algorithm (defined in rfc 1951). identity indicates the identity fu...
Digest - HTTP
Web › HTTP › Headers › Digest
quest). header type response header forbidden header name no syntax digest: <digest-algorithm>=<digest-value> digest: <digest-algorithm>=<digest-value>,<digest-algorithm>=<digest-value> directives <digest-algorithm> supported digest algorithms are defined in rfc 3230 and rfc 5843, and include sha-256 and sha-512. some of the supported algorithms, including unixsum and md5 are subject to collisions and are thus not suitable for applications in which collision-resistance is important. <digest-value> the result of applying the digest algorithm to the resource representation and encoding the result. the choice of digest algorithm also determines the encoding to use: for example sha-256 uses base64 encoding. examples digest: sha-256=x48e9qookqqrvdts8noj...
...ich collision-resistance is important. <digest-value> the result of applying the digest algorithm to the resource representation and encoding the result. the choice of digest algorithm also determines the encoding to use: for example sha-256 uses base64 encoding. examples digest: sha-256=x48e9qookqqrvdts8nojrjn3owduoywxbf7kbu9dbpe= digest: sha-256=x48e9qookqqrvdts8nojrjn3owduoywxbf7kbu9dbpe=,unixsum=30637 specifications specification title draft-ietf-httpbis-digest-headers-latest resource digests for http this header was originally defined in rfc 3230, but the definition of "selected representation" in rfc 7231 made the original definition inconsistent with current http specifications. when released, the "resource digests for http" draft there...
Transfer-Encoding - HTTP
he current chunk in hexadecimal format, followed by '\r\n' and then the chunk itself, followed by another '\r\n'. the terminating chunk is a regular chunk, with the exception that its length is zero. it is followed by the trailer, which consists of a (possibly empty) sequence of entity header fields. compress a format using the lempel-ziv-welch (lzw) algorithm. the value name was taken from the unix compress program, which implemented this algorithm. like the compress program, which has disappeared from most unix distributions, this content-encoding is used by almost no browsers today, partly because of a patent issue (which expired in 2003). deflate using the zlib structure (defined in rfc 1950), with the deflate compression algorithm (defined in rfc 1951). gzip a format using the lemp...
...the http/1.1 standard also recommends that the servers supporting this content-encoding should recognize x-gzip as an alias, for compatibility purposes. identity indicates the identity function (i.e. no compression, nor modification). this token, except if explicitly specified, is always deemed acceptable. ...
Lexical grammar - JavaScript
ressions. only the following unicode code points are treated as line terminators in ecmascript, other line breaking characters are treated as white space (for example, next line, nel, u+0085 is considered as white space). line terminator characters code point name abbreviation description escape sequence u+000a line feed <lf> new line character in unix systems. \n u+000d carriage return <cr> new line character in commodore and early mac systems. \r u+2028 line separator <ls> wikipedia u+2029 paragraph separator <ps> wikipedia comments comments are used to add hints, notes, suggestions, or warnings to javascript code. this can make it easier to read and understand. they ...
...mitted before the #!. the comment consists of all the characters after #! up to the end of the first line; only one such comment is permitted. the hashbang comment specifies the path to a specific javascript interpreter that you want to use to execute the script. an example is as follows: #!/usr/bin/env node console.log("hello world"); note: hashbang comments in javascript mimic shebangs in unix used to run files with proper interpreter. although bom before hashbang comment will work in a browser it is not advised to use bom in a script with hasbang. bom will not work when you try to run the script in unix/linux. so use utf-8 without bom if you want to run scripts directly from shell. you must only use the #! comment style to specify a javascript interpreter. in all other cases just...
io/file - Archive of obsolete content
experimental provides access to the local filesystem. usage paths path specifications in this api are platform-specific. this means that on windows paths are specified using the backslash path separator (\), and on unix-like systems like linux and os x paths are specified using the forward slash path separator (/). if your add-on uses literal windows-style path specifications with this api, your add-on likely won't work when users run it on unix-like systems. likewise, if your add-on uses literal unix-style path specifications, it won't work for users on windows. to ensure your add-on works for everyone, generate paths using the join function. unfortunately this api does not currently provide a way to obtain an absolute base path which you could then use with join. for now, you need t...
File I/O - Archive of obsolete content
their profile: %profile%/chrome. resource:app d the application directory in an xulrunner application. look in the source for other strings available: xpcom/io/nsappdirectoryservicedefs.h, xpcom/io/nsdirectoryservicedefs.h. other such keys as the "profd" key are available; check the known locations. enumerating drives on windows while you can use initwithpath("/") on unix-like systems (linux, mac) to get the root of the file system, there's no such root on windows. however, you can enumerate available drives using the following code: components.utils.import("resource://gre/modules/fileutils.jsm"); var root = new fileutils.file("\\\\."); var drivesenum = root.directoryentries, drives = []; while (drivesenum.hasmoreelements()) { drives.push(drivesenum.getnext().
Running applications - Archive of obsolete content
this page describes how to run other programs from your chrome javascript code, using mozilla xpcom interfaces. there are two ways to run programs. using nsiprocess the recommended way is to use the nsiprocess interface because it is crossplatform. using nsilocalfile.launch() this method is not implemented on all platforms, especially not on unix/linux! see nsilocalfile.launch() for details and make sure that all your target platforms support this method! this method has the same effect as if you double-clicked the file, so for executable files—it will just run the file without any parameters. for more information on nsifile/nsilocalfile, see file i/o. var file = components.classes["@mozilla.org/file/local;1"] .createinstance(components.interfaces.nsilocalfile); ...
Extension Versioning, Update and Compatibility - Archive of obsolete content
updatehash, must start with the string of hashing algorithm, it is a common error to delete this prefix, when setting new value to updatehash:sha256:78fc1d2887eda35b4ad2e3a0b60120ca271ce6e64ad2e3a0b60120ca271ce6e6 when a hash is specified the downloaded file is compared with the hash and an error shown if it does not match. there are quite a few tools you may use to generate hashes: various unix flavors include sha1sum, sha256sum and so on. windows users should consider hashtab for interactive (non-build-script) use. there are also gnu ports for win (besides usual suspects like cygwin), which are good for non-interactive use: sha256sum file there is also md5deep, which is cross platform: sha256deep file openssl also generates hashes for you: openssl sha256 file if you're on wind...
Appendix: What you should know about open-source software licenses - Archive of obsolete content
is provided "as is" and without warranty. use at your own risk. 3. neither the name of the <organization> nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. pros and cons the modified bsd license was originally created by the university of california at berkeley for distributing a unix-like operating system. because it has so few restrictions, it is often used by universities and the like for the products of research. however, the fact that software derived from bsd-licensed code can be redistributed under a different license creates the possibility that it will be wrapped in another proprietary program. the deleted advertising clause the original bsd license contained an ad...
Chapter 4: Using XPCOM—Implementing advanced processes - Archive of obsolete content
ath('c:\\temp\\temp.txt'); if (file.exists()) file.remove(false); file.create(file.normal_file_type, 0666); the first parameter of the nsilocalfile.create() method gives the type of file to create. this is defined using constant properties—to create a normal file, use normal_file_type, to create a folder use directory_type. the second parameter gives the access privileges to that file using unix-style octal values. note: windows ignores the privileges parameter; other platforms may do so as well. the nsilocalfile object includes methods that return virtual state values for the current file, as shown in table 1. table 1: methods for checking file states method name description nsilocalfile.exists() determines whether or not the file exists. nsilocalfil...
List of Mozilla-Based Applications - Archive of obsolete content
lone version uses xulrunner just (fr) audio a tool for setting temporal tags in audio documents jsdoc toolkit documentation tool uses mozilla rhino k-meleon gecko-based web browser for windows embeds gecko in mfc kairo.at mandelbrot creates images of mandelbrot sets xulrunner application kazehakase gecko-based web browser for unix kirix strata data browser kiwix offline version of wikipedia kneemail prayer, praise, and journal application komodo and komodo edit and open komodo development tools mozilla-based application (pre-xulrunner style), xul ui kompozer wysiwyg html editor unofficial bug-fix release of nvu kylo video browser ...
MMgc - Archive of obsolete content
e per heap region should not be a big deal in a 2gb address space... it would take a lot of player instances running simultaneously to exhaust the 2gb address space of the browser process. by allocating contiguous blocks of address space and managing them ourselves, fragmentation of the ie heap may actually be decreased. on windows, this uses the virtualalloc api to obtain memory. on mac os x and unix, we use mmap. virtualalloc and mmap can reserve memory and/or commit memory. reserved memory is just virtual address space. it consumes the address space of the process but isn't really allocated yet; there are no pages committed to it yet. memory allocation really occurs when reserved pages are committed. our strategy in gcheap is to reserve a fairly large chunk of address space, and then commit...
cert_override.txt - Archive of obsolete content
9:aa:bb:cc:dd:ee:ff:ff:ee:dd:cc:bb:aa:99:88:77:66:55:44:33:22:11:00 u aaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaa== fields fields are separated by a tab character. each line is terminated by a line feed character (unix format). domainname:port : port 443 for https (ssl) hash algorithm oid sha1-256: oid.2.16.840.1.101.3.4.2.1 (most used) sha-384: oid.2.16.840.1.101.3.4.2.2 sha-512: oid.2.16.840.1.101.3.4.2.3 certificate fingerprint using previous hash algorithm one or more characters for override type: m : allow mismatches in the hostname u : allow untrusted certs (whether it's self signed cert or a missing...
How Thunderbird and Firefox find their configuration files - Archive of obsolete content
you'd obtain a file such as the following: [general] startwithlastprofile=1 [profile0] name=default isrelative=0 path=h:\thunderbird a discussion about this file can be found here ...
Building TransforMiiX standalone - Archive of obsolete content
this document is out of date. we support building a standalone version of transformiix on windows, unix and os x. read the build instructions for your platform to get the requirements, which are the same as for mozilla. you need to get the source from cvs. add tx_exe=1 mk_add_options build_modules="xpcom transformiix" ac_add_options --enable-standalone-modules="xpcom transformiix" to your .mozconfig, and use client.mk to pull as usual. this will pull the necessary subtree with mozilla/client.mk mozilla/build/unix/modules.mk mozilla/build mozilla/config mozilla/expat mozilla/extensions/transformiix mozilla/include mozilla/allmakefiles.sh mozilla/client.mk mozilla/aclocal.m4 mozilla/configure mozilla/configure.in mozilla/makefile.in plus nspr and xpcom from the cvs repository. building ...
Mozilla Application Framework in Detail - Archive of obsolete content
pporting a less popular platform simply because you do not have the resources for parallel development! unlike many other application frameworks, you are not limited to the widget set we provide, nor limited to the "look and feel" of the native os. you can create applications using our framework that either have a native look and feel for each os, or one which is identical on macs, pc's or unix operating systems. you may also further enhance the user interface by allowing 3rd parties to develop "themes" for your application. themes are simply collections of images and css which can augment or replace your current ui elements. xul provides an excellent answer for organizations with heterogeneous computing environments. customized xul applications with significant business logic ca...
Running Tamarin acceptance tests - Archive of obsolete content
running with 2 or more phones uses threads to run tests in para...
Tamarin build documentation - Archive of obsolete content
available from the run menu. note: if you receive an error when trying to run/debug a newly imported project, try opening a file in the project first - eclipse can sometimes get confused as to what the 'current project' actually is. additional things to try are clicking on the project name then refreshing it (file/refresh or right-click/refresh) and/or quitting and restarting eclipse. linux and unix tamarin is tested on linux but not on other unix flavors. nonetheless, it is possible to build tamarin on unix. execute the following commands to build: $ cd tamarin-central/platform/unix $ make the resulting executable "shell" is built in the current directory. compiling and running applications currently the only compiler for tamarin is the adobe actionscript compiler. the source ...
The life of an HTML HTTP request - Archive of obsolete content
exist? (8) each nsiframe knows how how to draw itself on the screen. when the presshell [note: not true, who really does the call?] has layouted (reflowed) the frames it calls nsiframe::paint() method of all frames. these get passed references to the presentation context and a rendering context to do the drawing on. the rendering context implementation is a native class (nsgtkrenderingcontext on unix) that knows how to draw in a window. todo: views, viewmanager, eventstatemanager? diagram created with dia. original document information author(s): alexander larsson last updated date: october 8, 1999 copyright information: portions of this content are © 1998–2007 by individual mozilla.org contributors; content available under a creative commons license | details. ...
URIScheme - Archive of obsolete content
moz-icon://.ext?size=32 : you can replace ext by your some file extension like js, css, xul, xml, etc. and the size number by 1 to 127 mailto:emailaddress@domain.com about: chrome:// ... ...
Venkman Introduction - Archive of obsolete content
allows for execution of arbitrary javascript code. venkman's keyboard shortcuts are the same as leading visual debugging environments, and gdb users should be familiar with venkman's /break, /step, /next, /finish, /frame, and /where commands. on windows, the javascript debugger compares favorably with visual interdev and other large web development tools. on other platforms, including mac os and unix, it is alone in offering this degree of flexibility, depth, and power in a visual debugging environment. starting the debugger the javascript debugger is automatically pre-installed in mozilla 1.x but must be installed separately in firefox and other gecko-based products, such as thunderbird and netscape 7.x. fortunately, the xpinstall technology makes it possible to install new application mod...
Mac stub installer - Archive of obsolete content
utomatically generate an xpi for your module with a dummy install.js. if it finds your module's jst file it will substitute that for the install.js. 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. unfortunately, at the time of this writing there is no convenient way to test an installer build like there is on unix (deliver.pl) and windows (build.pl). original document information author(s): samir gehani other contributors: curt patrick last updated date: march 12, 2003 copyright information: copyright (c) samir gehani, curt patrick ...
Using XPInstall to Install Plugins - Archive of obsolete content
, the layout engine of the mozilla project. caveats: aol time warner's compuserve browser, also based on netscape gecko, does not support xpinstall. netscape communicator 4.x does not support xpinstall. what does a plugin consist of? plugins can consist of the following types of files, all of which can be installed via an xpi package: shared libraries (i.e. on windows, these are dlls, on unix these are *.so files). these files are native code files made with the netscape plugin api. if the plugin is scriptable, then it will also consist of an xpt file. examples would be flash 6r47 on windows, which consists of a dll (called npswf32.dll) and an xpt file for scriptability (called flashplayer.xpt). if you are developing a plugin and wish to make it scriptable, read the relevant portions...
addFile - Archive of obsolete content
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. example var xpisrc = "file.txt"; initinstall("adding a file", "addfile", "1.0.1.7", 1); f = getfolder("program"); setpackagefolder(f); addfile(xpisrc); if (0 == getlasterror()) performinstall(); else cancelinstall(); ...
gestalt - Archive of obsolete content
...
getWinProfile - Archive of obsolete content
ecified by the folder parameter, such as "royal/royal.ini". returns a winprofile object. description the getwinprofile method creates an object for manipulating the contents of a windows .ini file. once you have this object, you can call its methods to retrieve strings from the file or to add strings to the file. for information on the returned object, see winprofile. this method returns null on unix and macintosh platforms. example to edit the win.ini file, you would create a winprofile object with this call: var mywinprofileobj = getwinprofile (getfolder("windows"), "win.ini"); ...
getWinRegistry - Archive of obsolete content
registry. method of install syntax winreg getwinregistry(); parameters none. returns a winreg object. description use the getwinregistry method to create an object for manipulating the contents of the windows registry. once you have this object, you can call its methods to retrieve or change the registry's content. for information on the returned object, see winreg. this method returns null on unix and macintosh platforms. ...
Properties - Archive of obsolete content
feature sets might be built on the same day), using this property to "detect" the application version may produce false results. additionally, the build id can be 0 for custom builds. jarfile alias for archive platform contains information about the platform xpinstall was compiled for/runs on. for example, the value could begin with "windows", "macintosh" or "x11" (for unix/linux). for more details, see the corresponding code living in the getinstallplatform method of class nsinstall. url the fully qualified url of the xpi (file url, http url, ftp url, etc.) (e.g. http://dolfin/sgehani/zzz/ip.xpi). note, even if triggered using relative urls this will show the full url (after qualification). ...
Learn XPI Installer Scripting by Example - Archive of obsolete content
how to package a plugin as an extension. this article uses the installer script from browser.xpi install package as the basis for discussing xpi installations in general. this installer script is relatively short, but it exercises most of the important features of the xpinstall api, and it can easily be used as a template for other more general software installations. in this article, we use the unix install file, but the installers for all the platforms are quite similar, and you can easily take what you learn here and apply it to installations on any platform that mozilla supports. about browser.xpi browser.xpi is the xpi archive in which the main components of the mozilla browser are archived for installation. mozilla cross-platform installations use the xpi format as a way to organize, ...
Getting File Information - Archive of obsolete content
if (!file.iswritable()) throw "file cannot be modified"; if you aren't sure whether a file can be modified, for example, you may wish to check using nsifile.iswritable() first. otherwise, an attempt to write to the file will generate an error. the four methods above are usually sufficient for most purposes. however, you can also use the permissions (nsifile.attributes) attribute to get the unix-style permission flags for a file. this attribute is also necessary if you need to modify the permissions. file.permissions = 0640; it is common to use an octal number (a number in base 8 beginning with 0) for permissions as it can make the value easier to read. in this case, the first digit is the permissions for the owner of the file, the second digit is the permissions for the group of the ...
Index - Archive of obsolete content
Archive › Mozilla › XUL › Index
writing skinnable xul and css css, xul no summary! 974 xml xul no summary! 975 xul accesskey faq and policies xul an accesskey is an underlined letter in a web page, menu or dialog that indicates to a user a quick, keyboard method of simulating a click on that element. for example, an apply button may have the letter a underlined. on windows and unix, pressing alt+a is a convenient way to push that button. on macintosh, accesskeys are available only in html not in xul, and they are activated using ctrl+letter instead of alt. 976 xul changes for firefox 1.5 xul this lists the most notable changes to xul in firefox 1.5 (gecko 1.8). for other changes you should be aware of, see adapting xul applications for firefox 1.5. ...
List of commands - Archive of obsolete content
oomenlarge cmd_textzoomreduce cmd_textzoomreset cmd_undo cmd_viewcomponentbar cmd_viewlinktoolbar cmd_viewlinktoolbar_false cmd_viewlinktoolbar_maybe cmd_viewlinktoolbar_true cmd_viewnavbar cmd_viewpersonaltoolbar cmd_viewtaskbar cmd_zoomwindow thanks for help of joe.user0 in compiling: http://readlist.com/lists/mozilla.or...l/3/15261.html . also obtained from http://www.mozilla.org/unix/customizing.html ...
Using the Editor from XUL - Archive of obsolete content
key presses for typing, and other editing operations (backspace, delete, enter/return). cases that it does not handle explicitly it passes on to nshtmleditor::editorkeypress(), which is where normal typing keys end up. note that it only responds to the keypress event; keydown and keyup events are ignored. nstexteditormouselistener the mouse listener is used to do middle-mouse paste (which is a unix copy/paste feature). this happens in response to mouseclick with button 2. it also forces an ime commit. nstexteditorfocuslistener editor responds to focus and blur events by showing and hiding the caret or selection as appropriate. nstexteditortextlistener the nsidomtextlistener interface that this implements is used by the ime code. in response to the handletext event, the editor sets the i...
XUL Accesskey FAQ and Policies - Archive of obsolete content
on macintosh, accesskeys are available only in html not in xul, and they are activated using ctrl+letter instead of alt. ...
XUL Coding Style Guidelines - Archive of obsolete content
ml files to xul files. use the xml declaration. use namespace. case sensitivity. use chrome urls. javascript code shall be moved out of xul. dtd declaration. predefined entities. other guidelines mentioned in xhtml 1.1 recommendation. see details here. making xul localizable -- mandatory in the past, ui (display) related resource descriptions are stored in *.rc (for windows client) or *.ad (for unix client) so that they can be localized for a specific language or culture. in the new world, mozilla 5.0, this is not true any more. most of the windows and dialogs in mozilla will be described using xul. to make xul stream/file localizable, several guidelines are to be adopted to make the translation work easier and less error-prone. the issues are discussed in details here: what is localizable? ...
Application Update - Archive of obsolete content
r xulrunner application using the same method that firefox, thunderbird, songbird, and chatzilla use. getting started you will need the following utility scripts from http://lxr.mozilla.org/mozilla/sourc...ate-packaging/ (or local source of xulrunner) common.sh make_full_update.sh you will need mar / mar.exe to build a complete update patch. you will need to compile a unix/linux executable mar from mozilla/modules/libmar. as far as i can tell enabling the options --enable-updater and --enable-update-packaging on your configure will build you mar. compiled versions of mar are available in the gecko sdk under the folder /host/bin for your os. in order to generate sha1 hashes i installed shash. application settings you will need to configure the following set...
Using LDAP XPCOM with XULRunner - Archive of obsolete content
er.cpp: // copyright (c) 2005 benjamin smedberg <benjamin@smedbergs.us> #include "nscore.h" #include "nsmodule.h" #include "prlink.h" #include "nsilocalfile.h" #include "nsstringapi.h" #include "nscomptr.h" static char const *const kdependentlibraries[] = { #ifdef ns_win32 moz_dll_prefix "nsldap32v50" moz_dll_suffix, moz_dll_prefix "nsldappr32v50" moz_dll_suffix, #endif //ns_win32 #ifdef ns_unix moz_dll_prefix "ldap50" moz_dll_suffix, moz_dll_prefix "prldap50" moz_dll_suffix, #endif //ns_unix nsnull }; // component.dll on windows, libcomponent.dll on linux static char krealcomponent[] = moz_dll_prefix "mozldap" moz_dll_suffix; nsresult nsgetmodule(nsicomponentmanager* acompmgr, nsifile* alocation, nsimodule* *aresult) { nsresult rv; nscomptr<nsifile> ...
application/http-index-format specification - Archive of obsolete content
at url encoded. content-type mime content type. whitespace and 8-bit characters must be url-encoded. the mime-type for a directory can be given as application/http-index-format. file-type one of the following keywords to represent a special status for a file: file directory symbolic-link sym-file (a symbolic link to a file) sym-directory (a symbolic link to a directory) permissions unix type file permission syntax. 3 slots either 'r', 'w', 'x', or '-' representing, in order, read, write, or execute permissions. a '-' indicates that the particular permission is not set. example "rw-" means read and write permission, but not execute. example 100: this is a comment! do not present to the end-user 100: 101: the files in this directory are put forth for public 101: consumption an...
Archived Mozilla and build documentation - Archive of obsolete content
appreciate help with testing. plug-n-hack plug-n-hack (pnh) is a proposed standard from the mozilla security team for defining how security tools can interact with browsers in a more useful and usable way. plugin architecture this page contains some notes on how plugins work internally in gecko. it is mainly of interest to gecko developers. porting nspr to unix platforms last modified 16 july 1998 priority content update: i've removed documents from this list that have been migrated into the wiki. the list of completed documents is available through the devedge page. prism prism is a simple xulrunner-based browser that hosts web applications without the normal web browser user interface. prism is based o...
NPAnyCallbackStruct - Archive of obsolete content
contains information required during embedded mode printing. syntax typedef struct { int32 type; } npanycallbackstruct; fields the data structure has the following field: type always contains np_print. description callback structures are used to pass platform-specific information. the npanycallbackstruct structure contains information required by the platformprint field of the npembedprint structure during embedded mode printing. ...
NPEmbedPrint - Archive of obsolete content
contains platform-specific information used during embedded mode printing. syntax typedef struct _npembedprint { npwindow window; void* platformprint; /* platform-specific */ } npembedprint; fields the data structure has the following fields: window the npwindow the plug-in should use for printing. platformprint additional platform-specific printing information. mac os: thprint unix: pointer to a npprintcallbackstruct. description the npp_print function passes a pointer to an npprint object (previously allocated by the browser) to the plug-in. the npembedprint structure is used when the mode field of npprint is set to np_embed. unix the plug-in location and size in the npwindow are in page coordinates (720/ inch), but the printer requires point coordinates (72/inch). see...
NPEvent - Archive of obsolete content
losefocusevent adjustcursorevent 0, 1 (true, false) for information about these events, see the mac os developer documentation. message longint. additional information about the event. type of information depends on the event type. undefined for null, mouseup, and mousedown events. when longint. ticks since start-up. where point. cursor location. modifiers integer. flags. xevent npevent on unix/x11 npevent is defined as an xevent data structure, which is a union of a number of different x11 event structures. type the type member is an int representing an event type, and indicating which structure is relevant. the event type may be any of the ollowing: graphicsexpose focusin focusout enternotify leavenotify motionnotify buttonpress buttonrelease keypress keyrelease descripti...
NPN_PostURL - Archive of obsolete content
erver. the data to post can be contained either in a local temporary file or a new memory buffer. to post to a temporary file, set the flag file to true, the buffer buf to the path name string for a file, and len to the length of the path string. the file-type url prefix "file://" is optional. ms windows and os x if a file is posted with any protocol other than ftp, the file must be text with unix-style line breaks ('\n' separators only). to post data from a memory buffer, set the flag file to false, the buffer buf to the data to post, and len to the length of buffer. possible url types include http (similar to an html form submission), mail (sending mail), news (posting a news article), and ftp (upload a file). plug-ins can use this function to post form data to cgi scripts using http...
NPN_Version - Archive of obsolete content
xample, the plug-in could inquire on the constant npvers_has_windowless to see if it is running in a browser that supports windowless functionality. for more information and an example, see finding out if a feature exists. for a listing of version constants defined in the plug-in api, see version feature constants. note: platform-specific code in the plug-in api files npwin.cpp, npmac.cpp, or npunix.c checks version numbers automatically. a plug-in whose major version is less than the major version of the browser is not loaded. see also npn_useragent() np_initialize() ...
NPP_HandleEvent - Archive of obsolete content
ins: all platforms. syntax #include <npapi.h> int16 npp_handleevent(npp instance, void* event); parameters the function has the following parameters: instance pointer to the current plug-in instance. event platform-specific value representing the event handled by the function. values: ms windows: pointer to npevent structure mac os: pointer to a standard mac os eventrecord unix/x11: pointer to a standard xlib xevent for a list of possible events, see npevent. returns if the plug-in handles the event, the function should return true. if the plug-in ignores the event, the function returns false. description the browser calls npp_handleevent to tell the plug-in when events take place in the plug-in's window or drawable area. the plug-in either handles or igno...
NPPrintCallbackStruct - Archive of obsolete content
syntax typedef struct { int32 type; file* fp; } npprintcallbackstruct; fields the data structure has the following fields: type always contains np_print. fp pointer to the file to which the plug-in should write its postscript data. description callback structures are used to pass platform-specific information. ...
NPSetWindowCallbackStruct - Archive of obsolete content
syntax typedef struct { int32 type; display* display; visual* visual; colormap colormap; unsigned int depth; } npsetwindowcallbackstruct; fields the data structure has the following fields: type always contains np_setwindow. display standard x toolkit attribute. pointer to the display structure that represents the browser-server connection. visual standard x toolkit attribute. ...
NP_Initialize - Archive of obsolete content
if unsuccessful, the plug-in is not loaded and the function returns an error code. for possible values, see error codes. ...
Introduction to Public-Key Cryptography - Archive of obsolete content
enew it. if you want to get a commercial license for an eighteen-wheeler, the requirements are much more stringent. if you live in some other state or country, the requirements for various kinds of licenses will differ. similarly, different cas have different procedures for issuing different kinds of certificates. in some cases the only requirement may be your email address. in other cases, your unix or windows login and password may be sufficient. at the other end of the scale, for certificates that identify people who can authorize large expenditures or make other sensitive decisions, the issuing process may require notarized documents, a background check, and a personal interview. depending on an organization's policies, the process of issuing certificates can range from being completely ...
Using SSH to connect to CVS - Archive of obsolete content
setting up cvs to use ssh in your system's environment, make sure thatcvs_rsh is set to whatever your ssh binary is called; a full path is not necessary if ssh is already in your path. replace pserver with ext in your cvsroot environment variable. if you wish to keep your previous pserver trees, you'll need to update the root files in each cvs subdirectory in your tree. this can be done using a unix-style find and perl: find . -name root -exec perl -p -i -e "s/pserver/ext/" {} \; dealing with firewalls do not attempt to perform the steps in this section unless you have first verified that you can access cvs.mozilla.org from outside of the firewall. only proceed with these steps once you are certain you can access cvs.mozilla.org from the open internet. if you are behind a firewall with ...
New in JavaScript 1.1 - Archive of obsolete content
uctor and prototype properties on objects added. eval() is now a method of every object (was previously a built-in function); it evaluates a string of javascript code in the context of the specified object. math.random() now works on every platform. tostring(): added radix parameter, which specifies the base to use for representing numeric values. isnan() now works on every platform (not only unix anymore) parsefloat() and parseint() now return nan on all platforms, if the first character of the specified string cannot be converted to a number; in previous releases, it returned nan on solaris and irix and zero on all other platforms. ...
The Business Benefits of Web Standards - Archive of obsolete content
asing costs and uncertain quality and integrity of proprietary pay per click campaigns. increase website traffic maintain contact with your user on multiple platforms standards-based code and cross-platform go hand in hand. while some browsers have quirks that cause different behavior by platform, mozilla-based browsers are designed to behave identically on all supported platforms (mac, linux, unix, windows...) web content is increasingly being accessed by a growing number of user agents other than browsers, or by browsers on different platforms - for example mobile telephones. feed content such as rss and atom simply will not work without being implemented by following the requisite standard. assumptions about the user and their platform based on erroneous thinking about the anticipated ...
Endianness - MDN Web Docs Glossary: Definitions of Web-related terms
-significant (where the least significant byte takes the first or lowest address), comparable to a common european way of writing dates (e.g., 31 december 2050). naturally, big-endian is the opposite order, comparable to an iso date (2050-12-31). big-endian is also often called "network byte order", because internet standards usually require data to be stored big-endian, starting at the standard unix socket level and going all the way up to standardized web binary data structures. also, older mac computers using 68000-series and powerpc microprocessors formerly used big-endian. examples with the number 0x12345678 (i.e. 305 419 896 in decimal): little-endian: 0x78 0x56 0x34 0x12 big-endian: 0x12 0x34 0x56 0x78 mixed-endian (historic and very rare): 0x34 0x12 0x78 0x56 ...
Microsoft Internet Explorer - MDN Web Docs Glossary: Definitions of Web-related terms
ft first bundled ie with windows in 1995 as part of the package called "microsoft plus!". by around 2002, internet explorer had become the most used browser in the world, but has since lost ground to chrome, firefox, edge, and safari. ie has gone through many releases and currently stands at version 11.0.12, with desktop, mobile, and xbox console versions available. formerly available on mac and unix, microsoft discontinued those versions in 2003 and 2001 respectively. learn more general knowledge internet explorer on wikipedia history of internet explorer on wikipedia internet explorer versions on wikipedia learning about internet explorer http://windows.microsoft.com/en-us/internet-explorer/download-ie http://windows.microsoft.com/en-us/windows7/getting-started-with-internet-ex...
What text editors are available? - Learn web development
from os to os. so first find out which os you're using, and then check if a given editor supports your os. most editors specify on their website whether they support windows or mac, though some editors only support certain versions (say, only windows 7 or later and not vista). if you're running ubuntu, your best bet is to search within the ubuntu software center. in general, of course, the linux/unix world is a pretty diverse place where different distros work with different, incompatible packaging systems. that means, if you've set your heart on an obscure text editor, you may have to compile it from source yourself (not for the faint-hearted). what kind of technologies do i want to manipulate? generally speaking, any text editor can open any text file. that works great for writing notes t...
How can we design for all types of users? - Learn web development
cript of the video/audio file. image compression some users may choose to display images, but still have limited bandwidth available, especially in developing countries and on mobile devices. if you want a successful website, please compress your images. there are various tools to help you, either online or local: installed software. imageoptim (mac), optipng (all platforms), pngcrush (dos, unix/linux) online tools. yahoo's smushit!, dynamic drive's online image optimizer (which can convert automatically from one format to another if it's more bandwidth-efficient) ...
How do you upload your files to a web server? - Learn web development
r you need to drag-and-drop them from the left pane to the right pane. are they really online? so far, so good, but are the files really online? you can double-check by going back to your website (e.g. http://demozilla.examplehostingprovider.net/) in your browser: and voilà! our website is live! rsync rsync is a local-to-remote file synchronizing tool, which is generally available on most unix-based systems (like macos and linux), but windows versions exist too. it is seen as a more advanced tool than sftp, beause by default it is used on the command line. a basic command looks like so: rsync [-options] source user@x.x.x.x:destination -options is a dash followed by a one or more letters, for example -v for verbose error messages, and -b to make backups. you can see the full list a...
What is a URL? - Learn web development
t url does not start with /, the browser will attempt to find the document in a sub-directory of the one containing the current resource. so in this example, we really want to reach this url: https://developer.mozilla.org/docs/learn/skills/infrastructure/understanding_urls going back in the directory tree ../css/display in this case, we use the ../ writing convention — inherited from the unix file system world — to tell the browser we want to go up from one directory. here we want to reach this url: https://developer.mozilla.org/docs/learn/../css/display, which can be simplified to: https://developer.mozilla.org/docs/css/display semantic urls despite their very technical flavor, urls represent a human-readable entry point for a web site. they can be memorized, and anyone can en...
What software do I need to build a website? - Learn web development
uilt-in editor third-party editor windows notepad notepad++ visual studio code web storm brackets shiftedit sublime text mac os textedit textwrangler visual studio code brackets shiftedit sublime text linux vi (all unix) gedit (gnome) kate (kde) leafpad (xfce) emacs vim visual studio code brackets shiftedit sublime text chrome os shiftedit here is a screenshot of an advanced text editor: here is a screenshot of an online text editor: uploading files on the web when your website is ready for ...
Server-side web frameworks - Learn web development
ork, to easily grow single-file prototypes into well-structured mvc web applications. restful routes, plugins, commands, perl-ish templates, content negotiation, session management, form validation, testing framework, static file server, cgi/psgi detection, and first-class unicode support. a full-stack http and websocket client/server implementation with ipv6, tls, sni, idna, http/socks5 proxy, unix domain socket, comet (long polling), keep-alive, connection pooling, timeout, cookie, multipart, and gzip compression support. json and html/xml parsers and generators with css selector support. very clean, portable and object-oriented pure-perl api with no hidden magic. fresh code based upon years of experience, free and open-source. spring boot (java) spring boot is one of a number of pro...
Getting started with React - Learn web development
e the long-term support (lts) version. node includes npm (the node package manager), and npx (the node package runner). you may also use the yarn package manager as an alternative, but we'll assume you are using npm in this set of tutorials. see package management basics for more information on npm and yarn. if you're using windows, you will need to install some software to give you parity with unix/macos terminal in order to use the terminal commands mentioned in this tutorial. gitbash (which comes as part of the git for windows toolset) or windows subsystem for linux (wsl) are both suitable. see command line crash course for more information on these, and on terminal commands in general. also bear in mind that react and reactdom produce apps that only work on a fairly modern set of browse...
Getting started with Svelte - Learn web development
ong-term support (lts) version. node includes npm (the node package manager), and npx (the node package runner). note that you can also use the yarn package manager in place of npm, but we'll assume you are using npm in this set of tutorials. see package management basics for more information on npm and yarn. if you're using windows, you will need to install some software to give you parity with unix/macos terminal in order to use the terminal commands mentioned in this tutorial. gitbash (which comes as part of the git for windows toolset) or windows subsystem for linux (wsl) are both suitable. cmder is another very good and complete alternative. see command line crash course for more information on these, and on terminal commands in general. also see the following for more information: "...
Accessibility Information for Core Gecko Developers
oards and assistive technologies, and outlines a plan being developed by ibm, mozilla, and the wai protocols and formats working group (pfwg) to address the issue of dhtml accessibility. mozilla accessibility architecture this document explains how we implement the cross-platform accessibility layer in mozilla. it contains a class hierararchy and an explanation of the accessibility cache. unix accessibility project this document describes the sun accessibility project. join the mozilla accessibility community live chat both end users and developers are invited for discussion on the live irc channel at irc.mozilla.org/#accessibility. since this is a worldwide effort, there is always a good chance to find someone to chat with there, day or night. newsgroup and mailing list we h...
Embedding API for Accessibility
comments/questions? please contact the mozilla accessibility community. mozilla needs to move in the direction of accessibility. here is the w3c's definition of accessibility for a user agent like mozilla. in part, being accessible means supporting a built-in accessibility apis for a platform, such as microsoft active accessibility or atk for linux and unix desktops. there are many other pieces, such as preferences to allow the user to change foreground and background colors, and font sizes. mozilla already supports some of these options. this document lays out what we already have, and what we'll need later, in the embedding api to support accessibility. text zoom on a per-window basis the nsidomwindow::gettextzoom(float *zoomfactor) and nsidomwindow::sett...
Information for Assistive Technology Vendors
ft active accessibility) in html and in our user interface (based on xul technology). this makes it possible for the vendors of windows accessibility software, such as screen readers, voice dictation packages and screen magnifiers to provide support for mozilla. in addition, we provide some simple interfaces via which we expose a read-only dom (document object model). mozilla support for linux/unix assistive technology developers mozilla supports the at-spi (assistive technology service provider interface) in html and in our user interface (based on xul technology). this makes it possible for the developers of linux and unix accessibility software, such as screen readers, voice dictation packages and screen magnifiers to provide support for mozilla. join the mozilla accessibility comm...
Debugging on Windows
setting an environment variable, while the other affects only the currently running program instance in memory. environment variable there is an environment variable that can disable breaking for assertions. this is how you would normally set it: set xpcom_debug_break=warn the environment variable takes also other values besides warn, see xpcom_debug_break for more details. note that unlike unix, the default for windows is not warn, it's to pop up a dialog. to set the environment variable for visual studio, use project > properties > debugging > environment and click the little box. then use xpcom_debug_break=warn changing running code you normally shouldn't need to do this (just quit the application, set the environment variable described above, and run it again). and this can be dan...
HTTP logging
refox.app/contents/macos ./firefox-bin (the instructions assume that you've installed firefox directly into your startup disk's applications folder. if you've put it elsewhere, change the path used on the third line appropriately.) reproduce whatever problem you're trying to debug. quit firefox and look for the generated log.txt log files on your desktop. note: the generated log file uses unix-style line endings. older editors may have problems with this, but if you're using an even reasonably modern mac os x application to view the log, you won't have any problems. start logging using command line arguments since firefox 61 it's possible to start logging in a bit simpler way than setting environment variables: using command line arguments. here is an example for the windows platfo...
Makefiles - Best practices and suggestions
tle platform specific logic within a makefile as possible, a conditional and compiler flags at most should be needed. for ex use defines within sources to shift platform logic into your source code. if a unit test is platform specific write your makefile so it can be used on all platforms but only do work on the specific hardware or class of hardware. for classes of hardware (unix/windows) place your makefile in a subdirectory, unix/makefile.in always include dependencies when creating a target initial make call should always be the workhorse: build, generate, deploy, install, etc. all subsequent make calls must become a nop unless sources or dependencies change or have been removed. incorrect dependencies will contribute to...
How Mozilla's build system works
@ vpath = @srcdir@ include $(depth)/config/autoconf.mk module = layout library_name = gkbase_s # requires and cppsrcs omitted here for brevity # # we don't want the shared lib, but we want to force the creation of a static lib. force_static_lib = 1 include $(topsrcdir)/config/rules.mk the key here is setting force_static_lib = 1. this creates libgkbase_s.a (on unix) and gkbase_s.lib on windows and copies it to dist/lib. now, let's take a look at how to link several static libraries together to create a component: depth = ../.. topsrcdir = @top_srcdir@ srcdir = @srcdir@ vpath = @srcdir@ include $(depth)/config/autoconf.mk module = layout library_name = gklayout export_library = 1 is_component = 1 ...
How Mozilla determines MIME Types
okup the type of the file from the os a hardcoded list of extensions is checked (containing currently 13 entries, nsexternalhelperappservice.cpp line 463 (this is done for speed – it is faster to find data in the hardcoded list than asking the os or looking in preferences) if the extension is not listed there, it becomes interesting. firstly, the operating system is asked for a mime type. (on unix, this means checking mime.types.) if that fails, a user-supplied helper app is searched for by extension, and the specified mime type will be used. (i.e. the list in edit/preferences/helper applications) if that failed, a list of "extra" mime types is searched for an extension match. see line 507 for the complete list. if that also failed, the list of loaded plugins is checked for a plugin that...
Integrated Authentication
ernet standard (rfc 2478) to negotiate either kerberos, ntlm, or other authentication protocols supported by the operating system. spnego is commonly referred to as the "negotiate" authentication protocol. mozilla does not have its own internal implementation of spnego. instead, it leverages system libraries that provide spnego; sspi on microsoft windows, and gss-api on linux, mac osx, and other unix-like systems. the mozilla implementation of spnego can be found under extensions/auth/. it used to live in extensions/negotiateauth. mozilla also supports raw ntlm authentication using an internal implementation (based on the documentation provided by eric glass) that supports ntlmv1/lmv1 and ntlm2 session key modes. as of mozilla 1.7, there is no support for ntlmv2/lmv2. this is mainly due to ...
OS.File.Error
ailed operation. becauseexists true if the operation failed because a file or directory exists, false otherwise. becausenosuchfile true if the operation failed because a file or directory does not exist, false otherwise. becauseclosed true if the operation failed because a file or directory is closed, false otherwise. platform-specific attributes unixerrno (defined under unix only) the system error number (errno) for the error. for more details, you may compare it with the error constants of os.constants.libc.e*. winlasterror (defined under windows only) the system error number (getlasterror) for the error. for more details, you may compare it with the error constants of os.constants.win.error_*. ...
Encodings for localization files
ze/charset parameters in this file must be set to good values. for most western scripts, ‘ms sans serif’ and ‘8’ are good defaults for the font settings. eastern scripts will need to choose appropriate fonts that are shipped with windows. see the table below for appropriate values for the charset= parameter. ...
Index
o summary! 37 creating localizable web content internationalization, localizability, localization, web development no summary! ...
Localizing with Mozilla Translator
eckout just ''the locale directories'' you were interested in. with mercurial, partial checkouts are not possible, so you have your own mozilla repository full copy (there are alternate solutions; read on). a bit of history on mt mt has been evolving from long ago, when l10n were done always on shipped en-us jars and when mozilla suite had five l10n jars: ab-cd.jar, ab-win.jar, ab-mac.jar, ab-unix.jar, and cd.jar. mt thus referred to ab-cd.jar contents as ''platform neutral'' platform, cd.jar as '''region''' platform (or regional files), and the other three as ''windows platform'', ''mac platform'' and ''unix platform''. this jar structure is now used just by seamonkey 1.1.x. when mozilla l10n switched to ''source l10n'', one of the many problems that mt had to solve was how to fit a dire...
Setting up the infrastructure
create a new branch for l10n (optional if starting a new project). ...
Fonts for Mozilla's MathML engine
fonts. installation without administrator privilege if you need to install fonts on a system without adminstrator privilege, the easiest option is to use math font the mathml-fonts add-on. note that using the add-on is not optimal since it forces your gecko browser to load a css stylesheet on each page you visit as well as web math fonts on all pages with mathml content. a better alternative on unix systems is to install the otf files for latin modern math and stix into some local font folder and (if necessary) to run fc-cache on it. on os x and linux, the standard paths are ~/library/fonts/ and ~/.fonts. fonts with a math table you can actually render mathml using any font with a math table and related open font format features. a list of such math fonts is provided below. you can use the...
Fonts for Mozilla 2.0's MathML engine
em or can easily be installed via your software manager. for convenience we provide a zip archive of mathml fonts. 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. alternatively, follow dafont's "how to install a font". these fonts are opentype postscript fonts, which are supported by most modern operating systems. however some operating systems may not support these fonts. on such systems, it will be necessary to convert the fonts to a supported format. for example asana math is available in truetype format and there is an unofficial truetyp...
About NSPR
brary loading and unloading) is part of nspr's feature set. in most cases this is simply a smoothing over of the facilities offered by the various platform providers. where it's headed nspr is applicable as a platform on which to write threaded applications that need to be ported to multiple platforms. the current implementation supports macintosh (ppc), win-32 (winnt, win9x) and 20 versions of unix and is still expanding. the basic api is stable and expected to remain that way. nspr is functionally complete and has entered a mode of sustaining engineering. as operating system vendors issue new releases of their operating systems, nspr will be moved forward to these new releases by interested players. original document information author: larryh@netscape.com last updated date: 2000 (...
NSPR build instructions
the easiest way to get these tools is to install the mozillabuild package. introduction the top level of the nspr source tree is the mozilla/nsprpub directory. although nsprpub is a subdirectory under mozilla, nspr is independent of the mozilla client source tree. building nspr consists of three steps: run the configure script. you may override the compilers (the cc environment variable) or specify options. ...
NSPR release procedure
re you run repackage.sh, you need to have built the binary distributions using the "gmake release" makefile target. these binary distributions are jar files, which are really zip files, and they are published in the directory /share/builds/components. this design comes from the netscape days. the repackage.sh script repackages the jar files into the form most commonly used on that platform. so on unix it repackages the jar files into gzipped tar files, and on windows it repackages the jar files into zip files. edit the repackage.sh script to customize it for your environment. after you have run repackage.sh, follow the instructions in to upload the files to ftp.mozilla.org's staging server, so that they eventually show up on ftp.mozilla.org. the host ftp.mozilla.org can be accessed via the ftp...
IPC Semaphores
this chapter describes the nspr api for using interprocess communication semaphores. nspr provides an interprocess communication mechanism using a counting semaphore model similar to that which is provided in unix and windows platforms. note: see also named shared memory ipc semaphore functions ipc semaphore functions pr_opensemaphore pr_waitsemaphore pr_postsemaphore pr_closesemaphore pr_deletesemaphore ...
I/O Types
ns 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. this section introduces prfiledesc and related types. prfiledesc priomethods prfileprivate prdescidentity note that the nspr documentation follows the unix convention of using the termfiles 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. prfiledesc has an object-oriented flavor. an i/o function on a prfiledesc structure is carried out by invoking the corresponding "method" in the i/o methods table (a structure of type priomethods) of the ...
PRNetAddr
the familiar berkeley socket interface, although this fact should not be relied upon. the raw member of the union is equivalent to struct sockaddr, the inet member is equivalent to struct sockaddr_in, and if the binary is built with ipv6 support, the ipv6 member is equivalent to struct sockaddr_in6. (note that prnetaddr does not have the length field that is present in struct sockaddr_in on some unix platforms.) the macros pr_af_inet, pr_af_inet6, pr_inaddr_any, pr_inaddr_loopback are defined if prio.h is included. pr_inaddr_any and pr_inaddr_loopback are special ipv4 addresses in host byte order, so they must be converted to network byte order before being assigned to the inet.ip field. ...
PR_CreatePipe
or code can be retrieved via pr_geterror. description pr_createpipe creates an anonymous pipe. data written into the write end of the pipe can be read from the read end of the pipe. pipes are useful for interprocess communication between a parent and a child process. when the pipe is no longer needed, both ends should be closed with calls to pr_close. pr_createpipe is currently implemented on unix, linux, mac os x, and win32 only. ...
PR_Interrupt
upted, compare the result of pr_geterror with pr_pending_interrupt_error. pr_interrupt may itself fail if the target thread is invalid. bugs pr_interrupt has the following limitations and known bugs: there can be a delay for a thread to be interrupted from a blocking i/o function. in all nspr implementations, the maximum delay is at most five seconds. in the pthreads-based implementation on unix, the maximum delay is 0.1 seconds. file i/o is considered instantaneous, so file i/o functions cannot be interrupted. unfortunately the standard input, output, and error streams are treated as files by nspr, so a pr_read call on pr_stdin cannot be interrupted even though it may block indefinitely. in the nt implementation, pr_connect cannot be interrupted. in the nt implementation, a file desc...
PR_MkDir
ame, printn mode); parameters the function has the following parameters: name the name of the directory to be created. all the path components up to but not including the leaf component must already exist. mode the access permission bits of the file mode of the new directory if the file is created when pr_create_file is on. caveat: the mode parameter is currently applicable only on unix platforms. it may be applicable to other platforms in the future. possible values include the following: 00400. read by owner. 00200. write by owner. 00100. search by owner. 00040. read by group. 00020. write by group. 00010. search by group. 00004. read by others. 00002. write by others. 00001. search by others. returns if successful, pr_success. if unsuccessful, pr_failure...
PR_Open
be physically updated. pr_excl 0x80 with pr_create_file, if the file does not exist, the file is created. if the file already exists, no action and null is returned. mode when pr_create_file flag is set and the file is created, these flags define the access permission bits of the newly created file. this feature is currently only applicable on unix platforms. it is ignored by any other platform but it may apply to other platforms in the future. possible values of the mode parameter are listed in the table below. name value description pr_irwxu 0700 read, write, execute/search by owner. pr_irusr 0400 read permission, owner. pr_iwusr 0200 write permission, o...
PR_OpenAnonFileMap
, prfilemapprotect prot ); parameters the function has the following parameters: dirname a pointer to a directory name that will contain the anonymous file. size the size of the shared memory. prot how the shared memory is mapped. returns pointer to prfilemap or null on error. description if the shared memory already exists, a handle is returned to that shared memory object. on unix platforms, pr_openanonfilemap uses dirname as a directory name, without the trailing '/', to contain the anonymous file. a filename is generated for the name. on windows platforms, dirname is ignored. ...
PR_OpenSemaphore
syntax #include <pripcsem.h> #define pr_sem_create 0x1 /* create if not exist */ #define pr_sem_excl 0x2 /* fail if already exists */ nspr_api(prsem *) pr_opensemaphore( const char *name, printn flags, printn mode, pruintn value ); parameters the function has the following parameters: name the name to be given the semaphore. flags how to create or open the semaphore. mode unix style file mode to be used when creating the semaphore. value the initial value assigned to the semaphore. returns a pointer to a prsem structure or null/code> on error. description if the named semaphore doesn't exist and the pr_sem_create flag is specified, the named semaphore is created. the created semaphore needs to be removed from the system with a pr_deletesemaphore call. if pr_se...
PR_OpenTCPSocket
creates a new tcp socket of the specified address family. syntax #include <prio.h> prfiledesc* pr_opentcpsocket(printn af); parameters the function has the following parameters: af the address family of the new tcp socket. can be pr_af_inet (ipv4), pr_af_inet6 (ipv6), or pr_af_local (unix domain, supported on posix systems only). returns the function returns one of the following values: upon successful completion, a pointer to the prfiledesc object created for the newly opened tcp socket. if the creation of a new tcp socket failed, null. description tcp (transmission control protocol) is a connection-oriented, reliable byte-stream protocol of the tcp/ip protocol suite. pr_opentcpsocket creates a new tcp socket of the address family af. a tcp connection is established by a ...
PR OpenUDPSocket
creates a new udp socket of the specified address family. syntax #include <prio.h> prfiledesc* pr_openudpsocket(printn af); parameters the function has the following parameters: af the address family of the new udp socket. can be pr_af_inet (ipv4), pr_af_inet6 (ipv6), or pr_af_local (unix domain, supported on posix systems only). returns the function returns one of the following values: upon successful completion, a pointer to the prfiledesc object created for the newly opened udp socket. if the creation of a new udp socket failed, null. description udp (user datagram protocol) is a connectionless, unreliable datagram protocol of the tcp/ip protocol suite. udp datagrams may be lost or delivered in duplicates or out of sequence. pr_openudpsocket creates a new udp socket of...
PR_Poll
the prpolldesc structure is defined as follows: struct prpolldesc { prfiledesc* fd; print16 in_flags; print16 out_flags; }; typedef struct prpolldesc prpolldesc; the structure has the following fields: fd a pointer to a prfiledesc object representing a socket or a pollable event. this field can be set to null to indicate to pr_poll that this prfiledesc object should be ignored. on unix, the fd field can be set to a pointer to any prfiledesc object, including one representing a file or a pipe. cross-platform applications should only set the fd field to a pointer to a prfiledesc object representing a socket or a pollable event because on windows the select function can only be used with sockets. in_flags a bitwise or of the following bit flags: pr_poll_read: fd is readabl...
PR_ReadDir
de the following: pr_skip_none. do not skip any files. pr_skip_dot. skip the directory entry "." representing the current directory. pr_skip_dot_dot. skip the directory entry ".." representing the parent directory. pr_skip_both. skip both "." and ".." pr_skip_hidden. skip hidden files. on windows platforms and the mac os, this value identifies files with the "hidden" attribute set. on unix platform, this value identifies files whose names begin with a period ("."). returns a pointer to the next entry in the directory. if the end of the directory is reached or an error occurs, null. the reason can be retrieved via pr_geterror. description pr_readdir returns a pointer to a directory entry structure: struct prdirentry { const char *name; }; typedef struct prdirentry p...
Process Management and Interprocess Communication
the newly-created process executes its program from the beginning. a new process can inherit specified file descriptors from its parent, and the parent can redirect the standard i/o streams of the child process to specified file descriptors. ...
Build instructions for JSS 4.3.x
ss from the root of your source tree. cvs co -r jss_4_3_1_rtm mozilla/security/jss or cvs co -r jss_4_3_rtm mozilla/security/jss setup environment variables needed for compiling java source. the java_home variable indicates the directory containing your java sdk installation. note, on windows platforms it is best to have java_home set to a directory path that doest not have spaces. ...
NSS 3.14.2 release notes
ires gnu as version 2.19 or newer. on red hat enterprise linux 5.x systems, install the binutils220 package and add /usr/libexec/binutils220 to the beginning of your path environment variable. initial manual pages for some nss command line tools have been added. they are still under review, and contributions are welcome. the documentation is in the docbook format and can be rendered as html and unix-style manual pages using an optional build target. new types: in certt.h cert_pi_useonlytrustanchors in secoidt.h sec_oid_ms_ext_key_usage_ctl_signing notable changes in nss 3.14.2 bug 805604 - support for aes-ni and avx accelerated aes-gcm was contributed by shay gueron of intel. if compiled on linux systems in 64-bit mode, nss will include runtime...
nss tech note6
it must be put in the same directory as the nss libraries. the libsoftokn3.chk/softokn3.chk file contains a checksum for the softoken. when in fips 140 mode, the softoken is required to compute its checksum and compare it with the value in libsoftokn3.chk/softokn3.chk. ...
PKCS11 FAQ
Mozilla › Projects › NSS › PKCS11 › FAQ
n selection is based on where the key involved is currently stored. if the token that has your private keys doesn't also do symmetric operations, for example, it's likely that the internal token will end up doing the symmetric operations. is the pkcs #11 module supplied with nss accessible through a shared library? yes, the token is call softokn3 (softokn3.dll on windows, libsoftokn3.so on most unix platforms). the nss softokn3 is not a complete pkcs #11 module, it was implemented only to support nss, though other products have managed to get it to work in their environment. there are a number of bugs against softoken's non-compliance, but these bugs have lower priority than fixing nss's non-complient uses of pkcs #11 or adding new features to nss. if multiple pkcs #11 modules are loaded, h...
Build instructions
ese repositories, then switch to the release tags: cd nspr hg update nspr_4_9_5_rtm cd ../nss hg update nss_3_14_2_rtm cd .. set environment variables: if you want a non-debug optimized build, set build_opt=1 in your environment. otherwise, you get a debug build. on windows, if you want a debug build with the system's debug rtl libraries, set use_debug_rtl=1 in your environment. on unix platforms, except alpha/osf1, if you want a build for the system's 64-bit abi, set use_64=1 in your environment. by default, nss builds for the 32-bit environment on all platforms except alpha/osf1. to build with gcc on platforms other than linux and windows, you need to set two more environment variables: ns_use_gcc=1 no_mdupdate=1 for hp-ux, you must set the envir...
NSS tools : crlutil
t and output. this formatting follows rfc #1113. -c crl-gen-file specify script file that will be used to control crl generation/modification. see crl-cript-file format below. if options -m|-g is used and -c crl-script-file is not specified, crlutil will read script data from standard input. -d directory specify the database directory containing the certificate and key database files. on unix the certificate database tool defaults to $home/.netscape (that is, ~/.netscape). on windows nt the default is the current directory. the nss database files must reside in the same directory. -i crl-import-file specify the file which contains the crl to import -f password-file specify a file that will automatically supply the password to include in a certificate or to access a certificate...
NSS_3.12.3_release_notes.html
bug 464406: fix signtool regressions bug 465270: uninitialised...
NSS Tools certutil
-c issuer identify the certificate of the ca from which a new certificate will derive its authenticity. use the exact nickname or alias of the ca certificate, or use the ca's email address. bracket theissuer string with quotation marks if it contains spaces. -d directory specify the database directory containing the certificate and key database files. on unix the certificate database tool defaults to $home/.netscape (that is, ~/.netscape). on windows nt the default is the current directory. the cert8.db and key3.db database files must reside in the same directory. -p dbprefix specify the prefix used on the cert8.db and key3.db files (for example, my_cert8.db and my_key3.db). this option is provided as a special case.
NSS Tools crlutil
specify script file that will be used to control crl generation/modification. see crl-cript-file format below. if options -m|-g is used and -c crl-script-file is not specified, crlutil will read script data from standard input. -d directory specify the database directory containing the certificate and key database files. on unix the certificate database tool defaults to $home/.netscape (that is, ~/.netscape). on windows nt the default is the current directory. the nss database files must reside in the same directory. -i crl-import-file specify the file which contains the crl to import -f password-file ...
NSS tools : crlutil
Mozilla › Projects › NSS › tools › crlutil
e specify script file that will be used to control crl generation/modification. see crl-cript-file format below. if options -m|-g is used and -c crl-script-file is not specified, crlutil will read script data from standard input. -d directory specify the database directory containing the certificate and key database files. on unix the certificate database tool defaults to $home/.netscape (that is, ~/.netscape). on windows nt the default is the current directory. the nss database files must reside in the same directory. -i crl-import-file specify the file which contains the crl to import -f password-file specify a file that will automatically supply the passw...
SpiderMonkey Build Documentation
to be adapted to look for headers in the sdk until then, the following should help, open /library/developer/commandlinetools/packages/macos_sdk_headers_for_macos_10.14.pk this builds an executable named js in the directory build-release/dist/bin. you can test it with dist/bin/js --help, which displays a help page. at this point, you're ready to run and try out the shell. on mac, linux, or unix, you can install spidermonkey on your system with the additional command make install. 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. developer (debug) build for developing and debugging spidermonkey itself, it is best to have both a debug build (for everyday debugging) and an optimized build (for performance...
Introduction to the JavaScript shell
e javascript program specified by filename. -i enables interactive mode. (default if no filename is provided.) --no-ion disables the optimizing jit compiler. --no-baseline disables the baseline jit compiler. -p if the first line of the file is "/usr/bin/env js -p", then the file content will be interpreted by the javascript engine. this enables you to make a javascript file executable on unix and os x machines. -s enables strict warning mode. -w, --warnings enables warning messages. -w, --nowarnings disables warning messages. environment options there are some environment variables that can be set to alter js shell behavior. js_stdout=file redirect stdout to file. js_stderr=file redirect stderr to file. built-in functions to make the javascript shell more useful, the...
JS_NewDateObjectMsec
this article covers features introduced in spidermonkey 1.8.5 creates a new date object instance, configured to represent the date and time indicated by the specified time in milliseconds since the unix epoch. syntax jsobject * js_newdateobjectmsec(jscontext *cx, double msec); name type description cx jscontext * the context. requires request. in a js_threadsafe build, the caller must be in a request on this jscontext. msec double time since unix epoch in milliseconds. description the returned jsobject is a standard javascript date. see also mxr id search for js_newdateobjectmsec js_newdateobject js_objectisdate bug 625870 ...
Redis Tips
ration in seconds from the present. ttl tells you the time-to-live for the key, if there is an expiration set on it. otherwise, you get -1. note that you get -1 both when there's no expiration and when there's no key. if you change your mind, and you want to save the key from oblivion, you can persist it to undo the expire command. expireat lets you specify the expiration date of a key in unix timestamp. setex is an atomic shortcut for set + expire. using zsets, you can periodically cull expired objects by using the zremrangebyscore and zremrangebyrank commands. mutex locks in the case where you need a mutex, here's a recipe for using the atomic getset and setnx to orchestrate locking: https://redis.io/commands/setnx (scroll down). i have used this recipe in production. bit s...
Secure Development Guidelines
ta, 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 applications file i/o: file descriptors and handles potential overflows when using select fd_set struct, static length, holds a bitmask of fds manipulated with fd_set, fd_isset, fd_clr a...
Accessibility API Implementation Details
these pages contain documentation on mozilla specific implementation details of assistive technology apis. at apis supportthis documentation explains how makers of screen readers, voice dictation packages, onscreen keyboards, magnification software and other assitive technologies can support gecko-based software. we provide for them the support of these products on windows, linux/unix and os x platforms.at developmentthe accessibility of computer software has seen drastic improvements over the past two decades. this article (from 2007) reviews the progress and technology as it has developed. xforms accessibilitythis article provides a quick guide to how accessibility is handled in gecko for xforms.xul accessibilitythis article shows how xul control elements are mapped to accessibi...
An Overview of XPCOM
- but the fundamental ideas in the book will be important to developers embedding gecko as well. gecko is used in many internet applications, mostly browsers and most notably mozilla firefox. components xpcom allows you to break up large software projects into smaller pieces known as components. they are usually contained in reusable binary libraries (a dll on windows, for example, or a dso on unix), which can include one or more components. when two or more related components are grouped together in a binary library, the library is referred to as a module. modular, component-based programming makes software easier to develop and maintain and has some well-known advantages: benefit description reuse modular code can be reused in other applications and other context...
Component Internals
om, or you can skip to the next chapter, where the weblock component tutorial takes you step by step through the component creation process. xxx mediawiki...xxx sucks creating components in c++ let's start by examining how xpcom components are written in c++. the most common type of component is one that is written in c++ and compiled into a shared library (a dll on a windows system or a dso on unix). the illustration below shows the basic relationship between the shared library containing the component implementation code you write and the xpcom framework itself. in this diagram, the outer boundary is that of the module, the shared library in which a component is defined. a component in the xpcom framework when you build a component or module and compile it into a library, it must expo...
Creating the Component Code
s(); return ns_ok; } finally, sample_cid is an example of a cid that uniquely identifies the component. all of the 128-bit numbers used in xpcom - the class and the interface ids - are examples of uuids, or universal unique identifiers, which were discussed in object interface discovery. generating cids to generate a cid for your component, you can use the uuidgen tool that comes with most unix distributions and with microsoft visual c++. uuidgen is a command-line tool that returns a unique 128-bit number when you call it with no arguments: $ uuidgen ce32e3ff-36f8-425f-94be-d85b26e634ee on windows, a program called guidgen.exe does the same thing and also provides a graphical user interface if you'd rather point and click. or you can use one of the special "bots" on irc in #developer...
Setting up the Gecko SDK
firefox\profiles\<profile>\xpti.dat" "c:\users\<user>\appdata\roaming\mozilla\firefox\profiles\<profile>\extensions\bob@george.com\cspecialthing.dll" now if you start up firefox using that profile, you should have your new component installed. i used xpcomviewer, to make sure the class and the interface were showing. now you can use this component in your javascript extension. a makefile for unix on linux, the equivalent project settings are typically handled in a makefile. the makefile allows you to specify any number of options for your build environment, including the path and configuration updates you need to build with the gecko sdk. below is a listing for a makefile that configures your compiler to work with the sdk. explaining the details of the makefile is outside the scope of t...
Starting WebLock
*/ nsifile getfile(in string prop, out prbool persistent); }; modifying paths with nsifile the directory service returns an nsifile object, but that object points to the application directory and not the file itself. to modify this nsifile so that it points to the file, you must call the append method of the nsifile. append adds the input string to the path already specified in the nsifile. on unix, for example, calling append("b") on an nsifile modifies that nsifile representing /u/home/dougt/a to point to /u/home/dougt/a/b. the next operation on the nsifile returns results associated with the "b" path. if "a" wasn't a directory, further operations would fail, even if the initial append was successful. this is why append is considered a string operation. the weblock component manipulates ...
Creating XPCOM components
this material may be distributed only subject to the terms and conditions set forth in the open publication license, v1.02 or later. distribution of substantively modified versions of this document is prohibited without...
Index
Mozilla › Tech › XPCOM › Index
m, and available in the gecko runtime environment or in any gecko-based application after mozilla 1.2 (when the gre began to be used). 103 component internals obsolete, xpcom let's start by examining how xpcom components are written in c++. the most common type of component is one that is written in c++ and compiled into a shared library (a dll on a windows system or a dso on unix). 104 creating the component code xpcom this chapter goes over the basic code required to handle the relationship between your component and xpcom. having the component found and registered properly is the goal of this first chapter of the tutorial. in the subsequent chapters, we can begin to work on the example weblock component functionality itself. 105 finishing...
nsIBrowserHistory
the history with specific time stamp information. it is called by history importing code and is used in the history migration tool. void addpagewithdetails( in nsiuri auri, in wstring atitle, in long long alastvisited ); parameters auri the page that will be added to the history. atitle the title of the page. alastvisited when the page was last visited, in microseconds since the unix epoch. markpageasfollowedlink() obsolete since gecko 22.0 (firefox 22.0 / thunderbird 22.0 / seamonkey 2.19) note: this method was moved to another interface in gecko 22.0. you should use nsinavhistoryservice.markpageasfollowedlink() instead. this function was originally added in gecko 2.0 (firefox 4/thunderbird 3.3/seamonkey 2.1). designates the specified url as c...
nsICommandLine
e the initial hyphen. acasesensitive whether to do case-sensitive comparisons. return value the position of the flag in the command line, or -1 if the flag is not found.getargument() gets the value an argument from the array of command-line arguments, given the index into the argument list. on windows, flags of the form /flag are normalized to -flag. /flag:param are normalized to -flag param. on unix/linux and mac os x, flags of the form --flag are normalized to -flag, and flags of the form --flag=param are normalized to the form -flag param. astring getargument( in long aindex ); parameters aindex the argument to retrieve. this index is 0-based, and does not include the application name. return value the value of the specified argument. this is the full text of that argument, so if the ...
nsIEnvironment
eve. return value returns the value of the env variable. an empty string will be returned when the env variable does not exist or when the value itself is an empty string - please use exists() to probe whether the env variable exists or not. exists() check the existence of an environment variable. this method checks whether an environment variable is present in the environment or not. note: * for unix/linux platforms we follow the unix definition: an environment variable exists when getenv() returns a non-null value. an environment variable does not exist when getenv() returns null. for non-unix/linux platforms we have to fall back to a "portable" definition (which is incorrect for unix/linux!!!!) which simply checks whether the string returned by get() is empty or not. boolean exists( ...
nsILoginMetaInfo
login() using an nsipropertybag2 object as the input. metadata properties are ignored when comparing logins. attributes attribute type description guid astring the guid to uniquely identify the login. this can be any arbitrary string, but a format as created by nsiuuidgenerator is recommended. for example, "{d4e1a1f6-5ea0-40ee-bff5-da57982f21cf}" timecreated unsigned long long the time, in unix epoch milliseconds, when the login was first created. timelastused unsigned long long the time, in unix epoch milliseconds, when the login was last submitted in a form or used to begin an http auth session. timepasswordchanged unsigned long long the time, in unix epoch milliseconds, when the login's password was last modified. timesused unsigned long the number of times the login was sub...
nsIMsgDBHdr
he position of the offline copy of an imap or news messages within the offline store. offlinemessagesize unsigned long indicates the size of the offline copy of an imap or news message. date prtime indicates the date of this message; the equivalent header is the date: header. dateinseconds unsigned long readonly: indicates the date of this message as a unix timestamp. messageid string indicates the message id of this message, without angle brackets. if setting this value, outer angle brackets will be stripped if present. cclist string indicates the cc list of this message; the equivalent header is the cc: header. bcclist string [new in .31] indicates the bcc list of this message; the equivalent header is ...
nsISupportsPriority
1.0 66 introduced gecko 1.8 inherits from: nsisupports last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) this interface does not strictly define what happens when the priority of an object is changed. an implementation of this interface is free to define the side-effects of changing the priority of an object. ...
Using the clipboard
er to setdata (and the parameter to emptyclipboard) indicates which clipboard buffer to use. the above code uses the constant kglobalclipboard for this, which refers to the global clipboard. this would be the same one that cut and paste operations from the edit menu typically use. if you use kselectionclipboard instead, you will copy into the selection buffer, which is generally only available on unix systems. this multi-step process has resulted in text being copied on the clipboard. we can cut to the clipboard instead of copying by doing a copy and then deleting the original data. normally, the text would be in a document or textbox. the code is put together below, with additional error checking: var copytext = "text to copy"; var trans = transferable(sourcewindow); trans.adddataflavor("...
XPCOM ABI
pting language (such as javascript) can be moved across platforms (such as windows and os x) without adaptation, those written in a compiled language (such as c++) require recompilation when moving to a different platform. often, compiled xpcom components are called 'binary' or 'native'. a binary xpcom component consists of an .xpt file which fits all platforms and a dll (.dll on windows, .so on unix) which is platform-specific and has a certain abi. only applications which use this abi could use this xpcom component. to put it simply, an xpcom component built for a specific abi would only be compatible with firefox, thunderbird or other xulrunner application built for the same abi. abi naming each abi is named with a string [target_xpcom_abi] of the following format: {cpu_arch}-{target_co...
Xptcall Porting Guide
lementing classes whose objects can impersonate any xpcom interface. it does this using platform specific assembly language code. this code needs to be ported to all platforms that want to support xptcall (and thus mozilla). the tree mozilla/xpcom/reflect/xptcall +--public // exported headers +--src // core source | \--md // platform specific parts | +--mac // mac ppc | +--unix // all unix | \--win32 // win32 | +--test // simple tests to get started \--tests // full tests via api porters are free to create subdirectories under the base md directory for their given platforms and to integrate into the build system as appropriate for their platform. theory of operation there are really two pieces of functionality: invoke and stubs... the invoke functio...
Virtualenv
y easy_install-2.7 pip-2.7 using this python binary, or these scripts (which point to this python binary), you will correctly install python packages in the lib/python2.x/site-packages directory and they will be appropriately added to your import path (sys.path) via lib/python2.x/site.py. in order to get the virtualenv's python binary on your path, you should source the bin/activate script on unix or run activate.bat on windows. unix example . bin/activate once the virtualenv is activated, the virtualenv's python (and other executables) will be on your path and you will have a new environment variable, virtual_env, that points to the path of the virtualenv, as well as a deactivate function for deactivating the virtualenv. virtualenv tools virtualenv does one thing well: creates isola...
Working with ArrayBuffers
ctypes.winapi_abi : ctypes.default_a...
Using js-ctypes
[cfstr]); // returns void } } libcf.close(); calling libc routines on linux/posix this example demonstrates how to use ctypes to call a libc function on linux. ...
Initialization and Destruction - Plugins
during initialization, when the browser encounters data of a mime type registered for a plug-in (either embedded in an html page or in a separate file), it loads the plug-in code into memory (if it hasn't been loaded already) and creates a new instance of the plug-in. for more information, see registering plug-ins. plug-ins are native code libraries: .dll files on windows, .so or .dso files on unix, and powerpc shared library files or 68k code resources on mac os. to reduce memory overhead, plug-ins are usually loaded only when needed and released as soon as possible. in the initialization process, the browser passes the plug-in two tables of function pointers for all api calls: one table lists all api calls from the plug-in to the browser. this table is filled out by the browser before...
Plug-in Side Plug-in API - Plugins
es of the plug-in api interact, see the how plug-ins work and overview of plug-in structure sections in the introduction. plugin method summary npp_destroy deletes a specific instance of a plug-in. npp_destroystream tells the plug-in that a stream is about to be closed or destroyed. np_getentrypoints undocumented. np_getmimedescription registers the mime types supported by the plug-in (unix, mac os). npp_getvalue allows the browser to query the plug-in for information. np_getvalue allows the browser to query the plug-in for information. npp_handleevent delivers a platform-specific window event to the instance. np_initialize provides global initialization for a plug-in. npp_new creates a new instance of a plug-in. npp_newstream notifies a plug-in instance of a new data st...
Structures - Plugins
latformprint field of the npembedprint during embedded mode printing. nprect represents a rectangular area of a page. npregion represents a platform-defined region of a page. npsaveddata block of instance information saved after the plug-in is deleted; can be returned to the plug-in. npsetwindowcallbackstruct contains information about the plug-in's unix window environment. npstream represents a stream of data either produced by the browser and consumed by the plug-in, or produced by the plug-in and consumed by the browser. npwindow contains information about the target into which the plug-in instance can draw. « previousnext » ...
URLs - Plugins
npn_posturl(npp instance, const char *url, const char *target, uint32 len, const char *buf, npbool file); the instance, url, and target parameters have the same definitions as those of npn_geturl. the buf parameter identifies a local temporary file or data buffer that contains the data to post. windows and mac if a file is posted with any protocol other than ftp, the file must be text with unix-style line breaks ('\n' separators only). npn_posturl works identically with buffers and files. to post data from a memory buffer, set the flag file to false, the buffer buf to the data to post, and len to the length of the buffer. possible url types include http (similar to an html form submission), mailto (sending mail), news (posting a news article), and ftp (uploading a file). for protocols...
Crypto.getRandomValues() - Web APIs
imum degree of entropy mandated by the web cryptography specification. user agents are instead urged to provide the best entropy they can when generating random numbers, using a well-defined, efficient pseudorandom number generator built into the user agent itself, but seeded with values taken from an external source of pseudorandom numbers, such as a platform-specific random number function, the unix /dev/urandom device, or other source of random or pseudorandom data. examples /* assuming that window.crypto.getrandomvalues is available */ var array = new uint32array(10); window.crypto.getrandomvalues(array); console.log("your lucky numbers:"); for (var i = 0; i < array.length; i++) { console.log(array[i]); } specification specification status comment web c...
File.File() - Web APIs
Web › API › File › File
ed as utf-8. name a usvstring representing the file name or the path to the file. options optional an options object containing optional attributes for the file. available options are as follows: type: a domstring representing the mime type of the content that will be put into the file. defaults to a value of "". lastmodified: a number representing the number of milliseconds between the unix time epoch and when the file was last modified. defaults to a value of date.now(). example var file = new file(["foo"], "foo.txt", { type: "text/plain", }); specifications specification status comment file api working draft initial definition ...
File.lastModified - Web APIs
Web › API › File › lastModified
the file.lastmodified read-only property provides the last modified date of the file as the number of milliseconds since the unix epoch (january 1, 1970 at midnight). files without a known last modified date return the current date. syntax const time = instanceoffile.lastmodified; value a number that represents the number of milliseconds since the unix epoch. 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 t...
File - Web APIs
Web › API › File
x" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">file</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} constructor file() returns a newly constructed file. instance properties file.prototype.lastmodified read only returns the last modified time of the file, in millisecond since the unix epoch (january 1st, 1970 at midnight). file.prototype.lastmodifieddate read only returns the last modified date of the file referenced by the file object. file.prototype.nameread only returns the name of the file referenced by the file object. file.prototype.webkitrelativepath read only returns the path the url of the file is relative to. file implements blob, so it also has the fo...
PerformanceTiming.connectEnd - Web APIs
if the transport layer reports an error and the connection establishment is started again, the last connection establisment end time is given. ...
PerformanceTiming.connectStart - Web APIs
this interface of this property is deprecated in the navigation timing level 2 specification. please use the performancenavigationtiming interface instead. the legacy performancetiming.connectstart read-only property returns an unsigned long long representing the moment, in miliseconds since the unix epoch, where the request to open a connection is sent to the network. if the transport layer reports an error and the connection establishment is started again, the last connection establisment start time is given. if a persistent connection is used, the value will be the same as performancetiming.fetchstart. syntax time = performancetiming.connectstart; specifications specification status comment navigation timingthe definition of 'performancetiming.connectstart' i...
PerformanceTiming.domComplete - Web APIs
this interface of this property is deprecated in the navigation timing level 2 specification. please use the performancenavigationtiming interface instead. the legacy performancetiming.domcomplete read-only property returns an unsigned long long representing the moment, in miliseconds since the unix epoch, when the parser finished its work on the main document, that is when its document.readystate changes to 'complete' and the corresponding readystatechange event is thrown. syntax time = performancetiming.domcomplete; specifications specification status comment navigation timingthe definition of 'performancetiming.domcomplete' in that specification. recommendation initial definition. ...
PerformanceTiming.domContentLoadedEventEnd - Web APIs
this interface of this property is deprecated in the navigation timing level 2 specification. please use the performancenavigationtiming interface instead. the legacy performancetiming.domcontentloadedeventend read-only property returns an unsigned long long representing the moment, in milliseconds since the unix epoch, right after all the scripts that need to be executed as soon as possible, in order or not, has been executed. syntax time = performancetiming.domcontentloadedeventend; specifications specification status comment navigation timingthe definition of 'performancetiming.domcontentloadedeventend' in that specification. recommendation initial definition. ...
PerformanceTiming.domContentLoadedEventStart - Web APIs
this interface of this property is deprecated in the navigation timing level 2 specification. please use the performancenavigationtiming interface instead. the legacy performancetiming.domcontentloadedeventstart read-only property returns an unsigned long long representing the moment, in miliseconds since the unix epoch, right before the parser sent the domcontentloaded event, that is right after all the scripts that need to be executed right after parsing has been executed. syntax time = performancetiming.domcontentloadedeventstart; specifications specification status comment navigation timingthe definition of 'performancetiming.domcontentloadedeventstart' in that specification. recommendation initial definition. ...
PerformanceTiming.domInteractive - Web APIs
this interface of this property is deprecated in the navigation timing level 2 specification. please use the performancenavigationtiming interface instead. the legacy performancetiming.dominteractive read-only property returns an unsigned long long representing the moment, in miliseconds since the unix epoch, when the parser finished its work on the main document, that is when its document.readystate changes to 'interactive' and the corresponding readystatechange event is thrown. this property can be used to measure the speed of loading web sites that users feels. nevertheless there are a few caveats that happens if scripts are blocking rendering and not loaded asynchronously or with custom web fonts. check if you are in one of these cases before using this property as a proxy for the use...
PerformanceTiming.domLoading - Web APIs
this interface of this property is deprecated in the navigation timing level 2 specification. please use the performancenavigationtiming interface instead. the legacy performancetiming.domloading read-only property returns an unsigned long long representing the moment, in miliseconds since the unix epoch, when the parser started its work, that is when its document.readystate changes to 'loading' and the corresponding readystatechange event is thrown. syntax time = performancetiming.domloading; specifications specification status comment navigation timingthe definition of 'performancetiming.domloading' in that specification. recommendation initial definition. ...
PerformanceTiming.domainLookupEnd - Web APIs
this interface of this property is deprecated in the navigation timing level 2 specification. please use the performancenavigationtiming interface instead. the legacy performancetiming.domainlookupend read-only property returns an unsigned long long representing the moment, in miliseconds since the unix epoch, where the domain lookup is finished. if a persistent connection is used, or the information is stored in a cache or a local resource, the value will be the same as performancetiming.fetchstart. syntax time = performancetiming.domainlookupend; specifications specification status comment navigation timingthe definition of 'performancetiming.domainlookupend' in that specification. recommendation initial definition. ...
PerformanceTiming.domainLookupStart - Web APIs
this interface of this property is deprecated in the navigation timing level 2 specification. please use the performancenavigationtiming interface instead. the legacy performancetiming.domainlookupstart read-only property returns an unsigned long long representing the moment, in miliseconds since the unix epoch, where the domain lookup starts. if a persistent connection is used, or the information is stored in a cache or a local resource, the value will be the same as performancetiming.fetchstart. syntax time = performancetiming.domainlookupstart; specifications specification status comment navigation timingthe definition of 'performancetiming.domainlookupstart' in that specification. recommendation initial definition. ...
PerformanceTiming.fetchStart - Web APIs
this interface of this property is deprecated in the navigation timing level 2 specification. please use the performancenavigationtiming interface instead. the legacy performancetiming.fetchstart read-only property returns an unsigned long long representing the moment, in miliseconds since the unix epoch, the browser is ready to fetch the document using an http request. this moment is before the check to any application cache. syntax time = performance.timing.fetchstart; specifications specification status comment navigation timingthe definition of 'performancetiming.fetchstart' in that specification. recommendation initial definition. ...
PerformanceTiming.loadEventEnd - Web APIs
this interface of this property is deprecated in the navigation timing level 2 specification. please use the performancenavigationtiming interface's performancenavigationtiming.loadeventend read-only property instead. the legacy performancetiming.loadeventend read-only property returns an unsigned long long representing the moment, in miliseconds since the unix epoch, when the load event handler terminated, that is when the load event is completed. if this event has not yet been sent, or is not yet completed, it returns 0. syntax time = performancetiming.loadeventend; specifications specification status comment navigation timingthe definition of 'performancetiming.loadeventend' in that specification. recommendation initial definition. ...
PerformanceTiming.loadEventStart - Web APIs
this interface of this property is deprecated in the navigation timing level 2 specification. please use the performancenavigationtiming interface's performancenavigationtiming.loadeventstart read-only property instead.. the legacy performancetiming.loadeventstart read-only property returns an unsigned long long representing the moment, in miliseconds since the unix epoch, when the load event was sent for the current document. if this event has not yet been sent, it returns 0. syntax time = performancetiming.loadeventstart; specifications specification status comment navigation timingthe definition of 'performancetiming.loadeventstart' in that specification. recommendation initial definition. ...
PerformanceTiming.navigationStart - Web APIs
this interface of this property is deprecated in the navigation timing level 2 specification. please use the performancenavigationtiming interface instead. the legacy performancetiming.navigationstart read-only property returns an unsigned long long representing the moment, in milliseconds since the unix epoch, right after the prompt for unload terminates on the previous document in the same browsing context. if there is no previous document, this value will be the same as performancetiming.fetchstart. syntax time = performancetiming.navigationstart; specifications specification status comment navigation timingthe definition of 'performancetiming.navigationstart' in that specification. recommendation initial definition. ...
PerformanceTiming.redirectEnd - Web APIs
this interface of this property is deprecated in the navigation timing level 2 specification. please use the performancenavigationtiming interface instead. the legacy performancetiming.redirectend read-only property returns an unsigned long long representing the moment, in miliseconds since the unix epoch, the last http redirect is completed, that is when the last byte of the http response has been received. if there is no redirect, or if one of the redirect is not of the same origin, the value returned is 0. syntax time = performancetiming.redirectend; specifications specification status comment navigation timingthe definition of 'performancetiming.redirectend' in that specification. recommendation initial definition. ...
PerformanceTiming.redirectStart - Web APIs
this interface of this property is deprecated in the navigation timing level 2 specification. please use the performancenavigationtiming interface instead. the legacy performancetiming.redirectstart read-only property returns an unsigned long long representing the moment, in miliseconds since the unix epoch, the first http redirect starts. if there is no redirect, or if one of the redirect is not of the same origin, the value returned is 0. syntax time = performancetiming.redirectstart; specifications specification status comment navigation timingthe definition of 'performancetiming.redirectstart' in that specification. recommendation initial definition. ...
PerformanceTiming.requestStart - Web APIs
this interface of this property is deprecated in the navigation timing level 2 specification. please use the performancenavigationtiming interface instead. the legacy performancetiming.requeststart read-only property returns an unsigned long long representing the moment, in miliseconds since the unix epoch, when the browser sent the request to obtain the actual document, from the server or from a cache. if the transport layer fails after the start of the request and the connection is reopened, this property will be set to the time corresponding to the new request. syntax time = performancetiming.requeststart; specifications specification status comment navigation timingthe definition of 'performancetiming.requeststart' in that specification. recommendation ...
PerformanceTiming.responseEnd - Web APIs
this interface of this property is deprecated in the navigation timing level 2 specification. please use the performancenavigationtiming interface instead. the legacy performancetiming.responseend read-only property returns an unsigned long long representing the moment, in miliseconds since the unix epoch, when the browser received the last byte of the response, or when the connection is closed if this happened first, from the server from a cache or from a local resource. syntax time = performancetiming.responseend; specifications specification status comment navigation timingthe definition of 'performancetiming.responseend' in that specification. recommendation initial definition. ...
PerformanceTiming.responseStart - Web APIs
this interface of this property is deprecated in the navigation timing level 2 specification. please use the performancenavigationtiming interface instead. the legacy performancetiming.responsestart read-only property returns an unsigned long long representing the moment in time (in milliseconds since the unix epoch) when the browser received the first byte of the response from the server, cache, or local resource. syntax time = performancetiming.responsestart; specifications specification status comment navigation timingthe definition of 'performancetiming.responsestart' in that specification. recommendation initial definition. ...
PerformanceTiming.secureConnectionStart - Web APIs
this interface of this property is deprecated in the navigation timing level 2 specification. please use the performancenavigationtiming interface instead. the legacy performancetiming.secureconnectionstart read-only property returns an unsigned long long representing the moment, in miliseconds since the unix epoch, where the secure connection handshake starts. if no such connection is requested, it returns 0. syntax time = performancetiming.secureconnectionstart; specifications specification status comment navigation timingthe definition of 'performancetiming.secureconnectionstart' in that specification. recommendation initial definition. ...
PerformanceTiming.unloadEventEnd - Web APIs
this interface of this property is deprecated in the navigation timing level 2 specification. please use the performancenavigationtiming interface instead. the legacy performancetiming.unloadeventend read-only property returns an unsigned long long representing the moment, in miliseconds since the unix epoch, the unload event handler finishes. if there is no previous document, or if the previous document, or one of the needed redirects, is not of the same origin, the value returned is 0. syntax time = performancetiming.unloadeventend; specifications specification status comment navigation timingthe definition of 'performancetiming.unloadeventend' in that specification. recommendation initial definition. ...
PerformanceTiming.unloadEventStart - Web APIs
this interface of this property is deprecated in the navigation timing level 2 specification. please use the performancenavigationtiming interface instead. the legacy performancetiming.unloadeventstart read-only property returns an unsigned long long representing the moment, in miliseconds since the unix epoch, the unload event has been thrown. if there is no previous document, or if the previous document, or one of the needed redirects, is not of the same origin, the value returned is 0. syntax time = performancetiming.unloadeventstart; specifications specification status comment navigation timingthe definition of 'performancetiming.unloadeventstart' in that specification. recommendation initial definition. ...
PerformanceTiming - Web APIs
operties the performancetiming interface doesn't inherit any properties. these properties each describe the time at which a particular point in the page loading process was reached. some correspond to dom events; others describe the time at which internal browser operations of interest took place. each time is provided as an unsigned long long representing the moment, in milliseconds since the unix epoch these properties are listed in the order in which they occur during the navigation process. performancetiming.navigationstart read only when the prompt for unload terminates on the previous document in the same browsing context. if there is no previous document, this value will be the same as performancetiming.fetchstart. performancetiming.unloadeventstart read only when the un...
RTCStats.timestamp - Web APIs
the timestamp property of the rtcstats dictionary is a domhighrestimestamp object specifying the time at which the data in the object was sampled. for reports related to rtcp packets, for instance, this indicates the time at which the data covered by the statistics was received at the corresponding endpoint. the time is given in milliseconds elapsed since the unix epoch (the first moment of january 1, 1970, utc). syntax var timestamp = rtcstats.timestamp; value a domhighrestimestamp value indicating the time at which the activity described by the statistics in this object was recorded, in milliseconds elapsed since the beginning of january 1, 1970, utc. this should be accurate to within a few milliseconds but may not be entirely pricise, either because of hardware or operating system lim...
The WebSocket API (WebSockets) - Web APIs
the websocket api is an advanced technology that makes it possible to open a two-way interactive communication session between the user's browser and a server. with this api, you can send messages to a server and receive event-driven responses without having to poll the server for a reply. note: while a websocket connection is functionally somewhat similar to standard unix-style sockets, they are not related. interfaces websocket the primary interface for connecting to a websocket server and then sending and receiving data on the connection. closeevent the event sent by the websocket object when the connection closes. messageevent the event sent by the websocket object when a message is received from the server. guides writing websocket client applications writing websocket ...
Community - Accessibility
this document provides links to mailing lists, newsgroups, forums, and other communities related to accessbility. ...
Accessibility FAQ - Accessibility
for interface design with xul, follow the accessibile xul authoring guidelines (archive.org). i'm interested in helping promote the fine accessibility features that firefox provides, what can i do? join the fir...
Implementing a Microsoft Active Accessibility (MSAA) Server - Accessibility
nless your application's accessibility is being demanded by end-users. example: how gecko and mozilla implement msaa the accessible module is where the mozilla msaa implementation lives. feel free to peruse the source code in the accessible module whenever you want to see how something can be implemented. the accessible module is also where support for sun's atk accessibility api for linux and unix is implemented. creation of iaccessible objects the first thing that happens when an assistive technology wants to watch our application is that calls the windows api function accessibleobjectfromwindow(). this usually happens right after a window gets focused. when the win32 api function accessibleobjectfromwindow() is called, windows sends the window in question a wm_getobject message reques...
<input type="date"> - HTML: Hypertext Markup Language
Web › HTML › Element › input › date
but the parsed value is always formatted yyyy-mm-dd. you can get and set the date value in javascript with the input element's value and valueasnumber properties. for example: var datecontrol = document.queryselector('input[type="date"]'); datecontrol.value = '2017-06-01'; console.log(datecontrol.value); // prints "2017-06-01" console.log(datecontrol.valueasnumber); // prints 1496275200000, a unix timestamp this code finds the first <input> element whose type is date, and sets its value to 2017-06-01 (june 1st, 2017). it then reads that value back in string and number formats. additional attributes along with the attributes common to all <input> elements, date inputs have the following attributes: attribute description max the latest acceptable date ...
<input type="file"> - HTML: Hypertext Markup Language
Web › HTML › Element › input › file
tmlinputelement.files property, which is a filelist object containing a list of file objects. the filelist behaves like an array, so you can check its length property to get the number of selected files. each file object contains the following information: name the file's name. lastmodified a number specifying the date and time at which the file was last modified, in milliseconds since the unix epoch (january 1, 1970 at midnight). lastmodifieddate a date object representing the date and time at which the file was last modified. this is deprecated and should not be used. use lastmodified instead. size the size of the file in bytes. type the file's mime type. webkitrelativepath a string specifying the file's path relative to the base directory selected in a directory picker (t...
Accept-Encoding - HTTP
ding, is not explicitly forbidden, by an identity;q=0 or a *;q=0 without another explicitly set value for identity, the server must never send back a 406 not acceptable error. notes: an iana registry maintains a complete list of official content encodings. two others content encoding, bzip and bzip2, are sometimes used, though not standard. they implement the algorithm used by these two unix programs. note that the first one was discontinued due to patent licensing problems. header type request header forbidden header name yes syntax accept-encoding: gzip accept-encoding: compress accept-encoding: deflate accept-encoding: br accept-encoding: identity accept-encoding: * // multiple algorithms, weighted with the quality value syntax: accept-encoding:...
Accept-Patch - HTTP
ceiving a patch request with an unsupported media type could reply with 415 unsupported media type and an accept-patch header referencing one or more supported media types. notes: an iana registry maintains a complete list of official content encodings. two others content encoding, bzip and bzip2, are sometimes used, though not standard. they implement the algorithm used by these two unix programs. note that the first one was discontinued due to patent licensing problems. header type response header forbidden header name yes syntax accept-patch: application/example, text/example accept-patch: text/example;charset=utf-8 accept-patch: application/merge-patch+json directives none examples accept-patch: application/example, text/example accept-...
Server - HTTP
Web › HTTP › Headers › Server
the request. usually in a format similar to user-agent. ...
Want-Digest - HTTP
der forbidden header name no syntax want-digest: <digest-algorithm> // multiple algorithms, weighted with the quality value syntax: want-digest: <digest-algorithm><q-value>,<digest-algorithm><q-value> directives <digest-algorithm> supported digest algorithms are defined in rfc 3230 and rfc 5843, and include sha-256 and sha-512. some of the supported algorithms, including unixsum and md5 are subject to collisions and are thus not suitable for applications in which collision-resistance is important. <q-value> the quality value to apply to that option. examples want-digest: sha-256 want-digest: sha-512;q=0.3, sha-256;q=1, md5;q=0 basic operation the sender provides a list of digests which it is prepared to accept, and the server uses one of them: request: get ...
OPTIONS - HTTP
Web › HTTP › Methods › OPTIONS
rl. (this header is similar to the allow response header, but used only for cors.) access-control-allow-headers any script inspecting the response is permitted to read the values of the x-pingother and content-type headers. access-control-max-age the above permissions may be cached for 86,400 seconds (1 day). ...
Numbers and dates - JavaScript
object and its methods to work with dates and times in your applications. the date object has a large number of methods for setting, getting, and manipulating dates. it does not have any properties. javascript handles dates similarly to java. the two languages have many of the same date methods, and both languages store dates as the number of milliseconds since january 1, 1970, 00:00:00, with a unix timestamp being the number of seconds since january 1, 1970, 00:00:00. the date object range is -100,000,000 days to 100,000,000 days relative to 01 january, 1970 utc. to create a date object: var dateobjectname = new date([parameters]); where dateobjectname is the name of the date object being created; it can be a new object or a property of an existing object. calling date without the new...
RangeError: invalid date - JavaScript
strings, may also throw rangeerror: invalid date, like the following cases in firefox: new date('foo-bar 2014'); new date('2014-25-23').toisostring(); new date('foo-bar 2014').tostring(); this, however, returns nan in firefox: date.parse('foo-bar 2014'); // nan for more details, see the date.parse() documentation. valid cases new date('05 october 2011 14:48 utc'); new date(1317826080); // unix time stamp for 05 october 2011 14:48:00 utc ...
Date() constructor - JavaScript
there are four basic forms for the date() constructor: no parameters when no parameters are provided, the newly-created date object represents the current date and time as of the time of instantiation. time value or timestamp number value an integer value representing the number of milliseconds since january 1, 1970, 00:00:00 utc (the ecmascript epoch, equivalent to the unix epoch), with leap seconds ignored. keep in mind that most unix timestamp functions are only accurate to the nearest second. timestamp string datestring a string value representing a date, specified in a format recognized by the date.parse() method. (these formats are ietf-compliant rfc 2822 timestamps, and also strings in a version of iso8601.) note: parsing of date stri...
Date.prototype.getTime() - JavaScript
gettime() always uses utc for time representation. for example, a client browser in one timezone, gettime() will be the same as a client browser in any other timezone. you can use this method to help assign a date and time to another date object. this method is functionally equivalent to the valueof() method. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. ...
Date.prototype.getUTCMilliseconds() - JavaScript
() method returns the milliseconds portion of the time object's value. syntax dateobj.getutcmilliseconds() return value an integer number, between 0 and 999, representing the milliseconds portion of the given date object. this method is a companion to the other utc based methods that give hour portion, minute portion, etc.; this method gives milliseconds portion. not to be confused with unix epoch time. to get total milliseconds since 1970/01/01, use the method ".gettime()". examples using getutcmilliseconds() the following example assigns the milliseconds portion of the current time to the variable milliseconds. var today = new date(); var milliseconds = today.getutcmilliseconds(); specifications specification ecmascript (ecma-262)the definition of 'date.pr...
Date.now() - JavaScript
polyfill this method was standardized in ecma-262 5th edition. ...
Date - JavaScript
a new date/time api. read more about it on the igalia blog and fill out the survey. it needs real-world feedback from web developers, but is not yet ready for production use! description the ecmascript epoch and timestamps a javascript date is fundamentally specified as the number of milliseconds that have elapsed since midnight on january 1, 1970, utc. this date and time is the same as the unix epoch, which is the predominant base value for computer-recorded date and time values. note: it's important to keep in mind that while the time value at the heart of a date object is utc, the basic methods to fetch the date and time or its components all work in the local (i.e. host system) time zone and offset. it should be noted that the maximum date is not of the same value as the maximum sa...
RegExp - JavaScript
and $2 to indicate the results of the corresponding matching parentheses in the regular expression pattern. let re = /(\w+)\s(\w+)/ let str = 'john smith' let newstr = str.replace(re, '$2, $1') console.log(newstr) this displays "smith, john". using regular expression to split lines with different line endings/ends of line/line breaks the default line ending varies depending on the platform (unix, windows, etc.). the line splitting provided in this example works on all platforms. let text = 'some text\nand some more\r\nand yet\rthis is the end' let lines = text.split(/\r\n|\r|\n/) console.log(lines) // logs [ 'some text', 'and some more', 'and yet', 'this is the end' ] note that the order of the patterns in the regular expression matters. using regular expression on multiple lines le...
JavaScript shells - JavaScript
e javascript shell for writing cross-platform javascript applications. it can use wxwidgets for gui apps and was formerly called wxjavascript. jspl - a standalone javascript shell enhanced by perl. can use perl modules directly from javascript: dbi for database integration, gtk2 for gui apps, posix for system programming, etc. the best of cpan now for javascript programmers. shelljs - portable unix shell commands for node.js list of javascript shells the following javascript shells work with mozilla. firefox has a built-in javascript console, which support multi-line editing. javascript shell (js) - a command line interpreter for javascript xpcshell is an xpconnect - enabled shell, sometimes useful for mozilla development. babel repl - a browser-based repl for experimenting with fu...
Authoring MathML - MathML
s often available on linux distributions. let's consider the former, which was originally written by paul gartside at the beginning of the mozilla mathml project and has been maintained by jacques distler since then. it's a small stream filter written in c/c++ and generated with flex and bison ; in particular it is very fast. install flex/bison as well as the classical compiler and make tools. on unix, you can then download itex2mml, build and install it: wget http://golem.ph.utexas.edu/~distler/blog/files/itextomml.tar.gz; \ tar -xzf itextomml.tar.gz; \ cd itex2mml/itex-src; make sudo make install now suppose that you have a html page with tex fragments delimited by dollars: input.html ... </head> <body> <p>$\sqrt{a^2-3c}$</p> <p>$$ {\sum_{i=1}^n i} = \frac{n(n+1)}{2} $$</p> </body> ...