npm.io
1.0.0 • Published 9 years ago

rough-name

Licence
MIT
Version
1.0.0
Deps
0
Vulns
0
Weekly
0

rough-name

DESCRIPTION

An utility to get a rough name of html element.

The name is configured by its tagName, id and className as possible. This is available for logging or debugging, but not for identify the element in a document.

PREPARATION

<script src="rough-name.js"></script>
<script>
    function main() {
        console.log(RoughName.get(document.getElementById());
    }
</script>

If the require is available,

var RoughName = require('rough-name');

console.log(roughName.get(document.getElementById());

APIs

RoughName.get(element)

SYNTAX
roughName.get(<element>)
PARAMETER
  • element - HTML element.
RETURNS

The rough name of the element.

LICENSE

This software is released under the MIT License, see LICENSE

Keywords