0.2.3 • Published 8 years ago

mech-web v0.2.3

Weekly downloads
1
License
MIT
Repository
github
Last release
8 years ago

mech-web

Mech-web provides access to the DOM (document object model).

See Mechanisms Home for more information and other libraries.

Documentation

In This Library

elemActive

elemActive returns access to active DOM element.

Examples

Get active element.

m.elemActive().go;

elemByID, e$

elemByID returns access to a single DOM element (id).

id can be:

  • a primitive value
    • m.elemByID("hello")
    • m.elemByID(0)
  • a mechanism
    • m.elemByID(m.str("hello"))
    • m.elemByID(m.num(3))

Examples

Get an element.

mw.elemByID("left").go;

Get the value of an element with the id "left":

m.propGet("value",m.e$("left")).go;

Set the value of an element with the id "left" to 23:

m.propSet("value",m.e$("left"),23).go;

Setup

Using In Your Projects

Change directory to your node project.

$ npm install mech-web --save

Development

Get Involved!

There are a lot of core mechanisms just waiting to be created. Many of them can be created in a few hours including in-depth tests. Clone mech-library to get started!

Setup

Install:

$ npm install

Continuous test:

$ gulp

Test:

$ gulp webtests

Test Server

Read documentation in gulpfile.js to see how to setup automated web testing.

$ gulp webserver
0.2.3

8 years ago

0.2.2

8 years ago

0.2.1

8 years ago

0.1.6

9 years ago

0.1.5

10 years ago

0.1.3

10 years ago

0.1.2

10 years ago

0.1.1

10 years ago