function setPointsOnPoly(pointList, elemId) {
obj = document.getElementById(elemId);
obj.setAttribute("points", pointList);
}
function removePoints(elemId) {
obj = document.getElementById(elemId);
obj.removeAttribute("points");
}
setPointsOnPoly('35,35 40,50 70,10', 'polyCheck');
<svg width='80px' height='80px'>
<rect width='80' height='80' fill='none' stroke='black'></rect>
<polyline id="polyCheck" fill="none" stroke="black" stroke-width='2'></polyline>
</svg>
<button onclick="setPointsOnPoly('35,35 40,50 70,10', 'polyCheck');">Set Check</button>
<button onclick="removePoints('polyCheck');">Remove Check</button>
I would do this in javascript, this would be pretty close the inputs you would need on the CSS side.
If you want to do further reading on how to actually do all of this from CSS, I recommend reading up HERE.
The link provided is basically using jQuery, but that should feel a little more comfortable to you, as it accesses elements via the same syntax as CSS.