Experimenting with SVG foreignObject

HTML

<div>foo</div>
<svg width="100%" height="500">
  <rect x="10" y="10" width="100" height="150" fill="blue"/>

  </svg>

JavaScript

$(function(){
   console.log($('svg').children('rect')); 
   $('svg').selectAll('.node').append('<foreignObject width="100" height="57"><div xmlns="http://www.w3.org/1999/xhtml"style="position:relative;width:100px;height:57px;overflow:hidden;font-family:Arial;font-weight:400;font-size:12px;line-height:100%;">Lorem ipsum dolor sit amet, consectetur adipiscing egplit, sed do eiusmodtempor incididunt ut labore</div></foreignObject>');alert('dd');
   });