why are my sprites not drawing?

0

I am learning how to make a minigame with javascript, but my player is not rendered.
I don´t know why. I am not getting any errors.

The startGame() starts with

How should I edit my code to get it to run and get the sprites to render?

Here’s my code :

<html>
<head>
    <meta name="viewport" content="width = device-width, initial-scale = 1.0"/>
</head>  
<body onload='startGame()'>

<script>

function startGame() {
    createCanvas.start();

}
let ninja = new Image();
let ninjaImage = "images/player/stand01.png"


const createCanvas = {
    canvas : document.createElement('canvas'),
    start() {
        this.canvas.width = 600;
        this.canvas.height = 400;
        this.context = this.canvas.getContext('2d');
        document.body.insertBefore(this.canvas, document.body.childNodes[0]);
    }
}
function sprite(options){
    let that = {};
    that.context = options.context;
    that.width = options.width;
    that.height = options.height;
    that.image = options.image;
    return that;

    that.render = function () {
    that.context.drawImage(
    that.image, 0, 0, that.width, that.height, 0, 0, that.width, that.height);
    }
   player.render();
}

 player = sprite ({
    width: 100,
    height: 100,
    image: ninjaImage
});


</script>

</body>
<style>
canvas {
    border: 1px solid black;
    background: grey;
}
</style>