electron / governance

Public repository for governance issues and documents
141 stars 146 forks source link

docs: define practices for third-party extensible APIs #586

Closed samuelmaddock closed 3 weeks ago

samuelmaddock commented 1 month ago

A few of Electron's existing APIs don't do a good job of supporting extensibility for third-party libraries. Let's try to define best practices to guide future API designs with third-party extensibility in mind.

protocol.registerSchemesAsPrivileged

session.setPreloads / session.getPreloads

session.setPreloads([
  ...session.getPreloads(),
  path.join(__dirname, 'new-preload-script.js')
])
timfish commented 3 weeks ago

Thanks for your work on this!