Modernizr/Modernizr — Issue #402: clipPath detection
Author: basecode
Created: 2011-11-02 15:40:26+00:00
State: open

Hi, I'm currently trying to detect svg filters in a project and noticed that Safari (5.1.1) returns 'SVGElement' even so it doesn't support the corresponding filter. Example:

Detecting ColorMatrix in Safari 5.1.1:
/SVG/.test(({}).toString.call(document.createElementNS('http://www.w3.org/2000/svg','feColorMatrix'))) // true
but
/SVGFEColorMatrix/.test(({}).toString.call(document.createElementNS('http://www.w3.org/2000/svg','feColorMatrix'))) // false

You will properly run in similar problems with your current clipPath detection or at least keep that in mind if you want to add svg-filter detection some day.

Cheers.