fix getAttribute vs attributes.value fixes y-js/y-xml#8

This commit is contained in:
Kevin Jahns 2018-02-18 18:58:49 +01:00
parent 5e4b071693
commit de14fe0f3e

View File

@ -36,7 +36,8 @@ export default class YXmlElement extends YXmlFragment {
let attributes = new Map()
for (let i = 0; i < dom.attributes.length; i++) {
let attr = dom.attributes[i]
attributes.set(attr.name, attr.value)
// get attribute via getAttribute for custom element support (some write something different in attr.value)
attributes.set(attr.name, dom.getAttribute(attr.name))
}
attributes = this._domFilter(dom, attributes)
attributes.forEach((value, name) => {