
New WebKit Features in Safari 12.1 - Despegar
https://webkit.org/blog/8718/new-webkit-features-in-safari-12-1/
======
dddddaviddddd
Summary:

    
    
      - dark mode
      - improved tracking restrictions
      - Payment Request API
      - support for VP8 with WebRTC
      - updated DRM
      - streaming improvements
      - Intersection Observer API
      - API for native share dialogs
      - input type="color"

~~~
reaperducer
_input type= "color"_

Sadly, still no <input type="date" />.

~~~
thomas
Seriously. Any news on datetime?

~~~
ashton314
Please. This is my biggest gripe during web development. I _hate_ the fact
that I have to add a bloated bunch of JS to my site just to get a date picker.

~~~
chmln
Shameless plug -
[https://github.com/flatpickr/flatpickr](https://github.com/flatpickr/flatpickr)
has no dependencies :)

~~~
ashton314
Soild. Thanks for that plug. Will be using in the future. :)

------
ryanmccullagh
I'm very excited for Data Lists. Finally, this type of UI component will not
need to be implemented from scratch.

The standard select list works, but it's much better to have a select list
where one can type and filter by typing.

It becomes very hard to choose from a select list when the list becomes large.

~~~
warpech
8 years after it was implemented in Firefox and 7 years after IE and Chrome.
It is far from a new thing, but it is great to see Safari catching up with the
web standards.

~~~
pier25
I have a better one.

In Safari for iOS you can't set the height of an iframe. This has been
available since the <iframe> tag was first introduced in IE4 I believe.

[https://stackoverflow.com/questions/23083462/how-to-get-
an-i...](https://stackoverflow.com/questions/23083462/how-to-get-an-iframe-to-
be-responsive-in-ios-safari/)

There are a number of hacks to remediate this such as using a div with
overflow scroll which encapsulates the iframe, or using an absolute positioned
wrapper on the contents of the iframe.

------
sneak
Where is the U2F/FIDO support? The Mac could be using the T2/Secure Enclave to
differentiate massively here - same goes for the iPhone and iOS. (The
Pixelbook just enabled built in U2F hardware behind a shell flag.)

TOTP is still vulnerable to phishing. Why Apple has been ignoring this when
their biometric products are such a great fit for it is a mystery to me.

~~~
tstevens
They are working on it and it can be enabled in the preview release of safari
right now.

[https://developer.apple.com/safari/technology-
preview/releas...](https://developer.apple.com/safari/technology-
preview/release-notes/)

