Best way of scaling a rounded rectangle in html5?

Hello,

If I’m trying to scale a rounded rectangle I created with code (and I don’t want to redraw it every time) what’s the best way to do that? I tried scale9grid but it doesnt seem to work on html5. I’ve heard things about tilesheets, but I have no idea how to effectively use those.

Thanks!

-Taylor