bitovi/funcunit

F.open() doesn't throw when violating same-origin

Open

#156 创建于 2016年8月11日

在 GitHub 查看
 (0 评论) (0 反应) (0 负责人)JavaScript (575 star) (395 fork)batch import
bughelp wantedp3

描述

You can't, for example, load google.com from localhost. This fails, but does so silently.

We do catch the error in a try/catch here. We could improve this by checking the error in the catch and if it is a SecurityError, rethrow so the user can see the error.

Chrome and Firefox give a different error message, so detecting this might be tricky.

贡献者指南

F.open() doesn't throw when violating same-origin · bitovi/funcunit#156 | Good First Issue