[MIRROR] Add replace_html to tgwindows (for real this time) [MDB IGNORE] (#13740)

* Add replace_html to tgwindows (for real this time) (#67137)

adds the ability to realtime inject HTML into TGWindow instances, just as you can create TGWindow instances with inline_html at initialization.

Co-authored-by: Aleksej Komarov <stylemistake@ gmail.com>

* Add replace_html to tgwindows (for real this time)

Co-authored-by: magatsuchi <88991542+magatsuchi@users.noreply.github.com>
Co-authored-by: Aleksej Komarov <stylemistake@ gmail.com>
This commit is contained in:
SkyratBot
2022-05-20 13:09:26 +02:00
committed by GitHub
parent 7e5a0a5f0b
commit e7e886a0e6
2 changed files with 34 additions and 0 deletions
+12
View File
@@ -291,6 +291,18 @@
: "[id].browser:update")
message_queue = null
/**
* public
*
* Replaces the inline HTML content.
*
* required inline_html string HTML to inject
*/
/datum/tgui_window/proc/replace_html(inline_html = "")
client << output(url_encode(inline_html), is_browser \
? "[id]:replaceHtml" \
: "[id].browser:replaceHtml")
/**
* private
*