Created
May 7, 2018 21:25
-
-
Save daltonmenezes/0a148f37028cb73b8526e6c73787c199 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<plugin-section></plugin-section> | |
<script> | |
const Extensible = require('extensible') | |
const Render = require('extensible').Render // this will be global for extensions, | |
// if we don't do this, the extension creators will use Render using Extensible.Render() instead of Render() | |
const plugin = Extensible.load({ | |
context: 'plugin', | |
container: 'plugin-section' | |
}) | |
/* | |
context is the name of the const where the plugin object will be stored | |
context: 'plugin' needs to be the same 'const plugin' name | |
so we can access the extensions functions by that path: plugin.extension_id | |
example inside the extension: | |
onclick="${extension.id}.click()" is onclick="plugin.buttonExtensible.click()" | |
The next code (button.js) will clarify it | |
/* | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment