<div id="container"></div>
html, body, #container {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
}
var stage = acgraph.create('container');
var rectangle = stage.rect(10, 10, 100, 100);
rectangle.fill('#90CAF9');
// Gets flag.
var flag = rectangle.hasParent();
var simpleText = stage.text();
simpleText.x(10);
simpleText.y(120);
simpleText.text('Is parent element set? ' + flag);
simpleText.fontSize(12);