@startinblox/component-babelfish
v1.0.10
Published
Babelfish service catalog integration into startinblox as a component
Downloads
3
Keywords
Readme
Solid Babelfish
This is the repository of our component integrating the Babelfish services API, allowing a user to:
- Browse the list of available Ontochain services
- Access the detail of a service
- ?? Register a new service ??
Access core within your component
Use core
variable directly, eg.:
import('./utils.js').then(utils => {
import(utils.coreVersion()).then(core => {
customElements.define("solid-babelfish",
class extends core.SolidTemplateElement {
constructor() {
core.store.put({
'username': 'Superman',
'@context': this.context,
}, 'http://server/users/admin/');
}
}
);
});
});
Target a local asset
Use the utils.path()
function to return the actual path of your component (local or cdn), eg.:
import('./utils.js').then(utils => {
import(utils.coreVersion()).then(core => {
customElements.define("solid-babelfish",
class extends core.SolidTemplateElement {
constructor() {
core.Helpers.importCSS(utils.path() + '/styles/index.css?min');
}
}
);
});
});