Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
jomeier opened this issue Jul 25, 2015 · 2 comments
Closed

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

jomeier opened this issue Jul 25, 2015 · 2 comments
Labels
effort1: hours help wanted An issue that is suitable for a community contributor (based on its complexity/scope). type: bug/fix

Comments

@jomeier
Copy link
Contributor

jomeier commented Jul 25, 2015

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

@jomeier
Copy link
Contributor Author

jomeier commented Jul 26, 2015

@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.

@jomeier jomeier 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 Jul 26, 2015
@mhevery mhevery added type: bug/fix comp: core effort1: hours help wanted An issue that is suitable for a community contributor (based on its complexity/scope). labels Jul 27, 2015
pkozlowski-opensource added a commit to pkozlowski-opensource/angular that referenced this issue Jul 29, 2015
pkozlowski-opensource added a commit to pkozlowski-opensource/angular that referenced this issue Jul 29, 2015
pkozlowski-opensource added a commit to pkozlowski-opensource/angular that referenced this issue Jul 31, 2015
stevemao pushed a commit to stevemao/angular that referenced this issue Aug 3, 2015
@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
effort1: hours help wanted An issue that is suitable for a community contributor (based on its complexity/scope). type: bug/fix
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants