make_with(elem_name, att_list)
Make a new HTMLElement instance
Parameters
- elem_name (text)
- att_list (list) : {{"att1", "value1"}, {"att2", "value2"}}. When threre is no options, pass an empty list “{}”.
Result
script : an HTMLElement instance
Example
use HTMLElement : script "HTMLElement"
tell HTMLElement's make_with("p", {{"id", "hello"}, {"align", "center"}})
push("great contents")
log as_html()
end tell