[https://bugs.webkit.org/show_bug.cgi?id=181943](https://bugs.webkit.org/show_bug.cgi?id=181943)

~~~
pat2man
It can be enabled in the stable release too.

~~~
BillinghamJ
How? Do you have a link to any info?

~~~
threeseed
1\. Open Preferences -> Advanced tab.

2\. Enable "Show Develop menu in Menu Bar"

3\. Select menu item Develop -> Experimental Features -> Web Authentication

~~~
BillinghamJ
Ah awesome, looks like it's there on iOS too!

------
Despegar
Anyone in the ad-tech industry that can comment on the ITP changes? It's the
thing I look forward to the most.

>Updates to Intelligent Tracking Prevention add new restrictions to cookies,
further reducing the ability of hidden third parties to track users across
websites they visit. To do that, support for partitioned cookies was removed
for domains Intelligent Tracking Prevention identifies as having cross-site
tracking capabilities. Going a step further, Intelligent Tracking Prevention
now also limits long-term tracking for JavaScript first-party cookies.

~~~
manigandham
It further entrenches Facebook and Google's monopoly on adtech and solves
nothing against the companies that people worry about most (and ironically
give up the most data too). It also does nothing to stop the wild-west of
mobile app tracking.

The ideal solution would be to offer up the device's Advertising ID to the
browser, just like it is available to mobile apps. That would remove all the
tracking pixels and workarounds and improve privacy as the user can easily
reset their ID whenever they want to.

~~~
jen729w
> It further entrenches Facebook and Google's monopoly on adtech

Just don’t use those sites. I don’t.

~~~
manigandham
Are you being sarcastic? Or seriously suggesting the billions of users of
Google and Facebook should just stop using them? If it was that easy then why
all this trouble with ITP in the first place?

~~~
jen729w
Why would this be sarcastic?

I haven’t used Facebook for about 10 years now.

I stopped using Google last year. DDG is great.

What’s so hard?

~~~
manigandham
>> What's so hard?

Ah the classic HN comment.

The problem is you don't speak for the billions of people use various Facebook
and Google services to live their lives without easy alternatives. When
someone is using Gmail to run their small business or using Facebook to keep
in touch with their distant relatives, I'm sure saying "what's so hard" is all
it takes to get them to see the error of their ways.

------
0xb100db1ade
Is nobody mentioning Dark Mode?

I think it's the most exciting feature!

Android Pie introduced a system light/dark mode that hopefully apps will
integrate.

macOS is implementing system-wide light/dark mode.

I hope other browsers implement dark mode detection.

We are finally approaching my dream of a system wide light/dark toggle so I
can use light in the day and dark during the night.

~~~
DiseasedBadger
Advanced Night Mode, other extensions, various greasemonkey scripts, etc, have
been out for years.

------
miohtama
Looks like Apple finally gave in and started to support VP8, though only in
WebRTC. They are heavily vested in h264.

Maybe the world will see free codecs on one day.

~~~
e1ven
They don't have HW support for VP8 - This makes a big difference in battery
life, so I can understand why they don't support it.

From [https://webkit.org/blog/8672/on-the-road-to-
webrtc-1-0-inclu...](https://webkit.org/blog/8672/on-the-road-to-
webrtc-1-0-including-vp8/)

"We found that, on an iPhone 7 Plus in laboratory conditions, the use of H.264
on a 720p video call increases the battery life by up to an hour compared to
VP8."

That said, they make their own chips. They could certainly add it to the
iPhone n+1 if they were so inclined.

~~~
gcb0
and while they don't update chips, they could just allow the user to give
their batteries to see the content if they choose to. So condescending to
limit user agency like that.

~~~
RandallBrown
99.9% of users wouldn't know why their phone battery is dying more quickly.
They'd just complain that the latest update (or whatever) made their phone
worse.

I guess they could have some sort of pop up saying "The website you're
visiting is using a technology that uses more power on your phone" but that
seems like a pretty crappy compromise.

~~~
gcb0
everyone feels their phone getting hot when the battery has a high drain for
long and will quickly associate to a site.

thinking users are dumb is just gate keeping by oh-so-clever-engineers

------
georgecalm
Great news for PWAs buried in the release notes: “Updated the behavior of
websites saved to the home screen on iOS to pause in the background instead of
relaunching each time.”

------
dmitriid
What saddens me[1] is how horribly hopeless Safari's Developer Tools are. They
are basically unusable at this point. Every month Chrome adds more
capabilities to their dev tools than Safari in a whole year.

[1] It's been saddening (is this a word?) me for over six years now. Safari's
dev tools were best in class, and then they never really improved. The UI was
updated once or twice, each time making the UX considerably worse. People may
complain about how Apple doesn't care about pro market anymore, but the
writing has been on the wall for some time now, and the first canary in the
coal mine was Safari.

BTW. If you're interested, go to Develop -> Enter responsive mode. And then go
Develop -> Show web inspector. Good luck working with the unzoomable screen.
The first time I saw it, I had to go outside and walk for a bit.

~~~
saagarjha
> If you're interested, go to Develop -> Enter responsive mode. And then go
> Develop -> Show web inspector. Good luck working with the unzoomable screen.
> The first time I saw it, I had to go outside and walk for a bit.

I’m not sure what you’re trying to point out?

~~~
hombre_fatal
I think they're pointing out that when the web console is docked on the bottom
(default), the responsive viewport is shrunk since it's scaled by
window.innerHeight with no way (afaict) to zoom independently. At least I
couldn't figure out how.

[https://i.imgur.com/avAHd0l.jpg](https://i.imgur.com/avAHd0l.jpg)

I think I found a bug: docking the web console vertically while in responsive
mode hides the top row of controls. For example there's no button to dock
horizontally. (Edit: actually this was just fixed after updating Safari)

[https://i.imgur.com/XOP43hs.jpg](https://i.imgur.com/XOP43hs.jpg)

~~~
reaperducer
_I think I found a bug: docking the web console vertically while in responsive
mode hides the top row of controls. For example there 's no button to dock
horizontally._

Yep. I ran into this a couple of weeks ago. I thought it was something wonky
with my machine and rebooted to make sure.

My primary audiences on a couple of projects are IE11 and Safari. Sucks to be
me.

~~~
TimothyBJacobs
Appears to be fixed in 12.1

~~~
hombre_fatal
Yeah, realized I hadn't even updated my OS/Safari when I wrote that post,
spent the last 30min doing so, and the latter issue has been fixed.

------
Malic
Unless I am not seeing a polyfill inclusion, at least some of these are
supported in Firefox already (66.0.2) - Color Input and Data Lists, in
particular.

(Not trying to dis Webkit/Safari here - just saying that the "Can I Use?" list
grows desirably longer.)

~~~
lol768
No, you're correct. Firefox has supported <datalist> since v4, and colour
inputs since v29.

------
pier25
It always surprises me how slow Safari is moving compared to Chrome or
Firefox.

~~~
ken
It depends on your priorities. When I look at [1] or [2] or [3], it doesn't
look slow compared to those other browsers.

[1]: [https://caniuse.com/#feat=payment-
request](https://caniuse.com/#feat=payment-request) [2]:
[https://caniuse.com/#feat=web-share](https://caniuse.com/#feat=web-share)
[3]: [https://caniuse.com/#feat=prefers-color-
scheme](https://caniuse.com/#feat=prefers-color-scheme)

It's not hard to run into buggy or unimplemented features in any browser, even
today.

~~~
pier25
I guess you are right. I'm much more interested in ES implementation, PWA
support, etc, than the APIs you mention.

------
mgamache
I wonder if Microsoft's move to Chromium for the Edge browser will push Apple
to move more quickly? Safari will a more obvious outlier if the other two
major browsers support technology X and Apple doesn't. Currently the waters
are a bit muddy with Edge not properly supporting a lot of the latest
technologies (like WebRTC).

------
orf
> The Payment Request API has been updated with granular errors, support for
> default addresses and contacts configured in Wallet and Apple Pay settings,
> and special field support for Japan.

What is "special field support for Japan"? I cannot find any reference to this
in the specification or on Google.

~~~
aestes
It allows merchants to require a phonetic spelling of the recipient's name be
returned as part of the shipping address. This is a feature specific to the
Apple Pay payment method, and is implemented through Payment Request's various
payment method extension points (e.g., PaymentMethodData.data,
PaymentResponse.details).

------
edent
Is there a WebKit based browser for Android?

------
exabrial
U2F would have been nice. :(

------
PunksATawnyFill
It's incredible and pathetic how color-handling has regressed since the early
'90s.

Windows 3.1 through XP had system-wide, user-configurable color schemes. You
could set up a non-inverse (what today is being touted as "dark mode") color
scheme in a few minutes and all applications would honor it. You could do the
same in Unix GUIs. Only the Mac forced its glaring inverse-video scheme on you
24/7.

Now, inexplicably, Windows has ELIMINATED the ability to set up a global color
scheme, and Apple has delivered this half-assed, hard-coded workaround after
40 years. This after Apple was challenged at WWDC in the early 2000s for their
lack of color schemes, and feigned total ignorance that anyone would want
them.

