MCPcopy Create free account
hub / github.com/emscripten-core/emscripten / build_constructor

Function build_constructor

tools/webidl_binder.py:114–121  ·  view source on GitHub ↗
(name)

Source from the content-addressed store, hash-verified

112
113
114def build_constructor(name):
115 implementing_name = implements[name][0] if implements.get(name) else 'WrapperObject'
116 return [r'''{name}.prototype = Object.create({implementing}.prototype);
117{name}.prototype.constructor = {name};
118{name}.prototype.__class__ = {name};
119{name}.__cache__ = {{}};
120Module['{name}'] = {name};
121'''.format(name=name, implementing=implementing_name)]
122
123
124mid_js = ['''

Callers 1

webidl_binder.pyFile · 0.85

Calls 2

getMethod · 0.65
formatMethod · 0.45

Tested by

no test coverage detected