8000 feat: add serial api support by jkleinsc · Pull Request #25237 · electron/electron · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

feat: add serial api support #25237

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

Merged
merged 5 commits into from
Sep 28, 2020
Merged

feat: add serial api support #25237

merged 5 commits into from
Sep 28, 2020

Conversation

jkleinsc
Copy link
Member
@jkleinsc jkleinsc commented Aug 31, 2020

Description of Change

This PR enables use of the Serial API in Electron by exposing several new events on webContents:

  • select-serial-port - fired when navigator.serial.requestPort() is called so that an Electron developer can programmatically select a serial port
  • serial-port-added - fired when a new serial port is detected. Emitted after navigator.serial.requestPort has been called and select-serial-port has fired if a new serial port becomes available. For example, this event will fire when a new USB device is plugged in.
  • serial-port-removed - fired when a serial port is removed. Emitted after navigator.serial.requestPort has been called and select-serial-port has fired if a serial port has been removed. For example, this event will fire when a USB device is unplugged.
    Resolves Serial API support #22478

Checklist

Release Notes

Notes: Added Serial API support

@electron-cation electron-cation bot added the new-pr 🌱 PR opened recently label Aug 31, 2020
@electron-cation electron-cation bot removed the new-pr 🌱 PR opened recently label Sep 1, 2020
@jkleinsc jkleinsc changed the title [WIP] feat: add serial api support feat: add serial api support Sep 18, 2020
@jkleinsc jkleinsc requested review from nornagon, MarshallOfSound and a team September 18, 2020 00:52
@jkleinsc
Copy link
Member Author

The API WG reviewed this at the Sept 21, 2020 meeting.

@@ -1457,7 +1457,7 @@ describe('iframe using HTML fullscreen API while window is OS-fullscreened', ()
});

describe('navigator.serial', () => {
app.commandLine.appendSwitch('enable-experimental-web-platform-features');
app.commandLine.appendSwitch('enable-blink-features', 'Serial');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can this go in the WebPreferences?

Copy link
Contributor
@nornagon nornagon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm with nit

@jkleinsc jkleinsc merged commit fd63510 into master Sep 28, 2020
@release-clerk
Copy link
release-clerk 8000 bot commented Sep 28, 2020

Release Notes Persisted

Added Serial API support

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

Successfully merging this pull request may close these issues.

Serial API support
3 participants
0