8

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?

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
Sainath S.R
  • 3,074
  • 9
  • 41
  • 72
  • I doubt there'll be support for JS initially. Apple hasn't exactly been quick to add features to Safari lately. – ceejayoz Oct 27 '16 at 20:08
  • 1
    Safari Tech Preview 19 just dropped with Touch Bar support. I imagine official developer documentation isn't far behind. https://webkit.org/blog/7093/release-notes-for-safari-technology-preview-19/ – Tom Hamming Dec 07 '16 at 20:44

2 Answers2

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.

Aidas Bendoraitis
  • 3,965
  • 1
  • 30
  • 45
1

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

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

Zheko
  • 673
  • 6
  • 16