Scale SVG shape to fit to contents, where contents includes foreignObject
===

Is there a way - preferably without using JavaScript - to put some HTML contents into an SVG element using `foreignObject`, such that the SVG element will auto-resize (or scale) to fit its contents?