catch error thrown in cross-domain iframe

When `$().caret()` is called in an `<iframe>`, calling `oWindow.frameElement` causes an error:

> SecurityError: Failed to read the 'frame' property from 'Window': Blocked a frame with origin "http://another-work" from accessing a cross-origin frame.

In this PR the error is catched so that it falls back to the condition that `oFrame` is `null`.