-
Notifications
You must be signed in to change notification settings - Fork 149
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
docs: Add examples section for navigation history #588
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.
I believe these need to land in e/e
, not this repo. Anything in docs/latest
is overwritten with the latest from e/e
when docs sync.
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.
few formatting comments for the final PR on e/e
@@ -0,0 +1,61 @@ | |||
--- | |||
title: "Navigation history" |
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.
title: "Navigation history" | |
title: "Navigation History" |
The [NavigationHistory](latest/api/navigation-history.md) API allows you to manage and interact with the browsing history of your Electron application. This powerful feature enables you to create intuitive navigation experiences for your users. | ||
|
||
### Accessing NavigationHistory | ||
To use NavigationHistory, access it through the webContents of your BrowserWindow: |
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.
To use NavigationHistory, access it through the webContents of your BrowserWindow: | |
To use NavigationHistory, access it through the [webContents](../api/web-contents.md) of your [BrowserWindow](../api/browser-window.md): |
let mainWindow = new BrowserWindow({ width: 800, height: 600 }) | ||
let navigationHistory = mainWindow.webContents.navigationHistory |
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.
let mainWindow = new BrowserWindow({ width: 800, height: 600 }) | |
let navigationHistory = mainWindow.webContents.navigationHistory | |
const mainWindow = new BrowserWindow({ width: 800, height: 600 }) | |
const navigationHistory = mainWindow.webContents.navigationHistory |
let navigationHistory = mainWindow.webContents.navigationHistory | ||
``` | ||
### Key Features | ||
#### Navigating Through History |
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.
#### Navigating Through History | |
#### Navigating through history |
To be consistent with other docs, all headings should be in sentence case
#### Accessing History Entries | ||
Retrieve and display the user's browsing history: |
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.
I think this will fail lint. We'll need to add a newline in between each heading and content.
#### Accessing History Entries | |
Retrieve and display the user's browsing history: | |
#### Accessing History Entries | |
Retrieve and display the user's browsing history: |
let mainWindow = new BrowserWindow({ width: 800, height: 600 }) | ||
let navigationHistory = mainWindow.webContents.navigationHistory | ||
``` | ||
### Key Features |
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.
### Key Features |
I would remove this heading since it doesn't add anything here
Moving this to Todo:
|
This PR:
Note:
getAllEntries
does not work until this PR is merged, so we can hold on merging or remove the history portion of the example