When I make a local html load another local html file in a iFrame (frame.src=) in Chrome, I cannot access its document through contentWindow or contentDocument (even with the verification of contentWindow being the document itself) because it seems Chrome doesn't allow it when a local html file is involved. Is it possible that this feature will change in next releases of Chrome? Note: it works (contentDocument or contentWindow) with Safari and Opera, IE, WebKit. It seems to be a security issue but contentDocument and contentWindow are from W3C.
相关问题
- Views base64 encoded blob in HTML with PHP
- Is there a way to play audio on a mobile browser w
- HTML form is not sending $_POST values
- implementing html5 drag and drop photos with knock
- how to get selected text from iframe with javascri
It is because of Chrome restriction known as Same-Origin Policy. By default the local files are considered to belong to different origins and not allowed to access one from another. To solve the issue, you can launch the Chrome application with the
--allow-file-access-from-files
command-line switch.