File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 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 },
Original file line number Diff line number Diff line change 11import 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" ,
You can’t perform that action at this time.
0 commit comments