Pablo

viewport([filter])

Returns a collection of the collection svg element’s viewport ancestors from closest to furthest.

viewport uses the SVGElement’s viewportElement property.

See section Elements that establish viewports on the w3 SVG spec.

var flag   = Pablo(demoElement).svg({name:'japan', height: 100}),
    rect   = Pablo.rect({fill: 'white', height: 100, width: 200}),
    circle = Pablo.circle({fill: 'red', r: 26, cx: 100, cy: 50});

flag.append([rect, circle]);

alert(circle.viewport().attr('name'));
Painting is just another way of keeping a diary.
Pablo Picasso