summaryrefslogtreecommitdiff
path: root/Userland/Services/WebContent/ConnectionFromClient.h
diff options
context:
space:
mode:
authorSam Atkins <atkinssj@serenityos.org>2022-09-20 18:23:04 +0100
committerSam Atkins <atkinssj@gmail.com>2022-09-21 20:03:49 +0100
commit7a2da4cabf5627941cf1fc6eb7c5fd068fcc75f9 (patch)
tree86a1edc37ed2f5fab1a7432d0f9b8ea3d93b2268 /Userland/Services/WebContent/ConnectionFromClient.h
parenta875713f2e50994fb52ac9eb233f8d40440d6894 (diff)
downloadserenity-7a2da4cabf5627941cf1fc6eb7c5fd068fcc75f9.zip
Browser+WebContent+LibJS: Support `%c` specifiers in Console.log()
...and the other Console methods. This lets you apply styling to a log message or any other text that passes through the Console `Formatter` operation. We store the CSS on the ConsoleClient instead of passing it along with the rest of the message, since I couldn't figure out a nice way of doing that, as Formatter has to return JS::Values. This way isn't nice, and has a risk of forgetting to clear the style and having it apply to subsequent messages, but it works. This is only supported in the Browser for now. REPL support would require parsing the CSS and figuring out the relevant ANSI codes. We also don't filter this styling at all, so you can `position: absolute` and `transform: translate(...)` all you want, which is less than ideal.
Diffstat (limited to 'Userland/Services/WebContent/ConnectionFromClient.h')
0 files changed, 0 insertions, 0 deletions