Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

Remove browser sniff in compile.js #15614

Open

Description

Note: for support questions, please use one of these channels: https://github.com/angular/angular.js/blob/master/CONTRIBUTING.md#question. This repository's issues are reserved for feature requests and bug reports.

Do you want to request a feature or report a bug?

Neither.

What is the current behavior?

Browser sniff for IE 11 is used instead of a feature test.

// Support: IE 11 only
// Workaround for #11781 and #14924
if (msie === 11) {
    mergeConsecutiveTextNodes(nodeList, i, notLiveList);
}

Direct test would be something like this:

var el = document.createElement('span');
document.body.appendChild(el);
span.innerHTML = "— {{ 'foo' }}";
var problemWithSplitTextNodes = span.childNodes.length > 1;
document.body.removeChild(el);

Do that once during initialization (or first time through).

Would fix in all browsers (including future browsers) and configurations that may exhibit this quirk (would have to check the specs to determine if it is at odds with standard recommendations).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions