Looks like that Grid and Cell should have parent-child relationship. Is it normal that I'm creating child objects at parent class?
There is no reason for a Grid and Cell to have any inheritance relationship. A Cell is not a kind of Grid, nor is a Grid a kind of Cell.
I need somehow to give access to context var from Cell class without passing it via constructor.
Why? That's exactly how you should give a Cell access to the context. The constructor is the right way to do this. It's completely normal for a container class to pass needed context into its children.
I had tried to play with prototypes but can't figure out how to do that.
That'sIt's a bad design to put data on the prototype. You'reYou would effectively makingmake it impossible to have two independent Grids, if every single instance of Cell can only share access to one Grid's context via Cell's prototype. It's far better for each Grid to pass its context into all its Cells.