Her is the final, short version:;

function noFilter() {
  document.getElementById("highlight").setAttribute("opacity",0);
  document.getElementById("highlightwing").setAttribute("opacity",0)
}
function init() {
var fsupport = 
((document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#Filter";,
 "1.1")) || (!!document.createElementNS && 
/SVGFE/.test(toString.call(document.createElementNS('http://www.w3.org/2000/svg','feGaussianBlur')))))?
 true : false; 
if (!fsupport) noFilter();
}
document.addEventListener("DOMContentLoaded", init, false);




--- In svg-developers@yahoogroups.com, "Andreas" <paw...@...> wrote:
>
> Cool,
> 
> now, i use this:
> 
> function init() {
> if 
> ((document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#Filter";,
>  "1.1")) || (!!document.createElementNS && 
> /SVGFE/.test(toString.call(document.createElementNS('http://www.w3.org/2000/svg','feGaussianBlur'))))){
>    var fsupport = 'true';
>   } else{
>   var fsupport = 'false';
>    }
>   if (fsupport != 'true') noFilter();
> }
> 
> 
> 
> Try this:
> http://labs.pixelfans.de/Twitterbird3_withJS.svg
> 
> 
> --- In svg-developers@yahoogroups.com, "Erik Dahlstrom" <ed@> wrote:
> >
> > On Thu, 25 Nov 2010 19:05:58 +0100, Andreas <pawelf@> wrote:
> > 
> > > That works, but what is
> > >
> > > /SVGFE/.test ?
> > 
> > That's a regexp string match on the returned object, all SVG filter  
> > primitive interfaces start with "SVGFE", eg "SVGFEConvolveMatrixElement"  
> > [1].
> > 
> > Like Chris Peto writes, it doesn't work in IE8 with the Adobe plugin. My  
> > suggested way of testing was meant primarily for checking for native  
> > support. Also the Adobe plugin support docs[2] doesn't list all the svg  
> > filter primitive elements in the DOM section, which could be another  
> > reason for failing there. An alternative could be to use a two-level test,  
> > first check with hasFeature, and if that returns false check using the DOM  
> > interfaces.
> > 
> > Cheers
> > /Erik
> > 
> > [1]  
> > http://www.w3.org/TR/SVG11/filters.html#InterfaceSVGFEConvolveMatrixElement
> > [2] http://www.adobe.com/svg/indepth/pdfs/CurrentSupport.pdf
> > 
> > -- 
> > Erik Dahlstrom, Core Technology Developer, Opera Software
> > Co-Chair, W3C SVG Working Group
> > Personal blog: http://my.opera.com/macdev_ed
> >
>




------------------------------------

-----
To unsubscribe send a message to: svg-developers-unsubscr...@yahoogroups.com
-or-
visit http://groups.yahoo.com/group/svg-developers and click "edit my 
membership"
----Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/svg-developers/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/svg-developers/join
    (Yahoo! ID required)

<*> To change settings via email:
    svg-developers-dig...@yahoogroups.com 
    svg-developers-fullfeatu...@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
    svg-developers-unsubscr...@yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/

Reply via email to