Skip to content
hhh edited this page Feb 8, 2020 · 10 revisions

Documentation of canvasom

TOC

Usage

Via npm

To use canvasom as a dependency, execute the following command in your project folder

npm install canvasom

and import the APIs like this:

import { Root } from "canvasom";

const root = new Root();

Via CDN

Or, you can just include one of the following script tag in your HTML file

<!-- via jsdelivr -->
<script type="text/javascript" crossorigin="anonymous" src="https://cdn.jsdelivr.net/npm/canvasom@latest/dist/canvasom.umd.min.js"></script>
<!-- via unpkg -->
<script type="text/javascript" crossorigin="anonymous" src="https://unpkg.com/canvasom@latest/dist/canvasom.umd.min.js"></script>

and access the APIs via the COM global like this:

const root = new COM.Root();

Note: remember to replace latest in the script tag with the exact version you are using to avoid breaking your code.

Getting Started

Documentation of canvasom

Clone this wiki locally