--- In [email protected], Holger Will <[EMAIL PROTECTED]> wrote: > jophof007 schrieb: > > > > > Does anyone has a solution on detecting native svg support. Deer park > > Alpha 2 supports native svg. How can a client javascript detect that > > deerpark alpha 2 is running or how can a client javascript detect that > > native svg support is available? > >
> > or you might check for the support of inlined SVG, this works in mozilla and opera. > > <?xml version="1.0"?> > <html xmlns="http://www.w3.org/1999/xhtml" > > <head> > </head> > <script> > function testSVG1(){ > > var svg=document.getElementById("testSVG") > if(svg.namespaceURI=="http://www.w3.org/2000/svg"){ > alert("your broser supports inlined SVG") > } > } > </script> > <body onload="testSVG1()"> > <svg id="testSVG" xmlns="http://www.w3.org/2000/svg"/> I don't think that test above will tell you whether the browser supports inline SVG, all you do is checking the namespaceURI property of an element node in an XML document using elements in different namespaces, any W3C DOM Level 2 implementation should do that whether it knows about SVG or not. And you kind of check whether the browser implements getElementById on that <svg id="testSVG"> element but if that is the intension then you should check the result of the getElementById call before trying to access it as otherwise you can create a script error. For instance Opera 7.50 when served the above as application/xhtml+xml will show the alert while it certainly does not know to render SVG. Mozilla 1.7 does not show the alert but not because the test with the namespace is any good to detect SVG support but because the getElementById does not return an object but null and then the next line gives a script error. ----- To unsubscribe send a message to: [EMAIL PROTECTED] -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/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/

