The page

contains an example that has "" instead of e.g. "" used in the same chapter. It does have a warning saying

It is important to use a separate domain so that if the attacker
convinces the user to visit that page directly, the page doesn't run
in the context of the site's origin, which would make the user
vulnerable to any attack found in the page.

but I think this should specifically mention that using a subdomain is not enough because JavaScript can lift any domain restrictions if only the subdomain is different. This difference may not be immediately obvious to casual reader especially because both examples also have different subdomains which is easier to notice.

I'm not sure how wording should be put because technically "" is subdomain of "com." top level domain. And we have stuff such as "", which makes things even hairier.

I guess that the spec would like to use .example.* domains in all the examples but perhaps one could use something more explicit such as

for this example in addition to being more explicit about subdomains in the warning. That would prevent even casual reader from mixing and


Reply via email to