Ticket #1055 (closed New Feature: fixed)
onerror handler for editing area
| Reported by: | swift | Owned by: | martinkou |
|---|---|---|---|
| Priority: | Normal | Milestone: | FCKeditor 2.6 |
| Component: | General | Version: | FCKeditor 2.4.3 |
| Keywords: | Confirmed HasPatch Review+ | Cc: |
Description
In FCKEditingArea one can see the commented lines with a todo task.
// IE: Avoid JavaScript errors thrown by the editing are source (like tags events).
// TODO: This error handler is not being fired.
// this.Window.onerror = function() { alert( 'Error!' ) ; return true ; }
Fortunately I've found a possible solution. An error handler can be attached to the iframe's content window by adding the script tag that does it during the rendering of iframe's body (see below). It seems that the dynamic attaching of the handler is not implemented in IE.
var oDoc = this.Document = this.Window.document ;
oDoc.open() ;
oDoc.write('<script>window.onerror = function() { alert( 'Error!' ) ; return true ; };</scr'+'ipt>') ;
oDoc.write( html ) ;
oDoc.close() ;
Attachments
Change History
Note: See
TracTickets for help on using
tickets.
