What kind of error? It doesn't really make sense that you would get an error if this is done right. If you're looking up the URL of the frame and then re-fetching it, that should give you the same document as the contents of that frame. I'll test this later. Could you provide some test cases where this fails?