X-CHMOD: HTML5 Web Component

HTML5, CSS3 and JavaScript

The Fine Art of Web Development by Martin Ivanov

A new HTML5 Web Component has just joined my ever-growing collection of custom tags.

Meet AcidJs.XChmod – a HTML5 Web Component that can be used to set/display the CHMOD settings of a file. Since it emits a client-side event which returns what is currently set it can be easily connected to a server-side script. It was built using another HTML5 Web Component – AcidJs.XSwitch.

thumb

Markup

[sourcecode language=”html”]<acidjs-xchmod permissions="755" id="chmod-1"></acidjs-xchmod>
<acidjs-xchmod permissions="644" id="chmod-2"></acidjs-xchmod>
<acidjs-xchmod permissions="666" id="chmod-6">
<acidjs-xchmod-lang>
{
"owner": "Eigentümer",
"group": "Gruppe",
"other": "Sonstige",
"read": "Lesen",
"write": "Schreiben",
"execute": "Ausführen"
}
</acidjs-xchmod-lang>
</acidjs-xchmod>
<acidjs-xchmod permissions="644" enabled="false" id="chmod-4"></acidjs-xchmod>[/sourcecode]

HTML Attributes

Apart from the standard HTML attributes (style, class, id, etc.), the tag also supports the following component-specific attributes:

JavaScript Methods, Getters, Setters and Events

Methods

All standard JavaScript methods are supported, plus the component-specific:

Getters and Setters

All standard JavaScript setters/getters are supported, plus the component-specific:

Custom Events

Have a great day, and don’t forget to check the demo on this page.

If you share the same interest towards HTML5 Web Components as I do these days, make sure you read my relevant blog posts and further endeavors on my HTML5, CSS3 and JavaScriptExperiments and Insight website.

Categories and Tags
Links

© 2006 - 2023 Martin Ivanov