Functiondojo.marginBox

<script src="../../js/dojo.js"></script>
defined in dojo/_base/html.js

Returns an object in the expected format of box (regardless if box is passed). The object might look like: { l: 50, t: 200, w: 300: h: 150 } for a node offset from its parent 50px to the left, 200px from the top with a margin width of 300px and a margin-height of 150px.

Usage

function (/*DomNode|String*/ node, /*Object?*/ box) (view source)
parametertypedescription
nodeDomNode|Stringid or reference to DOM Node to get/set box for
boxObjectOptional. If passed, denotes that dojo.marginBox() should update/set the margin box for node. Box is an object in the above format. All properties are optional if passed.