JsFormValidatorBundle icon indicating copy to clipboard operation
JsFormValidatorBundle copied to clipboard

not working in IE8

Open mlarcher opened this issue 10 years ago • 3 comments

The lib fails on removeListener.call(this, eventName, arguments.callee, false); with error Invalid procedure call or argument. Any chance this get fixed ?

mlarcher avatar Nov 17 '15 11:11 mlarcher

Sorry, but I do not work with Symfony now, so waiting for PR from you or somebody else.

66Ton99 avatar Nov 17 '15 13:11 66Ton99

I don't have time to provide a PR, but for future reference here is what I did to make it work with IE8:

  • add a polyfill for add/removeEventListener ( cf https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener )
  • add a polyfill for HTMLElement:
(function () {

  if ('HTMLElement' in window) {
    return;
  }
  window.HTMLElement = window.Element;

})();

mlarcher avatar Nov 17 '15 16:11 mlarcher

Thanks.

66Ton99 avatar Nov 17 '15 17:11 66Ton99