Skip to content

Instantly share code, notes, and snippets.

Last active April 21, 2022 21:49
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
OS.js v3 - Basic Iframe Example
import './index.scss';
import osjs from 'osjs';
import {name as applicationName} from './metadata.json';
// Our launcher
const register = (core, args, options, metadata) => {
// Create a new Application instance
const proc = core.make('osjs/application', {args, options, metadata});
// Create a new Window instance
id: 'FormIOWindow',
title: metadata.title.en_EN,
dimension: {width: 400, height: 400}
.on('destroy', () => proc.destroy())
.render($content => {
const iframe = document.createElement('iframe'); = '100%'; = '100%';
iframe.setAttribute('border', '0');
iframe.src = 'http://localhost:3001';
return proc;
// Creates the internal callback function when OS.js launches an application
osjs.register(applicationName, register);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment