You can buy this project and download/modify it how often you want.
<polygon> attributes 'onload' <polygon> getPoints() in 'onload' points provider polygon with insertItemBefore inserted point replaceItem replaced point initialize/appendItem intialized point appended point new Polygon polygon with