Holger Will schrieb: > Jonathan Watt schrieb: > > > First off, I've noticed that my suggested script doesn't work in IE6 > > since it doesn't seem to implement createElementNS. To prevent a > > script error I'll revise my script to: > > > > var hasNativeSVG = false; > > try { > > if > > (document.createElementNS('http://www.w3.org/2000/svg','svg').width) > <http://www.w3.org/2000/svg%27,%27svg%27%29.width%29> > > <http://www.w3.org/2000/svg%27,%27svg%27%29.width%29> > > hasNativeSVG = true; > > } catch (e) { /* ignore exception */ }; > > > > > > On 7/28/05, Holger Will <[EMAIL PROTECTED]> wrote: > > > Hi Jonathan, > > > > > > in most cases i tend to favor the "<object>alternate > content</object>" - > > > syntax, which works without script. > > > > Yup, but John asked for a script, so that's what I was trying to do. > > Also the <object> approach will not differentiate between plug-in and > > native support. > > i should have statet that this is a bit off topic. your script seems > like a very clean and easy solution ! > > > > > > i've tried the following without success, and i wonder if the behavior > > > is specified like this or if its a bug. > > > <object ... > > > > <img ... onload="alert('SVG not supported')/> > > > </object> > > > > I thought you were trying not to rely on script support. j/k ;-) > > i still do :-) i was just wondering ... > > > > > > THIS DOES NOT WORK ! > > > the onload allways gets fired. is this right? do html clients allways > > > load both the objects content and the alternate content ? > > > is there another event that can be used ? is there any other specified > > > way to determin if object renders the original content or the > alternate > > > content ? > > > > Hmm, I'm not sure. That the onload get's evaluated seems like a bug > to me. > > yeah it seems strange but at least mozilla, opera and ie agree on the > behaviour :-) > so even if mozilla would get this right, it would be as useless as > contentDocument > for cross browser detection of svg support. > > thanks for your comments anyways > Holger > i dont know what ive tested last time, but this indeed seems to work in IE and Opera, so this is probably a bug in mozilla, in which component would i post this bug ?
Holger ----- 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/