fix notifyParent function name and specify origin in postMessage call