MCPcopy Create free account
hub / github.com/TruthHun/BookStack / Html5Runtime

Function Html5Runtime

static/webuploader/webuploader.withoutimage.js:3975–4005  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3973 components = {};
3974
3975 function Html5Runtime() {
3976 var pool = {},
3977 me = this,
3978 destroy = this.destroy;
3979
3980 Runtime.apply( me, arguments );
3981 me.type = type;
3982
3983
3984 // 这个方法的调用者,实际上是RuntimeClient
3985 me.exec = function( comp, fn/*, args...*/) {
3986 var client = this,
3987 uid = client.uid,
3988 args = Base.slice( arguments, 2 ),
3989 instance;
3990
3991 if ( components[ comp ] ) {
3992 instance = pool[ uid ] = pool[ uid ] ||
3993 new components[ comp ]( client, me );
3994
3995 if ( instance[ fn ] ) {
3996 return instance[ fn ].apply( instance, args );
3997 }
3998 }
3999 };
4000
4001 me.destroy = function() {
4002 // @todo 删除池子中的所有实例
4003 return destroy && destroy.apply( this, arguments );
4004 };
4005 }
4006
4007 Base.inherits( Runtime, {
4008 constructor: Html5Runtime,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected