标准主体是否有任何变动来支持安全复制到剪贴板的方法?

发布于 2024-11-18 10:33:49 字数 546 浏览 4 评论 0原文

如果请求是由用户(不仅仅是某些脚本)发起的,页面可以将某些内容复制到用户的剪贴板,这似乎是网络上的通用需求。一个典型的例子是 https://bitly.com/ ,它想在剪贴板上为您提供快捷链接您可以将其粘贴到其他地方。

我现在使用基于 Flash 的 ZeroClipboard 来解决这个问题(也是有点),但出于各种原因(移动、性能、安全、标准、查看器麻烦),我想在我的页面中删除 Flash。由于 ZeroClipboard 要求用户通过实际的鼠标单击来启动它,因此似乎它已被证明是相对安全的(除了一般的 Flash 漏洞)。

我有几个页面供用户访问,以便在剪贴板上获取他们想要的内容,以便他们可以将其粘贴到其他地方(JS 或 CSS 的片段)。如果最终用户不必手动选择正确的文本然后手动将其复制到剪贴板,那么对于最终用户来说,这显然会更容易。

所以......我想知道现在标准组织中是否正在讨论这个问题?现在,这是我的页面中出现闪烁的唯一原因。

对于正在讨论的任何标准工作,是否有任何浏览器提供或可用的支持?

It seems like a general purpose need on the web that a page can copy something to the user's clipboard if the request is initiated by the user (not just by some script). A classic example is something like https://bitly.com/ that wants to provide you with a shortcut link on your clipboard that you can paste somewhere else.

I'm using the Flash-based ZeroClipboard now to solve this problem (as is bitly too), but would like to get rid of Flash in my pages for a variety of reasons (mobile, performance, security, standards, viewer hassle). Since ZeroClipboard requires that it is initiated with an actual mouse click by the user, it seems like it has proven to be relatively safe (aside from the general Flash vulnerabilities).

I have several pages that users come to in order to get stuff that they want on their clipboard so they can paste it elsewhere (snippets of JS or CSS). It's obviously easier for the end-user if they don't have to manually select the correct piece of text and then manually copy it to the clipboard.

So ... I'm wondering if this is being discussed anywhere in the standards organizations now? Right now, it's the only reason left that I have flash in my pages.

For any standards efforts that are being discussed, is there any support coming or available in any of the browsers for it?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

淡墨 2024-11-25 10:33:49

关于该主题有一个 W3C 工作草案

There is a W3C working draft on that subject.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文