Closed AshfordN closed 4 years ago
Microformat works but it is more strict I would say and aligned with the SSX.
So you can use either this:
$(body).append([div: {class:"foo"}, ["hello world"]]);
or this
$(body).append( <div.foo>hello world</div> );
which are technically the same expressions.
Which format is preferred going forward?
Just use SSX:
<html>
<head>
<title>Test</title>
<style>
</style>
<script type="text/tiscript">
const data = ["Banana","Appricot","Apple"];
const rows = data.map( fruit => <tr><td>{fruit}</td></tr> );
$(body).append(
<table border>
<tbody>{rows}</tbody>
</table>
);
</script>
</head>
<body>
</body>
</html>
I've got it working. Thanks for your help.
Element.append() and similar functions that use the microformat no longer work, and causes the program to crash.