{"size": 519, "ext": "js", "max_stars_repo_path": "fabric-introduction/src/first-draw.js", "max_stars_repo_name": "course-one/canvas-fabric-introduction", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "fabric-introduction/src/first-draw.js", "max_issues_repo_name": "course-one/canvas-fabric-introduction", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "fabric-introduction/src/first-draw.js", "max_forks_repo_name": "course-one/canvas-fabric-introduction", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 22.5652173913, "max_line_length": 59, "alphanum_fraction": 0.5298651252}
document.addEventListener( 'DOMContentLoaded', function() {
    
    /** @type { import("fabric/fabric-impl") } */
    const fabric = window.fabric;

    // create `Canvas` object using `<canvas>` DOM node
    const canvas = new fabric.Canvas( 'canvas' )

    /*--------------*/

    // create a `Rect` object
    const rect = new fabric.Rect( {
        width: 200,
        height: 200,
        top: 100,
        left: 100,
        fill: '#03A87C'
    } );

    // add `rect` to the canvas
    canvas.add( rect );

} );