jquery - How does $('<html><head>...</head><body>...</body></html>') work? -


i still trying create full dom document string. got bunch of interesting suggestions on this other question, none fits i'm looking for. i'm trying understand how things work maybe find solution.

we need replace lot of jquery code 'native' javascript. jquery, able $('<html><head>...</head><body>...</body></html>') , perform operations on nodes of object, search them... etc.

what jquery do? create new document? append existing one?

since lot of people question our replacement of jquery, here little more details: building chrome application make use of content script. if jquery lightweight, it's not kind of add couple mb of memory consumed in each tab few jquery methods. jquery is awesome , fits many many needs, not ours.

you can find answer in jquery source. start out core.js, you'll find init method. if follow logic there, you'll see nontrivial elements it'll call jquery.buildfragment, indeed builds documentfragment it'll populate content specified. teach how deal building dom tree string, including stripping out various bits of content won't want.


Comments

Popular posts from this blog

delphi - How to convert bitmaps to video? -

jasper reports - Fixed header in Excel using JasperReports -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -