implement generic YEvent with path property

This commit is contained in:
Kevin Jahns 2017-11-07 19:18:41 -08:00
parent d29b83a457
commit d59e30b239
3 changed files with 9 additions and 6 deletions

View File

@ -1,10 +1,11 @@
import Type from '../Struct/Type.js'
import ItemJSON from '../Struct/ItemJSON.js'
import { logID } from '../MessageHandler/messageToString.js'
import YEvent from '../Util/YEvent.js'
class YArrayEvent {
class YArrayEvent extends YEvent {
constructor (yarray, remote) {
this.target = yarray
super(yarray)
this.remote = remote
}
}

View File

@ -2,10 +2,11 @@ import Type from '../Struct/Type.js'
import Item from '../Struct/Item.js'
import ItemJSON from '../Struct/ItemJSON.js'
import { logID } from '../MessageHandler/messageToString.js'
import YEvent from '../Util/YEvent.js'
class YMapEvent {
class YMapEvent extends YEvent {
constructor (ymap, subs, remote) {
this.target = ymap
super(ymap)
this.keysChanged = subs
this.remote = remote
}

View File

@ -1,7 +1,8 @@
import YEvent from '../../Util/YEvent.js'
export default class YXmlEvent {
export default class YXmlEvent extends YEvent {
constructor (target, subs, remote) {
this.target = target
super(target)
this.childListChanged = false
this.attributesChanged = new Set()
this.remote = remote