added a check for window.postMessage if it doesnt exist I present an alert