Search completed in 1.63 seconds.
423 results for "quit":
Your results are loading. Please wait...
How to Quit a XUL Application - Archive of obsolete content
script can attempt to quit a xul application, or force the application to quit, using the nsiappstartup interface.
... <script> function quit (aforcequit) { var appstartup = components.classes['@mozilla.org/toolkit/app-startup;1'].
... getservice(components.interfaces.nsiappstartup); // eattemptquit will try to close each xul window, but the xul window can cancel the quit // process if there is unsaved data.
...And 3 more matches
nsIAppStartup
it also helps in quitting applications as well.
... void ensure1window(in nsicmdlineservice acmdlineservice); obsolete since gecko 1.9.1 void enterlastwindowclosingsurvivalarea(); void exitlastwindowclosingsurvivalarea(); void getstartupinfo(); void hidesplashscreen(); obsolete since gecko 1.9.1 void initialize(in nsisupports nativeappsupportorsplashscreen); obsolete since gecko 1.9.1 void quit(in pruint32 amode); void restartinsafemode(in pruint32 aquitmode); void run(); attributes attribute type description interrupted boolean true if the startup process was interrupted by an interactive prompt.
...obsolete since gecko 1.9.1 constants the following flags may be passed as the amode parameter to the quit() method.
...And 13 more matches
nsIAppShellService
void hidesplashscreen(); obsolete since gecko 1.8 void initialize(in nsicmdlineservice acmdlineservice, in nsisupports nativeappsupportorsplashscreen); obsolete since gecko 1.8 void quit(in pruint32 aferocity); obsolete since gecko 1.8 void registertoplevelwindow(in nsixulwindow awindow); void run(); obsolete since gecko 1.8 void toplevelwindowismodal(in nsixulwindow awindow, in boolean amodal); obsolete since gecko 1.9.1 void unregistertoplevelwindow(in nsixulwindow awindow); note: prior to gecko 8.0, all references to nsidomwindow use...
... econsiderquit 1 attempt to quit if all windows are closed.
... obsolete since gecko 1.8 eattemptquit 2 try to close all windows, then quit if successful.
...And 8 more matches
Setting up your own test automation environment - Learn web development
ndkeys('webdriver'); driver.sleep(1000).then(function() { driver.findelement(by.name('q')).sendkeys(webdriver.key.tab); }); driver.findelement(by.name('btnk')).click(); driver.sleep(2000).then(function() { driver.gettitle().then(function(title) { if(title === 'webdriver - google search') { console.log('test passed'); } else { console.log('test failed'); } driver.quit(); }); }); in terminal, make sure you are inside your project folder, then enter the following command: node google_test you should see an instance of firefox automatically open up!
...driver.sleep(1000).then(function() { driver.findelement(by.name('q')).sendkeys(webdriver.key.tab); }); driver.findelement(by.name('btnk')).click(); driver.sleep(2000).then(function() { driver.gettitle().then(function(title) { if(title === 'webdriver - google search') { console.log('test passed'); } else { console.log('test failed'); } driver.quit(); }); }); } in terminal, make sure you are inside your project folder, then enter the following command: node google_test_multiple if you are using a mac and do decide to test safari, you might get an error message along the lines of "could not create a session: you must enable the 'allow remote automation' option in safari's develop menu to control safari via webdriver." if you ...
...this is done using the quit() method.
...And 4 more matches
Web video codec guide - Web media technologies
ringing is similar in some respects to mosquito noise, except that while the ringing effect is more or less steady and unchanging, mosquito noise shimmers and moves.
... mosquito noise mosquito noise is a temporal artifact which presents as noise or edge busyness that appears as a flickering haziness or shimmering that roughly follows outside the edges of objects with hard edges or sharp transitions between foreground objects and the background.
... the photo above shows mosquito noise in a number of places, including in the sky surrounding the bridge.
...And 4 more matches
WAI-ARIA basics - Learn web development
as a result, developers quite often rely on javascript libraries that generate such controls as a series of nested <div>s or table elements with classnames, which are then styled using css and controlled using javascript.
... browser support is generally quite good — at the time of writing, caniuse.com stated that global browser support for wai-aria was around 88%.
... screenreader support for aria features isn't quite at this level, but the most popular screenreaders are getting there.
...And 2 more matches
HTTP logging
quit out of firefox if it's running.
... quit firefox is if it's currently running, by using the quit option in the file menu.
... keep in mind that simply closing all windows does not quit firefox on mac os x (this is standard practice for mac applications).
...And 2 more matches
Supporting private browsing mode - Archive of obsolete content
doing this is quite easy, using the nsiprivatebrowsingservice interface.
... _inprivatebrowsing: false, // whether we are in private browsing mode _watcher: null, // the watcher object init : function () { this._inited = true; this._os = components.classes["@mozilla.org/observer-service;1"] .getservice(components.interfaces.nsiobserverservice); this._os.addobserver(this, "private-browsing", false); this._os.addobserver(this, "quit-application", false); try { var pbs = components.classes["@mozilla.org/privatebrowsing;1"] .getservice(components.interfaces.nsiprivatebrowsingservice); this._inprivatebrowsing = pbs.privatebrowsingenabled; } catch(ex) { // ignore exceptions in older versions of firefox } }, observe : function (asubject, atopic, adata) { if (atopic ...
...e; if (this.watcher && "onenterprivatebrowsing" in this._watcher) { this.watcher.onenterprivatebrowsing(); } } else if (adata == "exit") { this._inprivatebrowsing = false; if (this.watcher && "onexitprivatebrowsing" in this._watcher) { this.watcher.onexitprivatebrowsing(); } } } else if (atopic == "quit-application") { this._os.removeobserver(this, "quit-application"); this._os.removeobserver(this, "private-browsing"); } }, get inprivatebrowsing() { return this._inprivatebrowsing; }, get watcher() { return this._watcher; }, set watcher(val) { this._watcher = val; } }; of special note is the fact that this helper object is designed to not break on ver...
...private browsing for theme designers if you want to make your theme look different when used in private browsing mode, you can do so quite easily by using the browsingmode attribute in the window element in browser.xul.
Special per-platform menu considerations - Archive of obsolete content
for instance, this is the proper place to put the menu items which open the application preferences and which quit the application.
... menu_filequitseparator the separator just before the quit/exit item.
... menu_filequititem the item which exits the application.
... for example, using document.getelementbyid() for the quit menu item returns the hidden item that still sits in the file menu.
Game distribution - Game development
saying this, desktop platforms can be used for distribution quite easily with the availability of wrappers that can help you prepare native builds of your game see packaging games.
... the ios app store is quite hard to get into as there are strict requirements games have to meet, and you'll have to wait a week or two to get accepted.
...it's still quite hard to be noticed there as the number of apps submitted daily is huge.
...it's more like an excellent promotional opportunity than a way to earn a lot of money, however, as the prices paid for the games in a bundle are usually quite low.
extIApplication
method overview boolean quit() boolean restart() void getextensions(extiextensionscallback acallback) attributes the following interfaces are available to all applications: attribute type description id readonly attribute astring the id of the application.
...supports: "load", "ready", "quit", "unload" the following interfaces are only available to firefox: attribute type description bookmarks readonly attribute fuelibookmarkroots the root bookmarks object for the application.
... methods quit() attempts to shutdown the application.
... boolean quit() return value boolean value indicating whether the shutdown was successful.
Avoiding leaks in JavaScript XPCOM components
quite a lot has happened since this article was written.
... for javascript objects that implement xpcom interfaces, the interface between reference counting and garbage collection is quite simple.
...however, it's not quite that simple, because of the convention that dom nodes can have arbitrary javascript properties added to them by the programmer.
...t private_data to 2 fns1[1]() + ", " + // doubles first private_data to 4 fns2[1]() + ", " + // doubles second private_data to 0 fns1[0]() + ", " + // increments first private_data to 5 fns2[0]() + ", " + // increments second private_data to 1 fns1[1]() + "."; // doubles first private_data to 10 } this shows that closures are quite powerful.
nsIProfileUnlocker
1.0 66 introduced gecko 1.8 inherits from: nsisupports last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) method overview void unlock(in unsigned long aseverity); constants constant value description attempt_quit 0 politely ask the process currently holding the profile's lock to quit.
... force_quit 1 forcibly terminate the process holding the profile lock.
... methods unlock() tries to unlock the profile by attempting or forcing the process that currently holds the lock to quit.
... void unlock( in unsigned long aseverity ); parameters aseverity either attempt_quit or force_quit.
Index - Archive of obsolete content
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.
... 1165 how to quit a xul application xul, xulrunner script can attempt to quit a xul application, or force the application to quit, using the nsiappstartup interface.
... 1734 adding event handlers tutorials, xul, xul_tutorial the find files dialog so far looks quite good.
MCD, Mission Control Desktop, AKA AutoConfig - Archive of obsolete content
uild gmake[7]: entering directory `/usr/local/moz2/commsrc/mozilla/toolkit/crashreporter/google-breakpad/src/common/linux' dump_symbols.cc build then start building [root@b008-02 commsrc]# time make -f client.mk build rm -f ../../mozilla/dist/bin/testcookie if test -f ../../mozilla/dist/bin/testtarray; then cp ../../mozilla/dist/bin/testtarray ../../mozilla/dist/bin/testcookie; fi; gmake[5]: quittant le répertoire « /usr/local/moz/commsrc/mail/app » gmake[4]: quittant le répertoire « /usr/local/moz/commsrc/mail » gmake[3]: quittant le répertoire « /usr/local/moz/commsrc » gmake[2]: quittant le répertoire « /usr/local/moz/commsrc » make[1]: quittant le répertoire « /usr/local/moz/commsrc » real 23m33.845s user 20m34.356s sys 1m49.752s...
.../usr/local/moz/commsrc/mozilla/config/nsinstall -d /usr/local/thunderbirddebug/bin rm -f -f /usr/local/thunderbirddebug/bin/thunderbird ln -s /usr/local/thunderbirddebuglibs/thunderbird-3.0b3pre/thunderbird /usr/local/thunderbirddebug/bin gmake[1]: quittant le répertoire « /usr/local/moz/commsrc/mail/installer » [root@b008-02 commsrc]# ls -l /usr/local/thunderbirddebuglibs/thunderbird-3.0b3pre/ | grep ^d drwxr-xr-x 3 root root 4096 juil.
...the autoconfiguration subsystem is quite the same as described the section on 'old' netscape 4.x, but also slightly different.
Automated testing tips and tricks - Archive of obsolete content
todo: check example code in to the tree somewhere how to quit the browser on all platforms window.close() of the last open window does not quit the application on mac http://people.mozilla.com/~davel/scripts/ - look at quit.js and quit.xul install manifest file in appdir/chrome to map chrome://tests/content to directory containing quit.js and quit.xul example: content tests file:///users/davel/work/tests/ start app with command line flag -chrome chrome://tests/content/quit.xul how to create a new profile from the command line first, use the -createprofile command line flag to add a profile entry to profiles.ini and populate the new profile directory with a prefs.js file firefox-bin -createprofile "testprofile ${profi...
...le_dir}/testprofile" next, start firefox to populate the new profile directory with the rest of the default settings firefox-bin -p testprofile -chrome chrome://tests/content/quit.xul<code> the above process may exit before the profile is completely created.
...n how to enable dump in a new profile add user_pref("browser.dom.window.dump.enabled", true); to profiledir/user.js how to execute test code with chrome privileges using a chrome doc - see sbtests.xul in http://people.mozilla.com/~davel/scripts/ for an example firefox-bin -p sbtestprofile -chrome chrome://sbtests/content/ above code calls the quit function in quit.js to exit after test is finished how to detect content onload event from chrome use the domcontentloaded event chromewindow.addeventlistener('domcontentloaded',callbackfunction,false); ...
Download Manager preferences - Archive of obsolete content
browser.download.manager.quitbehavior indicates what should happen to in-progress downloads if the application is quit while they're ongoing.
... 0 indicates that the downloads should be paused and resumed automatically the next time firefox is run; 1 indicates that the downloads should be paused but will not automatically resume when the application is restarted; and 2 indicates that the downloads will be canceled on quit.
...0 indicates that the download should be removed upon completion; 1 indicates that completed and canceled downloads should be removed on quit; 2 indicates that downloads should never be removed automatically.
Beginner's guide to media queries - Learn web development
this second approach is described as mobile first responsive design and is quite often the best approach to follow.
... the view for the very smallest devices is quite often a simple single column of content, much as it appears in normal flow.
... from this point, start to drag the responsive design mode view wider until you can see that the line lengths are becoming quite long, and we have space for the navigation to display in a horizontal line.
What do common web layouts contain? - Learn web development
these elements are quite common in all form factors, but they can be laid out different ways.
...(even many desktop-users prefer viewing things in small windows rather than full-screen.) the real fun begins when you start mixing them all together: … these are just examples and you're quite free to lay things out as you want.
... quite straightforward.
The HTML5 input types - Learn web development
because html form control appearance may be quite different from a designer's specifications, web developers sometimes build their own custom form controls.
...you see these quite often on sites like housebuying sites where you want to set a maximum property price to filter by.
...note that the usage of these types is quite complex, especially considering browser support (see below); to find out the full details, follow the links below to the reference pages for each type, including detailed examples.
Index - Learn web development
106 backgrounds and borders background, beginner, css, image, learn, position, borders, color we have covered quite a lot here, and you can see that there is quite a lot to adding a background or a border to a box.
...there are a large number of these, and they often serve quite specific purposes.
... 264 introduction to automated testing article, automation, beginner, codingscripting, learn, sauce labs, testing, tools, web stack, cross browser this was quite a ride, but i'm sure you can start to see the benefits of using automation tools to do some of the heavy lifting in terms of testing.
Fetching data from the server - Learn web development
this may not be such a big issue on a desktop on a broadband connection, but it's a major issue on mobile devices and in developing countries that don't have ubiquitous fast internet service.
... xmlhttprequest xmlhttprequest (which is frequently abbreviated to xhr) is a fairly old technology now — it was invented by microsoft in the late '90s, and has been standardized across browsers for quite a long time.
... there is quite a lot of complex code that deals with filtering the products by category and search terms, manipulating strings so the data displays correctly in the ui, etc.
Command line crash course - Learn web development
once you are finished looking through the man page, you need to quit out of it using your text viewer’s quit command ("q" in less; you may have to search on the web to find it if it isn’t obvious).
... creating, copying, moving, removing there are a number of other basic utility commands that you’ll probably end up using quite a lot as you work with the terminal.
... they are pretty simple, so we won’t explain them all in quite as much detail as the previous couple.
Getting Started with Chat
simply type them into the message box at the bottom of the screen and press enter: /join #channel joins you to the specified channel until you quit your irc client or quit the channel /leave leave the current channel /mode #channel +k password sets a password for the channel.
...private message to the specified user /nick nickname change your current nickname nickname: ping get a user's attention (nickname is the name of the user you want the attention of) nickname: pong respond to a user's ping (nickname is the name of the user who wants your attention) /query nickname opens a private chat with the specified user /quit message disconnects you from the current server displaying the message in all connected channels prior to quitting /reload styles some irc clients, colloquy on mac in particular, stop displaying your messages in the channel window.
... further reading irc channel operator's guide (new version) irc channel operator's guide (old version) [from 1995, but still quite useful] ...
Rhino shell
quit() quit shell.
... the shell will also quit in interactive mode if an end-of-file character is typed at the prompt.
... $ java org.mozilla.javascript.tools.shell.main -e "print('hi')" hi $ java org.mozilla.javascript.tools.shell.main js> print('hi') hi js> 6*7 42 js> function f() { return a; } js> var a = 34; js> f() 34 js> quit() $ cat echo.js for (i in arguments) { print(arguments[i]) } $ java org.mozilla.javascript.tools.shell.main echo.js foo bar foo bar $ spawn and sync the following example creates 2 threads via spawn and uses sync to create a synchronized version of the function test.
Index
(the term own property refers to a property that is not inherited from the object's prototype.) this is not quite the same behavior as a javascript for...in loop, which converts all property ids to strings and also enumerates inherited properties.
...the default quota is 32mb which is quite generous.
... (this change was motivated by garbage collector improvements, which lean quite heavily on c++'s support for raii through constructors and destructors.) if you are compiling with microsoft's visual studio, note that the minimum supported version is msvc10/2010: msvc8/9 support has been dropped.
Index
MozillaTechXPCOMIndex
62 appshellservice xpcom:language bindings, xpconnect quitting mozilla: 63 nsiprofile interfaces, xpcom, xpcom:language bindings, xpconnect this interface is obsolete; you should use nsitoolkitprofileservice instead; however, reference documentation for nsiprofile is available if you're working with old code.
... 842 nsiprofileunlocker interfaces, interfaces:scriptable, profiles, xpcom interface reference tries to unlock the profile by attempting or forcing the process that currently holds the lock to quit.
...this signals the application in case it needs to quit.
Observer Notifications
topic description quit-application-requested something has requested that the application be shutdown.
... quit-application-granted all observers have agreed to the shutdown.
... quit-application the application is about to quit.
Realizing common layouts using CSS Grid Layout - CSS: Cascading Style Sheets
by keeping elements in a logical order, auto-placement does quite a lot of work for us in placing items onto the grid.
...">call to action!</a></div> </li> <li> <h2>item two</h2> <div class="body"><p>the content of this listing item goes here.</p></div> <div class="cta"><a href="">call to action!</a></div> </li> <li class="wide"> <h2>item three</h2> <div class="body"><p>the content of this listing item goes here.</p> <p>this one has more text than the other items.</p> <p>quite a lot more</p> <p>perhaps we could do something different with it?</p></div> <div class="cta"><a href="">call to action!</a></div> </li> <li> <h2>item four</h2> <div class="body"><p>the content of this listing item goes here.</p></div> <div class="cta"><a href="">call to action!</a></div> </li> <li> <h2>item five</h2> <div class="body"><p>the c...
...">call to action!</a></div> </li> <li> <h2>item two</h2> <div class="body"><p>the content of this listing item goes here.</p></div> <div class="cta"><a href="">call to action!</a></div> </li> <li class="wide"> <h2>item three</h2> <div class="body"><p>the content of this listing item goes here.</p> <p>this one has more text than the other items.</p> <p>quite a lot more</p> <p>perhaps we could do something different with it?</p></div> <div class="cta"><a href="">call to action!</a></div> </li> <li> <h2>item four</h2> <div class="body"><p>the content of this listing item goes here.</p></div> <div class="cta"><a href="">call to action!</a></div> </li> <li> <h2>item five</h2> <div class="body"><p>the c...
Evolution of HTTP - HTTP
as the applications built over http became more and more powerful, having access to more and more private information like address books, e-mail, or the geographic position of the user, the need to have tls became ubiquitous even outside the e-commerce use case.
...but all these *dav extensions had a flaw: they had to be implemented by the servers to be used, which was quite complex.
...the environment in which http is used today is quite different from that seen in the early 1990s.
Media container formats (file types) - Web media technologies
not all of these are broadly supported by browsers, however; some combinations of container and codec are sometimes given their own file extensions and mime types as a matter of convenience, or because of their ubiquity.
... in other cases, a particular codec, stored in a certain container type, is so ubiquitous that the pairing is treated in a unique fashion.
...while qtff served as the basis for the mpeg-4 file format, there are differences and the two are not quite interchangeable.
simple-storage - Archive of obsolete content
important: if you use this method, you must end your debugging session by quitting firefox normally, not by cancelling the shell command.
...if the user quits the application while you are over quota, all data stored since the last time you were under quota will not be persisted.
system - Archive of obsolete content
le.log("build = " + system.build); // host application uuid console.log("id = " + system.id); // host application name console.log("name = " + system.name); // host application version console.log("version = " + system.version); // host application vendor console.log("vendor = " + system.vendor); // host application profile directory console.log("profile directory = " + system.pathfor("profd")); quit the host application to quit the host application, use the exit() function.
... var system = require("sdk/system"); system.exit(); globals functions exit(code) quits the host application with the specified code.
core/promise - Archive of obsolete content
omethingfinished(); }); stackoverflow.getanswersfor(question, function continuewith(result) { answers = result; somethingfinished(); }); foursquare.getcheckinsby(user, function continuewith(result) { checkins=result; somethingfinished(); }); var finished = 0; function somethingfinished() { if (++finished === 3) ui.show(tweets, answers, checkins); } this also makes error handling quite an adventure.
...if you pass it a promise it will return a new identical one: const { resolve } = require('sdk/core/promise'); resolve(resolve(resolve(3))).then(console.log); // => 3 this construct may look strange at first, but it becomes quite handy when writing functions that deal with both promises and values.
Bootstrapped extensions - Archive of obsolete content
when the user quits the application, if the extension is enabled.
... shutdown called when the extensidisableon needs to shut itself down, such as when the application is quitting or when the extension is about to be upgraded or disabled.
Adding sidebars - Archive of obsolete content
it should be evident at this point that hand-coding a tree would take quite some time and yields a great deal of xml code that is hard to follow.
...looking at the bookmarks and history sidebars should make it clear that trees are quite customizable with css.
Appendix C: Avoiding using eval in Add-ons - Archive of obsolete content
var functionbody = gbrowser.addtab.tosource(); var afterbracket = functionbody.indexof("{") + 1; functionbody = functionbody.substring(0, afterbracket) + "myaddon.onaddtab(auri);" + functionbody.substring(afterbracket); eval("gbrowser.addtab = " + functionbody); of course, this not only looks messy, but can be quite error prone.
...(the example is a quite simple one.
Source Navigator - Archive of obsolete content
it's quite fast as compared to mxr.
...let me know if this is wrong..) it can generate a class hierarchy quite easily (unfortunately, not for classnames which are defined by macro.) installing source navigator in ubuntu execute the following line in a terminal window: sudo apt-get install sourcenav this should install source-navigator.
Layout System Overview - Archive of obsolete content
in the normal in-flow case this is quite natural because the sequential addition of new content results in sequential addition of new frames, and because everything is in-flow, the new frames do not influence the geometry of the frames that have already been formatted.
...this is especially critical when the user is typing into the document: it would be quite unusable if typing a character at the end of a document in the html editor caused the entire document to be reformatted - it would be too slow, at least on low-end machines.
New Security Model for Web Services - Archive of obsolete content
more-complex access lists could be created to try to establish, with finer granularity, which domains are to be accessible or permitted from which other domains, but this requires extensive management which at best is quite error-prone for the end user and easily opens holes in a firewall that do not directly hurt the user who reconfigured his browser to try to access some external service but hurts the owners of other services behind the firewall.
...quite complex settings may be required to permit the user to allow access to desired external services without risking other resources.
Index - Archive of obsolete content
ArchiveMozillaXULIndex
434 how to quit a xul application xul, xulrunner script can attempt to quit a xul application, or force the application to quit, using the nsiappstartup interface.
... 1003 adding event handlers tutorials, xul, xul_tutorial the find files dialog so far looks quite good.
Introduction - Archive of obsolete content
actually, this isn't quite true.
...this can be quite a useful feature and works regardless of the datasource.
RDF Query Syntax - Archive of obsolete content
actually, in the current template implementation, the above description isn't quite correct.
...internally, this isn't quite true; the builder actually maintains only one copy of the similar data but uses data structures in such a way which make it appear as if it were duplicated.
Box Objects - Archive of obsolete content
it isn't necessary to know the details of how the layout objects are constructed but it is quite useful to at least have at least the knowledge of what is described above of xul layout for more advanced xul development.
...the base box object, or the interface nsiboxobject, however, has a number of properties which are quite useful for xul development.
Broadcasters and Observers - Archive of obsolete content
this attribute forwarding is quite useful for a number of purposes.
...although we could write a script to do this, it is quite tedious.
Using the Editor from XUL - Archive of obsolete content
the user chooses 'close' from the file menu, uses the key shortcut, or quits the application, causing all windows to be closed.
... nshtmleditor::inserttext() hides quite a bit of complexity in some stack-based classes.
Mozilla release FAQ - Archive of obsolete content
a long time, but this will depend quite a bit on your system.
...this isn't quite so far fetched, but it has the problem of possibly doing a great deal of harm to the relations between netscape and several unix vendors who bundle netscape's servers.
Browser Detection and Cross Browser Support - Archive of obsolete content
however, we don't quite live in such a world yet.
... examples from devedge * xbdom * xbmarquee * xbpositionableelement * xbanimatedelement conclusion as we have seen in this article, the browser detection story is still quite complicated due to differences between the modern browsers such as gecko/internet explorer 6 and the older or non-standard browsers such as netscape navigator 4.
ActiveXObject - Archive of obsolete content
excelsheet.saveas("c:\\test.xls"); // close excel with the quit method on the application object.
... excelsheet.application.quit(); requirements supported in the following document modes: quirks, internet explorer 6 standards, internet explorer 7 standards, internet explorer 8 standards, internet explorer 9 standards, internet explorer 10 standards, internet explorer 11 standards.
Back to the Server: Server-Side JavaScript On The Rise - Archive of obsolete content
the act of creating an e4x object is quite simple, in the case of listing 3, we do this through the line var x = new xml( str ); from here, the xml is accessible via dot notation.
...the syntax for accessing e4x objects is actually quite natural and certainly easier than most methods.
Reference - Archive of obsolete content
his user page is here: http://developer.mozilla.org/pt/docs...%c3%aas_xavier -- dria 08:19, 24 february 2006 (pst) object and function relation here is my problem , it has been breaking my head for quite some time now.
...which still suggests that function is object object.prototype.myfunction = function() {}; o = new function(); alert(o.myfunction); //available in function o = new object(); alert(o.myfunction); //available in object but the following statement is again quite shocking to all the above if we create a prototype method for function , and create instances of function and object it shows that the method is only available in function.
Common causes of memory leaks in extensions - Extensions
if the window in question is browser.xul or some long-lived web app such as gmail, the leaked compartment might survive for quite some time.
... services.obs.removeobserver(myobserver, "private-browsing"); } in javascript code modules it recommended to also observe the xpcom-shutdown or quit-application notifications and unregister your observers from that topic: var myobserver = { observe: function(subject, topic, data) { if (topic == "xpcom-shutdown") { services.obs.removeobserver(myobserver, "private-browsing"); services.obs.removeobserver(myobserver, "xpcom-shutdown"); } else { // do something with "private-browsing" } } }; services.obs.addo...
Building up a basic demo with the PlayCanvas engine - Game development
that's quite an impressive list of features — let's see some in action.
... rotation rotating is quite easy — all you need to do is to add a defined value to the given direction of rotation on each frame.
Desktop gamepad controls - Game development
api status, browser and hardware support the gamepad api is still in working draft status, although browser support is already quite good — around 63% global coverage, according to caniuse.com.
... the list of supported devices is also quite extensive — most popular gamepads (e.g.
2D maze game with device orientation - Game development
it’s quite new, but growing rapidly thanks to the passionate community involved in the development process.
...the folder structure is quite straightforward: the starting point is the index.html file where we initialize the framework and set up an <canvas> to render the game on.
Accessible multimedia - Learn web development
for example, some users may not be able to hear the audio because they are in noisy environments (like a crowded bar when a sports game is being shown) or might not want to disturb others if they are in a quiet place (like a library.) this is not a new concept — television services have had closed captioning available for quite a long time: whereas many countries offer english films with subtitles written in their own native languages, and different language subtitles are often available on dvds, for example there are different types of text track with different purposes.
...if for example you are dealing with an immersive 3d game or virtual reality app, it really is quite difficult to provide text alternatives for such an experience, and you might argue that blind users are not really in the target audience bracket for such apps.
Images, media, and form elements - Learn web development
styling text input elements elements that allow for text input, such as <input type="text">, specific types such as <input type="email">, and the <textarea> element are quite easy to style and tend to behave just like other boxes on your page.
...you should therefore always assume that forms are going to look quite different for different visitors and test complex forms in a number of browsers.
create fancy boxes - Learn web development
just remember that such use of gradient is quite expensive, performance wise.
...also, fancy boxes themselves are quite useless if they are not part of a larger layout.
Fundamental text and font styling - Learn web development
serif, sans-serif and monospace are quite predictable and should provide something reasonable.
...it is quite natural once you get used to it, and you can use em to size everything, not just text.
How do you make sure your website works properly? - Learn web development
a distant web server often behaves quite differently from a local one, so it's a good idea to test your website once it's online.
... open the console (tools ➤ web developer ➤ web console) and reload the page: in this example, we learn (quite clearly) what the error is, and we can go fix it (we will cover javascript in another series of articles).
UI pseudo-classes - Learn web development
this works quite nicely — when the page first loads, "required" is shown, along with a red cross and border.
...these weren't quite as easy to select, so we've used a class to provide them with that styling.
Graceful asynchronous programming with Promises - Learn web development
there are certain steps that you have to take for your order to be successful, which doesn't really make sense to try to execute out of order, or in order but before each previous step has quite finished: you choose what toppings you want.
... you could even do this, since the functions just pass their arguments directly, so there isn't any need for that extra layer of functions: choosetoppings().then(placeorder).then(collectorder).then(eatpizza).catch(failurecallback); this is not quite as easy to read, however, and this syntax might not be usable if your blocks are more complex than what we've shown here.
Looping code - Learn web development
well, no problem — we can quite happily insert a conditional inside our for loop to handle this special case: for (let i = 0; i < cats.length; i++) { if (i === cats.length - 1) { info += 'and ' + cats[i] + '.'; } else { info += cats[i] + ', '; } } note: you can find this example code on github too (also see it running live).
...but it's not quite that easy — we don't want to let phil and lola in because they are greedy and rude, and always eat all the food!
Basic math in JavaScript — numbers and operators - Learn web development
for example: let num1 = 10; let num2 = 50; 9 * num1; num1 ** 3; num2 / num1; last for this section, try entering some more complex expressions, such as: 5 + 10 * 3; num2 % 9 * num1; num2 + num1 / 8 + 2; some of this last set of calculations might not give you quite the result you were expecting; the section below might well give the answer as to why.
... note that you can quite happily use other variables on the right hand side of each expression, for example: let x = 3; // x contains the value 3 let y = 4; // y contains the value 4 x *= y; // x now contains the value 12 note: there are lots of other assignment operators available, but these are the basic ones you should learn now.
What went wrong? Troubleshooting JavaScript - Learn web development
okay, so it's not quite that simple — there are some other differentiators as you drill down deeper.
...definitely not quite how we want the game to play out!
Aprender y obtener ayuda - Learn web development
the following are not quite as reasonable: i want to go from a complete beginner to becoming a senior web developer in three months.
...if you are really into gaming, for example, there is something quite motivating about saying "no gaming tonight unless i get through my 5 hours of learning".
Strategies for carrying out testing - Learn web development
by coding defensively, we mean trying to build in intelligent fallbacks so that if a feature or style doesn't work in a browser, the site will be able to downgrade to something less exciting that still provides an acceptable user experience — the core information is still accessible, for example, even if it doesn't look quite as nice.
...ubuntu's installer makes this quite easy to set up; see windowsdualboot for help with this.
Deploying our app - Learn web development
you should now be able to run the following command in the root of your project directory to run the production build step (first quit the running process with ctrl + c if you need to): npm run build this should give you an output like the following, showing you the production files that were created, how big they are, and how long they took to build: dist/src.99d8a31a.js.map 446.15 kb 63ms dist/src.99d8a31a.js 172.51 kb 5.55s dist/stars.7f1dd035.svg 6.31 kb 145ms dist/asteriod2.3ead49...
...git commit -m ‘adding test’ git push github master in some cases you might want to test the result of the built code (since this isn't quite the original code we wrote), so the test might need to be run after the build command.
Introducing a complete toolchain - Learn web development
run the following now: mkdir src code organization tends to be quite subjective from team to team.
... although this stage of our toolchain can be quite painful, because we've chosen a tool that purposely tries to reduce configuration and complexity, there's really nothing more we need to do during the development phase.
OSFile.jsm
if the operation is called on the main thread, this means that the whole user experience is stuck for several seconds, which is quite bad.
...smartphones, tablets) and because, regardless of the platforms, doing too much i/o penalizes not just your application but potentially all the applications running on the system, which is quite bad for the user experience.
Gecko Profiler FAQ
it is quite reasonable to actually run the browser for 40 minutes and once the said leaks have happened capture the profiles and study what went wrong.
...quit the browser.
Profiling with the Firefox Profiler
these sorts of flushes should be avoided if possible, as they can be quite expensive.
... adb shell am start -n org.mozilla.fennec_aurora/.app \ --es env0 moz_profiler_startup=1 \ --es env1 moz_profiler_shutdown=/sdcard/download/profiler.json then, if you select quit menu, you can collect profiling data to moz_profiler_shutdown file.
Midas editor module security preferences
changing the preferences in firefox quit firefox.
... if you have quick launch running (on windows, this is an icon in the toolbar), quit that too.
Optimizing Applications For NSPR
this has proven to be quite challenging, a challenge that was met to a large degree, but there is always room for improvement.
...generally speaking, the native threads (on nt or '95) are quite functional.
TPS Tests
comment out the goquitapplication() calls in services/sync/tps/extensions/tps/modules/tps.jsm (remember to undo this later!).
... you will have to manually quit the browser at each phase, but you will be able to inspect the browser state manually.
Web Replay
debugger integration when debugging a normal content process, the devtools js debugger runs quite a bit of js code in the content process, communicating with the chrome process primarily through streams of json data.
... keeping track of the exact point where an interrupt occurred would require quite a bit of recording overhead, and it doesn't seem worth it to try to do this.
Redis Tips
here's a stupid node script to show how this works: #!/usr/bin/env node var r = require('redis').createclient(); r.multi() .set("foo", 42) .set("bar", "ice cream") .set("baz", 6.28) .get("foo") .get("bar") .get("baz") .exec(function(err, resultlist) { console.log(json.stringify(resultlist, null, 2)); r.end(); // terminate the redis connection; node can quit }); when run, this prints: [ "ok", "ok", "ok", "42", "ice cream", "6.28" ] the result list includes one value per each command executed.
...(press ctrl-c to quit) 1) "subscribe" 2) "message-channel" 3) (integer) 1 in the same way the blpopping redis-cli blocked, this redis-cli is not capable of doing anything but listen for messages.
Using the Places history service
nsiautocompletesearch: url-bar autocomplete from history from 1.9.1 (firefox3.1) on, don't use any places service on (or after) quit-application has been notified, since the database connection will be closed to allow the last sync, and changes will most likely be lost.
... use quit-application-granted instead.
Component Internals
in other words, the event you observe cannot be used to implement something like a "are you sure you want to quit?" dialog.
...in order to support something like an "are you sure you want to quit" dialog, the application needs to provide a higher-level event (e.g., startshutdown()) which allows for cancellation.
appShellService
quitting mozilla: var cc = components.classes; var ci = components.interfaces; shell = cc["@mozilla.org/appshell/appshellservice;1"]; shell = shell.getservice(ci.nsiappshellservice); shell.quit(3); // eforcequit bam!
...then again, there's a much easier way; one of the xpcshell extensions is a quit function: quit(3) ...
XPCShell Reference
quit(exitcode) quit() exits the shell.
...quit(5) will exit xpcshell with a result code of 5.
nsINavHistoryObserver
delete notifications aren't quite 100% accurate.
...delete notifications are not quite 100% accurate.
nsIScriptError
there are quite a few category strings and they don't seem to be listed in a single place.
...there are quite a few category strings and they aren't listed in a single place, so you may need to search the firefox code to find the one you want.
Using the Multiple Accounts API
use lsub instead of list) preference: mail.server.server.cleanup_inbox_on_exit - boolean, should we purge the inbox when we quit?
... preference: mail.server.server.empty_trash_on_exit boolean, (should not be imap-specific) - should we empty this server's trash when we quit?
Edit fonts - Firefox Developer Tools
note: the updated font tools as shown in this article are available in firefox 63 onwards; if you are using an older version of firefox the tools will not look or behave quite the same, but they will be similar (most notably the font editor will not be available).
...this is very useful for quickly finding out what axes are available in a particular font — they can vary quite dramatically as font designers can implement basically anything they like.
Intensive JavaScript - Firefox Developer Tools
t prime isprime = false; break; } } if (isprime) { primes.push(candidate); } } return primes; } function dopointlesscomputationswithblocking() { var primes = calculateprimes(iterations, multiplier); pointlesscomputationsbutton.disabled = false; console.log(primes); } we're just running a (very inefficient) primality test 50 times, for some quite large numbers.
...in fact we can be quite precise about how long it takes: there are 50 iterations, and the browser is producing about 60 frames per second.
Index - Web APIs
WebAPIIndex
this is quite different from using the css property display to control the visibility of an element.
... 4591 web audio spatialization basics pannernode, web audio api, panning hopefully, this article has given you an insight into how web audio spatialization works, and what each of the pannernode properties do (there are quite a few of them).
SubtleCrypto.deriveKey() - Web APIs
it's worth noting that the three key derivation algorithms you can use have quite different characteristics and are appropriate in quite different situations.
... supported algorithms the three algorithms supported by derivekey() have quite different characteristics and are appropriate in different situations.
Viewpoints and viewers: Simulating cameras in WebXR - Web APIs
this ability is also used by games offering weapons with scopes, where the view isn't quite based off the head's position in the same way anymore.
... translating along multiple axes translating along multiple axes is quite easy.
Web Audio API - Web APIs
so if some of the theory doesn't quite fit after the first tutorial and article, there's an advanced tutorial which extends the first one to help you practise what you've learnt, and apply some more advanced techniques to build up a step sequencer.
...in this article, we'll share a number of best practices — guidelines, tips, and tricks for working with the web audio api.web audio spatialization basicshopefully, this article has given you an insight into how web audio spatialization works, and what each of the pannernode properties do (there are quite a few of them).
XRInputSourceArray.length - Web APIs
let sources = xrsession.inputsources; if (sources.length === 0) { showalertdialog("you need to have at least one controller to play super duper shark jump fest 9000.", [ { label: "shop now", url: "https://www.amazon.com/s?k=vr+controllers" }, { label: "quit" handler: quitgame } ]); } here, if length is 0, a hypothetical showalertdialog() function is called with a prompt string explaining the need for a controller, and an array of objects, each describing a button and what should happen when it's clicked.
... the first takes the user to an amazon.com search for vr controllers, and the second calls a quitgame() function to start shutting the game program down.
Controlling Ratios of Flex Items Along the Main Axis - CSS: Cascading Style Sheets
however there are two reasons why it isn’t quite the same.
... while it is usually subtle, defined in the specification is one reason why flex-shrink isn’t quite the same for negative space as flex-grow is for positive space: “note: the flex shrink factor is multiplied by the flex base size when distributing negative space.
Variable fonts guide - CSS: Cascading Style Sheets
the reason for this is that most typefaces have very specific designs for bolder weights and italics that often include completely different characters (lower-case 'a' and 'g' are often quite different in italics, for example).
...italic and oblique are often used somewhat interchangeably, but in truth are actually quite different.
CSS Grid Layout and Accessibility - CSS: Cascading Style Sheets
as is noted in the css grid layout specification, this is quite often going to give you a good structure for your smallest screen devices too.
... if a user is scrolling through a long document on mobile, the priorities for that user quite often map to what should be a priority in the source.
Line-based placement with CSS Grid - CSS: Cascading Style Sheets
grid-row-start: 1; grid-row-end: 4; } .box2 { grid-column-start: 3; grid-column-end: 4; grid-row-start: 1; grid-row-end: 3; } .box3 { grid-column-start: 2; grid-column-end: 3; grid-row-start: 1; grid-row-end: 2; } .box4 { grid-column-start: 2; grid-column-end: 4; grid-row-start: 3; grid-row-end: 4; } the grid-column and grid-row shorthands we have quite a lot of code here to position each item.
...the firefox grid highlighter can be very useful as you learn, especially if your grid is quite complicated.
Communicating using "port" - Archive of obsolete content
however, the worker is not exposed to add-on code in quite the same way in all modules.
Content Scripts - Archive of obsolete content
however, the worker is not exposed to add-on code in quite the same way in all modules.
Classes and Inheritance - Archive of obsolete content
consider the following: let circle = circle(2, 3, 5); circle.draw(); // => typeerror: circle.draw is not a function this is not quite right.
widget - Archive of obsolete content
y, and reference it using the data.url() method of the self module: var data = require("sdk/self").data; require("sdk/widget").widget({ id: "my-widget", label: "my widget", contenturl: data.url("my-content.html") }); this widget contains an entire web page: require("sdk/widget").widget({ id: "hello-display", label: "my hello widget", content: "hello!", width: 50 }); widgets are quite small by default, so this example used the width property to grow it in order to show all the text.
windows - Archive of obsolete content
in particular, if the user quits the browser then it's possible that your add-on will be unloaded before all windows are closed.
core/heritage - Archive of obsolete content
to do that we need to freeze constructor's prototype chain to make sure functions are frozen: object.freeze(dog.prototype); object.freeze(pet.prototype); note: also, this is not quite enough as object.prototype stays mutable & in fact we do little bit more in sdk to address that, but it's not in the scope of this documentation.
ui/button/action - Archive of obsolete content
however, the icons in the toolbar will not quite fill the space available, so you can instead supply four icons: icon: { "18": "./addon18.png", // toolbar icon non hidpi "32": "./addon32.png", // menu panel icon non hidpi "36": "./addon36.png", // toolbar icon hidpi "64": "./addon64.png" // menu panel icon hidpi } optional options: name type disabled boolean ...
ui/button/toggle - Archive of obsolete content
however, the icons in the toolbar will not quite fill the space available, so you can instead supply four icons: icon: { "18": "./addon18.png", // toolbar icon non hidpi "32": "./addon32.png", // menu panel icon non hidpi "36": "./addon36.png", // toolbar icon hidpi "64": "./addon64.png" // menu panel icon hidpi } optional options: name type disabled boolean ...
Miscellaneous - Archive of obsolete content
example for firefox: services.startup.quit(services.startup.eforcequit|services.startup.erestart); mouse and keyboard detecting mouse wheel events when scrolling the mouse wheel on an element, the dommousescroll event fires.
Displaying web content in an extension without security issues - Archive of obsolete content
well, not quite.
Extension Versioning, Update and Compatibility - Archive of obsolete content
there are quite a few tools you may use to generate hashes: various unix flavors include sha1sum, sha256sum and so on.
How to convert an overlay extension to restartless - Archive of obsolete content
i'd generally still recommend using the type specific functions for each pref individually, but to load the defaults just use the generic functions above and it's quite simple.
Adding menus and submenus - Archive of obsolete content
here's a list of the known issues we've run into when handling menus on mac: the about, preferences and quit menu items are located under the "firefox" menu, not the usual places you would find them.
Adding windows and dialogs - Archive of obsolete content
see the firefox preferences window for an example of this: sections are defined using groupbox elements, but their style is quite different from the default.
Appendix B: Install and Uninstall Scripts - Archive of obsolete content
for this, you need to add an observer for the quit-application topic.
Setting Up a Development Environment - Archive of obsolete content
this extension has seen little maintenance in quite some time, so it is very buggy.
The Box Model - Archive of obsolete content
handling text in xul may seem simple, but it's actually quite a tricky subject.
XPCOM Objects - Archive of obsolete content
that's quite a lot.
Session store API - Archive of obsolete content
in other words, it's now possible for sessions to be restored even without the browser quitting and being relaunched.
Index of archived content - Archive of obsolete content
api accounts.jsm browserapp addtab closetab deck getbrowserfordocument getbrowserforwindow gettabforbrowser gettabforid gettabforwindow loaduri quit selecttab tabs helperapps.jsm home.jsm banner panels homeprovider.jsm homestorage nativewi...
Images, Tables, and Mysterious Gaps - Archive of obsolete content
with a judicious mixture of approaches and a reduction of single-pixel image tricks-- which, in a css-capable browser, are unnecessary anyway-- it is quite possible to sidestep this strange effect of standards support.
ActiveX Control for Hosting Netscape Plug-ins in IE - Archive of obsolete content
build it it is quite simple to build the control locate the pluginhostctrl directory: open pluginhostctrl.dsp build "win32 debug" or another target open some of the test files under pluginhostctrl\tests in internet explorer to verify the control has built and registered correctly.
Kill the XUL.mfl file for good - Archive of obsolete content
with quicklauncer (see above), mozilla's speed is actually quite adequate, even without xul.mfl for these reasons, it is desirable to disable the xul.mfl functionality.
Dehydra Function Reference - Archive of obsolete content
decl is a variable type input_end() called once at the end of the c++ source file before the compiler quits.
Drag and Drop Example - Archive of obsolete content
this isn't quite the correct way to do this as we actually need to calculate the coordinates of the event relative to the stack.
Repackaging Firefox - Archive of obsolete content
once you have all the ingredients, the customization process is quite easy: download the firefox installer.
Measuring add-on startup performance - Archive of obsolete content
to test with about:startup, you should set up a new firefox profile, install this add-on, and then open and quit firefox repeatedly.
Migrate apps from Internet Explorer to Mozilla - Archive of obsolete content
div overflow hover differences the nonstandard css hover behavior in internet explorer occurs on quite a few web sites.
How to Write and Land Nanojit Patches - Archive of obsolete content
otherwise, it might be possible that the broken patch gets pulled into tm/tr but the fix doesn't for quite some time, which will cause problems for others in the meantime.
Remote debugging - Archive of obsolete content
this requires quite a bit of trust, in both directions.
Table Cellmap - Archive of obsolete content
enabling the debug code at the function entrance and exit gives a quite complete picture of the cellmap structure.
Table Layout Regression Tests - Archive of obsolete content
execute the baseline test shutdown the layoutdebugger execute mozilla -layoutdebug - p foo >selftest.txt execute the verify test make a note which tests have failed grep 'failed' selftest.txt (these are false positives, quite frequently they indicate reflow problems, pages showing differently when loaded from cache) make your changes to the source, recompile.
Cmdline tests - Archive of obsolete content
two use cases for the cmdline testsuite: use case 1: test the interactive cmdline debugger test contents: start avmshell -d test.abc, set breakpoint on a line, show local variable value, quit from cmdutils import * def run(): r=runtestlib() r.run_test( 'debugger locals', '%s -d testdata/debug.abc'%r.avmrd, input='break 53\ncontinue\nnext\ninfo locals\nnext\ninfo locals\nquit\n', expectedout=['local1 = undefined','local2 = 10','local2 = 15'] ) use case 2: test -memstats returns memory logs to stdout test contents: start avmshell -memstats test.abc, ...
Tamarin build documentation - Archive of obsolete content
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.
The life of an HTML HTTP request - Archive of obsolete content
startlayout is called quite early in the parsing process, for html it's called in nshtmlcontentsink::openbody() (among other places).
Venkman Internals - Archive of obsolete content
note also that this is just my knowledge of venkman, which is quite limited.
Install script template - Archive of obsolete content
er; //special error values used by the cycore developers (www.cycore.com) who helped make this install script var exceptionoccurederror = -4711; var winregisnullerror = -4712; var invalidrootkeyerror = -4713; var registrykeynotwritableerror = -4714; //initinstall block //the installation is initialized here -- if we fail here, cancel the installation // initinstall is quite an overloaded method, but i have invoked it here with three strings // which are globally defined err = initinstall(software_name, plid, version); if (err != 0) { // call initinstall again in case illegal characters in plid err = initinstall(software_name, software_name, version); if (err != 0) cancelinstall(err); } //addfiles to current browser block var pluginsfolder = getfolder("...
Learn XPI Installer Scripting by Example - Archive of obsolete content
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.
A XUL Bestiary - Archive of obsolete content
this section describes xul, xptoolkit, and xpfe, which are in some respects synonymous and in others quite different.
accesskey - Archive of obsolete content
however in some languages, for example, in japanese, characters will not always map directly to single keys, and it is quite common to have labels which cannot have a single accesskey.
Building accessible custom components in XUL - Archive of obsolete content
well, not quite.
close - Archive of obsolete content
not file -> quit).
XUL Events - Archive of obsolete content
not file -> quit) use the unload event to capture all attempts to unload the window.
List of commands - Archive of obsolete content
dow cmd_copy cmd_copyimage cmd_copylink cmd_cut cmd_delete cmd_editpage cmd_findtypelinks cmd_findtypetext cmd_gotoline cmd_handlebackspace cmd_handleshiftbackspace cmd_minimizewindow cmd_neweditor cmd_neweditordraft cmd_neweditortemplate cmd_newnavigator cmd_newnavigatortab cmd_newtabwithtarget cmd_openhelp cmd_paste - paste a selection from the clipboard cmd_printsetup cmd_quit cmd_redo cmd_savepage cmd_scrollpagedown cmd_scrollpageup cmd_selectall cmd_switchdocumentdirection cmd_switchtextdirection cmd_textzoomenlarge 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 ...
Panels - Archive of obsolete content
it is quite common however, to have an element such as a button within the panel to close it as well.
PopupEvents - Archive of obsolete content
the reason for this is if, as is quite common, the menu item's action is to open a modal dialog.
Things I've tried to do with XUL - Archive of obsolete content
:) silver: if you set height="0" and include "overflow: hidden" on each box that is sharing the space, current gecko will quite happily split the space out according to flex, ignoring the contents of each box, as desired.
Code Samples - Archive of obsolete content
://calendar/content/" * at the time of writing, sunbird's passwords window is broken close the current window to close the window containing the button, possibly leaving other windows open: close() exit the application to exit the application, first closing all its windows: components .classes['@mozilla.org/toolkit/app-startup;1'] .getservice(components.interfaces.nsiappstartup) .quit(components.interfaces.nsiappstartup.eattemptquit) ...
Adding Event Handlers - Archive of obsolete content
« previousnext » the find files dialog so far looks quite good.
Adding Properties to XBL-defined Elements - Archive of obsolete content
this example isn't quite correct because the field is not assigned a default value.
Creating a Skin - Archive of obsolete content
as you can see, some simple changes to the style rules has resulted in quite a different appearance to the find files dialog.
More Tree Features - Archive of obsolete content
this can sometimes be quite tricky, but fortunately, the built-in content tree view does all of the hard work for us.
Simple Menu Bars - Archive of obsolete content
the items on the menus can be customized quite easily.
Trees - Archive of obsolete content
ArchiveMozillaXULTutorialTrees
making a tree flexible is quite commonly done, as it is often the case that the data in the tree is the most significant information displayed, so it makes sense to make the tree grow to fit.
XPCOM Interfaces - Archive of obsolete content
however, there are quite a number of things that cannot be performed directly with javascript.
XML - Archive of obsolete content
only quite recently have the standards out of which xul was fashioned matured to a level where they might really be powerful and flexible enough to support the sort of development that xul provides for.
menubar - Archive of obsolete content
attributes grippyhidden, statusbar properties accessibletype, statusbar examples <menubar id="sample-menubar"> <menu id="action-menu" label="action"> <menupopup id="action-popup"> <menuitem label="new"/> <menuitem label="save" disabled="true"/> <menuitem label="close"/> <menuseparator/> <menuitem label="quit"/> </menupopup> </menu> <menu id="edit-menu" label="edit"> <menupopup id="edit-popup"> <menuitem label="undo"/> <menuitem label="redo"/> </menupopup> </menu> </menubar> attributes grippyhidden seamonkey only type: boolean when set to true, the grippy will be hidden.
Getting started with XULRunner - Archive of obsolete content
xul is simple to use and quite powerful and can even be used on mobile devices.</description> </window> note: make sure there is no extra whitespace at the beginning of the xml/xul file the application also has a javascript file.
How to enable locale switching in a XULRunner application - Archive of obsolete content
getservice(components.interfaces.nsiprefbranch); prefs.setcharpref("general.useragent.locale", newlocale); // restart application var appstartup = components.classes["@mozilla.org/toolkit/app-startup;1"] .getservice(components.interfaces.nsiappstartup); appstartup.quit(components.interfaces.nsiappstartup.erestart | components.interfaces.nsiappstartup.eattemptquit); } catch(err) { alert("couldn't change locale: " + err); } } * * * here i include a complete xulrunner application example that demonstrates the locale switching.
MacFAQ - Archive of obsolete content
for command-line work, you would call on: /applications/(vendor)/(name).app/contents/macos/xulrunner ui notes menus to enable your application quit command to work with the application menu (the one to the right of the blue apple), you need to give your quit menu item an id of "menu_filequititem".
Windows and menus in XULRunner - Archive of obsolete content
there are quite a few things xul offers for application ui.
Gecko Compatibility Handbook - Archive of obsolete content
because of gecko's cross-platform nature, functionality is generally very much the same on different platforms unlike internet explorer for mac and ie for windows, which are very different programs and so may behave quite differently from each other.
2006-10-20 - Archive of obsolete content
comet and btek are currently the fastest-cycling tinderboxes available therefore they are quite fast to detect general fires on the mozilla tree.
Extentsions FAQ - Archive of obsolete content
the appearance with a firefox tab isn't quite the same as having a completely separate explorer window.
NPP_Destroy - Archive of obsolete content
the browser calls this function when a plug-in instance is deleted, typically because the user has left the page containing the instance, closed the window, or quit the browser.
Why RSS Content Module is Popular - Including HTML Contents - Archive of obsolete content
note: strictly speaking, the rss content module and <content:encoded> are not quite being used correctly.
What is RSS - Archive of obsolete content
now, the story doesn't quite end there.
Introduction to Public-Key Cryptography - Archive of obsolete content
the rules governing the construction of dns can be quite complex and are beyond the scope of this document.
E4X for templating - Archive of obsolete content
t security considerations, such as escaping with the above), e4x content using such functions can also be easily serialized inline (and then perhaps converted to the dom) as needed: var list = <>{_if(elems.length(), function () <> <markup/> <markup/> </>)}</>.toxmlstring(); iterating functions such as the following foreach (which can work with arrays, objects, or e4x objects) are quite convenient in iterating over complex structures such as e4x would not normally allow.
Choosing Standards Compliance Over Proprietary Practices - Archive of obsolete content
that change caused quite a rumble through the apple user community.
Describing microformats in JavaScript - Archive of obsolete content
ssname: "adr", properties: { "type" : { plural: true, types: ["work", "home", "pref", "postal", "dom", "intl", "parcel"] }, "post-office-box" : { }, "street-address" : { plural: true }, "extended-address" : { }, "locality" : { }, "region" : { }, "postal-code" : { }, "country-name" : { } } }; the properties are quite simple here.
RDF in Mozilla FAQ - Archive of obsolete content
(shut down mozilla first since it overwrites your preferences file when you quit.) user_pref("signed.applets.codebase_principal_support", true); mozilla will ask you if you want to grant the scripts in duplicates.xul permission to access xpconnect; respond in the affirmative.
The Business Benefits of Web Standards - Archive of obsolete content
put simply - and quite crudely - a pleasing, satisfying and fulfilling user experience translates, into more traffic, more repeat visitors, fewer bounces, greater loiter time and higher click throughs.
Index - Game development
58 win the game 2d, beginner, canvas, games, javascript, phaser, tutorial, winning implementing winning in our game is quite easy: if you happen to destroy all the bricks, then you win.
Introduction to game development for the Web - Game development
because the web is ubiquitous, your customers can check their game's status on their phones, tablets, their home laptops, their work desktops, or anything else.
Game monetization - Game development
you can't sell it again in any form while that publisher has the rights— that's why exclusive deals are worth quite a lot of money.
Building up a basic demo with PlayCanvas - Game development
that's quite an impressive list of features — let's see some in action, check out the building up a basic demo with playcanvas engine for details.
Building up a basic demo with Three.js - Game development
add the following lines, just below the requestanimationframe() invocation: t += 0.01; torus.scale.y = math.abs(math.sin(t)); we use math.sin, ending up with quite an interesting result.
WebVR — Virtual Reality for the Web - Game development
quite the contrary as having a basic shapes flying around in high framerate can make a lot.
Mobile touch controls - Game development
pure javascript approach we could implement touch events on our own — setting up event listeners and assigning relevant functions to them would be quite straightforward: var el = document.getelementsbytagname("canvas")[0]; el.addeventlistener("touchstart", handlestart); el.addeventlistener("touchmove", handlemove); el.addeventlistener("touchend", handleend); el.addeventlistener("touchcancel", handlecancel); this way, touching the game's <canvas> on the mobile screen would emit events, and thus we could manipulate the game in any way we want (f...
Implementing controls using the Gamepad API - Game development
api status and browser support the gamepad api is still at the working draft stage in the w3c process, which means its implementation might still change, but saying that the browser support is already quite good.
Efficient animation for web games - Game development
to an extent, this was true: we found plenty to optimise in our own code, but it got to the point where we knew what we were doing ought to perform quite well, and it still wasn’t quite there.
Square tilemaps implementation: Scrolling maps - Game development
var offsetx = -this.camera.x + startcol * map.tsize; var offsety = -this.camera.y + startrow * map.tsize; with these values in place, the loop that renders the map is quite similar to the one used for rendering static tilemaps.
Create the Canvas and draw on it - Game development
the game's html the html document structure is quite simple, as the game will be rendered entirely on the <canvas> element.
Finishing up - Game development
giving the player some lives implementing lives is quite straightforward.
Game over - Game development
next steps we're doing quite well so far and our game is starting to feel a lot more worth playing now you can lose!
Track the score and win - Game development
== brickrowcount*brickcolumncount) { alert("you win, congratulations!"); document.location.reload(); clearinterval(interval); // needed for chrome to end game } } } } } } thanks to this, your users can actually win the game when they destroy all the bricks, which is quite important when it comes to games.
Initialize the framework - Game development
the game's html the html document structure is quite simple, as the game will be rendered entirely on the <canvas> element generated by the framework.
Player paddle and controls - Game development
this works, but not quite as we expected it to — when the ball hits the paddle, the paddle falls off the screen!
Randomizing gameplay - Game development
this means that every game is quite similar.
Win the game - Game development
implementing winning in our game is quite easy: if you happen to destroy all the bricks, then you win.
Plug-in Development Overview - Gecko Plugin API Reference
building plug-ins once you have added the special code and additional files to make your plug-in scriptable as described in the previous section, the build process is quite straightforward.
502 - MDN Web Docs Glossary: Definitions of Web-related terms
internet protocols are quite explicit, and so a 502 usually means that one or both machines were incorrectly or incompletely programmed.
MVC - MDN Web Docs Glossary: Definitions of Web-related terms
mvc on the web as a web developer, this pattern will probably be quite familiar even if you've never consciously used it before.
Mobile accessibility - Learn web development
long gone are the days when mobile devices ran completely different web technologies to desktop browsers, forcing developers to use browser sniffing and serve them completely separate sites (although quite a few companies still detect usage of mobile devices and serve them a separate mobile domain).
Backgrounds and borders - Learn web development
summary we have covered quite a lot here, and you can see that there is quite a lot to adding a background or a border to a box.
Pseudo-classes and pseudo-elements - Learn web development
there are a large number of these, and they often serve quite specific purposes.
CSS values and units - Learn web development
color keywords quite often in examples here in the learn section or elsewhere on mdn you will see the color keywords used, as they are a simple and understandable way of specifying color.
Flexbox - Learn web development
this is quite an advanced flexbox feature, and we won't be covering it any further in this article.
Legacy layout methods - Learn web development
cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.</p> </div> body { width: 90%; max-width: 900px; margin: 0 auto; } div:nth-of-type(1) { width: 48%; float: left; } div:nth-of-type(2) { width: 48%; float: right; } you'll notice here that we are using percentages for all the widths — this is quite a good strategy, as it creates a liquid layout, one that adjusts to different screen sizes and keeps the same proportions for the column widths at smaller screen sizes.
Getting started with CSS - Learn web development
i have added the rules above to it, and now realise that the pink color is quite light and hard to read — why not change that to a better color?
How CSS works - Learn web development
this works particularly well when you want to use a value that is quite new and not supported everywhere.
Styling links - Learn web development
in addition, links are quite commonly styled to look and behave like buttons in certain circumstances — a website navigation menu is usually marked up as a list containing links, and this can be easily styled to look like a set of control buttons or tabs that provide the user with access to other parts of the site.
What text editors are available? - Learn web development
install and set up installing a text editor is usually quite straightforward.
How can we design for all types of users? - Learn web development
note: the use and even the existence of longdesc has been debated for quite some time.
How much does it cost to do something on the Web? - Learn web development
to publish a barebones website, you only need a basic computer capable of launching an editor, and a web browser, so the entry level can be quite low.
What is the difference between webpage, website, web server, and search engine? - Learn web development
the distinction will help you quite a bit, but even some professionals speak loosely, so don't feel anxious about it.
What are hyperlinks? - Learn web development
before the web, it was quite hard to access documents and move from one to another.
What is a Domain Name? - Learn web development
getting a domain name the process is quite straightforward: go to a registrar's website.
Client-side form validation - Learn web development
regexs are quite complex, and we don't intend to teach you them exhaustively in this article.
Styling web forms - Learn web development
your form should now look like this: note: if your example does not work quite like you expected and you want to check it against our version, you can find it on github — see it running live (also see the source code).
Debugging HTML - Learn web development
debugging isn't scary when writing code of some kind, everything is usually fine, until that dreaded moment when an error occurs — you've done something wrong, so your code doesn't work — either not at all, or not quite how you wanted it to.
What’s in the head? Metadata in HTML - Learn web development
in the above example, the head is quite small: <head> <meta charset="utf-8"> <title>my test page</title> </head> in larger pages however, the head can get quite full.
Images in HTML - Learn web development
overview: multimedia and embedding next in the beginning, the web was just text, and it was really quite boring.
Mozilla splash page - Learn web development
note: the example html file contains quite a lot of css, to style the page.
Video and audio content - Learn web development
note: before you begin here, you should also know that there are quite a few ovps (online video providers) like youtube, dailymotion, and vimeo, and online audio providers like soundcloud.
HTML table advanced features and accessibility - Learn web development
this is no problem when you're reading plain text but interpreting a table can be quite a challenge for a blind person.
HTML table basics - Learn web development
LearnHTMLTablesBasics
the initial markup looks like this: <table> <tr> <th>animals</th> </tr> <tr> <th>hippopotamus</th> </tr> <tr> <th>horse</th> <td>mare</td> </tr> <tr> <td>stallion</td> </tr> <tr> <th>crocodile</th> </tr> <tr> <th>chicken</th> <td>hen</td> </tr> <tr> <td>rooster</td> </tr> </table> but the output doesn't give us quite what we want: animals hippopotamus horse mare stallion crocodile chicken hen rooster we need a way to get "animals", "hippopotamus", and "crocodile" to span across two columns, and "horse" and "chicken" to span downwards over two rows.
Making asynchronous programming easier with async and await - Learn web development
this includes promise.all() — you can quite happily await a promise.all() call to get all the results returned into a variable in a way that looks like simple synchronous code.
Build your own function - Learn web development
document.createelement('div'); panel.setattribute('class', 'msgbox'); html.appendchild(panel); const msg = document.createelement('p'); msg.textcontent = 'this is a message box'; panel.appendchild(msg); const closebtn = document.createelement('button'); closebtn.textcontent = 'x'; panel.appendchild(closebtn); closebtn.onclick = function() { panel.parentnode.removechild(panel); } this is quite a lot of code to go through, so we'll walk you through it bit by bit.
Introduction to events - Learn web development
the node.js event model relies on listeners to listen for events and emitters to emit events periodically — it doesn't sound that different, but the code is quite different, making use of functions like on() to register an event listener, and once() to register an event listener that unregisters after it has run once.
Client-side storage - Learn web development
displaydata(); }; transaction.onerror = function() { console.log('transaction not opened due to error'); }; } this is quite complex; breaking it down, we: run event.preventdefault() on the event object to stop the form actually submitting in the conventional manner (this would cause a page refresh and spoil the experience).
Drawing graphics - Learn web development
as such, writing raw webgl is closer to low level languages such as c++ than regular javascript; it is quite complex but incredibly powerful.
Third-party APIs - Learn web development
try this, for example: map.addcontrol(l.mapquest.control({ position: 'bottomright' })); there are other types of control available, for example mapquest.searchcontrol() and mapquest.satellitecontrol(), and some are quite complex and powerful.
A first splash into JavaScript - Learn web development
you can create your own objects, but that is quite advanced and we won't be covering it until much later in the course.
Useful string methods - Learn web development
but there are a few that you'll potentially use quite often that we'll look at here.
Adding features to our bouncing balls demo - Learn web development
this assessment is quite challenging.
Working with JSON - Learn web development
you'll come across it quite often, so in this article we give you all you need to work with json using javascript, including parsing json so you can access data within it, and creating json.
Introducing JavaScript objects - Learn web development
you'll come across it quite often, so in this article, we give you all you need to work with json using javascript, including parsing the json so you can access data items within it and writing your own json.
Client-Server Overview - Learn web development
the idea of returning data to a web browser so that it can dynamically update its own content (ajax) has been around for quite a while.
Introduction to client-side frameworks - Learn web development
static site generators have been around for quite a long time, but they have seen a bit of a revival in the recent history of the web.
TypeScript support in Svelte - Learn web development
first class typescript support has been svelte's most requested feature for quite some time.
Getting started with Svelte - Learn web development
we'll learn all the basics about svelte and also quite a few advanced topics.
Working with Svelte stores - Learn web development
using the store contract to persist our todos our little app lets us manage our todos quite easily, but is rather useless if we always get the same list of hardcoded todos when we reload it.
Vue conditional rendering: editing existing todos - Learn web development
fixing this is fortunately quite easy — we can do this by converting our isdone data item into a computed property — another advantage of computed properties is that they preserve reactivity, meaning (among other things) that their state is saved when the template changes like ours is now doing.
Introduction to automated testing - Learn web development
summary this was quite a ride, but i'm sure you can start to see the benefits of using automation tools to do some of the heavy lifting in terms of testing.
Implementing feature detection - Learn web development
note: bear in mind that all of modernizr's html and javascript feature tests are also reported in these class names, so you can quite happily apply css selectively based on whether the browser supports html or javascript features, if needed.
Introduction to cross browser testing - Learn web development
the workflow for testing and bug fixes on a project can be broken down into roughly the following four phases (this is only very rough — different people may do things quite differently to this): initial planning > development > testing/discovery > fixes/iteration steps 2–4 will tend to be repeated as many times as necessary to get all of the implementation done.
Handling common JavaScript problems - Learn web development
handling javascript prefixes in the previous article, we included quite a lot of discussion about handing css prefixes.
Accessibility API cross-reference
aria is a standard developed as part of the web accessibility initiative, which uses markup syntax quite familiar to users of html, xml, sgml and others.
Accessibility/LiveRegionDevGuide
text changed the text changed events are quite similar in at-spi and iaccessible2 with both having an insert and delete or removal events.
Gecko info for Windows accessibility vendors
however, exposing the entire dom to external software packages is quite involved, partially because changes to the dom in firefox must occur on the main thread.
Mozilla’s UAAG evaluation report
(p2) p our interface for image toggling needs redesign unfortunately, there are quite a few open bugs on image toggling guideline 4.
Accessible Toolkit Checklist
t (default state) links enter key activates link (thus default button no longer shows dark border when link is focused) msaa support, including linked and traversed states, and accessible value that holds destination url text fields - single and multiple line it's probably best to use native widgets for these, otherwise accessibility support will be quite difficult tab should always focus the next item, not insert a tab, unless there's a really good reason and another way to navigate always use system selection color, otherwise screen reader won't read the text make sure the caret is never blinking when focus is not in text field handle standard editing keys, such as arrow keys, home, end, pageup, pagedown, ctrl+left/right...
Adding a new word to the en-US dictionary
add and remove words in the dictionary file, then quit the editor.
Creating reftest-based unit tests
if one has software that multiplies numbers, one wants a regression test to show that 2 * 2 continues to be calculated to be 4, not something similar to but not quite exactly 4.
Debugging on Mac OS X
when you are done debugging, click the "stop" button and quit the instance of firefox that you were debugging in the normal way.
Debugging on Windows
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).
How Mozilla's build system works
makefile basics makefiles can be quite complicated, but mozilla provides a number of built-in rules that should enable most makefiles to be simpler.
Old Thunderbird build
while you can build thunderbird on older hardware it can take quite a bit of time to compile on slower machines with less ram.
Simple Instantbird build
build prerequisites hardware requirements: while you can build instantbird on older hardware it can take quite a bit of time to compile on slower machines, and having 8gb of ram is recommended (though you can probably still get away with 4gb).
Simple Thunderbird build
while you can build thunderbird on older hardware it can take quite a bit of time to compile on slower machines with less ram.
Creating Custom Events That Can Pass Data
mozilla/content/events/src/nseventdispatcher.cpp note: in the mozilla 1.8.x branch this code is actually in mozilla/content/events/src/nseventlistenermanager.cpp this is quite an important file since this holds the createevent method which acts as a factory method dom events.
Gecko Logging
you can set an overall logging level, though it could be quite verbose: set rust_log="debug" you can also target individual modules by path: set rust_log="style::style_resolver=debug" for linux/macos users, you need to use export rather than set.
SVG Guidelines
plus, in most of the cases, the filename is quite descriptive so it's recommended to remove that kind of metadata since it doesn't bring much value.
mach
generally, mach is known to work pretty well without issues for most people and works terribly for others with even the "basics" being quite unsatisfactory.
Multiple Firefox profiles
launching firefox into a desired profile although it is possible in some cases to have multiple instances of firefox running in different profiles, to avoid confusion, you might want to first exit/quit/terminate all running instances of firefox, firefox developer edition or nightly.
Performance best practices for Firefox front-end engineers
if you can make do with information that may not be quite current, this can be helpful.
Roll your own browser: An embedding how-to
you will also want to shut this down when you quit.
How Mozilla determines MIME Types
externalhelperappservice (located at uriloader/exthandler/nsexternalhelperappservice.cpp) the file->mime type mapping works like this: on beos, the operating system is asked for the type of the file (not quite yet, bug 217723) on macos, the type and creator code will be used to lookup 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...
Extending a Protocol
it's quite involved and, unfortunately, all steps need to be done before we can successfully recompile.
Internationalized Domain Names (IDN) Support in Mozilla Browsers
these preferences can be modified or new ones can be created without quitting the browser using the steps described below.
JavaScript Tips
however, in javascript this is quite simple even in the case of a weak reference which in c++ requires a helper class: var weakobserver = { queryinterface: function queryinterface(aiid) { if (aiid.equals(components.interfaces.nsiobserver) || aiid.equals(components.interfaces.nsisupportsweakreference) || aiid.equals(components.interfaces.nsisupports)) return this; throw components.results.ns_nointe...
Bootstrapping a new locale
ser/chrome/browser to see what is contained in "browser" type $ ls and, you should see the following output from your terminal: aboutcerterror.dtd pageinfo.dtd aboutdialog.dtd pageinfo.properties aboutprivatebrowsing.dtd pagereportfirsttime.dtd aboutrobots.dtd places aboutsessionrestore.dtd preferences aboutsupport.dtd quitdialog.properties basemenuoverlay.dtd safemode.dtd browser.dtd safebrowsing browser.properties sanitize.dtd credits.dtd search.properties enginemanager.dtd searchbar.dtd enginemanager.properties setdesktopbackground.dtd feeds shellservice.properties history sidebar migration ...
L10n testing with xcode
the accessibility inspector remains active until you turn it off, even if you quit and restart ios simulator.
Mozilla DOM Hacking Guide
since i am myself still learning how it works, don't expect this to be a complete reference quite yet.
Mozilla Style System Documentation
while the style context tree is generally quite deep, since it corresponds roughly to the content tree, the rule tree is generally quite broad (but are there cases where it is quite deep??), since the depth of a node in the tree corresponds to the number of rules matched.
Profiling with Instruments
the call tree view can be quite helpful here.
about:memory
if this number is low, it's likely that memory allocations will fail due to lack of virtual address space quite soon.
Phishing: a short definition
the ss7 telephony system is vulnerable, making eavesdropping, or rerouting text messages quite trivial.
A brief guide to Mozilla preferences
if the application encounters any error during loading of a default pref file, the application will issue a warning that a configuration file has failed to load and then quit.
Leak And Bloat Tests
startup main mail window open address book and message composition windows close address book and message composition windows quit the application future improvements will be discussed on the discussion page of the mozilla wiki.
About NSPR
the industry's offering of threads is quite sundry.
An overview of NSS Internals
(note that it's important to look at the number 11, as there are other pkcs standards with different numbers that define quite different topics.) a software or hardware module conforming to the pkcs#11 standard implements an interface of c calls, which allow querying the characteristics and offered services of the module.
Index
(note that it's important to look at the number 11, as there are other pkcs standards with different numbers that define quite different topics.) a software or hardware module conforming to the pkcs#11 standard implements an interface of c calls, which allow querying the characteristics and offered services of the module.
NSS API Guidelines
some simple strategies and their issues: use hash tables: hash table lookups are usually quite fast, limiting the contention on the lock.
Python binding for NSS
programmers already familiar with nss/nspr will be quite comfortable with python-nss.
Rhino serialization
they're intended mainly as examples of the use of serialization: $ java org.mozilla.javascript.tools.shell.main js> function f() { return 3; } js> serialize(f, "f.ser") js> quit() $ java org.mozilla.javascript.tools.shell.main js> f = deserialize("f.ser") function f() { return 3;} js> f() 3 js> here we see a simple case of a function being serialized to a file and then read into a new instance of rhino and called.
Hacking Tips
feature of gdb, to step one instruction, and settle back to where you came from with the following set of gdb commands: (gdb) record full (gdb) si (gdb) record goto 0 (gdb) record stop if you have a core file, you can use the gdb unwinder the same way, or do everything from the command line as follow: $ gdb -ex 'enable unwinder .* spidermonkey' -ex 'bt 0' -ex 'thread apply all backtrace' -ex 'quit' out/dist/bin/js corefile the gdb unwinder is supposed to be loaded by dist/bin/js-gdb.py and load python scripts which are located in js/src/gdb/mozilla under gdb.
Exact Stack Rooting
the performance tradeoffs that these techniques make, however, are quite different.
Property cache
lookups for jof_name instructions are quite different from ordinary property lookups: name lookups follow the scope chain and the prototype chain, whereas the others only follow the prototype chain.
Introduction to the JavaScript shell
quit([status]) exits the shell.
JSAPI Cookbook
it's a nice thought—javascript wouldn't crash, at least—but implementing its exact behavior turns out to be quite complicated, and most of the work is not particularly helpful.
JSClass.flags
this is actually quite subtle.
JS_ConstructObject
neither of these functions is quite like the javascript new keyword.
JS_Enumerate
(the term own property refers to a property that is not inherited from the object's prototype.) this is not quite the same behavior as a javascript for...in loop, which converts all property ids to strings and also enumerates inherited properties.
JS_ExecuteScript
in ecmascript terms, the script is executed in a new execution context, but that context is not initialized quite as described in any of the three cases in ecma 262-3 §10.2.
JS_ExecuteScriptVersion
in ecmascript terms, the script is executed in a new execution context, but that context is not initialized quite as described in any of the three cases in ecma 262-3 §10.2.
JS_SealObject
as of spidermonkey 1.8.5, js_sealobject has been removed from the jsapi, because ecmascript 5 includes a "seal" concept (namely, that of object.seal) which is quite different from that of js_sealobject.
JS_SetScriptStackQuota
the default quota is 32mb which is quite generous.
SpiderMonkey 24
(this change was motivated by garbage collector improvements, which lean quite heavily on c++'s support for raii through constructors and destructors.) if you are compiling with microsoft's visual studio, note that the minimum supported version is msvc10/2010: msvc8/9 support has been dropped.
Setting up CDT to work on SpiderMonkey
still, there are a quite a few things that cdt does not pick up yet: for everything to be indexed, cdt has to be aware of the project's build details.
Shell global objects
quit() quit the shell.
Feed content access API
example: reading a feed from the web it's actually quite easy to read and parse a feed.
History Service Design
database indexes are quite important, and a good query can make the difference between minutes or seconds.
Accessing the Windows Registry Using XPCOM
value) { switch (wrk.getvaluetype(value)) { case wrk.type_string: return wrk.readstringvalue(value); case wrk.type_binary: return wrk.readbinaryvalue(value); case wrk.type_int: return wrk.readintvalue(value); case wrk.type_int64: return wrk.readint64value(value); } // unknown type return null; } writing registry values writing registry values is quite similar to reading.
Finishing the Component
the web locking policy that we are going to put into place is quite simple: for every load request that comes through, we will ensure that the uri is in the list of "good" urls on the white list.
Starting WebLock
as a strongly typed and implementation-agnostic language, xpidl requires that you be quite specific about the apis, the list of parameters, their order, and their types.
Using XPCOM Components
this isn't quite all there is to it, of course, but this shows an important aspect of xpcom.
Using XPCOM Utilities to Make Things Easier
another nice feature of smart pointers - the part that makes them smart - is that you can queryinterface them quite easily.
nsIRegistry
perhaps if we quit with the xpconnect:appshellservice, it will work.
mozIRegistry
our current build/install process doesn't quite step up to these problems as of yet.
nsIConsoleService
there are quite a few category strings and they do not currently seem to be listed in a single place.
nsINavHistoryResultNode
using places services after quit-application is not reliable, so make sure to do any shutdown work on quit-application, or history synchronization could fail, losing latest changes.
nsIScriptError2
there are quite a few category strings and they don't seem to be listed in a single place.
nsIXULWindow
this signals the application in case it needs to quit.
Storage
you can use them quite simply in your select queries, like this: var stmt = aconn.createstatement("select * from foo order by name collate locale asc"); var results = []; while (stmt.executestep()) { results.push(stmt.row.t); } stmt.finalize(); how to corrupt a database sqlite is very good about maintaining database integrity, but there are a few things you can do that can lead to database corruption.
XPIDL Syntax
MozillaTechXPIDLSyntax
out") type_spec ident attr_decl = [prop_list] ["readonly"] "attribute" type_spec *(ident ",") ident ; descending order of precedence expr /= expr ("|" / "^" / "&") expr ; unequal precedence "|" is lowest expr /= expr ("<<" / ">>") expr expr /= expr ("+" / "-") expr expr /= expr ("*" / "/" / "%") expr expr /= ["-" / "+" / "~"] (scoped_name / literal / "(" expr ")" ) ; numeric literals: quite frankly, i'm sure you know how these kinds of ; literals work, and these are annoying to specify in abnf.
Creating a Custom Column
this function is a simple one liner along the lines of: function addcustomcolumnhandler() { gdbview.addcolumnhandler("colreplyto", columnhandler); } wrap up as you have seen it is quite easy to add your own custom column handler.
WebIDL bindings
they will get cross-compartment wrappers that make touching them from chrome code not be an immediate security bug, but otherwise they can have quite surprising behavior if the page is trying to be malicious.
Working with windows in chrome code
pros: quite easy to use for storing simple data.
Initialization and Destruction - Plugins
the browser calls npp_destroy when a plug-in instance is deleted, usually because the user has left the page containing the instance, closed the window, or quit the application.
Plug-in Basics - Plugins
this nesting is quite common in the use of object elements, and lets you avoid code forking for different browsers.
Plug-in Development Overview - Plugins
building plug-ins once you have added the special code and additional files to make your plug-in scriptable as described in the previous section, the build process is quite straightforward.
DOM Inspector internals - Firefox Developer Tools
this comparison turns out to be quite apt, since each panel actually contains an anonymous browser, and individual viewers exist in separate documents loaded in the browser.
Debugger-API - Firefox Developer Tools
however, debugger is quite general, and can be used to implement other kinds of tools like tracers, coverage analysis, patch-and-continue, and so on.
Index - Firefox Developer Tools
however, debugger is quite general, and can be used to implement other kinds of tools like tracers, coverage analysis, patch-and-continue, and so on.
AnalyserNode.smoothingTimeConstant - Web APIs
if 0 is set, there is no averaging done, whereas a value of 1 means "overlap the previous and current buffer quite a lot while computing the value", which essentially smoothes the changes across analysernode.getfloatfrequencydata/analysernode.getbytefrequencydata calls.
AudioListener.dopplerFactor - Web APIs
os, audioctx.currenttime); panner.positionz.setvalueattime(zpos, audioctx.currenttime); } else { panner.setposition(xpos,ypos,zpos); } pannerdata.innerhtml = 'panner data: x ' + xpos + ' y ' + ypos + ' z ' + zpos; } note: in terms of working out what position values to apply to the listener and panner, to make the sound appropriate to what the visuals are doing on screen, there is quite a bit of math involved, but you will soon get used to it with a bit of experimentation.
AudioListener.forwardX - Web APIs
os, audioctx.currenttime); panner.positionz.setvalueattime(zpos, audioctx.currenttime); } else { panner.setposition(xpos,ypos,zpos); } pannerdata.innerhtml = 'panner data: x ' + xpos + ' y ' + ypos + ' z ' + zpos; } note: in terms of working out what position values to apply to the listener and panner, to make the sound appropriate to what the visuals are doing on screen, there is quite a bit of math involved, but you will soon get used to it with a bit of experimentation.
AudioListener.forwardY - Web APIs
os, audioctx.currenttime); panner.positionz.setvalueattime(zpos, audioctx.currenttime); } else { panner.setposition(xpos,ypos,zpos); } pannerdata.innerhtml = 'panner data: x ' + xpos + ' y ' + ypos + ' z ' + zpos; } note: in terms of working out what position values to apply to the listener and panner, to make the sound appropriate to what the visuals are doing on screen, there is quite a bit of math involved, but you will soon get used to it with a bit of experimentation.
AudioListener.forwardZ - Web APIs
os, audioctx.currenttime); panner.positionz.setvalueattime(zpos, audioctx.currenttime); } else { panner.setposition(xpos,ypos,zpos); } pannerdata.innerhtml = 'panner data: x ' + xpos + ' y ' + ypos + ' z ' + zpos; } note: in terms of working out what position values to apply to the listener and panner, to make the sound appropriate to what the visuals are doing on screen, there is quite a bit of math involved, but you will soon get used to it with a bit of experimentation.
AudioListener.positionX - Web APIs
os, audioctx.currenttime); panner.positionz.setvalueattime(zpos, audioctx.currenttime); } else { panner.setposition(xpos,ypos,zpos); } pannerdata.innerhtml = 'panner data: x ' + xpos + ' y ' + ypos + ' z ' + zpos; } note: in terms of working out what position values to apply to the listener and panner, to make the sound appropriate to what the visuals are doing on screen, there is quite a bit of math involved, but you will soon get used to it with a bit of experimentation.
AudioListener.positionY - Web APIs
os, audioctx.currenttime); panner.positionz.setvalueattime(zpos, audioctx.currenttime); } else { panner.setposition(xpos,ypos,zpos); } pannerdata.innerhtml = 'panner data: x ' + xpos + ' y ' + ypos + ' z ' + zpos; } note: in terms of working out what position values to apply to the listener and panner, to make the sound appropriate to what the visuals are doing on screen, there is quite a bit of math involved, but you will soon get used to it with a bit of experimentation.
AudioListener.positionZ - Web APIs
os, audioctx.currenttime); panner.positionz.setvalueattime(zpos, audioctx.currenttime); } else { panner.setposition(xpos,ypos,zpos); } pannerdata.innerhtml = 'panner data: x ' + xpos + ' y ' + ypos + ' z ' + zpos; } note: in terms of working out what position values to apply to the listener and panner, to make the sound appropriate to what the visuals are doing on screen, there is quite a bit of math involved, but you will soon get used to it with a bit of experimentation.
AudioListener.setOrientation() - Web APIs
os, audioctx.currenttime); panner.positionz.setvalueattime(zpos, audioctx.currenttime); } else { panner.setposition(xpos,ypos,zpos); } pannerdata.innerhtml = 'panner data: x ' + xpos + ' y ' + ypos + ' z ' + zpos; } note: in terms of working out what position values to apply to the listener and panner, to make the sound appropriate to what the visuals are doing on screen, there is quite a bit of math involved, but you will soon get used to it with a bit of experimentation.
AudioListener.setPosition() - Web APIs
os, audioctx.currenttime); panner.positionz.setvalueattime(zpos, audioctx.currenttime); } else { panner.setposition(xpos,ypos,zpos); } pannerdata.innerhtml = 'panner data: x ' + xpos + ' y ' + ypos + ' z ' + zpos; } note: in terms of working out what position values to apply to the listener and panner, to make the sound appropriate to what the visuals are doing on screen, there is quite a bit of math involved, but you will soon get used to it with a bit of experimentation.
AudioListener.speedOfSound - Web APIs
os, audioctx.currenttime); panner.positionz.setvalueattime(zpos, audioctx.currenttime); } else { panner.setposition(xpos,ypos,zpos); } pannerdata.innerhtml = 'panner data: x ' + xpos + ' y ' + ypos + ' z ' + zpos; } note: in terms of working out what position values to apply to the listener and panner, to make the sound appropriate to what the visuals are doing on screen, there is quite a bit of math involved, but you will soon get used to it with a bit of experimentation.
AudioListener.upX - Web APIs
WebAPIAudioListenerupX
os, audioctx.currenttime); panner.positionz.setvalueattime(zpos, audioctx.currenttime); } else { panner.setposition(xpos,ypos,zpos); } pannerdata.innerhtml = 'panner data: x ' + xpos + ' y ' + ypos + ' z ' + zpos; } note: in terms of working out what position values to apply to the listener and panner, to make the sound appropriate to what the visuals are doing on screen, there is quite a bit of math involved, but you will soon get used to it with a bit of experimentation.
AudioListener.upY - Web APIs
WebAPIAudioListenerupY
os, audioctx.currenttime); panner.positionz.setvalueattime(zpos, audioctx.currenttime); } else { panner.setposition(xpos,ypos,zpos); } pannerdata.innerhtml = 'panner data: x ' + xpos + ' y ' + ypos + ' z ' + zpos; } note: in terms of working out what position values to apply to the listener and panner, to make the sound appropriate to what the visuals are doing on screen, there is quite a bit of math involved, but you will soon get used to it with a bit of experimentation.
AudioListener.upZ - Web APIs
WebAPIAudioListenerupZ
os, audioctx.currenttime); panner.positionz.setvalueattime(zpos, audioctx.currenttime); } else { panner.setposition(xpos,ypos,zpos); } pannerdata.innerhtml = 'panner data: x ' + xpos + ' y ' + ypos + ' z ' + zpos; } note: in terms of working out what position values to apply to the listener and panner, to make the sound appropriate to what the visuals are doing on screen, there is quite a bit of math involved, but you will soon get used to it with a bit of experimentation.
AudioListener - Web APIs
os, audioctx.currenttime); panner.positionz.setvalueattime(zpos, audioctx.currenttime); } else { panner.setposition(xpos,ypos,zpos); } pannerdata.innerhtml = 'panner data: x ' + xpos + ' y ' + ypos + ' z ' + zpos; } note: in terms of working out what position values to apply to the listener and panner, to make the sound appropriate to what the visuals are doing on screen, there is quite a bit of math involved, but you will soon get used to it with a bit of experimentation.
BaseAudioContext.createPanner() - Web APIs
os, audioctx.currenttime); panner.positionz.setvalueattime(zpos, audioctx.currenttime); } else { panner.setposition(xpos,ypos,zpos); } pannerdata.innerhtml = 'panner data: x ' + xpos + ' y ' + ypos + ' z ' + zpos; } note: in terms of working out what position values to apply to the listener and panner, to make the sound appropriate to what the visuals are doing on screen, there is quite a bit of math involved, but you will soon get used to it with a bit of experimentation.
CanvasRenderingContext2D.drawFocusIfNeeded() - Web APIs
html <canvas id="canvas"> <button id="button1">continue</button> <button id="button2">quit</button> </canvas> javascript const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); const button1 = document.getelementbyid('button1'); const button2 = document.getelementbyid('button2'); document.addeventlistener('focus', redraw, true); document.addeventlistener('blur', redraw, true); canvas.addeventlistener('click', handleclick, false); redraw(); function r...
Drawing shapes with canvas - Web APIs
using quadratic and cubic bézier curves can be quite challenging, because unlike vector drawing software like adobe illustrator, we don't have direct visual feedback as to what we're doing.
Using images - Web APIs
some disadvantages of this method are that your image is not cached, and for larger images the encoded url can become quite long.
How to create a DOM tree - Web APIs
another application is that, since xul is xml, the ui of your application can be dynamically manipulated, downloaded, uploaded, saved, loaded, converted, or transformed quite easily.
Using the W3C DOM Level 1 Core - Web APIs
due to the ubiquity of the dom, this api is supported in all major browsers, including mozilla firefox and microsoft internet explorer, and serves as a base for scripting on the web.
Element.innerHTML - Web APIs
WebAPIElementinnerHTML
se this as the event handler for a number of mouse events on the box that contains our log: var boxelem = document.queryselector(".box"); boxelem.addeventlistener("mousedown", logevent); boxelem.addeventlistener("mouseup", logevent); boxelem.addeventlistener("click", logevent); boxelem.addeventlistener("mouseenter", logevent); boxelem.addeventlistener("mouseleave", logevent); html the html is quite simple for our example.
Element: mouseenter event - Web APIs
with deep hierarchies, the number of mouseenter events sent can be quite huge and cause significant performance problems.
Event.returnValue - Web APIs
WebAPIEventreturnValue
usage notes returnvalue was introduced into the dom by internet explorer 6, and due to that browser's ubiquity became so commonly used that other browsers eventually implemented it as well.
HTMLElement.hidden - Web APIs
this is quite different from using the css property display to control the visibility of an element.
Basic concepts - Web APIs
this is quite important, as error events abort whatever transactions they're running in, unless they are cancelled.
Checking when a deadline is due - Web APIs
human-readable dates are quite different, with a number of different representations.
Using IndexedDB - Web APIs
<iframe> content) cannot access indexeddb if the browser is set to never accept third party cookies (see bug 1147821.) warning about browser shutdown when the browser shuts down (because the user chose the quit or exit option), the disk containing the database is removed unexpectedly, or permissions are lost to the database store, the following things happen: each transaction on every affected database (or all open databases, in the case of browser shutdown) is aborted with an aborterror.
KeyboardEvent.key - Web APIs
WebAPIKeyboardEventkey
break; default: return; // quit when this doesn't handle the key event.
NodeList - Web APIs
WebAPINodeList
the ubiquitous document.queryselectorall() method returns a static nodelist.
PannerNode.distanceModel - Web APIs
os, audioctx.currenttime); panner.positionz.setvalueattime(zpos, audioctx.currenttime); } else { panner.setposition(xpos,ypos,zpos); } pannerdata.innerhtml = 'panner data: x ' + xpos + ' y ' + ypos + ' z ' + zpos; } note: in terms of working out what position values to apply to the listener and panner, to make the sound appropriate to what the visuals are doing on screen, there is quite a bit of math involved, but you will soon get used to it with a bit of experimentation.
PannerNode.maxDistance - Web APIs
os, audioctx.currenttime); panner.positionz.setvalueattime(zpos, audioctx.currenttime); } else { panner.setposition(xpos,ypos,zpos); } pannerdata.innerhtml = 'panner data: x ' + xpos + ' y ' + ypos + ' z ' + zpos; } note: in terms of working out what position values to apply to the listener and panner, to make the sound appropriate to what the visuals are doing on screen, there is quite a bit of math involved, but you will soon get used to it with a bit of experimentation.
PannerNode.panningModel - Web APIs
os, audioctx.currenttime); panner.positionz.setvalueattime(zpos, audioctx.currenttime); } else { panner.setposition(xpos,ypos,zpos); } pannerdata.innerhtml = 'panner data: x ' + xpos + ' y ' + ypos + ' z ' + zpos; } note: in terms of working out what position values to apply to the listener and panner, to make the sound appropriate to what the visuals are doing on screen, there is quite a bit of math involved, but you will soon get used to it with a bit of experimentation.
PannerNode.setOrientation() - Web APIs
os, audioctx.currenttime); panner.positionz.setvalueattime(zpos, audioctx.currenttime); } else { panner.setposition(xpos,ypos,zpos); } pannerdata.innerhtml = 'panner data: x ' + xpos + ' y ' + ypos + ' z ' + zpos; } note: in terms of working out what position values to apply to the listener and panner, to make the sound appropriate to what the visuals are doing on screen, there is quite a bit of math involved, but you will soon get used to it with a bit of experimentation.
PannerNode.setPosition() - Web APIs
os, audioctx.currenttime); panner.positionz.setvalueattime(zpos, audioctx.currenttime); } else { panner.setposition(xpos,ypos,zpos); } pannerdata.innerhtml = 'panner data: x ' + xpos + ' y ' + ypos + ' z ' + zpos; } note: in terms of working out what position values to apply to the listener and panner, to make the sound appropriate to what the visuals are doing on screen, there is quite a bit of math involved, but you will soon get used to it with a bit of experimentation.
PannerNode.setVelocity() - Web APIs
os, audioctx.currenttime); panner.positionz.setvalueattime(zpos, audioctx.currenttime); } else { panner.setposition(xpos,ypos,zpos); } pannerdata.innerhtml = 'panner data: x ' + xpos + ' y ' + ypos + ' z ' + zpos; } note: in terms of working out what position values to apply to the listener and panner, to make the sound appropriate to what the visuals are doing on screen, there is quite a bit of math involved, but you will soon get used to it with a bit of experimentation.
PannerNode - Web APIs
os, audioctx.currenttime); panner.positionz.setvalueattime(zpos, audioctx.currenttime); } else { panner.setposition(xpos,ypos,zpos); } pannerdata.innerhtml = 'panner data: x ' + xpos + ' y ' + ypos + ' z ' + zpos; } note: in terms of working out what position values to apply to the listener and panner, to make the sound appropriate to what the visuals are doing on screen, there is quite a bit of math involved, but you will soon get used to it with a bit of experimentation.
SpeechSynthesis.cancel() - Web APIs
this is quite a long sentence to say.'); var utterance2 = new speechsynthesisutterance('we should say another sentence too, just to be on the safe side.'); synth.speak(utterance1); synth.speak(utterance2); synth.cancel(); // utterance1 stops being spoken immediately, and both are removed from the queue specifications specification status comment web speech apithe definition of 'cance...
SpeechSynthesis.pause() - Web APIs
this is quite a long sentence to say.'); var utterance2 = new speechsynthesisutterance('we should say another sentence too, just to be on the safe side.'); synth.speak(utterance1); synth.speak(utterance2); synth.pause(); // pauses utterances being spoken specifications specification status comment web speech apithe definition of 'pause()' in that specification.
SpeechSynthesis.pending - Web APIs
this is quite a long sentence to say.'); var utterance2 = new speechsynthesisutterance('we should say another sentence too, just to be on the safe side.'); synth.speak(utterance1); synth.speak(utterance2); var amipending = synth.pending; // will return true if utterance 1 is still being spoken and utterance 2 is in the queue specifications specification status comment web speech apithe definition of 'pend...
SpeechSynthesis.resume() - Web APIs
this is quite a long sentence to say.'); var utterance2 = new speechsynthesisutterance('we should say another sentence too, just to be on the safe side.'); synth.speak(utterance1); synth.speak(utterance2); synth.pause(); // pauses utterances being spoken synth.resume() // resumes speaking specifications specification status comment web speech apithe definition of 'resume()' in that specification.
SpeechSynthesis.speaking - Web APIs
this is quite a long sentence to say.'); var utterance2 = new speechsynthesisutterance('we should say another sentence too, just to be on the safe side.'); synth.speak(utterance1); synth.speak(utterance2); var amispeaking = synth.speaking; // will return true if utterance 1 or utterance 2 are currently being spoken specifications specification status comment web speech apithe defi...
A basic 2D WebGL animation example - Web APIs
here, we're using code designed to let us add multiple shaders to our program quite easily.
Boilerplate 1 - Web APIs
boilerplate code for setting up webgl rendering context by now you are quite used to seeing the same pieces of html, css, and javascript repeated again and again.
WebGL best practices - Web APIs
minmax oes_element_index_uint oes_standard_derivatives oes_vertex_array_object webgl_debug_renderer_info webgl_lose_context (see also: https://jdashg.github.io/misc/webgl/webgl-feature-levels.html) consider polyfilling these into webglrenderingcontext, like: https://github.com/jdashg/misc/blob/master/webgl/webgl-v1.1.js universally supported limits the minimum requirements for webgl are quite low.
Signaling and video calling - Web APIs
perhaps a network failure has occurred, or one user might have quit their browser, or had a system crash.
A simple RTCDataChannel sample - Web APIs
.getelementbyid('sendbutton'); messageinputbox = document.getelementbyid('message'); receivebox = document.getelementbyid('receivebox'); // set event listeners for user interface widgets connectbutton.addeventlistener('click', connectpeers, false); disconnectbutton.addeventlistener('click', disconnectpeers, false); sendbutton.addeventlistener('click', sendmessage, false); } this is quite straightforward.
Advanced techniques: Creating and sequencing audio - Web APIs
our values are running from -1 to 1, which means we have peaks of all frequencies, which in turn is actually quite dramatic and piercing.
Example and tutorial: Simple synth keyboard - Web APIs
with this table in place, we can find out the frequency for a given note in a particular octave quite easily.
Using the Web Audio API - Web APIs
this makes up quite a few basics that you would need to start to add audio to your website or web app.
Web audio spatialization basics - Web APIs
} moving = moveboombox(direction); }, false); window.addeventlistener('mouseup', function() { if (moving && moving.frameid) { window.cancelanimationframe(moving.frameid); } }, false) }) summary hopefully, this article has given you an insight into how web audio spatialization works, and what each of the pannernode properties do (there are quite a few of them).
Using Web Workers - Web APIs
its content is (quite literally) transferred to the worker context.
Window.defaultStatus - Web APIs
example <html> <body onload="window.defaultstatus='hello!';"/> <button onclick="window.confirm('are you sure you want to quit?');">confirm</button> </body> </html> notes to set the status once the window has been opened, use window.status.
Window.open() - Web APIs
WebAPIWindowopen
opening new windows, even with reduced features, uses considerably a lot of the user's system resources (cpu, ram) and involves considerably a lot of coding in the source code (security management, memory management, various code branchings sometimes quite complex, window frame/chrome/toolbars building, window positioning and sizing, etc.).
WorkerGlobalScope.self - Web APIs
this provides a full list of the objects available to that worker scope, so it is quite a useful test if you want to see whether something is available to your worker or not.
Accessibility: What users can do to browse more safely - Accessibility
usually they are quite easy to find by simply typing ( or saying) in the word, "accessibility" in the search finder of the operating system.
Web Accessibility: Understanding Colors and Luminance - Accessibility
ng in their publication, photic- and pattern-induced seizures: expert consensus of the epilepsy foundation of america working group "irrespective of luminance, a transition to or from a saturated red is also considered a risk" saturation is sometimes described as the "purity" or "intensity" of a color, and although these are good definitions for "pigments" in an artist's paint set, they are not quite accurate as definitions for color from a computer screen.
Understanding the Web Content Accessibility Guidelines - Accessibility
it is comprehensive but incredibly detailed, and quite difficult to gain a rapid understanding of.
-moz-image-rect - CSS: Cascading Style Sheets
w a similar pattern: #box3 { background-image: -moz-image-rect(url(https://mdn.mozillademos.org/files/12053/firefox.png), 50%, 50%, 100%, 0%); width:133px; height:136px; position:absolute; } #box4 { background-image: -moz-image-rect(url(https://mdn.mozillademos.org/files/12053/firefox.png), 50%, 100%, 100%, 50%); width:133px; height:136px; position:absolute; } html the html is quite simple: <div id="container" onclick="rotate()"> <div id="box1" style="left:0px;top:0px;">top left</div> <div id="box2" style="left:133px;top:0px;">top right</div> <div id="box3" style="left:0px;top:136px;">bottom left</div> <div id="box4" style="left:133px;top:136px;">bottom right</div> </div> this places the four segments of our image in a two-by-two box grid.
Coordinate systems - CSS: Cascading Style Sheets
the implementation is then quite simple.
CSS Containment - CSS: Cascading Style Sheets
this information is something that is usually known, and in fact quite obvious, to the web developer creating the page.
Backwards Compatibility of Flexbox - CSS: Cascading Style Sheets
in 2009, the specification looked quite different.
Ordering Flex Items - CSS: Cascading Style Sheets
you can also use negative values with order, which can be quite useful.
Typical use cases of Flexbox - CSS: Cascading Style Sheets
quite often you have more than one choice.
Relationship of grid layout to other layout methods - CSS: Cascading Style Sheets
border-radius: 5px; background-color: #fff4e6; } .wrapper > div { border: 2px solid #ffa94d; border-radius: 5px; background-color: #ffd8a8; padding: 1em; color: #d9480f; } <div class="wrapper"> <div>one</div> <div>two</div> <div>three</div> </div> .wrapper { display: grid; grid-template-columns: repeat(auto-fill, 200px); } a flexible number of tracks this isn’t quite the same as flexbox.
Overview of CSS Shapes - CSS: Cascading Style Sheets
if your polygon isn’t quite right you can use the shapes editor to tweak it, then copy the new value back into your css.
<custom-ident> - CSS: Cascading Style Sheets
also, quite a few predefined values are implemented by the different browsers: disc, circle, square, decimal, cjk-decimal, decimal-leading-zero, lower-roman, upper-roman, lower-greek, lower-alpha, lower-latin, upper-alpha, upper-latin, arabic-indic, armenian, bengali, cambodian, cjk-earthly-branch, cjk-heavenly-stem, cjk-ideographic, devanagari, ethiopic-numeric, georgian, gujarati, gurmukhi, hebrew, hiraga...
scroll-margin-inline-end - CSS: Cascading Style Sheets
the aim here is to create four horizontally-scrolling blocks, the second and third of which snap into place, near but not quite at the right of each block.
scroll-margin-inline-start - CSS: Cascading Style Sheets
the aim here is to create four horizontally-scrolling blocks, the second and third of which snap into place, near but not quite at the left of each block.
scroll-margin-inline - CSS: Cascading Style Sheets
the aim here is to create four horizontally-scrolling blocks, the second and third of which snap into place, near but not quite at the right of each block.
scroll-margin - CSS: Cascading Style Sheets
the aim here is to create four horizontally-scrolling blocks, the second and third of which snap into place, near but not quite at the left of each block.
shape-margin - CSS: Cascading Style Sheets
l value0applies tofloatsinheritednopercentagesrefer to the width of the containing blockcomputed valueas specified, but with relative lengths converted into absolute lengthsanimation typea length, percentage or calc(); formal syntax <length-percentage>where <length-percentage> = <length> | <percentage> examples adding a margin to a polygon html <section> <div class="shape"></div> we are not quite sure of any one thing in biology; our knowledge of geology is relatively very slight, and the economic laws of society are uncertain to every one except some individual who attempts to set them forth; but before the world was fashioned the square on the hypotenuse was equal to the sum of the squares on the other two sides of a right triangle, and it will be so after this world is dead; and the i...
text-emphasis - CSS: Cascading Style Sheets
the text-emphasis property is quite different from text-decoration.
Cross-browser audio basics - Developer guides
the playhead is in position but not quite ready to play.
Video player styling basics - Developer guides
each image was then converted to a base64 encoded string (using an online base64 image encoder), since the images are quite small, the resultant encoded strings are quite short.
Writing Web Audio API code that works in every browser - Developer guides
today the support is already present in nightly, but not quite yet in aurora.
Creating a cross-browser video player - Developer guides
once again the html is quite straightforward, using an unordered list with list-style-type:none set to enclose the controls, each of which is a list item with float:left.
Introduction to HTML5 - Developer guides
this requirement helps web developers quite a bit.
Mobile-friendliness - Developer guides
needless to say, a fixed-width, three-column layout filled with complex javascript animations and mouse-over effects is not going to look or feel quite right on a phone with a 2-inch-wide screen and a diminutive processor.
Mobile Web Development - Developer guides
WebGuideMobile
designing for mobile devices mobile devices have quite different hardware characteristics compared with desktop or laptop computers.
Writing forward-compatible websites - Developer guides
if you have a single code path that works in all the top engines, it means that you are either using features where browser behavior has already converged or, if the behavior hasn't quite converged yet, your code works regardless of which engine's behavior standards turn out to uphold.
<input type="checkbox"> - HTML: Hypertext Markup Language
WebHTMLElementinputcheckbox
however, if they're all related, things are not quite so simple.
<input type="date"> - HTML: Hypertext Markup Language
WebHTMLElementinputdate
hopefully, over time browser support will become ubiquitous, and this problem will fade away.
<input type="tel"> - HTML: Hypertext Markup Language
WebHTMLElementinputtel
here's a screenshot of what that might look like: validation as we've touched on before, it's quite difficult to provide a one-size-fits-all client-side validation solution for phone numbers.
<link>: The External Resource Link element - HTML: Hypertext Markup Language
WebHTMLElementlink
ico is more ubiquitous, so you should use this format if cross-browser support is a concern (especially for old ie versions).
Standard metadata names - HTML: Hypertext Markup Language
WebHTMLElementmetaname
other metadata names the whatwg wiki metaextensions page contains a large set of non-standard metadata names that have not been formally accepted yet; however, some of the names included there are already used quite commonly in practice — including the following: creator: the name of the creator of the document, such as an organization or institution.
Preloading content with rel="preload" - HTML: Hypertext Markup Language
other resource preloading mechanisms other preloading features exist, but none are quite as fit for purpose as <link rel="preload">: <link rel="prefetch"> has been supported in browsers for a long time, but it is intended for prefetching resources that will be used in the next navigation/page load (e.g.
HTTP conditional requests - HTTP
it is quite difficult to have a unique identifier for strong validation with last-modified.
Content negotiation - HTTP
the information by the client is quite verbose (http/2 header compression mitigates this problem) and a privacy risk (http fingerprinting) as several representations of a given resource are sent, shared caches are less efficient and server implementations are more complex.
Content-Language - HTTP
note: language tags are formaly defined in rfc 5646, which rely on the iso 639 standard (quite often the iso 639-1 code list) for language codes to be used.
Large-Allocation - HTTP
for complex games, for example, these allocations can be quite large, sometimes as large as 1gb.
X-DNS-Prefetch-Control - HTTP
description dns requests are very small in terms of bandwidth, but latency can be quite high, especially on mobile networks.
HTTP Messages - HTTP
WebHTTPMessages
the whole header, including the value, consist of one single line, which can be quite long.
Concurrency model and the event loop - JavaScript
this model is quite different from models in other languages like c and java.
Array.prototype.flatMap() - JavaScript
it is identical to a map() followed by a flat() of depth 1, but flatmap() is often quite useful, as merging both into one method is slightly more efficient.
Web audio codec guide - Web media technologies
when mp3-format audio is stored inside an mpeg container, the resulting file is also referred to as just an "mp3 file" or simply "mp3." files with the ubiquitous .mp3 extension are stored in what is perhaps the most widely distributed audio file format in the world, which is in large part responsible for the digital audio revolution of the late 1990s and early 2000s.
Digital audio concepts - Web media technologies
this doesn't quite cover the entire range of human speech at the low end, but enough of the waveform is available that the human ear and brain compensate easily.
Progressive web app structure - Progressive web apps (PWAs)
structure of our example application the js13kpwa website structure is quite simple: it consists of a single html file (index.html) with basic css styling (style.css), and a few images, scripts, and fonts.
Installing and uninstalling web apps - Progressive web apps (PWAs)
by reducing the user experience differential between the web app and native apps on the user's device, you reduce both the loss of any muscle memory they have revolving around the native interface of the device and the sensation of "something isn't quite right" that users can experience when switching between native and web-based apps.
Introduction to progressive web apps - Progressive web apps (PWAs)
progressive enhancement suppport modern web apps can be developed to provide an excellent experience to fully capable browsers, and an acceptable (although not quite as shiny) experience to less capable browsers.
Making PWAs work offline with Service workers - Progressive web apps (PWAs)
service workers are quite powerful as they can take control over network requests, modify them, serve custom responses retrieved from the cache, or synthesize responses completely.
The building blocks of responsive design - Progressive web apps (PWAs)
first of all, as expected, there is a media query in our main css, which is quite weighty, so we'll go through it in parts: @media all and (max-width: 480px) { x-card:nth-child(1), x-card:nth-child(2), x-card:nth-child(3) { width: 100%; float: none; padding: 0; } button { margin-top: 0; border-radius: 0; } x-card:nth-child(1) video, x-card:nth-child(2) img { border-radius: 0px; border: none; padding: 0; background-color: 0; }...
Structural overview of progressive web apps - Progressive web apps (PWAs)
structure of a sample application the js13kpwa web site's structure is quite simple.
Basic shapes - SVG: Scalable Vector Graphics
since the list of points can get quite long, all the points are included in one attribute: <polyline points="60, 110 65, 120 70, 115 75, 130 80, 125 85, 140 90, 135 95, 150 100, 145"/> points a list of points.
Basic Transformations - SVG: Scalable Vector Graphics
rotation rotating an element is quite a common task.
Clipping and masking - SVG: Scalable Vector Graphics
if you want an element to fade out, you can achieve this effect quite quickly with masks.
Paths - SVG: Scalable Vector Graphics
WebSVGTutorialPaths
because of that, arcs require quite a few parameters: a rx ry x-axis-rotation large-arc-flag sweep-flag x y a rx ry x-axis-rotation large-arc-flag sweep-flag dx dy at its start, the arc element takes in two parameters for the x-radius and y-radius.
SVG Filters Tutorial - SVG: Scalable Vector Graphics
it is quite different to an xml id and only can be referenced within the actual filter.
Index - XSLT: Extensible Stylesheet Language Transformations
WebXSLTIndex
12 setting parameters xslt while running transformations using precoded .xsl and .xml files is quite useful, configuring the .xsl file from javascript may be even more useful.
An Overview - XSLT: Extensible Stylesheet Language Transformations
although xsl is the conventionally used shorthand name (called the prefix), it is not mandatory and it is quite possible to choose a different one.
Setting Parameters - XSLT: Extensible Stylesheet Language Transformations
setting parameters while running transformations using precoded .xsl and .xml files is quite useful, configuring the .xsl file from javascript may be even more useful.