servo/components/script
delan azabani 95eedb997a
Devtools: initial Debugger > Sources panel (#36164)
This patch adds support for listing scripts in the Sources panel.
Classic scripts, both external and inline, are implemented, but worker
scripts and imported module scripts are not yet implemented.

For example:

```html
<!-- sources.html -->
<!doctype html><meta charset=utf-8>
<script src="classic.js"></script>
<script>
    console.log("inline classic");
    new Worker("worker.js");
</script>
<script type="module">
    import module from "./module.js";
    console.log("inline module");
</script>
<script src="https://servo.org/js/load-table.js"></script>
```

```js
// classic.js
console.log("external classic");
```

```js
// worker.js
console.log("external classic worker");
```

```js
// module.js
export default 1;
console.log("external module");
```


![image](https://github.com/user-attachments/assets/2f1d8d7c-501f-4fe5-bd07-085c95e504f2)

---
<!-- 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 partially implement #36027

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes require tests, but they are blocked on #36325

Signed-off-by: Delan Azabani <dazabani@igalia.com>
Co-authored-by: atbrakhi <atbrakhi@igalia.com>
2025-04-08 09:22:53 +00:00
..
docs doc: fix broken link to UnrootedMustRoot plugin (#36198) 2025-03-28 10:23:41 +00:00
dom Devtools: initial Debugger > Sources panel (#36164) 2025-04-08 09:22:53 +00:00
layout_dom Move ScriptToConstellationMsg to constellation_traits (#36364) 2025-04-05 22:13:29 +00:00
svgpath Add Path2D (#35783) 2025-03-26 12:12:44 +00:00
xpath Update rustfmt to the 2024 style edition (#35764) 2025-03-03 11:26:53 +00:00
animation_timeline.rs script: Limit public exports. (#34915) 2025-01-10 08:19:19 +00:00
animations.rs Move ScriptToConstellationMsg to constellation_traits (#36364) 2025-04-05 22:13:29 +00:00
body.rs Move ScriptToConstellationMsg to constellation_traits (#36364) 2025-04-05 22:13:29 +00:00
build.rs script: Move code generation and webidl files to new script_bindings crate. (#35157) 2025-01-24 20:47:43 +00:00
canvas_context.rs Cleanups for future script crate split (#35987) 2025-03-16 13:46:14 +00:00
canvas_state.rs Move ScriptToConstellationMsg to constellation_traits (#36364) 2025-04-05 22:13:29 +00:00
Cargo.toml compositing: Combine webrender_traits and compositing_traits (#36372) 2025-04-06 17:34:18 +00:00
clipboard_provider.rs Move ScriptToConstellationMsg to constellation_traits (#36364) 2025-04-05 22:13:29 +00:00
conversions.rs suppress build warnings when disabling webgpu and webxr (#35379) 2025-02-08 08:16:21 +00:00
devtools.rs Add CanGc as arguments in methods in devtools.rs, CharacterData, CSSStyleRule, CSSStyleSheet (#36375) 2025-04-06 23:44:58 +00:00
document_collection.rs Update rustfmt to the 2024 style edition (#35764) 2025-03-03 11:26:53 +00:00
document_loader.rs Update rustfmt to the 2024 style edition (#35764) 2025-03-03 11:26:53 +00:00
drag_data_store.rs Move ScriptToConstellationMsg to constellation_traits (#36364) 2025-04-05 22:13:29 +00:00
fetch.rs Check all ancestor navigable trustworthiness for mixed content (#36157) 2025-04-05 05:38:24 +00:00
iframe_collection.rs Move ScriptToConstellationMsg to constellation_traits (#36364) 2025-04-05 22:13:29 +00:00
image_animation.rs Animation: Aggregate Animated Image Info to Document (#36141) 2025-03-28 23:19:49 +00:00
init.rs Make generated bindings generic over DOM types (#35169) 2025-01-25 05:08:49 +00:00
layout_image.rs Move various reflector types and traits to script_bindings (#35279) 2025-02-04 06:58:08 +00:00
lib.rs Move generated bindings to script_bindings (#36323) 2025-04-04 06:45:08 +00:00
links.rs Move ScriptToConstellationMsg to constellation_traits (#36364) 2025-04-05 22:13:29 +00:00
messaging.rs Move ScriptToConstellationMsg to constellation_traits (#36364) 2025-04-05 22:13:29 +00:00
microtask.rs script: Mark callback methods with CanGc. (#35753) 2025-03-03 12:17:25 +00:00
navigation.rs Move ScriptToConstellationMsg to constellation_traits (#36364) 2025-04-05 22:13:29 +00:00
network_listener.rs Propagate CanGc arguments through callers in constructors (#35541) 2025-02-20 16:17:45 +00:00
realms.rs Move generated bindings to script_bindings (#36323) 2025-04-04 06:45:08 +00:00
routed_promise.rs webgpu: leverage routed_promise in calls returning promises (#35859) 2025-03-23 18:52:46 +00:00
script_module.rs refactor: add CanGc as argument to methods in Document (#36392) 2025-04-07 23:15:23 +00:00
script_runtime.rs Update rustfmt to the 2024 style edition (#35764) 2025-03-03 11:26:53 +00:00
script_thread.rs Add CanGc as arguments in methods in devtools.rs, CharacterData, CSSStyleRule, CSSStyleSheet (#36375) 2025-04-06 23:44:58 +00:00
security_manager.rs Cleanups for future script crate split (#35987) 2025-03-16 13:46:14 +00:00
serviceworker_manager.rs Move ScriptToConstellationMsg to constellation_traits (#36364) 2025-04-05 22:13:29 +00:00
stylesheet_loader.rs Fix: Add support for stylesheet MIME type quirk in quirks mode (#36338) 2025-04-06 00:28:35 +00:00
stylesheet_set.rs script: Limit public exports. (#34915) 2025-01-10 08:19:19 +00:00
task.rs Migrate to the 2024 edition (#35755) 2025-03-13 10:28:11 +00:00
task_manager.rs dom: Implement minimal IntersectionObserver workflow (#35551) 2025-03-18 11:09:44 +00:00
task_queue.rs Use strum to iterate through enum variants and get their names (#35933) 2025-03-13 12:00:31 +00:00
task_source.rs dom: Implement minimal IntersectionObserver workflow (#35551) 2025-03-18 11:09:44 +00:00
test.rs Update rustfmt to the 2024 style edition (#35764) 2025-03-03 11:26:53 +00:00
textinput.rs Fix Backspace deleting entire previous line in <textarea> (#36112) 2025-03-26 18:37:48 +00:00
timers.rs script: Mark callback methods with CanGc. (#35753) 2025-03-03 12:17:25 +00:00
unminify.rs Update rustfmt to the 2024 style edition (#35764) 2025-03-03 11:26:53 +00:00
webdriver_handlers.rs refactor: add CanGc as argument to methods in Document (#36392) 2025-04-07 23:15:23 +00:00
window_named_properties.rs Migrate to the 2024 edition (#35755) 2025-03-13 10:28:11 +00:00