我如何知道我的浏览器是否支持SVG 2.0? [英] How do I know if my browser supports SVG 2.0?
本文介绍了我如何知道我的浏览器是否支持SVG 2.0?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我怎么知道我的浏览器是否支持SVG 2.0?
How do I know if my browser supports SVG 2.0?
(除了尝试使用应该在SVG2中工作的功能并意识到它不起作用或可以工作...?)
(Apart from trying a feature that is supposed to work in SVG2 and realizing it's not working or that it works ...?)
推荐答案
根据 SVG 2.0规范可能类似于
document.implementation.hasFeature("http://www.w3.org/TR/SVG2/feature#GraphicsAttribute", 2.0)
您可以通过hasFeature调用检查SVG 1.1支持
SVG 1.1 support you can check with hasFeature call
document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#SVG", 1.1)
编辑:不推荐使用hasFeature
并将其从Web标准中删除.在现代浏览器( DOM规范)中,它将始终返回true.
hasFeature
is deprecated and removed from Web standards. It will return always true on modern browsers (DOM Spec).
这篇关于我如何知道我的浏览器是否支持SVG 2.0?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文