mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-30 16:28:48 +00:00
LibWeb: Use inline script tag source line as javascript line offset
This makes JS exception line numbers meaningful for inline script tags.
This commit is contained in:
parent
47d0d9fd65
commit
c575710e5e
Notes:
sideshowbarker
2024-07-17 17:28:07 +09:00
Author: https://github.com/IdanHo
Commit: c575710e5e
Pull-request: https://github.com/SerenityOS/serenity/pull/13033
7 changed files with 12 additions and 7 deletions
|
@ -40,6 +40,8 @@ public:
|
|||
return type.is_one_of("classic", "module");
|
||||
}
|
||||
|
||||
void set_source_line_number(Badge<HTMLParser>, size_t source_line_number) { m_source_line_number = source_line_number; }
|
||||
|
||||
private:
|
||||
void prepare_script();
|
||||
void script_became_ready();
|
||||
|
@ -66,6 +68,8 @@ private:
|
|||
RefPtr<Script> m_script;
|
||||
|
||||
Optional<DOM::DocumentLoadEventDelayer> m_document_load_event_delayer;
|
||||
|
||||
size_t m_source_line_number { 1 };
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue