function getDimension$1(name) {
    return function (element, propertyValue) {
        if (propertyValue === undefined) {
            // Firefox throws an error if .getBBox() is called on an SVG that isn't attached to the DOM.
            try {
                return element.getBBox()[name] + "px";
            } catch (e) {
                return "0px";
            }
        }
        element.setAttribute(name, propertyValue);
    };
}
Get/set the width or height.