还能有一个HTML5 API剪贴板? [英] Will there ever be an HTML5 Clipboard API?

查看:204
本文介绍了还能有一个HTML5 API剪贴板?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我沮丧,我们是多么远远落后于其他标准的网络API的剪贴板访问。

I'm frustrated with how far behind other standard web APIs we are with clipboard access.

我工作的web应用程序,让你画,并在浏览器中编辑SVG图形。文件API让我加载和读取SVG文件完全客户端和SVG API显然让我显示SVG图形。

I'm working on a webapp that lets you draw and edit SVG graphics in the browser. The File API lets me load and read an SVG file completely client-side and the SVG API obviously lets me display SVG graphics.

但它不可能得到任何我画出来的浏览器并将其粘贴到,说,Photoshop中,一样可以当你在Illustrator复制的东西。

But it's impossible to get anything I draw out of the browser and paste it into, say, Photoshop, like you can when you copy something in Illustrator.

在W3C否认操纵安全为由复制事件的能力:

The W3C denies the ability to manipulate copy events on the grounds of security:

使作者能够改变什么复制由用户,或作出
  东西自动拷贝这是从来没有选择,并允许
  无限制拨打粘贴信息可以提高各种安全和
  隐私问题。

Enabling authors to change what is copied by a user, or to make an automated copy of something that was never selected and allowing unrestricted calls to paste information can raise various security and privacy concerns.

的问题的一个例子的情形是,其中用户选择的链接,并
  拷贝它,但不同的链接复制到剪贴板。效果
  这可粘贴的范围从一个意想不到的结果未遂
  网络钓鱼攻击。

An example scenario of a problem is where a user selects a link and copies it, but a different link is copied to the clipboard. The effect of this can range from an unexpected result on pasting to an attempted "phishing" attack.

来源:<一个href=\"http://www.w3.org/TR/clipboard-apis/#other-security-and-privacy-considerations\">http://www.w3.org/TR/clipboard-apis/#other-security-and-privacy-considerations

然而地理位置,这是一样多的安全/隐私的考虑,是由一个简单的权限对话框中的最新的浏览器支持。

Yet geolocation, which is just as much of a security/privacy consideration, is being supported by the newest browsers with a simple permissions dialog.

我们为什么不能对复制到剪贴板同样的事情?甚至可以限制在需要CTRL + C的事件,以避免滥用。

Why can't we have the same thing for copying to the clipboard? It could even be restricted to require a CTRL+C event, to avoid abuse.

so-and-so.com想控制你复制数据。[允许] [拒绝]

"so-and-so.com wants to control the data you're copying. [Allow] [Deny]"

用户可以允许它一次,他们信任的Web应用程序,并得到更好地利用它永远。和开发商可以与网络做更多的令人兴奋的事情。

Users could allow it once for a webapp they trust, and get more out of it forever. And developers could do more exciting things with the web.

最近通过的<一个href=\"http://stackoverflow.com/questions/6219197/how-to-manage-image-pasting-from-clipboard-in-html5\">paste捕捉给了我一些希望。我绝对喜欢什么,我可以用这个在 imgur 做的,例如。 (试着在你的操作系统复制图像并将其粘贴在imgur的主页)。

The recent adoption of paste capturing gives me some hope. I absolutely love what I can do with this on imgur, for example. (Try copying an image in your OS and pasting it on the homepage of imgur).

有什么我描述成为可能复制任何机会?是它在所有正在工作?

Is there any chance of what I described becoming possible for copying? Is it being worked on at all?

推荐答案

优秀文章。 1,我想看到​​的应用程序。但我认为你已经回答了你自己的问题与所有的文档。

Excellent post. +1 I'd like to see the app. But I think you've answered your own question with all the documentation.

您应该请愿WHATWG,正如你说的话似乎是一个很好的解决方案,它不会出现他们(WHATWG)希望建立这个标准,生怕剪贴板倾销捕捉(可能)敏感的用户数据。

You ought to petition the WHATWG, as what you say seems to be a good solution and it does not appear that they (the WHATWG) wish to create this standard for fear of clipboard dumping to capture (possibly) sensitive user data.

这篇关于还能有一个HTML5 API剪贴板?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