passing window object to API JS

API JS is now executing from Node context so window ref is needed