Resturn "\n" on set root rather than nothin
Replaced image creation method

cerateElement(“image”) works in Safari and createImage(“img”) in
Chrome, but new Image() works in both.