I am facing a bug I am not able to resolve.
To repoduce it, launch Firefox, then go on the jQuery's home page, open the javascript console and execute the following code:
var xml = `<?xml version="1.0" encoding="UTF-8"?> <root> <value> <string>Test</string> </value> </root>` var $xml = $.parseXML(xml); var $root = $($xml).children("root"); console.log($root); For no reason, $root is ok but it raises a not well-formed error in the console.
I know this is because of .children("root") but I do not find a way to fix it. There is no error using Chrome.
Could someone explain me why do I get this message, and how to prevent this error, please?
No comments:
Post a Comment