Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

asWebviewUri文档和代码不符,并且通过webView无法调用该方法 #53

Open
Cone1989 opened this issue Jan 3, 2023 · 1 comment

Comments

@Cone1989
Copy link

Cone1989 commented Jan 3, 2023

文档描述如下:
WeChat70fbff57c3bd6c1c853c0d4e0abe1433

代码如下:

interface WebView {
    ...
    /**
     * 将本地资源转换成可在WebView中加载的Uri。
     */
    asWebviewUri(Uri: Uri): void;
}

代码中该方法没有返回值。

另外,在代码中调用的时候:

resolveCustomEditor(document, webViewPanel) {
	console.log(webViewPanel.webView)
	console.log(webViewPanel.webView.asWebviewUri)
}

打印如下:

// webView有值
WebView {
 _id: 'customeditor.htmlEdit.html.1',
_msgListeners: [],
 _html: ''

// webView.asWebviewUri为undefined
undefined

这两个问题是怎么回事?是我的版本有问题吗?
我的环境是macOS 12.3,HBuilderX版本为:3.6.15.20221228

@gaoshengqing21
Copy link

我也遇到了上面的问题,您这边解决了吗

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants