Re: [web-bluetooth] I want to package a browser that supports webble by myself (#558)

> > 你能在 JavaScript devtools 控制台中成功运行下面的代码吗?
> > ```js
> > 等待 导航器。蓝牙。requestDevice ( {  acceptAllDevices : true  } ) ; 
> > // 应该出现提示,因为在 devtools 中不需要用户手势。
> > ```
> > 
> > 
> >     
> >       
> >     
> > 
> >       
> >     
> > 
> >     
> >   
> > 仅供参考 错误来自https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/modules/bluetooth/bluetooth.cc;l=353;drc=3095f0ce2cadab0ffa2d0ae922ad7dffd3eeda30
> 
> 我认为它不能在 bluetooth.cc 中调用,因为注入从 web 蓝牙 api.but webview 实现的 javascript 也调用 bluetooth.cc 而不是调用注入 javascript。

I changed requestDevice to requestDevice2, and found that navigator.bluetooth.xxx is not executing the JS code I injected, but calling the Chrome kernel source code, which is normal on http

> > Can you run code below successfully in JavaScript devtools console?
> > ```js
> > await navigator.bluetooth.requestDevice({ acceptAllDevices:true });
> > // Prompt should appear because user gesture is not needed in devtools.
> > ```
> > 
> > 
> >     
> >       
> >     
> > 
> >       
> >     
> > 
> >     
> >   
> > FYI Error comes from https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/modules/bluetooth/bluetooth.cc;l=353;drc=3095f0ce2cadab0ffa2d0ae922ad7dffd3eeda30
> 
> I think it that can not call in bluetooth.cc,because inject javascript which implement from web bluetooth api.but webview also call in bluetooth.cc and not call inject javascript.

I changed requestDevice to requestDevice2, and found that navigator.bluetooth.xxx is not executing the JS code I injected, but calling the Chrome kernel source code, which is normal on http

-- 
GitHub Notification of comment by TsaiYongChuan
Please view or discuss this issue at https://github.com/WebBluetoothCG/web-bluetooth/issues/558#issuecomment-916766067 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Friday, 10 September 2021 09:27:53 UTC