Javascript 从驱动器打开文件时未调用Onfileloaded事件

Javascript 从驱动器打开文件时未调用Onfileloaded事件,javascript,google-drive-api,google-drive-realtime-api,Javascript,Google Drive Api,Google Drive Realtime Api,我正试图在我的谷歌硬盘中打开一个由我的谷歌实时应用程序创建的文件。尽管URL打开正确,但在afterAuth事件之后不会触发onfileloaded事件。当从Google Drive打开应用程序创建的文件时,我是否应该在应用程序中预期并处理不同的事件。在其他窗口中复制URL将触发onfileload事件 未加载: function onFileLoaded(doc) { Util.log.console("Doc:"); Util.log.console(doc); data = d

我正试图在我的谷歌硬盘中打开一个由我的谷歌实时应用程序创建的文件。尽管URL打开正确,但在afterAuth事件之后不会触发onfileloaded事件。当从Google Drive打开应用程序创建的文件时,我是否应该在应用程序中预期并处理不同的事件。在其他窗口中复制URL将触发onfileload事件

未加载:

function onFileLoaded(doc) {
  Util.log.console("Doc:");
  Util.log.console(doc);
  data = doc.getModel().getRoot().get('data');
}
我还尝试处理onLoad(of model)事件。也没有帮助。

/**
/**
 * Parses the hash parameters to this page and returns them as an object.
 * @function
 */
rtclient.getParams = function() {
  var params = {};
  // The following statement was changed from window.location.hash
  // to window.location.search.  There was no hash in the URL.  So
  // .hash was returning an empty string.
  var hashFragment = window.location.search;
  if (hashFragment) {
    // split up the query string and store in an object
    var paramStrs = hashFragment.slice(1).split("&");
    for (var i = 0; i < paramStrs.length; i++) {
      var paramStr = paramStrs[i].split("=");
      params[paramStr[0]] = unescape(paramStr[1]);
    }
  }
  return params;
}
*将哈希参数解析到此页并将其作为对象返回。 *@函数 */ rtclient.getParams=函数(){ var params={}; //以下语句已从window.location.hash更改 //到window.location.search。URL中没有哈希。所以 //.hash返回了一个空字符串。 var hashFragment=window.location.search; if(hashFragment){ //拆分查询字符串并存储在对象中 var paramStrs=hashFragment.slice(1).split(&); 对于(变量i=0;i

在realtime-client-utils.js中修复了它

能否提供一个代码片段,显示如何配置已加载的事件?