add iife build
This commit is contained in:
@@ -6,47 +6,14 @@
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
|
||||
<meta name="apple-mobile-web-app-capable" content="yes" />
|
||||
|
||||
<!-- No-op until loaded dynamically (could make configurable) -->
|
||||
<link rel="shortcut icon" href="data:image/x-icon;," type="image/x-icon" />
|
||||
|
||||
<!-- STYLESHEETS (others loaded dynamically) -->
|
||||
<style id="styleoverrides" media="screen"></style>
|
||||
<link href="./svgedit.css" rel="stylesheet" media="all">
|
||||
</link>
|
||||
|
||||
<!-- SCRIPTS -->
|
||||
|
||||
<!-- Lacking browser support -->
|
||||
<script type="module" src="./browser-not-supported.js"></script>
|
||||
|
||||
<!-- If you do not wish to add extensions by URL, you can add calls
|
||||
within the following file to svgEditor.setConfig -->
|
||||
<script type="module">
|
||||
/* for available options see the file `docs/tutorials/ConfigOptions.md */
|
||||
import Editor from './Editor.js';
|
||||
const svgEditor = new Editor(document.getElementById('container'));
|
||||
svgEditor.init();
|
||||
svgEditor.setConfig({
|
||||
allowInitialUserOverride: true,
|
||||
extensions: [],
|
||||
noDefaultExtensions: false,
|
||||
userExtensions: [/* '../ext-helloworld/ext-helloworld.js' */]
|
||||
});
|
||||
|
||||
// Variable XDOMAIN below is created by Rollup for the Xdomain build (see rollup.config.js)
|
||||
/* globals XDOMAIN */
|
||||
try { // try clause to avoid js to complain if XDOMAIN undefined
|
||||
if (XDOMAIN) {
|
||||
svgEditor.setConfig({
|
||||
canvasName: 'xdomain', // Namespace this
|
||||
allowedOrigins: [ '*' ]
|
||||
});
|
||||
console.info('xdomain config activated');
|
||||
}
|
||||
} catch (error) {/* empty fn */ }
|
||||
</script>
|
||||
|
||||
<title>SVG-edit</title>
|
||||
</head>
|
||||
|
||||
@@ -60,5 +27,29 @@
|
||||
-->
|
||||
<div id="container" style="width:100%;height:100vh"></div>
|
||||
</body>
|
||||
|
||||
<!-- If you do not wish to add extensions by URL, you can add calls
|
||||
within the following file to svgEditor.setConfig -->
|
||||
<script type="module">
|
||||
import Editor from './Editor.js';
|
||||
/* for available options see the file `docs/tutorials/ConfigOptions.md */
|
||||
const svgEditor = new Editor(document.getElementById('container'));
|
||||
svgEditor.init();
|
||||
svgEditor.setConfig({
|
||||
allowInitialUserOverride: true,
|
||||
extensions: [],
|
||||
noDefaultExtensions: false,
|
||||
userExtensions: [/* '../ext-helloworld/ext-helloworld.js' */]
|
||||
});
|
||||
// Variable XDOMAIN below is created by Rollup for the Xdomain build (see rollup.config.js)
|
||||
/* globals XDOMAIN */
|
||||
try { // try clause to avoid js to complain if XDOMAIN undefined
|
||||
if (XDOMAIN) {
|
||||
svgEditor.setConfig({
|
||||
canvasName: 'xdomain', // Namespace this
|
||||
allowedOrigins: [ '*' ]
|
||||
});
|
||||
console.info('xdomain config activated');
|
||||
}
|
||||
} catch (error) {/* empty fn */ }
|
||||
</script>
|
||||
</html>
|
||||
Reference in New Issue
Block a user