[UWP] [HTML] UWP与Webview之间的通信 [英] [UWP][HTML] Communication between UWP and Webview
问题描述
我正在研究如何在UWP和加载远程内容的嵌入式Webview之间进行最佳通信。我找到了一个名为"addWebAllowedObject"的东西,但它似乎只适用于暴露C ++组件。
是否可以在UWP中公开JS代码?我可以在这里找到我要求的样本:https://stackoverflow.com/questions/35786005/winjs-x-ms-webview-addweballowedobject-method-example
I’m doing some investigation on how to best communicate between a UWP and an embedded Webview that loads remote content. I found something called "addWebAllowedObject" but it seems to only work with exposing C++ components.
Is it possible to expose JS code from within the UWP? A sample of what I’m asking for can be found here: https://stackoverflow.com/questions/35786005/winjs-x-ms-webview-addweballowedobject-method-example
推荐答案
你好,冬天,
请阅读粘贴帖子,特别是
发布指南:主题行标签和
Windows 10的已知问题SDK和工具 并自行为标题添加标记。
Please read the sticky posts, especially the Guide to posting: subject line tags and Known Issues for Windows 10 SDK and Tools and add tag to title by yourself.
>>"是否可以在UWP中公开JS代码?"
>>" Is it possible to expose JS code from within the UWP?"
你能告诉我你真正想做什么吗?你最后的要求是什么?请提供更详细的信息。
Could you please tell me what you actually want to do? What’s your final requirement? Please provide more detailed information.
最好的问候,
Xavier Eoro
Xavier Eoro
这篇关于[UWP] [HTML] UWP与Webview之间的通信的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!