RemediateIE

This article is in need of a technical review.

This page has been flagged by editors or users as needing technical review. Until it is fully reviewed, it may contain inaccurate or incorrect information.

This is a bad way to implement these and I bet a better one can be googled easily -Nickolay

Remediating Internet Explorer to Support W3C API

IE doesn't support all the W3C DOM API. Some of the missing functions can be added by defining JavaScript functions to provide the equivalent function. This allows the programmer to write his code using the standard API and have it work on IE and Mozilla.

Here is a (very) crude example of one such remediation:

function addEventListener(evtName, func, useCapture) {
  document["on"+evtName] = func;
} // end of addEventListener


function removeEventListener(evtName, func, useCapture) {
  document["on"+evtName] = null;
} // end of removeEventListener

// Add these functions to the document object
document.addEventListener = addEventListener; 
document.removeEventListener = removeEventListener; 

Document Tags and Contributors

Tags:
Contributors to this page: Riboribo, ethertank, jswisher, Nickolay
Last updated by: ethertank,