简体   繁体   English

在 Google Chrome 中重新启用 document.execCommand(“cut”)

[英]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.

相关问题 Chrome 中的 document.execCommand('heading' ..') - document.execCommand('heading' ..') in Chrome 为什么 document.execCommand("paste") 在 Google Chrome 中不起作用? - Why is document.execCommand("paste") not working in Google Chrome? bookmark.exe中的document.execCommand('cut'/'copy')被拒绝 - document.execCommand(‘cut’/‘copy’) was denied in bookmarklet document.execCommand('copy') 命令在 Chrome 中不起作用 - document.execCommand('copy') Command not working in Chrome Javascript document.execCommand“粗体”在Chrome中不起作用 - Javascript document.execCommand “bold” not working in chrome document.execCommand('copy') 不适用于 Chrome - document.execCommand('copy') not working on Chrome document.execCommand - document.execCommand 在Chrome中使用document.execCommand(“ insertorderedlist”)丢失样式 - Styles getting lost using document.execCommand(“insertorderedlist”) in Chrome Chrome HTML document.execCommand('inserthtml'插入到下面的表格单元格中 - Chrome HTML document.execCommand('inserthtml' inserts into following table cell document.execCommand('SaveAs',null,'filename.csv')在chrome上不起作用 - document.execCommand('SaveAs',null,'filename.csv') is not working on chrome
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM