Safari 16.4 Released, Adds 135 New Web Features and Over 280 Updates to WebKit



Apple released Safari 16.4 for iOS 16, iPadOS 16, macOS Ventura, macOS Monterey, and macOS Big Sur on March 28, 2023. Apple's WebKit developers have blogged about updates to

WebKit , the rendering engine of Safari 16.4.

WebKit Features in Safari 16.4 |
https://webkit.org/blog/13966/webkit-features-in-safari-16-4/



・Web Push Notifications on iOS and iPadOS
The availability of web push notifications from iOS 16.4 was announced in February 2023, and it will be possible to send notifications to users from the website.

It turns out that 'push notification from website' becomes possible on iOS 16.4 - GIGAZINE



・Improved web application
With the addition of Badging API support, web apps will be able to display a badge count that shows the number of notifications above the app. Also, by selecting 'Add to Home Screen' from the share menu on a third-party web browser, you will be able to add a website shortcut icon.

・Improved web components
Declarative Shadow DOM support has been added, allowing developers to define shadow DOM without using JavaScript. Additionally, the Imperative Slot API is now supported, allowing developers to specify the node assigned to a slot in JavaScript for greater flexibility.

・CSS
Adjusting margins with margin-trim , more customizable typography and CSS properties, added support for relative color syntax and web animations, improved syntax for media queries , and more.



・HTML
The inline frame used for embedding videos etc. has been improved.

・Addition of JavaScript and WebAssembly functions
From Safari 16.4, RegExp Lookbehind, which enables regular expression lookbehind, and JavaScript Import Maps, which can control URLs of modules acquired by JavaScript, are supported.

・Web API
Added support for APIs such as

OffscreenCanvas , Full Screen , ScreenOrientation , Screen Activate Lock , UserActivation , Compression Streams . Also, the WebGL canvas now supports the Display P3 wide color space.

・Images, videos and audio
Added support for the video portion of the WebCodecs API , useful for applications that perform video editing, video conferencing, and real-time processing of video. Safari 16.4 also improves audio quality for video conferencing and adds support for AVCapture 's virtual camera.

・WKWebView
WKPreference used by WKWebView in iOS and iPadOS 16.4 added support for the shouldPrintBackgrounds API , which allows you to opt-in to include page backgrounds when printing.

・Developer tools
A new property called 'isInspectable' is now available on all platforms that support WKWebView or JSContext . The default is false, and setting it to true will allow you to opt-in to inspecting content using Web Inspector even in release builds of your app.



Also, when automating Safari 16.4 with safaridriver, we now support commands to get elements in the shadow root and accessibility commands to get element roles and labels.

Web Inspector
A typography inspection feature has been added to the Web Inspector. A warning will now appear if the rendering engine has to generate these styles for fonts that don't provide the appropriate styles.



We've also added tools for adding CSS and the ability to badge HTML elements. It is expected that this will help when developing using powerful third-party framework services.



・Safari extension
Enhancements have been made to the Declarative Net Request API. It also now supports SVG images as extension icons and introduces support for the scripting.registerContentScript API , allowing developers to script dynamic content that can be registered, updated, and deleted programmatically. Become.

・Safari content blocker
The ``: has ()'' selector is supported in the Safari content blocker rules, and the possibility of content blocking has expanded greatly. Developers can now create more precise rules that target specific parts of web pages, making it easier to block unwanted content while preserving the user's browsing experience.

- New restrictions in lockdown mode
Added API to disable lockdown mode, which severely restricts device functionality when targeted by highly sophisticated cyber-attacks.

・Other improvements
Safari 16.4 now supports dark mode for text files. Also, now prevents redirects to URLs starting with 'data:' and 'about:'. In addition, WebKit in Safari 16.4 has various bug fixes and feedback.

in Software, Posted by log1i_yk