Search code examples
webkitfeature-detection

Is the a specific webkit feature I can detect to check if a user is using a webkit browser


I've used the code below if I need to detect Firefox:

var firefox = !(window.mozInnerScreenX == null);

I'm curious if there is something similar to detect webkit browsers without checking the user agent string. Like checking a specific feature only webkit browsers have?


Solution

  • Go to the console in Chrome and type window.webkit - the autocompletion will show you a stack of properties that should be Webkit specific (e.g. webkitRequestAnimationFrame, webkitAudioContext, etc)