getTitle
The getTitle
method gets the current title of the document. setTitle
defines the document's title that is shown in a browser's title bar or a page's tab.
document.getTitle(): Title
Examples
print(document.getTitle())
document.addEventListener("DOMContentLoaded",function()
print("Title is", document.getTitle())
end)
Last updated
Was this helpful?