SetBody (Method)
From Legacy Roblox Wiki
Jump to navigationJump to search
SetBody( String HTML ) | |
Returns | nil |
Description: | Sets the HTML contents of the window. Can be run on a single window continuously, allowing for dynamic content. |
Member of: | HtmlWindow |
Example
Sets and then updates the body to count from 0 to 10:
local HtmlService = game:service("HtmlService")
local htmlWindow = HtmlService:NewWindow()
local initialDisplayed = false
htmlWindow.DocumentComplete:connect(function()
if not initialDisplayed then
htmlWindow:SetBody(0)
initialDisplayed = true
end
end)
htmlWindow:Show()
htmlWindow:Navigate()
for i = 0, 10 do
htmlWindow:SetBody(i)
wait(1)
end