Compare commits

...

3 Commits

Author SHA1 Message Date
Kevin Jahns
29760cfe53 v13.0.0-55 -- distribution files 2018-03-14 18:52:59 -07:00
Kevin Jahns
941a22b257 13.0.0-55 2018-03-14 18:52:49 -07:00
Kevin Jahns
4aa41b98a9 fix dom filtering bug 2018-03-14 18:51:48 -07:00
7 changed files with 5058 additions and 6 deletions

2
package-lock.json generated
View File

@@ -1,6 +1,6 @@
{
"name": "yjs",
"version": "13.0.0-54",
"version": "13.0.0-55",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View File

@@ -1,6 +1,6 @@
{
"name": "yjs",
"version": "13.0.0-54",
"version": "13.0.0-55",
"description": "A framework for real-time p2p shared editing on any data",
"main": "./y.node.js",
"browser": "./y.js",

View File

@@ -8,6 +8,9 @@ export default class YXmlElement extends YXmlFragment {
super()
this.nodeName = null
this._scrollElement = null
if (typeof arg2 === 'function') {
this._domFilter = arg2
}
if (typeof arg1 === 'string') {
this.nodeName = arg1.toUpperCase()
} else if (arg1 != null && arg1.nodeType != null && arg1.nodeType === arg1.ELEMENT_NODE) {
@@ -16,9 +19,6 @@ export default class YXmlElement extends YXmlFragment {
} else {
this.nodeName = 'UNDEFINED'
}
if (typeof arg2 === 'function') {
this._domFilter = arg2
}
}
_copy () {
let struct = super._copy()
@@ -39,7 +39,7 @@ export default class YXmlElement extends YXmlFragment {
// 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 = this._domFilter(dom.nodeName, attributes)
attributes.forEach((value, name) => {
this.setAttribute(name, value)
})

9
y.js Normal file

File diff suppressed because one or more lines are too long

1
y.js.map Normal file

File diff suppressed because one or more lines are too long

5041
y.node.js Normal file

File diff suppressed because it is too large Load Diff

1
y.node.js.map Normal file

File diff suppressed because one or more lines are too long