electron / electron/remote

webview.webContents.addListener returns an empty object

Open
#148 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
411
Forks
53
Avg merge
3m
Merged PRs (30d)
1

Description

### Expected Behavior
```javascript
const webview = webContents.fromId(webviewel.getWebContentsId())
webview.addListener('will-navigate', e => console.log(e))
```

This code must return an object like this
```javascript
{
isTrusted: false
url: "https://mail.google.com/"
bubbles: false
cancelBubble: false
cancelable: false
composed: false
currentTarget: null
defaultPrevented: false
eventPhase: 0
returnValue: true
srcElement: webview#webview.w-screen.h-[calc(100vh-40px)]
target: webview#webview.w-screen.h-[calc(100vh-40px)]
timeStamp: 1475.2000000001863
type: "will-navigate"
}
```
### Actual Behavior
But returns an empty object with no data
```
{}
```

I do not understand the issue here properly. Please get to me as soon as possible.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.