os-js / osjs-client

OS.js Client Module
https://manual.os-js.org/
Other
30 stars 30 forks source link

Provide configuration entry for creating iframe applications #207

Open andersevenrud opened 1 year ago

andersevenrud commented 1 year ago

Instead of going through the whole route of scaffolding an entire package, it would be nice if the client supported a configuration option to launch a standard iframe application from a URL, etc.

I could see this could be useful for environments that already have deployed apps, and there's no need for actual package distribution or installation.

It's already possible to configure custom (virtual) metadata entries this way, but it doesn't cover this use-case because this method still expects actual source files.

Something like:

{
  packages: {
    external: [
      {
        target: {
          url: '',
          /* Other possible stuff that might be required */
        },
        metadata: {
         /* Standard package metadata here */
        },
        window: {
         /* Window options that cannot be set from metadata */
        },
        callback: (proc) => {
         /* It's even possible to provide callback to when app has started for bindings etc */
        }
      }
    ]
  }
)