No javascript error reporting when clicking on hook added to menuitem

NEW
Unassigned

Status

()

Core
DOM: Events
5 years ago
5 years ago

People

(Reporter: h4writer, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

5 years ago
Error reporting not working when error occurs during "onclick" on "menuitem". Testcase is reduced version from production code used by my brother at "uwsoftware.be". I owe him, because he reduced this from 30000+ js lines (took him a day or something).

<!DOCTYPE html>
<html>
 <head>
 </head
 <body contextmenu="editMenu">
  <menu type='context' id='editMenu'>
   <menuitem label='Edit' id='__editor_edit_menu' />
  </menu>

  test

  <script type="text/javascript">
    document.getElementById("__editor_edit_menu").addEventListener("click", function(e) {
      document.body.innerHTML = "1"; 
      console.log(prev); 
      document.body.innerHTML += "2";
    });
  </script>
 </body>
</html>

Howto reproduce: click right on "test", click on the contextitem "Edit", the document will show "1" and should report an error "ReferenceError: prev is not defined". The error isn't reported in FF/Aurora/Nightly!!!!

I'm not familiar with this code (IonMonkey developer), but like I said I owe it to him. So could anybody with the knowledge look into this or atleast give me some pointers to where I should look etc...

Comment 1

5 years ago
This is likely bug 503244, which will be solved by switching everything to WebIDL.
You need to log in before you can comment on or make changes to this bug.