PatrickJS / ie-shim

ie-shim for Angular 2
MIT License
3 stars 0 forks source link

add classList to polyfill #1

Open PatrickJS opened 8 years ago

PatrickJS commented 8 years ago
// Shim for proper handling SVG g element in Angular
if (!("classList" in document.createElementNS("http://www.w3.org/2000/svg","g"))) {
    var descr = Object.getOwnPropertyDescriptor(HTMLElement.prototype, 'classList');
    Object.defineProperty(SVGElement.prototype, 'classList', descr);
}