mozilla - Dave's Blog


Multiple Windows in Win10 JavaScript UWP apps

2018 Mar 10, 1:47

Win10 Changes

In Win8.1 JavaScript UWP apps we supported multiple windows using MSApp DOM APIs. In Win10 we use and window and a new MSApp API getViewId and the previous MSApp APIs are gone:

Win10 Win8.1
Create new window MSApp.createNewView
New window object window MSAppView
viewId MSApp.getViewId(window) MSAppView.viewId

WinRT viewId

We use and window for creating new windows, but then to interact with WinRT APIs we add the MSApp.getViewId API. It takes a window object as a parameter and returns a viewId number that can be used with the various Windows.UI.ViewManagement.ApplicationViewSwitcher APIs.

Delaying Visibility

Views in WinRT normally start hidden and the end developer uses something like TryShowAsStandaloneAsync to display the view once it is fully prepared. In the web world, shows a window immediately and the end user can watch as content is loaded and rendered. To have your new windows act like views in WinRT and not display immediately we have added a option. For example
let newWindow ="", null, "msHideView=yes");

Primary Window Differences

The primary window that is initially opened by the OS acts differently than the secondary windows that it opens:

Primary Secondary Allowed Disallowed
window.close Close app Close window
Navigation restrictions ACUR only No restrictions

The restriction on secondary windows such that they cannot open secondary windows could change in the future depending on feedback.

Same Origin Communication Restrictions

Lastly, there is a very difficult technical issue preventing us from properly supporting synchronous, same-origin, cross-window, script calls. That is, when you open a window that's same origin, script in one window is allowed to directly call functions in the other window and some of these calls will fail. postMessage calls work just fine and is the recommended way to do things if that's possible for you. Otherwise we continue to work on improving this.


Retweet of JustRogDigiTec

2016 Jan 22, 5:43
This is becoming increasingly more relevant as high quality games/apps move to #html5 …#html5games #webGL

Retweet of mlhaufe

2015 Jun 17, 4:45
Eich's Law: "If you are liberal in what you accept, others will utterly fail to be conservative in what they send." …

Retweet of sleevi_

2015 Apr 7, 2:41
Rad to see Mozilla in on the fun! For Chrome, see!topic/blink-dev/2LXKVWYkOus … and!topic/security-dev/pnsUO-KxzTs … // @metromoxie …

Retweet of dveditz

2015 Mar 19, 6:56
The joys of bug bounty programs: someone reported that port 21 was open on 

Retweet of zoltandulac

2015 Mar 4, 5:21
Great resource. I always wondered what was "animatable" via CSS and what wasn't. Now I know. …

Retweet of JustRogDigiTec

2015 Feb 13, 6:54
Still on the fence if this is good for the web. Love the progress!! “@shanselman: Flash isn't dead. It's undead. …

Microsoft will pay up to $100K for new Windows exploit techniques

2013 Jun 21, 4:29

Good news everyone! Of course Microsoft employees are not eligible but that’s probably for the best.

PermalinkCommentssecurity exploit money microsoft technical

Mario 3 recreated with CSS3 animations and media queries (

2012 Nov 1, 2:48PermalinkCommentscss animation Mario smb3 video-game

JavaScript Array methods in the latest browsers

2011 Dec 3, 6:46

Cool and (relatively) new methods on the JavaScript Array object are here in the most recent versions of your favorite browser! More about them on ECMAScript5, MSDN, the IE blog, or Mozilla's documentation. Here's the list that's got me excited:

some & every
Does your callback function return true for any (some) or all (every) of the array's elements?
Filters out elements for which your callback function returns false (in a new copy of the Array).
Each element is replaced with the result of it run through your callback function (in a new copy of the Array).
reduce & reduceRight
Your callback is called on each element in the array in sequence (from start to finish in reduce and from finish to start in reduceRight) with the result of the previous callback call passed to the next. Reduce your array to a single value aggregated in any manner you like via your callback function.
Simply calls your callback passing in each element of your array in turn. I have vague performance concerns as compared to using a normal for loop.
indexOf & lastIndexOf
Finds the first or last (respectively) element in the array that matches the provided value via strict equality operator and returns the index of that element or -1 if there is no such element. Surprisingly, no custom comparison callback method mechanism is provided.
PermalinkCommentsjavascript array technical programming

Using client-side storage, today. ✩ Mozilla Hacks – the Web developer blog

2011 Apr 5, 5:14A JS wrapper script that lets you use storage in IE6/7 via userData or localStorage every where else.PermalinkCommentsjavascript html web webbrowser storage technical userdata localstorage

Internet Explorer team sent us cake for shipping Firefox 4 #fx4 on Twitpic

2011 Mar 22, 12:51We've now got IE9 and FF4 which means time for more cake!PermalinkCommentshumor browser webbrowser firefox ie ie9 ff4 mozilla microsoft

Spirit of Indiana (Jones) – syncing HTML5 Video with Maps ✩ Mozilla Hacks – the Web developer blog

2010 Dec 16, 1:12Nice! Indiana Jones style map fade in over video done in HTML5 with video tag, and Google maps API.
PermalinkCommentshtml5 video map technical demo google animation svg

Video+html5+Popcorn.js=hyper-video - Standblog

2010 Aug 22, 4:04Demo of marked-up video with the people and places shown in the video popping up along side in real time.PermalinkCommentsvideo html html5 javascript technical mozilla

Microsoft throws its weight behind Web Open Font format

2010 Apr 21, 6:48"The Web Open Font Format, already backed by Mozilla and many type foundries was accepted by the World Wide Web Consortium yesterday, marking the first stage in its standardization. The submission included a surprising new sponsor: Microsoft."PermalinkCommentsfont microsoft web internet typography arstechnica browser technical

Weave Developer Resources

2010 Feb 27, 10:17Weave syncs web browser user data. Its an open platform using JSON data, RESTful URL based APIs, with basic auth over HTTPS.PermalinkCommentsweave firefox web browser mozilla development technical reference

Aza’s Thoughts » Identity in the Browser (Firefox)

2009 Nov 30, 6:31"At Mozilla Labs, we’ve been working on some potential integrations of identity directly into the browser. Note, this is an extremely rough draft." Looks pretty!PermalinkCommentsfirefox browser identity web mozilla security authentication openid

Bookmarklet of death: Domain hijacking without 0days | GNUCITIZEN

2009 Sep 23, 7:56"I do understand that it would be annoying to warn users every time they run a bookmarklet, but I think it would be sensible to show a warning at least the first time a given bookmarklet is executed. If you work for a popular web browser vendor such as Microsoft or Mozilla, you can think of this as my wish for the day! I'd love to hear your feedback if you are reading this!"PermalinkCommentstechnical bookmarklet bookmarklets security web webbrowser javascript

Code Rush - Mozilla documentary (PCR | Click Movement)

2009 Jul 10, 7:37"Code Rush aired nationally on PBS in March 2000. It documents the Mozilla team as they struggle to publish the first open source release of the Netscape Browser."PermalinkCommentsvideo mozilla browser browser-war internet opensource documentary free download web technical

Bits Up!: DNS Prefetching for Firefox

2009 Jun 22, 3:28Details on Firefox's DNS prefetching: "The Firefox implementation takes this approach one step further than just pre-resolving anchor href hostnames. It uses the prefetch logic on URLs that are being included in the current document. By this I mean that it uses the prefetch logic on things like images, css, and jscript that are being loaded right away, in addition to anchor links which might be clicked on at a slightly later time."PermalinkCommentsdns dns-prefetching html performance networking firefox mozilla technical
Older Entries Creative Commons License Some rights reserved.