Page MenuHomePhabricator

Reply tool used in IE11 errors out with "Type error: Object doesn't support property or method 'contains'"
Closed, ResolvedPublic

Event Timeline

Urbanecm updated the task description. (Show Details)

I can reproduce this.

I trusted MDN documentation about this, which says 'contains' is supported even as far back as IE 9: https://developer.mozilla.org/en-US/docs/Web/API/Node/contains – but it clearly isn't.

It appears that 'contains' is supported on HTMLElement objects, but not on other Node objects (e.g. text nodes). There is a note about this in the MDN docs, but it's unclear.

Change 619356 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[mediawiki/extensions/DiscussionTools@master] utils: Avoid Node#contains for IE 11 support

https://gerrit.wikimedia.org/r/619356

Change 619356 merged by jenkins-bot:
[mediawiki/extensions/DiscussionTools@master] utils: Avoid Node#contains for IE 11 support

https://gerrit.wikimedia.org/r/619356