How to use the type.File.openFileSupported function in type

To help you get started, we’ve selected a few type examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github basisjs / basisjs / src / devpanel / sync-basisjs-tools.js View on Github external
File.all.set(basisjsTools.getFiles());

  // subscribe to files change notifications
  basisjsTools.notifications.attach(function(action, filename, content){
    if (!notificationsQueue.length)
      basis.nextTick(processNotificationQueue);

    notificationsQueue.push({
      action: action,
      filename: filename,
      content: content
    });
  });

  File.open = basisjsTools.openFile;
  File.openFileSupported.set(typeof File.open == 'function'); // TODO: remove when basisjs-tools released with features
  File.getAppProfile = basisjsTools.getAppProfile;

  // sync features
  if (basisjsTools.features)
  {
    link(features, basisjsTools.features);
    features.link(File.openFileSupported, function(list){
      this.set(list.indexOf('file:open') !== -1);
    });
  }

  // invoke onInit callbacks
  initCallbacks.splice(0).forEach(init);
});
github basisjs / basisjs / src / devpanel / sync-basisjs-tools.js View on Github external
notificationsQueue.push({
      action: action,
      filename: filename,
      content: content
    });
  });

  File.open = basisjsTools.openFile;
  File.openFileSupported.set(typeof File.open == 'function'); // TODO: remove when basisjs-tools released with features
  File.getAppProfile = basisjsTools.getAppProfile;

  // sync features
  if (basisjsTools.features)
  {
    link(features, basisjsTools.features);
    features.link(File.openFileSupported, function(list){
      this.set(list.indexOf('file:open') !== -1);
    });
  }

  // invoke onInit callbacks
  initCallbacks.splice(0).forEach(init);
});
github basisjs / basisjs / src / devpanel / api / file.js View on Github external
return function(){
      return File.openFileSupported;
    };
  }