mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-02-24 00:24:38 +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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user