How to determine canvas height and width?

Is there any function to get the height and width of a canvas?

„from canvas get height…“ you only get „fill container“ or „80%“ but not the absolute number of pixels.

Unfortunately, there is no such function. Moreover, the canvas coordinate system does not match the screen coordinates, which in my opinion is a disadvantage. For example, we can’t precisely position components on top of the canvas for this reason.