mozilla - Dave's Blog

Search
My timeline on Mastodon

Scrollbars in EdgeHtml WebView and Edge browser

2019 Aug 22, 5:35

The scrollbars in UWP WebView and in Edge have different default behavior leading to many emails to my team. (Everything I talk about here is for the EdgeHtml based WebView and Edge browser and does not apply to the Chromium based Edge browser and WebView2).

There is a Edge only -ms-overflow-style CSS property that controls scroll behavior. We have a different default for this in the WebView as compared to the Edge browser. If you want the appearance of the scrollbar in the WebView to match the browser then you must explicitly set that CSS property. The Edge browser default is scrollbar which gives us a Windows desktop styled non-auto-hiding scrollbar. The WebView default is -ms-autohiding-scrollbar which gives a sort of compromise between desktop and UWP app scrollbar behavior. In this configuration it is auto-hiding. When used with the mouse you'll get Windows desktop styled scrollbars and when used with touch you'll get the UWP styled scrollbars.

Since WebViews are intended to be used in apps this style is the default in order to better match the app's scrollbars. However this difference between the browser and WebView has led to confusion.

Here’s an -ms-overflow-style JSFiddle showing the difference between the two styles. Try it in the Edge browser and in WebView. An easy way to try it in the Edge WebView is using the JavaScript Browser.

PermalinkComments

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 window.open and window and a new MSApp API getViewId and the previous MSApp APIs are gone:

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

WinRT viewId

We use window.open 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, window.open 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 window.open option. For example
let newWindow = window.open("https://example.com", 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
window.open 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.

PermalinkComments

Retweet of JustRogDigiTec

2016 Jan 22, 5:43
This is becoming increasingly more relevant as high quality games/apps move to #html5https://hacks.mozilla.org/2016/01/webgl-off-the-main-thread/ …#html5games #webGL
PermalinkComments

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." https://bugzilla.mozilla.org/show_bug.cgi?id=310993 …
PermalinkComments

Retweet of sleevi_

2015 Apr 7, 2:41
Rad to see Mozilla in on the fun! For Chrome, see https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/2LXKVWYkOus … and https://groups.google.com/a/chromium.org/forum/#!topic/security-dev/pnsUO-KxzTs … // @metromoxie https://twitter.com/jruderman/status/585562933914181635 …
PermalinkComments

Retweet of dveditz

2015 Mar 19, 6:56
The joys of bug bounty programs: someone reported that port 21 was open on http://ftp.mozilla.org 
PermalinkComments

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. https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_animated_properties …
PermalinkComments

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. http://www.hanselman.com/blog/JavaScriptHasWonRunFlashWithMozillaShumwayAndDevelopSilverlightInJSWithFayde.aspx …
PermalinkComments

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 (mozilla.org)

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?
filter
Filters out elements for which your callback function returns false (in a new copy of the Array).
map
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.
forEach
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
Older Entries Creative Commons License Some rights reserved.