sets a user-defined viewport
x | number | top-left viewport corner's X-coordinate |
y | number | top-left viewport corner's Y-coordinate |
width | number | viewport's width |
height | number | viewport's height |
parentObj | HTMLElement | create inside of parentObj object |
myWins.setViewport(x, y, width, height, parentObj);
Creates a new viewport with the specified position and dimensions. If parentObj is specified, attaches the viewport to it; otherwise, attaches the viewport to the document.body.
Back to top