summaryrefslogtreecommitdiffstats
path: root/src/G.js
blob: 2532f30709ad9f98dc2dadb81b5be28686b558bf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import Container from './Container.js'
import { nodeOrNew } from './tools.js'
import { register } from './adopter.js'
import { registerMethods } from './methods.js'

export default class G extends Container {
  constructor (node) {
    super(nodeOrNew('g', node), G)
  }
}

registerMethods({
  Element: {
    // Create a group element
    group: function () {
      return this.put(new G())
    }
  }
})

register(G)