Skip to content

Instantly share code, notes, and snippets.

@vintprox
Last active June 2, 2020 15:35
Show Gist options
  • Save vintprox/bb0afc007a3d4d45617ef74089c8b491 to your computer and use it in GitHub Desktop.
Save vintprox/bb0afc007a3d4d45617ef74089c8b491 to your computer and use it in GitHub Desktop.

Revisions

  1. vintprox revised this gist Jun 2, 2020. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions index.html
    Original file line number Diff line number Diff line change
    @@ -2,6 +2,7 @@
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xmlns:widget="http://www.netvibes.com/ns/">
    <head>
    <title>Test Widget</title>
    <script src="TestWidget.js"></script>
    <script>require(['DS/TestWidget'])</script>
    </head>
  2. vintprox created this gist Jun 2, 2020.
    3 changes: 3 additions & 0 deletions TestWidget.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,3 @@
    define('DS/TestWidget', () => {
    widget.body.innerHTML = 'Hello World!'
    })
    9 changes: 9 additions & 0 deletions index.html
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xmlns:widget="http://www.netvibes.com/ns/">
    <head>
    <script src="TestWidget.js"></script>
    <script>require(['DS/TestWidget'])</script>
    </head>
    <body></body>
    </html>