Browser :: Prototype

Prototype.Browser -> Object

 

Detects the current browser and returns an object

 

Possible Tests:

 

Prototype.Browser.IE

Prototype.Browser.Opera

Prototype.Browser.WebKit // Safari

Prototype.Browser.Gecko

 

 

Examples

 

In case you are viewing in Mozilla:

 

Prototype.Browser

//-> Object: IE=false Opera=false WebKit=false Gecko=true

 

if(Prototype.Browser.Gecko) {

  alert("It's a Gecko!")

}

 


Prototype API 1.5.0 - prototypejs.org