[Webkit-unassigned] [Bug 278919] New: Web Inspector: $event ReferenceError in Safari extension event listeners

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Aug 30 07:19:09 PDT 2024


https://bugs.webkit.org/show_bug.cgi?id=278919

            Bug ID: 278919
           Summary: Web Inspector: $event ReferenceError in Safari
                    extension event listeners
           Product: WebKit
           Version: Safari 17
          Hardware: All
                OS: All
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Web Inspector
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: opendarwin at lapcatsoftware.com
                CC: inspector-bugzilla-changes at group.apple.com

Created attachment 472371

  --> https://bugs.webkit.org/attachment.cgi?id=472371&action=review

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

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20240830/d44a9699/attachment-0001.htm>


More information about the webkit-unassigned mailing list