Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Field {
- constructor(canvas) {
- const CANVAS = document.querySelector(canvas);
- const CONTEXT = CANVAS.getContext("2d");
- return Object.assign(CONTEXT, Field.prototype); // *
- }
- prototypeMethodName() {
- return "something";
- }
- }
Add Comment
Please, Sign In to add comment