glance-dom

Glance DOM library

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
glance-dom
660.11.8-15 years ago6 years agoMinified + gzip package size for glance-dom in KB

Readme

Glance DOM
Glance is a simple way to reference elements in the DOM. It’s intention and hope is to keep you from needing to look at the DOM in order to gain a handle to an element. However, if you do inspect the DOM (for example to grab a class or an id off of an element) then referencing elements by classes and id’s are supported too.
To best understand how it works, experimenting with it goes a long way. You can learn how to read Glance by playing a game… Come Take A Glance. Learn even more at Quasimatic.org

Documentation

For details on all good things that are Glance, come read the docs.

Browser

If you want to use Glance DOM in your Browser simply include it in a ``<script>`` tag on your page as shown below and then use it as shown below in example-script.js
<html>
  <body>
    <script src="http://quasimatic.org/glance-dom/dist/glance-dom.js" type="text/javascript"></script>
    <script src="example-script.js" type="text/javascript"></script>
  </body>
</html>

And then in your ``example-script.js`` file you can find the element that contains "click me" by executing the following:
var element = glanceDOM("click me");