mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-02 01:08:48 +00:00
LibWeb: Handle JavaScript source code with non-UTF-8 encoding
When fetching scripts in HTMLScriptElement's "prepare a script" algorithm, we now re-encode the script sources to UTF-8.
This commit is contained in:
parent
da451467b1
commit
83c69fa62e
Notes:
sideshowbarker
2024-07-17 06:54:10 +09:00
Author: https://github.com/awesomekling
Commit: 83c69fa62e
2 changed files with 37 additions and 22 deletions
|
@ -13,7 +13,9 @@
|
|||
|
||||
namespace Web::HTML {
|
||||
|
||||
class HTMLScriptElement final : public HTMLElement {
|
||||
class HTMLScriptElement final
|
||||
: public HTMLElement
|
||||
, public ResourceClient {
|
||||
WEB_PLATFORM_OBJECT(HTMLScriptElement, HTMLElement);
|
||||
|
||||
public:
|
||||
|
@ -49,9 +51,12 @@ public:
|
|||
|
||||
void set_source_line_number(Badge<HTMLParser>, size_t source_line_number) { m_source_line_number = source_line_number; }
|
||||
|
||||
private:
|
||||
public:
|
||||
HTMLScriptElement(DOM::Document&, DOM::QualifiedName);
|
||||
|
||||
virtual void resource_did_load() override;
|
||||
virtual void resource_did_fail() override;
|
||||
|
||||
virtual void visit_edges(Cell::Visitor&) override;
|
||||
|
||||
void prepare_script();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue