2 ms·
For anyone wanting to do graphics in web pages I would recommend looking into the canvas tag. Example code: with (context) { beginPath(); moveTo(100,
by z3t4 11y ago
For anyone wanting to do graphics in web pages I would recommend looking into the canvas tag. Example code:
with (context) {
beginPath();
moveTo(100, 100);
lineTo(100, 300);
lineTo(300, 300);
closePath();
stroke();
}
- ahoge 11y agoSince ES5, you can't use `with` in strict mode. Well, you shouldn't use it anyways since it's confusing/ambiguous and it's also terrible for performance.
- z3t4 11y agoI wanted to make a point about all the confusing new features of ES6 that are just there to save a few key strokes, and will haunt you forever.