If the collection contains anything other than a single <svg>
element, it will append the elements in the collection to a new <svg>
container, crop the container to its contents and return the container.
If the collection already contains a single <svg>
element, then it will just be returned.
This is useful for operations that need to work on an <svg>
container and is used internally, for example by the dataUrl()
and markup()
methods.
var svg = Pablo.circle({r:50}).withViewport();
svg.appendTo(demoElement);
alert(svg[0].nodeName);