Handle exception when document.domain is set

If host page's `document.domain` is set to another, access to iframes within the page will raise exception.

To prevent such tragedy, a prior check for access privilege is necessary.

Hope I'm doing the right way.