Built files from Bizgaze WebServer
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

unidochub.js 1.7KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. var Unibase;
  2. (function (Unibase) {
  3. let Apps;
  4. (function (Apps) {
  5. let Collaboration;
  6. (function (Collaboration) {
  7. let Hubs;
  8. (function (Hubs) {
  9. class UniDocHub {
  10. constructor(huburl) {
  11. this.huburl = huburl;
  12. this.connection = new window['signalR'].HubConnectionBuilder()
  13. .withUrl(this.huburl).withAutomaticReconnect()
  14. .build();
  15. }
  16. getConnection() {
  17. return this.connection;
  18. }
  19. connect(callback) {
  20. this.getConnection().start().then(function () {
  21. callback();
  22. });
  23. }
  24. register(eventname, actionmethod) {
  25. this.getConnection().on(eventname, actionmethod);
  26. }
  27. invoke(methodname, params) {
  28. this.getConnection().invoke(methodname, params);
  29. }
  30. static Instance(huburl) {
  31. if (this.instance === undefined) {
  32. this.instance = new UniDocHub(huburl);
  33. }
  34. return this.instance;
  35. }
  36. }
  37. Hubs.UniDocHub = UniDocHub;
  38. })(Hubs = Collaboration.Hubs || (Collaboration.Hubs = {}));
  39. })(Collaboration = Apps.Collaboration || (Apps.Collaboration = {}));
  40. })(Apps = Unibase.Apps || (Unibase.Apps = {}));
  41. })(Unibase || (Unibase = {}));