servo/components/constellation
bors-servo 40c8a6389a Auto merge of #17083 - danielj41:javascript-url-global-3, r=jdm
"javascript:" urls: execute in correct global scope

<!-- Please describe your changes on the following line: -->

#### Summary

This pull request makes `javascript:` urls execute in the correct global scope.

#### Example

```html
<script> var x = 4; </script>

<!-- this branch: logs "4" -->
<!-- master: undefined variable error -->
<a href="javascript:console.log(x)">link</a>
```

#### Questions

I'm new to servo and rust, so I'm unsure about these changes. In particular:
  * What's the appropriate place to evaluate the js?
    * I moved it to `handle_navigate`, but I'm not sure if this will catch all occurrences of `javascript:` urls. I also don't know if this will execute in the correct thread and the correct window.
  * What should I do with the result of the js evaluation?
    * I just ignored it. The previous behavior displayed it as the content of a new page load.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #15147, #16718

<!-- Either: -->
- [x] There are tests for these changes

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/17083)
<!-- Reviewable:end -->
2017-09-09 04:39:43 -05:00
..
browsingcontext.rs Bump euclid to 0.14. 2017-06-14 16:00:59 +02:00
Cargo.toml First step toward iOS Support 2017-08-23 17:16:30 +02:00
constellation.rs Auto merge of #17083 - danielj41:javascript-url-global-3, r=jdm 2017-09-09 04:39:43 -05:00
event_loop.rs Update serde to 0.9 (fixes #15325) 2017-02-18 21:09:46 +01:00
lib.rs First step toward iOS Support 2017-08-23 17:16:30 +02:00
network_listener.rs Add location_url to Metadata struct 2017-08-18 16:30:14 -07:00
pipeline.rs Auto merge of #18155 - ferjm:pwm.perf.timeline, r=jdm 2017-08-23 15:06:12 -05:00
sandboxing.rs Removed util. 2016-12-14 18:04:37 -06:00
timer_scheduler.rs Terminate timer scheduler thread during shutdown 2017-03-30 14:27:40 +02:00