dart2js wrong implementation of onbeforeunload event #16215
Labels
closed-as-intended
Closed as the reported issue is expected behavior
web-libraries
Issues impacting dart:html, etc., libraries
This issue was originally filed by igor.ko...@mailvision.com
What steps will reproduce the problem?
window.onBeforeUnload.listen((e)=>"Good Bye");
close tab
What is the expected output? What do you see instead?
in Dartium it works as should: pop up window with
"Confirm Navigation. Good Bye. Are you sure you want to leave this page" and buttons "Leave this Page" and "Stay on this Page"
in run as JavaScript page closed without the pop up window.
It's bug in window.onBeforeUnload implementation, because
if you replace it to:
import 'dart:js';
context["onbeforeunload"] = ((e)=>"Good Bye");
It works both in Dartium and run as JavaScript.
What version of the product are you using? On what operating system?
Dart SDK version 1.1.0-dev.5.11 Windows 7 64 bits
Please provide any additional information below.
The text was updated successfully, but these errors were encountered: