However, this way would not scale with null and undefined so that per each test we need to check them and this is boring.Finally, I would not worry about cross frame variables since via postMessage everything has to be serialized and unserialized.