chore(browsers): fix failing tests in IE11

Closes #3388
This commit is contained in:
Marc Laval
2015-07-29 18:34:02 +02:00
parent 39ad50657e
commit 166688348a
6 changed files with 54 additions and 48 deletions

View File

@ -121,7 +121,7 @@ export class BrowserDomAdapter extends GenericBrowserDomAdapter {
}
firstChild(el): Node { return el.firstChild; }
nextSibling(el): Node { return el.nextSibling; }
parentElement(el): Node { return el.parentElement; }
parentElement(el): Node { return el.parentNode; }
childNodes(el): List<Node> { return el.childNodes; }
childNodesAsList(el): List<any> {
var childNodes = el.childNodes;

View File

@ -35,7 +35,7 @@ export function containsRegexp(input: string): RegExp {
export function normalizeCSS(css: string): string {
css = StringWrapper.replaceAll(css, /\s+/g, ' ');
css = StringWrapper.replaceAll(css, /:\s/g, ':');
css = StringWrapper.replaceAll(css, /'"/g, '"');
css = StringWrapper.replaceAll(css, /'/g, '"');
css = StringWrapper.replaceAllMapped(css, /url\(\"(.+)\\"\)/g, (match) => `url(${match[1]})`);
css = StringWrapper.replaceAllMapped(css, /\[(.+)=([^"\]]+)\]/g,
(match) => `[${match[1]}="${match[2]}"]`);