SerialPort.close()
Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.
The SerialPort.close()
method of the SerialPort
interface returns a Promise
that resolves when the port closes.
Syntax
var promise = SerialPort.close();
Parameters
None.
Return value
A Promise
.
Specifications
Specification |
---|
Web Serial API # dom-serialport-close |
Browser compatibility
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | WebView Android | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | |
close |
89 |
89 |
No |
No |
No |
No |
No |
No |
No |
No |
No |
No |
© 2005–2021 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/SerialPort/close