I am writing a jQuery Plugin that needs to be able to run against DOM elements within an iFrame. I\'m just testing this locally right now (ie url is file://.../example.html
Given that both the parent file and the iFrame's file are coming off my local disk (in development) and will be coming off the same server (in production) I'd have thought that I'd not be subject to the cross-origin issues.
"Please open this perfectly harmless HTML document that I have attached to this email." There are good reasons for browsers to apply cross-domain security to local files.
Is there a way I can convince the browser that my local files are actually of the same domain?
Install a web server. Test through http://localhost. As a bonus, get all the other benefits of an HTTP server (such as being able to use relative URIs that start with a / and develop with server side code).