1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
SVG.Nested = SVG.invent({ // Initialize node create: 'svg', // Inherit from inherit: SVG.Container, // Add parent method construct: { // Create nested svg document nested: function () { return this.put(new SVG.Nested()) } } })