Collection of utilities for using the DOM.
Object with width and height values representing the width
and height of the window.
public Object Crafty.DOM.inner(HTMLElement obj)
Find a DOM elements position including padding and border.
public Object Crafty.DOM.getStyle(HTMLElement obj, String property)
Determine the value of a style on an HTML element. Notation can be in either CSS or JS.
public Object Crafty.DOM.translate(Number x, Number y)
Object with x and y as keys and translated values
Method will translate x and y positions to positions on the
stage. Useful for mouse events with e.clientX and e.clientY.