<html>
<head>
<script src="../../../resources/ahem.js"></script>
<script src="../../../resources/run-after-layout-and-paint.js"></script>
<style>
.container {
font: 50px/1 Ahem, sans-serif;
color: green;
}
.shape-outside {
width: 100px;
height: 100px;
float: left;
shape-outside: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='100px' height='100px'><rect x='0' y='50' width='50' height='50' fill='blue'/></svg>");
}
</style>
<script>
window.onload = function() {
runAfterLayoutAndPaint(function() {
var container = document.querySelector('.container');
var shape = document.createElement('div');
shape.className = 'shape-outside';
container.insertBefore(shape, container.firstChild);
}, true);
}
</script>
</head>
<body>
<div class='container'>
<p>X<br>X<br>X</p>
</div>
</body>
</html>