Fake postMessage() / addEventListener() implementations.