| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
basic.js is a lightweight JavaScript library built to make developing web applications as simple, fast, and understandable as possible. No need to write HTML or CSS!
Its Goal: Not to make coding harder, but to turn it into an enjoyable and fluent experience.
Code is written not just for the machine, but for humans too.
There are a small number of basic concepts.
No extra dependencies.
Provides a more flexible structure.
No over-engineering. Keeps simple things simple.
You can better see how this system is no different from a lego set with a simple click Counter example:
// Variables
let lblText;
let clickedCount = 0;
// The first (main) function to be triggered when the application runs
window.onload = function() {
// We change the color of the page where everything resides
page.color = "whitesmoke";
// GROUP: Start the auto layout group.
// Center all its content horizontally.
HGroup({
// flow: "horizontal", // Or "vertical"
// align: "center", // Or "top left", "center right"
// gap: 0,
// padding: 0, // Ex: [0, 0, 0, 0]
});
// LABEL: We add a box inside the group intended as a clickable button
lblText = Label({
text: "Click Me",
color: "white",
padding: [12, 4],
round: 4,
border: 1,
borderColor: "rgba(0, 0, 0, 0.1)",
});
// The last created element is attached to the variable named "that".
// Therefore, an event or mouse cursor can be attached without explicitly calling its name.
that.elem.style.cursor = "pointer";
that.on("click", increaseOne);
// We Close the Group.
endGroup();
};
// Externally linked function that will run every time the button (.on("click")) is clicked
const increaseOne = function(self, event) {
// Increase the variable
clickedCount++;
// Change the text content of our Lego piece (.text)
lblText.text = "Clicked Count: " + clickedCount;
// We can also print to the console
println(clickedCount);
};This handbook exemplifies how you can use the library most efficiently, from basic to advanced levels:
Also, to quickly look at the latest developments and fresh methods added to the library, you can review the 00-what-is-new.md release notes.
I wish you to see its benefits.
Copyright 2020-2026 Bugra Ozden bugra.ozden@gmail.com
Licensed under the Apache License, Version 2.0
| Back | FazBrowse Home | New Git URL |