Security News
Cloudflare Adds Security.txt Setup Wizard
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
A JavaScript view framework.
Here is a basic template in Temple. This just uses a simple variable, but Temple has support for most of the major Mustache features.
<hello-world>
<h1>Hello {{ name }}</h1>
</hello-world>
// the above template is rendered
Temple.render(template);
// create an instance from a view name and data
var view = Temple.create("hello-world", { name: "World" });
// render and append to the document body
view.paint("body");
By default, data passed to Temple is not reactive, meaning that re-renders will need to be handled manually. Views can easily be made reactive by using reactive objects, provided by trackr-objects.
// create a reactive object to serve as data
var data = new Temple.Map({ name: "World" })
var view = Temple.create("hello-world", data).paint("body");
// later, change the data and watch the DOM auto-update
data.set("name", "John");
Listening for DOM events is really easy in Temple. Enable the plugin and then add an on-<event>
attribute to any element.
<alert-anchor>
<!-- anchor element with on-click attribute -->
<a href="#" on-click="alert">Click Me</a>
<!-- scripts are called when views are initiated -->
<script>
// enable the DOM events plugin
this.use("actions");
// add the special alert action
this.addAction("alert", function(e) {
e.original.preventDefault();
alert("You clicked me!");
});
</script>
</alert-anchor>
Temple uses the new Web Components API to give every view its own custom element. This allows views to be used as reusable modules.
<!-- resuable view -->
<list-item>
<li>{{ item }}</li>
</list-item>
<!-- main view which uses the above view many times -->
<my-view>
{{# list }}
<list-item />
{{/ list }}
</my-view>
FAQs
A JavaScript view framework.
The npm package templejs receives a total of 37 weekly downloads. As such, templejs popularity was classified as not popular.
We found that templejs demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
Security News
The Socket Research team breaks down a malicious npm package targeting the legitimate DOMPurify library. It uses obfuscated code to hide that it is exfiltrating browser and crypto wallet data.
Security News
ENISA’s 2024 report highlights the EU’s top cybersecurity threats, including rising DDoS attacks, ransomware, supply chain vulnerabilities, and weaponized AI.