mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 06:57:46 +00:00
LibJS: Create JS to HTML markup generator
The new JS::MarkupGenerator class can convert both a JS source string and a JS Runtime Value into properly formatted HTML using the new LibWeb System Palette css color values. It makes more sense for this JS -> HTML process to occur in LibJS so that it can be used elsewhere, namely Markdown code block syntax highlighting. It also means the Browser can worry less about LibJS implementation details.
This commit is contained in:
parent
b352a6b59d
commit
941b028ca3
6 changed files with 392 additions and 160 deletions
|
@ -47,13 +47,6 @@ private:
|
|||
|
||||
String create_document_style();
|
||||
|
||||
void print_value(JS::Value, StringBuilder& output_html, HashTable<JS::Object*> seen_objects = {});
|
||||
void print_array(const JS::Array&, StringBuilder& output_html, HashTable<JS::Object*>&);
|
||||
void print_object(const JS::Object&, StringBuilder& output_html, HashTable<JS::Object*>&);
|
||||
void print_function(const JS::Object&, StringBuilder& output_html, HashTable<JS::Object*>&);
|
||||
void print_date(const JS::Object&, StringBuilder& output_html, HashTable<JS::Object*>&);
|
||||
void print_error(const JS::Object&, StringBuilder& output_html, HashTable<JS::Object*>&);
|
||||
|
||||
RefPtr<GUI::TextBox> m_console_input;
|
||||
RefPtr<Web::HtmlView> m_console_output_view;
|
||||
RefPtr<Web::Element> m_console_output_container;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue