[英]Reenabling document.execCommand(“cut”) in Google Chrome
Is there a way to re-enable the document.execCommand("cut")
Javascript method call in Google Chrome?有没有办法在 Google Chrome 中重新启用
document.execCommand("cut")
Javascript 方法调用? Palm's WebOS Enyo framework uses this is a few places, which means when I'm working on applications locally I can't access every API of the framework. Palm 的 WebOS Enyo 框架使用的地方很少,这意味着当我在本地处理应用程序时,我无法访问框架的每个 API。
Insight from all platforms welcome, but I'm working on OS X so those answers are preferred.欢迎来自所有平台的见解,但我正在使用 OS X,所以这些答案是首选。
Chrome does not support execCommand or clipboard interaction, which is considered a security threat. Chrome 不支持 execCommand 或剪贴板交互,这被视为安全威胁。
For example, Google docs on chrome shows a "Please use CTRL+X or use your browser's edit menu" dialog when a user tries to execute cut from google docs' UI.例如,当用户尝试从谷歌文档的 UI 执行剪切时,Chrome 上的谷歌文档会显示“请使用 CTRL+X 或使用浏览器的编辑菜单”对话框。
An experimental clipboard API is available for chrome extensions : http://code.google.com/chrome/extensions/experimental.clipboard.html#method-executeCut实验剪贴板 API 可用于 chrome扩展: http://code.google.com/chrome/extensions/experimental.clipboard.html#method-executeCut
You are going to have to use the emulator for some functionality.您将不得不使用模拟器来实现某些功能。
I dont know if other WebKit browsers like Safari have this ability enabled however.我不知道其他 WebKit 浏览器(如 Safari)是否启用了此功能。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.