从 Enyo 应用程序访问 WebOS 剪贴板
使用Enyo开发WebOS应用程序时,是否可以访问剪贴板内容?也就是说,如果我将一些文本复制到 Touchpad 或 Pre 设备上的剪贴板,我可以通过编程方式抓取该文本片段,或者通过编程方式替换它吗?
根据我在 SDK 文档中读到的内容,我假设我需要一个 服务来执行此操作。这是正确的吗?
如果有,是哪项服务?是否有可用服务列表,和/或是否有办法反映到框架中以查看哪些服务可用?
(WebOS开发新手,所以在大声和缓慢说话方面会出错)
When developing a WebOS application with Enyo, is it possible to access the clipboard contents? That is, if I copy a bit of text to the clipboard on a Touchpad or Pre device , can I programmatically grab that piece of text, or programmatically replace it?
From what I've read in the SDK documents, I assume I'd need a Service to do this. Is this correct?
If so, which service? Are there a list of services available, and/or is there a way to reflect into the framework to see which services are available?
(New to WebOS development, so error on the side of speaking loudly and slowly)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为您正在 enyo.dom 上寻找 getClipboard 方法。但是,当我尝试时:
我只是得到 {"0",""},即使剪贴板中有文本。这让我想知道这是否还没有完全烘烤。一个参数是剪贴板工作时的文本。
如果我尝试配套的 enyo.dom.setClipboard,我会收到 NOT_FOUND_ERR: DOM Exception 8。
在这里找到这两个函数: https://developer.palm.com/content/api/reference/enyo/enyo-api-reference.html
I think you are looking for the getClipboard method on the enyo.dom. However, when I try:
I just get {"0",""}, even though I have text in the clipboard. It makes me wonder if this isn't fully baked yet. One argument will be the text in the clipboard when it works.
If I try the companion enyo.dom.setClipboard, I get a NOT_FOUND_ERR: DOM Exception 8.
Found both of these functions in here: https://developer.palm.com/content/api/reference/enyo/enyo-api-reference.html