from jquery-2.1.3
tmp = new DOMParser(); xml = tmp.parseFromString( data, "text/xml" );
and jquery-3.5.1
xml = ( new window.DOMParser() ).parseFromString( data, "text/xml" );
What is the difference?
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Rijwan AnsariPosted Feb 1, 2021, 3:27 PM
Satya KarkiPosted Feb 1, 2021, 11:42 AM
Kiran MohantyPosted Feb 1, 2021, 7:26 AM
Sachin SinghPosted Jan 29, 2021, 1:37 PM
This code in jQuery < 3.5 would produce two separate HTML elements
<div>div> <input/>Since jQuery 3.5.0 the same code produces nested elements.
apart from that i don't find any change between predefined methods of jquery and dom.<div><input/>div>