You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When first starting to work on a library, before you have a good handle on what you are doing it's a good idea to create a demo script that you can work off of. This gives you the ability to look at how the library will be used.
First, update the main module in src/vdom-streaming-serializer.js to look like this:
module.exports=function(element){};
Then create a demo script in demo/serialize.js that looks like this:
varmakeDocument=require('can-vdom/make-document/make-document');varserialize=require('../src/vdom-streaming-serializer');varASYNC=Symbol.for('async-node');vardocument=makeDocument();varh1=document.createElement('h1');h1.appendChild(document.createTextNode('Hello world'));document.body.appendChild(h1);varul=document.createElement('ul');document.body.appendChild(ul);varli=document.createElement('li');// Marking this li as async will force the serialize to waitli[ASYNC]=Promise.resolve();ul.appendChild(li);serialize(document.documentElement);
At this point your serialize function doesn't do anything. The next step will be to implement the serializer.
The text was updated successfully, but these errors were encountered:
When first starting to work on a library, before you have a good handle on what you are doing it's a good idea to create a demo script that you can work off of. This gives you the ability to look at how the library will be used.
First, update the main module in
src/vdom-streaming-serializer.js
to look like this:Then create a demo script in
demo/serialize.js
that looks like this:At this point your
serialize
function doesn't do anything. The next step will be to implement the serializer.The text was updated successfully, but these errors were encountered: