This should work if you want to use foreignObject because it integrates the html content ...
<switch> <g requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" requiredExtensions="http://www.w3.org/1999/xhtml"> <foreignObject > </foreignObject> </g> <text font-size="10" font-family="Verdana"> No foreignObject </text> </switch>
The required portion of extents was proposed for w3c and that was their answer . Firefox really implements this, but I have not tested anything. You can get away with the attribute of the required attributes, as Eric suggests.
If you want to test javascript try
var supported = document.implementation.hasFeature("www.http://w3.org/TR/SVG11/feature#Extensibility","1.1"); –
Robert Longson
source share