WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
278919
Web Inspector: $event ReferenceError in Safari extension event listeners
https://bugs.webkit.org/show_bug.cgi?id=278919
Summary
Web Inspector: $event ReferenceError in Safari extension event listeners
Jeff Johnson
Reported
2024-08-30 07:19:09 PDT
Created
attachment 472371
[details]
Sample Safari web extension Xcode project According to the Console Command Line API, $event is equal to the current DOM event while JavaScript execution is paused inside a DOM event listener.
https://webkit.org/web-inspector/console-command-line-api/
However, $event does not work in Safari extension DOM event listeners. Steps to reproduce: 1) Download, unzip, open, build, and run the attached sample Safari web extension Xcode project EventBug. 2) Enable EventBug in Safari. 3) Open the attached sample HTML in Safari. 4) Open the web inspector. 5) Create a mousedown event breakpoint. 6) Click in the web page. 7) In the content.js mousedown event listener, enter $event in the console. Expected results: MouseEvent Actual results: ReferenceError: Can't find variable: $event
Attachments
Sample Safari web extension Xcode project
(324.99 KB, application/zip)
2024-08-30 07:19 PDT
,
Jeff Johnson
no flags
Details
Sample HTML to reproduce the bug
(253 bytes, text/html)
2024-08-30 07:19 PDT
,
Jeff Johnson
no flags
Details
Screen recording of the bug
(20.76 MB, video/quicktime)
2024-08-30 12:57 PDT
,
Jeff Johnson
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Jeff Johnson
Comment 1
2024-08-30 07:19:35 PDT
Created
attachment 472372
[details]
Sample HTML to reproduce the bug
Jeff Johnson
Comment 2
2024-08-30 12:57:32 PDT
Created
attachment 472377
[details]
Screen recording of the bug
Devin Rousso
Comment 3
2024-08-30 21:46:59 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/32976
EWS
Comment 4
2024-09-04 17:48:47 PDT
Committed
283181@main
(bec6d22a9343): <
https://commits.webkit.org/283181@main
> Reviewed commits have been landed. Closing PR #32976 and removing active labels.
Radar WebKit Bug Importer
Comment 5
2024-09-04 17:49:17 PDT
<
rdar://problem/135311271
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug