
New WebKit Features in Safari 13.1 - chmaynard
https://webkit.org/blog/10247/new-webkit-features-in-safari-13-1/
======
tmvnty
I do love browse with Safari from time to time, but it would not take long for
me to notice a site's behaviour being "different" because of it. Use
hn.algolia.com as an example, on Safari 13.1, the site currently renders
differently to Chrome (black background?) and the time range filter (Past
Year/Month etc) text are missing...

~~~
gumby
Is this a bug in WebKit or in the algolia site?

~~~
Tagbert
It’s usually considered best, when styling a site, that if you set the
background color, you have to set the text color. otherwise you run into site
bugs like this. Dark Mode is one cause but there are other reason why text
might not be the color you expect and your background color will conflict.

------
sandstrom
Great improvements! It’s comforting that Apple is still prioritizing the
browser. Though I’d wish they’d focus even more resources on it. Given all
they spend on iOS native it would be sound if a slice of that could be towards
Safari.

The new hint values for the soft key enter is a small but very useful
addition!

------
queezey
> These improvements are available to users running watchOS 6.2 [...]

I would like more information about Safari being available on Apple Watch.

Normally I'd think it's inclusion was an accident or oversight, but it's
mentioned at both the top and the bottom of the article.

~~~
Austin_Conlon
Not a standalone browser app, but if I tap a link in say the watchOS Mail app,
it'll display a web view. Developers can optimize their site for the watch
display. It might sound crazy but it's useful for glancing at brief
information on the web.

~~~
brandonhorst
Siri can also show web results on watch. I believe the News app uses WebView
as well.

------
andrekandre
> Async Clipboard API

> The implementation is available through the navigator.clipboard API which
> must be called within user gesture event handlers like pointerdown or
> pointerup, and only works for content served in a secure context (e.g.
> [https://](https://)). Instead of a permissions-based model for reading from
> the clipboard, a native UI is displayed when the page calls into the
> clipboard API; the clipboard can only be accessed if the user then
> explicitly interacts with the platform UI.

that looks pretty cool... do other browsers implementation also work like ↑
that?

~~~
om2
I’m not sure who else has implemented this API so far, but I believe they
mostly use explicit permissions instead.

------
forkLding
At least I think WebRTC was mentioned, been dying for more fixes to issues.

~~~
maxwell
Apple has intentionally crippled WebRTC for years to stifle FaceTime
competition and drive up dev costs by forcing native app development. The
video chat startup I co-founded in 2015 was impacted.

[https://docs.house.gov/meetings/JU/JU05/20190716/109793/HHRG...](https://docs.house.gov/meetings/JU/JU05/20190716/109793/HHRG-116-JU05-20190716-SD036.pdf)

~~~
scarface74
Why pray tell would Apple want to “stifle” competition for FaceTime? It’s not
like Apple makes money from it.

And then they are stifling competition for their app - by “forcing” you to
create an app that integrates with dialer and your call history?

Maybe your startup was “impacted” by not having the expertise or funding to
create a native app like at least a dozen companies have done?

~~~
1over137
>It’s not like Apple makes money from it.

Facetime is a feature that helps sell their devices. If they don't ultimately
make money from it, why did they spent money to create it?

~~~
scarface74
So how would stopping people from making web video chat apps but allowing them
to make apps that integrate with the dialer and phone history help them sell
more devices?

They want a robust third party ecosystem.

~~~
maxwell
Devoting developer resources to building/extending native iOS apps to
integrate with iOS-specific dialer/phone history increases costs and extends
lock-in. Web apps that can perform all the functionality of native apps, such
as video chat and games, erode the value of the App Store.

Integrating with the iOS dialer and phone history means not implementing
something else that would provide value across platforms.

~~~
scarface74
The attitude that a company shouldn’t actually build features that are better
for the consumer and instead are better for the developer is how we end up
with crappy resource intensive, battery draining electron apps. If you can’t
make an app that is in the best interest of the customer, maybe your product
doesn’t deserve to exist.

------
claytongulick
Still doing everything they can to hold back PWA's, I see.

Their browser monopoly on ios can only last so long. The same strategy
backfired horribly for ms in the ie6 days.

(And no, you can't install an alternate browser on ios. It's just a crippled
"skinned" shell on top of safari)

~~~
om2
How is this large set of web platform improvements evidence of holding back
PWAs?

------
floatingatoll
For folks who read the release notes for Safari Technology Preview releases,
you'll find no surprises here:

> _Changes in this [13.1] release of Safari were included in the following
> Safari Technology Preview releases: 90, 91, 92, 93, 94, 95, 96, 97, 98._

------
xfalcox
No Web Push API.

No fixes for SameSite Lax cookies under service worker routes.

No page lifecycle API so we better handle iOS PWAs.

~~~
om2
We’d love your feedback on how you are looking to use these APIs. A lot of our
work is driven by developer feedback.

Also, for the SameSite Lax thing, can you explain a bit more? That sounds like
a bug. If you have a reproducible case, please file at bugs.webkit.org and let
me know the Bug ID.

~~~
xfalcox
Regarding the bugs, please check this repro site: [https://samesite-pwa-
demo.herokuapp.com/](https://samesite-pwa-demo.herokuapp.com/)

Also another bug, which is maybe related: [https://rocky-
fjord-97287.herokuapp.com](https://rocky-fjord-97287.herokuapp.com)

------
Hitton
Still no webp. Safari is holding web back.

~~~
olliej
Or you could actually use a standardized video format.

------
arkanciscan
Pointer Events, nearly one full decade after Microsoft implented them in IE10!
Way to skate to the puck AAPL!

~~~
om2
We actually shipped pointer events a while ago. What’s new here is support for
an external mouse or trackpad attached to an iPad generating real mouse events
(and mouse type pointer events) instead of touch events.

------
sunseb
On a side note, I find crazy this obsessive-compulsive behavior to use `const`
everywhere in modern JS codebase (even in Webkit now).

It solves really no problem (I mean, Python, Ruby and almost all other
programming languages are doing fine without preventing against variable
reassignment, and we can still reassign function parameters and object
properties in JS).

So much brain power wasted on this useless thing.

Also using `const` everywhere is semantically misleading and ugly. It's not
what you would expect in 99% of other programming languages out there.

~~~
Chyzwar
There are very few places where you ever need to use let or var. const is
solving important issues

    
    
      - it has lexical scope instead var function scope
      - it does not hoist like var
      - it prevents accidental reassignment
    

Accidental reassignment happen more often in JS because of non-lexial scoping,
weakly typed and async functions. Also, both Ruby and Python are "strongly
typed" as opposed to weakly typed Javascript.

~~~
olliej
Let has lexical scope.

I’ve always thought const was something of a mid feature, as it doesn’t
generally do what people think. He’ll back when Opera was an actual browser
engine it just used const as an alias for var.

