xref: /aosp_15_r20/external/skia/modules/canvaskit/preamble.js (revision c8dee2aa9b3f27cf6c858bd81872bdeb2c07ed17)
1*c8dee2aaSAndroid Build Coastguard Worker// Adds compile-time JS functions to augment the CanvasKit interface.
2*c8dee2aaSAndroid Build Coastguard Worker(function(CanvasKit) {
3*c8dee2aaSAndroid Build Coastguard Worker
4*c8dee2aaSAndroid Build Coastguard Worker
5*c8dee2aaSAndroid Build Coastguard Worker// This intentionally dangles because we want all the
6*c8dee2aaSAndroid Build Coastguard Worker// JS code to be in the same scope, but JS doesn't support
7*c8dee2aaSAndroid Build Coastguard Worker// namespaces like C++ does. Thus, we simply include this
8*c8dee2aaSAndroid Build Coastguard Worker// preamble.js file, all the source .js files and then postamble.js
9*c8dee2aaSAndroid Build Coastguard Worker// to bundle everything in the same scope.