UNPKG

@awayfl/avm2

Version:

Virtual machine for executing AS3 code

9 lines (8 loc) 415 B
import { assert } from '@awayjs/graphics'; import { defineNonEnumerableProperty, release } from '@awayfl/swf-loader'; export function addPrototypeFunctionAlias(object, name, fun) { release || assert(name.indexOf('$Bg') === 0); release || assert(typeof fun === 'function'); // REDUX: remove the need to box the function. defineNonEnumerableProperty(object, name, object.sec.AXFunction.axBox(fun)); }