Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/ogone/src/main/Ogone.ts

Advanced Web Composition for Future
Latest
import * as ogone from "https://deno.land/x/ogone@revb3/src/main/Ogone.ts";

Functions

for the flag --class

for the flag --html

for the flag --style

for the flag --bind

function called right after Ogone.setOgone Ogone.setOgone is called when the customElement is created by document.createElement

will destroy the component and use the case 'destroy'

this is used to update the attributes of the webcomponent when a prop is updated

returns the new webcomponent, the instance of OComponent will save this webcomponent and synchronize itself with the webcomponent.

will remove all nodes of the component

instructions for the async components

rendering instructions for async components inside an async component context

rendering instructions for the router components inside an async component context

rendering instructions for the store components inside an async component context

rendering instructions for the basic components inside an async component context

this function call the render function of the component if it's only a basic node or of the parent component if it's already a component the component render function will duplicate the element using the user's --for flag

all the instructions involved in the rendering of the components or dynamic nodes

global instructions for the rendering of the HTMLOgoneElement will render all the dynamic textnodes and replace all the slots elements

all the instructions involved in the implementation of the router. this will use a HTMLSectionElement and alays replace it's innerHTML

fake slot replacement inside the component // TODO use native slot implementation

start the store component's lifeCycle and remove all nodes of the store component ends by removing the HTMLOgoneElement throws if the namespace doesn't match with the namespace inside the store component

this function is used inside an array.find this is why it returns a boolean. true if the route matches

this function saves another function into OgoneParameters of the HTMLOgoneElement

used inside a reaction, this will create a new component each time the route is updated, via routerGo(...)

set the context when the user uses the flags: then, catch, finally the context is saved into OComponent.async

adds a reaction to the parent component or the component to keep up to data the nodes renderContext is used for the updates

adds Listeners on nodes

to any element that has the flag --await

for dynamic attributes of any elements

use the dedicated render function inside Ogone.render which returns all the template of the component or the dynamic node

function that will add the ogone parameters into the customElement those parameters are passed right after the creation of the customElement in Ogone.render

will set the position of the node using the level, assigned during the creation of the template, depending on how many ancestors has the element and an index which will increase if needed into a loop each element in the rendered loop has it's own index

set the props into the component from the OgoneParameters.props OgoneParameters.props is passed during the creation of the node

for all RouterComponents, this function will force the use of the default modifier. and save a reaction in the component. this reaction will use the functions Ogone.setActualRouterTemplate && Ogone.renderRouter

for the flag --spread