summaryrefslogtreecommitdiffstats
path: root/src/Use.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/Use.js')
-rw-r--r--src/Use.js18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/Use.js b/src/Use.js
index 9cf1711..5c4fe8e 100644
--- a/src/Use.js
+++ b/src/Use.js
@@ -1,9 +1,9 @@
-import {Shape, Container} from './classes.js'
+import Base from './Base.js'
import {xlink} from './namespaces.js'
-export default class Use extends Shape {
+export default class Use extends Base {
constructor (node) {
- super(nodeOrNew('use', node))
+ super(nodeOrNew('use', node), Use)
}
// Use element as a reference
@@ -13,9 +13,11 @@ export default class Use extends Shape {
}
}
-addFactory(Container, {
- // Create a use element
- use: function (element, file) {
- return this.put(new Use()).element(element, file)
+Use.constructors = {
+ Container: {
+ // Create a use element
+ use: function (element, file) {
+ return this.put(new Use()).element(element, file)
+ }
}
-})
+}