Skip to content

Alpha32: IE10/11 doesn't support "remove" in browser_adapter.ts #3295

Closed

Description

@jomeier

In IE10/11 I get this error message with a simple application (in the end of this text).

Sorry for the first two messages in german. Didn't get it to switch my IE to the english language :-)

TypeError: Das Objekt unterstützt die Eigenschaft oder Methode "remove" nicht

TypeError: Das Objekt unterstützt die Eigenschaft oder Methode "remove" nicht
   at clearNodes (http://localhost:810/javascripts/offline/angular2.dev_2.0.0-alpha.32.js:20921:15)
   at appendComponentNodesToHost (http://localhost:810/javascripts/offline/angular2.dev_2.0.0-alpha.32.js:16297:7)
   at mergeComponent (http://localhost:810/javascripts/offline/angular2.dev_2.0.0-alpha.32.js:16253:5)
   at mergeComponents (http://localhost:810/javascripts/offline/angular2.dev_2.0.0-alpha.32.js:16238:9)
   at mergeProtoViewsRecursively (http://localhost:810/javascripts/offline/angular2.dev_2.0.0-alpha.32.js:16138:5)
   at mergeProtoViewsRecursively (http://localhost:810/javascripts/offline/angular2.dev_2.0.0-alpha.32.js:29185:13)
   at Anonymous function (http://localhost:810/javascripts/offline/angular2.dev_2.0.0-alpha.32.js:29571:13)
   at _mergeUnmergedProtoViews (http://localhost:810/javascripts/offline/angular2.dev_2.0.0-alpha.32.js:29
import {
Component,
View,
bootstrap
} from 'angular2/angular2';

@Component({
    selector: 'app',
})
@View({
    template: '<div></div>',
})
export class MyAppComponent {
    constructor() {
    }
}

bootstrap(MyAppComponent);

Chrome and Firefox don't show an error message but also behave "strange" (Zippy example doesn't work where a div is shown/hidden through the click of a mouse).

Setup:
Typescript 1.5 with Visual Studio 2013 or VS Code
Angular 2 Alpha 32
Windows 8.1
IE10 and IE11

Activity

  1. jomeier commented on Jul 26, 2015

    @jomeier
    ContributorAuthor

    @robwormald I'll cite your gitter answer here.
    looks like IE doesn't support childEl.remove ():

    clearNodes(el) {
    while (el.firstChild) {
    el.firstChild.remove();
    }
    }

    It's also mentioned here, that IE doesn't support node.remove()
    https://developer.mozilla.org/en-US/docs/Web/API/ChildNode/remove

    Regarding to this article:
    http://stackoverflow.com/questions/13763/how-do-i-remove-a-child-node-in-html-using-javascript

    IE should use removeNode() instead.

  2. changed the title [-]Alpha32: Object doesn't support property or method "remove" in IE10/11[/-] [+]Alpha32: IE10/11 doesn't support "remove" in browser_adapter.ts[/+] on Jul 26, 2015
  3. angular-automatic-lock-bot commented on Sep 6, 2019

    @angular-automatic-lock-bot

    This issue has been automatically locked due to inactivity.
    Please file a new issue if you are encountering a similar or related problem.

    Read more about our automatic conversation locking policy.

    This action has been performed automatically by a bot.

  4. locked and limited conversation to collaborators on Sep 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions