I searched for documents for YUI3, but I cannot figure out how to create a fragment of a document. Should I just use the document object itself? I would like to consider it as a YUI Node object.
If you want to create a new empty docfrag, this should work:
var frag = Y.all([]).toFrag();
frag is a Node instance terminating docfrag.
frag
I think this is equivalent to Luke's answer (I just find it more readable)
var frag = Y.one(document.createDocumentFragment());
, NodeList.toFrag(). toFrag _nl2frag (NodeList to Frag) .
, . , appendChild node.
var docFrag = Y.Node.create('<div id="foo"><p>Bar</p></div>');
Will work. Y.Node.create can do anything. Recently ran into this problem with very new versions of chrome, but simplified the job:
http://yuilibrary.com/projects/yui3/ticket/2529368
Source: https://habr.com/ru/post/1779539/More articles:grails: reusable authentication interceptor - authenticationLogin page redirection - asp.net-mvc-2Postgres Is there a way to create a foreign date key that references a date range in another table? - sqlto find conditions about pair vectors - c ++copy a file from source to destination using Glib library functions - glibcLimit API requests for translating Google Translate - google-translateHow to handle hi and low resolution Icon.png application for iPhone and iPhone4 - iphoneWhat are common python program update strategies? - pythonlightweight template template for python - pythonMySQL query per month - sqlAll Articles