<head>
<style>
html,body{height:100%;margin:0;}
body{overflow:hidden;}
</style>
</head>
<body>
<svg width="160" height="90" viewbox="0 0 160 90" id="mysvg">
<rect width="160" height="90" fill="#999"/>
</svg>
<script>
var sw=window.innerWidth;
var sh=window.innerHeight;
document.getElementById("mysvg").setAttribute("width",sw);
document.getElementById("mysvg").setAttribute("height",sh);
</script>
</body>