-
Notifications
You must be signed in to change notification settings - Fork 23
Open
Description
When I use winEvents on a brite view,
When I bind the event beforeunload thanks the 'winEvents' of briteView, nothing appened.
With the same function binding directly, with 'on', it's work.
Below, an example of code :
beforeUnloadFn = function(e){
var confirmationMessage = "\o/";
(e || window.event).returnValue = confirmationMessage; //Gecko + IE
return confirmationMessage;
}
brite.registerView('Test', {
create: function(){
return '<div style="background-color:red;height:50px;width:50px;"></div>'
},
winEvents: {
// No effect
'beforeunload': beforeUnloadFn
}
});
$(document).ready(function(){
brite.display('Test', 'body');
// work
//$(window).on("beforeunload", beforeUnloadFn);
});
Metadata
Metadata
Assignees
Labels
No labels