handle xmlhook in mutation observer
This commit is contained in:
parent
e70aa09f88
commit
e4c10fd6b3
@ -1,4 +1,4 @@
|
|||||||
/* global Y, HTMLElement, customElements */
|
/* global Y, HTMLElement, customElements, CanvasJS */
|
||||||
|
|
||||||
window.onload = function () {
|
window.onload = function () {
|
||||||
window.yXmlType.bindToDom(document.body)
|
window.yXmlType.bindToDom(document.body)
|
||||||
@ -33,19 +33,18 @@ class MagicTable extends HTMLElement {
|
|||||||
var chart = new CanvasJS.Chart(this.shadowRoot,
|
var chart = new CanvasJS.Chart(this.shadowRoot,
|
||||||
{
|
{
|
||||||
title: {
|
title: {
|
||||||
text: "Bar chart"
|
text: 'Bar chart'
|
||||||
},
|
},
|
||||||
|
|
||||||
data: [
|
data: [
|
||||||
{
|
{
|
||||||
type: "bar",
|
type: 'bar',
|
||||||
|
|
||||||
dataPoints: dataPoints
|
dataPoints: dataPoints
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
});
|
})
|
||||||
|
|
||||||
chart.render();
|
chart.render()
|
||||||
|
|
||||||
// this.shadowRoot.innerHTML = '<p>dtrn</p>'
|
// this.shadowRoot.innerHTML = '<p>dtrn</p>'
|
||||||
}
|
}
|
||||||
|
@ -268,7 +268,7 @@ export default class YXmlFragment extends YArray {
|
|||||||
mutations.forEach(mutation => {
|
mutations.forEach(mutation => {
|
||||||
const dom = mutation.target
|
const dom = mutation.target
|
||||||
const yxml = dom._yxml
|
const yxml = dom._yxml
|
||||||
if (yxml == null) {
|
if (yxml == null || yxml.constructor === YXmlHook) {
|
||||||
// dom element is filtered
|
// dom element is filtered
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user