Owner document of a newly created xml text node is incorrect

Fixed, not yet flighted Issue #8475284

Details

Author
Oleksiy S.
Created
Aug 12, 2016
Privacy
This issue is public.
Found in
  • Microsoft Edge
Found in build #
14.14393
Reports
Reported by 1 person

Sign in to watch or report this issue.

Steps to reproduce

Steps to reproduce

  • run example from attachments (e.g. in IIS)
  • open index.html in EDGE browser
  • open console
  • see result

Expected result
Owner document of a newly created xml text node is XML document

Actual result
Owner document of a newly created xml text node is HTML document

Code from example

var textNode = xmlDoc.createTextNode('text');
console.log('Incorrect OwnerDocument', textNode.ownerDocument);

Workaround that we’ve tried

var xmlElement = xmlDoc.createElement('root');
xmlElement.textContent = 'text content';
textNode = xmlElement.firstChild;
console.log('Correct OwnerDocument', textNode.ownerDocument);

But this workaround is not workable if you need detach text node

var xmlElement = xmlDoc.createElement('root');
xmlElement.textContent = 'text content';
textNode = xmlElement.firstChild;
detachTextNode = xmlElement.removeChild(textNode);
console.log('Incorrect OwnerDocument', detachTextNode.ownerDocument);

NOTE: this bug is related https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/8474659/

Attachments

Comments and activity

  • Microsoft Edge Team

    Changed Assigned To to “Ibrahim O.”

  • Thank you for your feedback. I see identical output on both object and HTML mode. Could you please send us your results for both normal and cloned text nodes. Please also let me know if I am missing something in here.

    All the best,
    The MS Edge Team

  • Hello,

    Thank you for your quick response!

    I’ve added couple screenshots to clarify my issue.

    First screenshot (issue.png - I ran example from attachment on IIS)
    So here:

    • I have XML document
    • Then I create xml text node
    • Then I get owner document of this newly created xml text node
    • Then I assume that owner document should be XML Document, but it’s not, it’s HTML Document! (first log in the console)

    Second screenshot (issue2.png I ran example from https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/8474659/ on IIS)
    So here:

    • I have XML document
    • Then I select xml text node from one of the elements
    • Then I clone this xml text node
    • Then I get owner document of cloned xml text node
    • Then I assume that owner document should be XML Document, but it’s not, it’s HTML Document! (second log in the console)
  • Appreciate the update. We will look into that.

    All the best,
    The MS Edge Team

  • Microsoft Edge Team

    Changed Assigned To to “Travis L.”

    Changed Status to “Confirmed”

    Changed Assigned To from “Travis L.” to “Sanket J.”

    Changed Assigned To from “Sanket J.” to “Fei W.”

    Changed Assigned To from “Fei W.” to “Sanket J.”

    Changed Assigned To from “Sanket J.” to “Fei W.”

    Changed Status from “Confirmed” to “Fixed, not yet flighted”

  • Hello,

    Thank you for providing this information about the issue. We are pleased to report this feature is fixed in Edge 15165 and will be available in an upcoming Insider Preview build.

    Best Wishes,
    The MS Edge Team

You need to sign in to your Microsoft account to add a comment.

Sign in