Home > XModules >

Requirements

  • OS X 10.9 or later
    • Developed and tested on macOS 10.14.6

Download

Version 1.0 -- 2020-07-04

Dependencies

HTMLElement

HTMLElement is an AppleScript libraryt to build HTML with programming.

The structre of HTML document is built by script object through well arranged object orientied interface. And the object structre can output well fomatted HTML data.

This library is useful when a kind of data is converted into HTML data.

use HTMLElement : script "HTMLElement"

tell HTMLElement's make_with("html", {})
tell push_element_with("head", {})
tell push_element_with("title", {})
push("Welcome to HTMLElement")
end tell
end tell
tell push_element_with("body", {})
tell push_element_with("p", {})
push("hello")
end tell
set body_tag to it
end tell
set html_tag to it
end tell

set comment_tag to HTMLElement's comment_with("this is comment", {})
body_tag's push(comment_tag)

log html_tag's as_html()
(*<html>
<head>
<title>Welcome to HTMLElement</title>
</head>
<body>
<p>hello</p>
<!-- this is comment -->
</body>
</html>*)

History

  • 1.0 -- 2020-07-04
    • First Release