Skip to content

Commit 9265081

Browse files
changes
1 parent f68e7cd commit 9265081

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"license": "MIT",
1919
"homepage": "https://codeboltai.github.io",
2020
"dependencies": {
21-
"@codebolt/common": "^1.0.3",
21+
"@codebolt/common": "^1.0.4",
2222
"typedoc-plugin-missing-exports": "^2.2.0",
2323
"ws": "^8.17.0"
2424
},

src/modules/browser.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import cbws from './websocket';
2-
2+
import {GoToPageResponse,UrlResponse} from '@codebolt/common'
33
/**
44
* A module for interacting with a browser through WebSockets.
55
*/
@@ -19,7 +19,7 @@ const cbbrowser = {
1919
* Retrieves the current URL of the browser's active page.
2020
* @returns {Promise<any>} A promise that resolves with the URL.
2121
*/
22-
getUrl: () => {
22+
getUrl: ():Promise<UrlResponse> => {
2323
return new Promise((resolve, reject) => {
2424
cbws.getWebsocket.send(JSON.stringify({
2525
"type": "browserEvent",
@@ -39,7 +39,7 @@ const cbbrowser = {
3939
* @param {string} url - The URL to navigate to.
4040
* @returns {Promise<any>} A promise that resolves when navigation is complete.
4141
*/
42-
goToPage: (url: string) => {
42+
goToPage: (url: string):Promise<GoToPageResponse> => {
4343
return new Promise((resolve, reject) => {
4444
cbws.getWebsocket.send(JSON.stringify({
4545
"type": "browserEvent",

0 commit comments

Comments
 (0)