You can buy this project and download/modify it how often you want.
<polyline> attributes 'onload' <polyline> getPoints() in 'onload' getNumberOfItems polyline with clear getItem first point insertItemBefore inserted point replaceItem replaced point removeItem removed point initialize/appendItem intialized point appended point setAttribute before after setAttribute2 point 0 before point 0 after