Chrome 110, scheduled for launch on February 7, 2022, includes a Web Share API handling change that improves privacy and security by requiring the Web Share API to explicitly allow third-party content.
This may not be something a single publisher needs to respond to.
It’s probably more relevant on the developer side, where they build things like web apps that use the Web Share API.
Still, it’s good to know what it is for the rare situation where it might come in handy in diagnosing why a website isn’t working.
The Mozilla developer page describes the Web Share API:
“The Web Share API allows a website to share text, links, files, and other content to user-selected sharing targets, using the underlying operating system’s sharing mechanisms.
These sharing destinations typically include the system clipboard, email, contacts or messaging applications, and Bluetooth or Wi-Fi channels.
…Note: This API should not be confused with the Web Share Target API, which allows a website to specify itself as a share target.”
allow=”web-share” attribute
An attribute is HTML markup that modifies an HTML element in some way.
For example, the nofollow attribute modifies the anchor element by signaling to search engines that the link is not trusted.
The
A
Iframes are ubiquitous, e.g. B. in ads and embedded videos.
The problem with an iframe containing content from another website is that it creates an opportunity to display unwanted content or allow malicious activity.
And that’s the problem that the allow=”web-share” attribute solves by setting a permissions policy on the iframe.
This special permissions policy (allow=”web-share”) tells the browser that it’s okay to display third-party content inside an iframe.
Google’s announcement uses this example of the attribute used:
<iframe allow="web-share" src="https://third-party.example.com/iframe.html"></iframe>
Google calls this a “a potentially groundbreaking change in the Web Share API.”
The announcement warns:
“If a sharing action needs to take place in a third-party iframe, a recent spec change requires that you explicitly allow the operation.
Add to this
This tells the browser that the embedding website allows the third-party embedded iframe to trigger the share action.”
Read the announcement on Google’s Chrome website:
New requirements for the Web Share API in third-party iframes
Featured image from Shutterstock/Krakenimages.com
var s_trigger_pixel_load = false; function s_trigger_pixel(){ if( !s_trigger_pixel_load ){ striggerEvent( 'load2' ); console.log('s_trigger_pix'); } s_trigger_pixel_load = true; } window.addEventListener( 'cmpready', s_trigger_pixel, false);
window.addEventListener( 'load2', function() {
if( sopp != 'yes' && !ss_u ){
!function(f,b,e,v,n,t,s) {if(f.fbq)return;n=f.fbq=function(){n.callMethod? n.callMethod.apply(n,arguments):n.queue.push(arguments)}; if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0'; n.queue=[];t=b.createElement(e);t.async=!0; t.src=v;s=b.getElementsByTagName(e)[0]; s.parentNode.insertBefore(t,s)}(window,document,'script', 'https://connect.facebook.net/en_US/fbevents.js');
if( typeof sopp !== "undefined" && sopp === 'yes' ){ fbq('dataProcessingOptions', ['LDU'], 1, 1000); }else{ fbq('dataProcessingOptions', []); }
fbq('init', '1321385257908563');
fbq('track', 'PageView');
fbq('trackSingle', '1321385257908563', 'ViewContent', { content_name: 'chrome-110-web-share-api', content_category: 'news web-development' }); } });