first_page the funky knowledge base
personal notes from way, _way_ back and maybe today

JavaScript Code: Dom() Class; Abandoned Code

//Bryan Wilhite (rasx@kintespace.com)

//WARNING: this object depends on Sniffer.js! Dom = function() { this.IsMs = (is_ie5_5up || is_opera6up)? true : false this.IsMsMac = (is_mac && is_ie5up)? true : false this.IsMz = is_gecko this.IsSafari = is_safari this.IsSupportedBrowser = (this.IsMs || this.IsMsMac || this.IsMz || this.IsSafari)

this.GetEventSourceElement = function(e)
{
    if(e == null) return null

    if(this.IsMs) return e.srcElement

    //Based on http://developer.apple.com/internet/javascript/ie5macscripting.html
    if(this.IsMsMac) return e.target

    if(this.IsMz) return e.currentTarget
}

this.GetEventSourceStyle = function(e)
{
    var o = null
    if(this.IsMs || this.IsMsMac) o = e.srcElement.style
    if(this.IsMz) o = e.currentTarget.style
    return o
}

}

var dom = new Dom()

mod date: 2007-01-10T05:38:11.000Z