summaryrefslogtreecommitdiffstats
path: root/src/elements/Symbol.js
blob: 3dd48d77f4171f7572af9593f9ada6d76e6b1789 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import { nodeOrNew, register, wrapWithAttrCheck } from '../utils/adopter.js'
import { registerMethods } from '../utils/methods.js'
import Container from './Container.js'

export default class Symbol extends Container {
  // Initialize node
  constructor (node) {
    super(nodeOrNew('symbol', node), node)
  }
}

registerMethods({
  Container: {
    symbol: wrapWithAttrCheck(function () {
      return this.put(new Symbol())
    })
  }
})

register(Symbol, 'Symbol')