Syntax error corrected.
Passing xhr (also named as "req") object as the third parameter to asynchronous callback implemented.
Calling postMessage on parent window (if available) instead of received postMessage source implemented.
Unused parameter removed.
Default value of absent function parameter "data" now is null instead of undefined.
Merge pull request #15 from antonruban/master

One bug and two features implemented.