package me.eater.threedom.event

import me.eater.threedom.dom.INode

class Event<out T>(val data: T, val source: INode<*>) {

    var bubble = true
        private set

    var propagate = true
        private set

    fun stopPropagation() {
        propagate = false
    }

    fun stopBubbling() {
        bubble = false
    }

    operator fun component1(): T = data
    operator fun component2(): INode<*> = source
}


