Skip to content

Commit

Permalink
Update wg-api/best-practices.md
Browse files Browse the repository at this point in the history
Co-authored-by: Will Anderson <[email protected]>
  • Loading branch information
samuelmaddock and itsananderson authored Oct 3, 2024
1 parent 1ea5033 commit e24ce52
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions wg-api/best-practices.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,11 +156,11 @@ protocol.registerSchemesAsPrivileged([
])

// Good: third-party libraries can create, read, update, and delete items
if (protocol.getRegisteredSchemes().includes(scheme => scheme.scheme === 'app')) {
protocol.unregisterScheme({ scheme: 'app' })
if (protocol.getPrivilegedSchemes().includes(scheme => scheme.scheme === 'app')) {
protocol.unregisterSchemeAsPrivileged('app' )
}
protocol.registerScheme({ scheme: 'app', privileges: { standard: true } })
protocol.updateScheme({ scheme: 'app', privileges: { secure: true } })
protocol.registerSchemeAsPrivileged({ scheme: 'app', privileges: { standard: true } })
protocol.updatePrivilegedScheme({ scheme: 'app', privileges: { secure: true } })
```

## Classes
Expand Down

0 comments on commit e24ce52

Please sign in to comment.