--- trunk/doc/faq.html 2007/11/22 01:03:33 64 +++ trunk/doc/faq.html 2007/11/22 01:04:43 65 @@ -13,6 +13,27 @@

FAQ

+

Can I use JSCoverage to measure code coverage for a page on http://example.com/?

+ +

+ In order to measure the code coverage of a page on http://example.com/, + you must run jscoverage to create a jscoverage.html file on the + example.com server. You cannot use http://example.org/jscoverage.html + to measure the code coverage of a page located on http://example.com/. +

+ +

+ The fundamental reason for this limitation is the + Same-Origin Policy + for untrusted JavaScript. +

+ +

+ (In fact, the current version of JSCoverage is slightly more restrictive + than this: it requires that the JavaScript being measured reside under the + same directory as the jscoverage.html file.) +

+

I'm trying to load my code with the URL file:///C:/foo/bar/jscoverage.html?foo/bar.html and I'm getting all kinds of JavaScript errors.