-
Notifications
You must be signed in to change notification settings - Fork 365
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
Adding an indexLoadOptions option #263
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a bunch! This looks overall very good.
I only have two small changes
src/types.ts
Outdated
* @default `{}` | ||
* @see https://electronjs.org/docs/api/browser-window#winloadurlurl-options | ||
*/ | ||
indexLoadOptions?: object; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instead of object, can we put the actual fields?
indexLoadOptions?: {
userAgent?: string
//etc
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actuall, there's a import { LoadURLOptions } from 'electron'
already available.
On the same topic, could we rename indexLoadOptions
to loadUrlOptions
to keep the same naming as Electron?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, can do. I thought it would be hassle to keep it in sync.
Great if we can import it but I just tried to log LoadURLOptions
and I got undefined
. Where did you see that? I can't find anything online
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just tried to log LoadURLOptions
Yeah, it's a TypeScript interface, so doesn't have a JS value.
Where did you see that? I can't find anything online
It's generated from Electron docs by https://github.com/electron/typescript-definitions, so it's not really online. But you can search for LoadURLOptions
in your local node_modules/electron/electron.d.ts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for explaining. I'm new to TypeScript. That's handy.
package-lock.json
Outdated
@@ -0,0 +1,6648 @@ | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you remove this file? We use yarn in this repo
24e3a6d
to
bbca016
Compare
OK I think it's ready now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm 👍 thanks!
Resolves #262
The code changes are small. I updated the tests and docs. There were more changes than expected when updating the docs. Maybe someone forgot to commit them before... or maybe I shouldn't be running the command?