aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/elements/Gradient.js6
-rw-r--r--src/elements/Style.js10
2 files changed, 8 insertions, 8 deletions
diff --git a/src/elements/Gradient.js b/src/elements/Gradient.js
index 4e09cbd..a698225 100644
--- a/src/elements/Gradient.js
+++ b/src/elements/Gradient.js
@@ -61,9 +61,9 @@ extend(Gradient, gradiented)
registerMethods({
Container: {
// Create gradient element in defs
- gradient: wrapWithAttrCheck(function (type, block) {
- return this.defs().gradient(type, block)
- })
+ gradient (...args) {
+ return this.defs().gradient(...args)
+ }
},
// define gradient
Defs: {
diff --git a/src/elements/Style.js b/src/elements/Style.js
index 0b7d952..62467d8 100644
--- a/src/elements/Style.js
+++ b/src/elements/Style.js
@@ -1,4 +1,4 @@
-import { nodeOrNew, register, wrapWithAttrCheck } from '../utils/adopter.js'
+import { nodeOrNew, register } from '../utils/adopter.js'
import { registerMethods } from '../utils/methods.js'
import { unCamelCase } from '../utils/utils.js'
import Element from './Element.js'
@@ -42,12 +42,12 @@ export default class Style extends Element {
}
registerMethods('Dom', {
- style: wrapWithAttrCheck(function (selector, obj) {
+ style (selector, obj) {
return this.put(new Style()).rule(selector, obj)
- }),
- fontface: wrapWithAttrCheck(function (name, src, params) {
+ },
+ fontface (name, src, params) {
return this.put(new Style()).font(name, src, params)
- })
+ }
})
register(Style, 'Style')