summaryrefslogtreecommitdiffstats
path: root/src/utils
diff options
context:
space:
mode:
authorUlrich-Matthias Schäfer <ulima.ums@googlemail.com>2018-12-03 16:19:21 +0100
committerUlrich-Matthias Schäfer <ulima.ums@googlemail.com>2018-12-03 16:19:21 +0100
commit6d164340d99434b9c11099a2e74d7cf4a4a7e322 (patch)
treec98d3b295f53c58f6affdb62d5df0ee546c29bdf /src/utils
parent135f9d03c11a295ff5a9e4bdc4683e8ea35e2f38 (diff)
downloadsvg.js-6d164340d99434b9c11099a2e74d7cf4a4a7e322.tar.gz
svg.js-6d164340d99434b9c11099a2e74d7cf4a4a7e322.zip
fixed methods not returning this and missing methods on List
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/adopter.js2
-rw-r--r--src/utils/methods.js2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/utils/adopter.js b/src/utils/adopter.js
index 34b853e..f091c96 100644
--- a/src/utils/adopter.js
+++ b/src/utils/adopter.js
@@ -75,7 +75,7 @@ export function register (element, name = element.name, asRoot = false) {
elements[name] = element
if (asRoot) elements[root] = element
- addMethodNames(Object.keys(element.prototype))
+ addMethodNames(Object.getOwnPropertyNames(element.prototype))
return element
}
diff --git a/src/utils/methods.js b/src/utils/methods.js
index bc05a70..e957213 100644
--- a/src/utils/methods.js
+++ b/src/utils/methods.js
@@ -16,7 +16,7 @@ export function registerMethods (name, m) {
return
}
- addMethodNames(Object.keys(m))
+ addMethodNames(Object.getOwnPropertyNames(m))
methods[name] = Object.assign(methods[name] || {}, m)
}