
Security News
Open Source CAI Framework Handles Pen Testing Tasks up to 3,600Ć Faster Than Humans
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600Ć faster than humans.
The art library makes it easy to dynamically create and manipulate DOM elements.
Create an empty DIV
:
const myDiv = art("div");
Append the text "Hello, World!" to the document body:
art(document.body, "Hello World!");
Create a button with a caption and a click handler:
function handleClick(event)
{
alert("Bravo!");
}
const button =
art
(
"input",
{ type: "button", value: "Click me" },
art.on("click", handleClick)
);
Detach the click handler:
art(button, art.off("click", handleClick));
Reattach the click handler:
art(button, art.on("click", handleClick));
Create a 2Ć2 table with centered text and append it to an existing element:
art
(
document.getElementById("myParent"),
art
(
"table",
{ style: { textAlign: "center" } },
art
(
"tr",
art("td", "top left"),
art("td", "top right")
),
art
(
"tr",
art("td", "bottom left"),
art("td", "bottom right")
)
)
);
See the art Library Reference for further informations.
The pregenerated files in the distribution package expose all implemented features.
For aspecialized usage, it is possible to generate a custom build of the art library with only
desired features included.
Furthermore, it is possible to generate the library code in form of an ECMAScript module that only
exports art
as a default export.
The art library is generated using make-art
, which can be used as a command line tool after
installing the art-js
package.
npm i art-js
npx make-art <output_folder> [dts] [esModule] [art.on] [art.off] [art.css] [art.css.keyframes]
output_folder
dts
esModule
art.on
art.on
.art.off
art.off
.art.css
art.css
.art.css.keyframes
art.css.keyframes
.
The art library is compatible with the browsers listed below.
ā Chrome
ā Safari 7+
ā Edge
ā Firefox
ā Opera
ā Internet
Explorer 9+
ā Android Browser 4.x
Some features may not be available in older browsers.
FAQs
A really small DOM manipulation library
The npm package art-js receives a total of 11 weekly downloads. As such, art-js popularity was classified as not popular.
We found that art-js demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago.Ā It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600Ć faster than humans.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.
Security News
CVEForecast.org uses machine learning to project a record-breaking surge in vulnerability disclosures in 2025.