最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Has Apple released APIs for touch bar yet? - Stack Overflow

programmeradmin2浏览0评论

Apple just announced the new MacBook with the touch bar. Are there APIs that app developers can use? I can't seem to find any online yet.

Does it support access from the browser via JavaScript? WebKit has force touch APIs to support it on four runs touch trackpad) so I'm guessing it'll be pretty useful if they release this one too. Is anything out yet?

Also how to debug and test for touch bar functions, is there some 'MAC EMULATOR' sort of thing?

Apple just announced the new MacBook with the touch bar. Are there APIs that app developers can use? I can't seem to find any online yet.

Does it support access from the browser via JavaScript? WebKit has force touch APIs to support it on four runs touch trackpad) so I'm guessing it'll be pretty useful if they release this one too. Is anything out yet?

Also how to debug and test for touch bar functions, is there some 'MAC EMULATOR' sort of thing?

Share Improve this question edited Apr 28, 2019 at 8:10 Brian Tompsett - 汤莱恩 5,89372 gold badges61 silver badges133 bronze badges asked Oct 27, 2016 at 19:39 Sainath S.RSainath S.R 3,3069 gold badges42 silver badges73 bronze badges 2
  • I doubt there'll be support for JS initially. Apple hasn't exactly been quick to add features to Safari lately. – ceejayoz Commented Oct 27, 2016 at 20:08
  • 1 Safari Tech Preview 19 just dropped with Touch Bar support. I imagine official developer documentation isn't far behind. webkit/blog/7093/… – Tom Hamming Commented Dec 7, 2016 at 20:44
Add a ment  | 

2 Answers 2

Reset to default 7

I think this option is for native client, it won’t be able to manipulate in browser, unless the browser doesn’t support it

If you're writing Native Client (JavaScript only), then here is a repository.

UPDATE: It is already supported by Electron.

There is a native API: https://developer.apple./reference/appkit/nstouchbar

I don't know whether there will be support via Javascript

发布评论

评论列表(0)

  1. 暂无评论