---
title: "Allowing Web Share on Third-Party Sites"
description: "Starting with Safari Technology Preview 160, the W3C Web Share API no longer works inside third-party iframes unless the embedding page grants permission with an allow=\"web-share\" attribute."
url: "https://swe.quest/articles/allowing-web-share-on-third-party-sites-f594e789237bdd6b"
canonical: "https://webkit.org/blog/13708/allowing-web-share-on-third-party-sites/"
source: "WebKit"
published: "2023-01-31"
difficulty: "medium"
kind: "Announcement"
reading_minutes: 1
tags: ["browsers","security","frontend"]
---

# Allowing Web Share on Third-Party Sites

A post on [WebKit](https://swe.quest/sources/webkit.md), published 2023-01-31, 1 min read, Announcement. Original: [https://webkit.org/blog/13708/allowing-web-share-on-third-party-sites/](https://webkit.org/blog/13708/allowing-web-share-on-third-party-sites/)

## Summary

Starting with Safari Technology Preview 160, the W3C Web Share API no longer works inside third-party iframes unless the embedding page grants permission with an allow="web-share" attribute. An origin can optionally be specified. All major browser engines agreed to the change for privacy and security reasons and are rolling it out. Without the attribute, calls to the API throw an exception. Developers embedding third-party content that uses sharing must update their iframe markup following Permissions Policy syntax.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Browsers](https://swe.quest/tags/browsers.md) (Web & mobile)
- [Security](https://swe.quest/tags/security.md) (Security)
- [Frontend](https://swe.quest/tags/frontend.md) (Web & mobile)

## Prerequisites

- HTML iframes

## Keywords

Web Share API, Permissions Policy, Safari Technology Preview, W3C, WebKit

## Related posts

- [New WebKit Features in Safari 15.4](https://swe.quest/articles/new-webkit-features-in-safari-15-4-378317c134d40474.md): WebKit · 2022-03-14 · Medium · 13 min read · Browsers, CSS, Frontend, JavaScript
  Safari 15.4 ships over 70 WebKit additions, led by the \<dialog\> element with ::backdrop, lazy-loaded images, the :has() parent selector (shipped first in Safari), Cascade Layers, CSS containment, and new small/large/dynamic viewport units (svh, lvh, dvh and friends) that fix mobile viewport sizing.
- [Badging for Home Screen Web Apps](https://swe.quest/articles/badging-for-home-screen-web-apps-42741870aac64b42.md): WebKit · 2023-04-25 · Medium · 4 min read · Browsers, Mobile, JavaScript, Frontend
  WebKit on iOS and iPadOS 16.4 supports the W3C Badging API, but only for web apps added to the Home Screen.
- [Web Push for Web Apps on iOS and iPadOS](https://swe.quest/articles/web-push-for-web-apps-on-ios-and-ipados-7478bb28f95c6572.md): WebKit · 2023-02-16 · Medium · 7 min read · Browsers, Mobile, Communications, Frontend
  iOS and iPadOS 16.4 beta 1 adds standards-based Web Push for Home Screen web apps, using the Push API, Notifications API and Service Workers over Apple Push Notification service, with no Apple Developer Program membership required (allow \*.push.apple.com).
- [News from WWDC24: WebKit in Safari 18 beta](https://swe.quest/articles/news-from-wwdc24-webkit-in-safari-18-beta-f6c733f3db9a46ad.md): WebKit · 2024-06-10 · Medium · 34 min read · Browsers, CSS, Frontend
  Safari 18 beta ships 48 new web platform features, 18 deprecations and 174 bug fixes across iOS 18, iPadOS 18, visionOS 2 and macOS Sequoia betas.
- [News from WWDC23: WebKit Features in Safari 17 beta](https://swe.quest/articles/news-from-wwdc23-webkit-features-in-safari-17-beta-56e2385f10cea4f8.md): WebKit · 2023-06-06 · Medium · 26 min read · Browsers, Frontend, CSS, Video & media
  Safari 17 beta brings 88 web features. Mac users can add any website to the Dock as a web app: cookies are copied over and web push and badging are supported.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
