At the very least, need to do the `frame.contentDocument || frame.document` check.
At the very least, need to do the
frame.contentDocument || frame.documentcheck.