-
Notifications
You must be signed in to change notification settings - Fork 567
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use contextBridge in preload script + update navigation plugin
- Loading branch information
Showing
5 changed files
with
21 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,24 @@ | ||
const { triggerAction } = require('../utils'); | ||
const { triggerAction } = require("../utils"); | ||
|
||
const CHANNEL = "navigation"; | ||
const ACTIONS = { | ||
NEXT: "next", | ||
BACK: 'back', | ||
} | ||
NEXT: "next", | ||
BACK: "back", | ||
}; | ||
|
||
function goToNextPage() { | ||
triggerAction(CHANNEL, ACTIONS.NEXT); | ||
triggerAction(CHANNEL, ACTIONS.NEXT); | ||
} | ||
|
||
function goToPreviousPage() { | ||
triggerAction(CHANNEL, ACTIONS.BACK); | ||
triggerAction(CHANNEL, ACTIONS.BACK); | ||
} | ||
|
||
module.exports = { | ||
CHANNEL: CHANNEL, | ||
ACTIONS: ACTIONS, | ||
global: { | ||
goToNextPage: goToNextPage, | ||
goToPreviousPage: goToPreviousPage, | ||
} | ||
CHANNEL: CHANNEL, | ||
ACTIONS: ACTIONS, | ||
actions: { | ||
goToNextPage: goToNextPage, | ||
goToPreviousPage: goToPreviousPage, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters