Categorygithub.com/realPy/hogosuru
repositorypackage
1.5.0
Repository: https://github.com/realpy/hogosuru.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# README

Hogosuru Unit Test

Hogosuru is a framework to easily write a complete single page application in Go or just export some functionnality directly accessible in javascript (functionnality that need speed for example).

Documentation

A detailed documentation with code examples can be found here : https://hogosuru.v-ip.fr/

How it work?

He use an addon syscall/js (that catch error) and implement a large part of the major features of javascript directly accessible in go.

For a list of functionnality , see the array of compatibility below or check the name of directory that match the API MDN implementation: https://developer.mozilla.org/fr/docs/Web/API

Each object is herited from a baseobject.BaseObject. The baseobject keep a true JS object reference.

All structure available can interact with this object and use the internal functionnality of each object.
If an error occur , this error is handle and return by each function.

How to use

Just import the lib in your project (hogosuru no need use an extended rewrite of base syscall)


GOOS=js GOARCH=wasm go get github.com/realPy/hogosuru

The project work with Go and Tinygo compiler. Use Go compiler for developpement (faster) and tinygo for production

Use the special "autodiscover" of hogosuru

The autodiscover is a special function.

When a function receives a data which is global object (exemple with the attribute data of an event) or which is not an expected data, it is possible to ask hogosuru to guess the content of the object and to create the corresponding Go object.

This is not magic, and it only works if the type of object has already been seen before (hogosuru keeps in memory the type of objects and their constructor).
It would be possible to register all the objects known to hogosuru but that would amount to integrating the whole implementation in your binary. When you use an object (by use it or cast it) , the constructor is loaded automatically. If the type is not known, autodiscover will return an object of type BaseObject

Chaining capabilities

Some structure like nodelist or document can be used with chaining capabilities (function that return one object that will be used immediatly without check error).It's a shortcut that ignores errors. The functions which allow this functionality are by convention with the same prototype, with the same name but which end with "_". It is a convention created for hogosuru. All the functions available in chaining are contained in the "chaining.go" file at the root of each component

How to help

This is a young project and there are a lot of work to do
All help is welcome. If you are interested by this project, please contact me

Implemented API/Object status

API/ObjectImplemented SupportMDN URL
AbortControllerFullhttps://developer.mozilla.org/en-US/docs/Web/API/AbortController
AbortSignalFullhttps://developer.mozilla.org/en-US/docs/Web/API/AbortSignal
AnimationEventFullhttps://developer.mozilla.org/fr/docs/Web/API/AnimationEvent
ArrayFullhttps://developer.mozilla.org/fr/docs/Web/JavaScript/Reference/Global_Objects/Array
ArraybufferFullhttps://developer.mozilla.org/fr/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer
AttrFullhttps://developer.mozilla.org/fr/docs/Web/API/Attr
BlobFullhttps://developer.mozilla.org/fr/docs/Web/API/Blob
Broadcast ChannelFullhttps://developer.mozilla.org/en-US/docs/Web/API/BroadcastChannel
ClipboardFullhttps://developer.mozilla.org/en-US/docs/Web/API/Clipboard
ClipboardItemFullhttps://developer.mozilla.org/en-US/docs/Web/API/ClipboardItem
ClipboardEventFullhttps://developer.mozilla.org/en-US/docs/Web/API/ClipboardEvent
ConsoleFullhttps://developer.mozilla.org/fr/docs/Web/API/Console
CSSRuleFullhttps://developer.mozilla.org/en-US/docs/Web/API/CSSRule
CSSStyleDeclarationFullhttps://developer.mozilla.org/en-US/docs/Web/API/CSSStyleDeclaration
CustomEventFullhttps://developer.mozilla.org/fr/docs/Web/API/CustomEvent
DataTransferFullhttps://developer.mozilla.org/en-US/docs/Web/API/DataTransfer
DataTransferItemPartialhttps://developer.mozilla.org/en-US/docs/Web/API/DataTransferItem
DataTransferItemListFullhttps://developer.mozilla.org/en-US/docs/Web/API/DataTransferItemList
DateFullhttps://developer.mozilla.org/fr/docs/Web/JavaScript/Reference/Global_Objects/Date
DedicatedWorkerGlobalScopeFullhttps://developer.mozilla.org/en-US/docs/Web/API/DedicatedWorkerGlobalScope
DocumentMostlyhttps://developer.mozilla.org/fr/docs/Web/API/Document
DragEventFullhttps://developer.mozilla.org/en-US/docs/Web/API/DragEvent
ElementFullhttps://developer.mozilla.org/fr/docs/Web/API/Element
EventPartial implementedhttps://developer.mozilla.org/fr/docs/Web/API/Event
EventTargetFullhttps://developer.mozilla.org/fr/docs/Web/API/EventTarget/EventTarget
FetchFullhttps://developer.mozilla.org/fr/docs/Web/API/Fetch_API
FileFullhttps://developer.mozilla.org/fr/docs/Web/API/File
FileListFullhttps://developer.mozilla.org/fr/docs/Web/API/FileList
FormDataFullhttps://developer.mozilla.org/fr/docs/Web/API/FormData
HeadersFullhttps://developer.mozilla.org/en-US/docs/Web/API/Headers
HistoryFullhttps://developer.mozilla.org/fr/docs/Web/API/History
HTMLAnchorElementFullhttps://developer.mozilla.org/en-US/docs/Web/API/HTMLAnchorElement
HTMLAreaElementFullhttps://developer.mozilla.org/en-US/docs/Web/API/HTMLAreaElement
HTMLBaseElementFullhttps://developer.mozilla.org/en-US/docs/Web/API/HTMLBaseElement
HTMLBodyElementFullhttps://developer.mozilla.org/en-US/docs/Web/API/HTMLBodyElement
HTMLBRElementFullhttps://developer.mozilla.org/en-US/docs/Web/API/HTMLBRElement
HTMLButtonElementFullhttps://developer.mozilla.org/en-US/docs/Web/API/HTMLButtonElement
HTMLCollectionFullhttps://developer.mozilla.org/fr/docs/Web/API/HTMLCollection
HTMLDataElementFullhttps://developer.mozilla.org/en-US/docs/Web/API/HTMLDataElement
HTMLDataListElementFullhttps://developer.mozilla.org/en-US/docs/Web/API/HTMLDataListElement
HTMLDetailsElementFullhttps://developer.mozilla.org/en-US/docs/Web/API/HTMLDetailsElement
HTMLDivElementFullhttps://developer.mozilla.org/en-US/docs/Web/API/HTMLDivElement
HTMLDListElementFullhttps://developer.mozilla.org/en-US/docs/Web/API/HTMLDListElement
HTMLElementFullhttps://developer.mozilla.org/en-US/docs/Web/API/HTMLElement
HTMLEmbbedElementFullhttps://developer.mozilla.org/en-US/docs/Web/API/HTMLEmbbedElement
HTMLFieldSetElementFullhttps://developer.mozilla.org/en-US/docs/Web/API/HTMLFieldSetElement
HTMLFormElementFullhttps://developer.mozilla.org/en-US/docs/Web/API/HTMLFormElement
HTMLHeadElementFullhttps://developer.mozilla.org/en-US/docs/Web/API/HTMLHeadElement
HTMLHeadingElementFullhttps://developer.mozilla.org/en-US/docs/Web/API/HTMLHeadingElement
HTMLHtmlElementFullhttps://developer.mozilla.org/en-US/docs/Web/API/HTMLHtmlElement
HTMLHRElementFullhttps://developer.mozilla.org/en-US/docs/Web/API/HTMLHRElement
HTMLIFrameElementFullhttps://developer.mozilla.org/en-US/docs/Web/API/HTMLIFrameElement
HTMLImageElementFullhttps://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement
HTMLInputElementFullhttps://developer.mozilla.org/fr/docs/Web/API/HTMLInputElement
HTMLLabelElementFullhttps://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement
HTMLLegendElementFullhttps://developer.mozilla.org/en-US/docs/Web/API/HTMLLegendElement
HTMLLIElementFullhttps://developer.mozilla.org/en-US/docs/Web/API/HTMLLIElement
HTMLLinkElementFullhttps://developer.mozilla.org/en-US/docs/Web/API/HTMLLinkElement
HTMLMapElementFullhttps://developer.mozilla.org/en-US/docs/Web/API/HTMLMapElement
HTMLMetaElementFullhttps://developer.mozilla.org/en-US/docs/Web/API/HTMLMetaElement
HTMLMeterElementFullhttps://developer.mozilla.org/en-US/docs/Web/API/HTMLMeterElement
HTMLIFrameElementFullhttps://developer.mozilla.org/en-US/docs/Web/API/HTMLIFrameElement
HTMLOptionsCollectionFullhttps://developer.mozilla.org/en-US/docs/Web/API/HTMLOptionsCollection
HTMLParagraphElementFullhttps://developer.mozilla.org/en-US/docs/Web/API/HTMLParagraphElement
HTMLQuoteElementFullhttps://developer.mozilla.org/en-US/docs/Web/API/HTMLQuoteElement
HTMLScriptElementFullhttps://developer.mozilla.org/en-US/docs/Web/API/HTMLScriptElement
HTMLSelectElementFullhttps://developer.mozilla.org/en-US/docs/Web/API/HTMLSelectElement
HTMLSourceElementFullhttps://developer.mozilla.org/en-US/docs/Web/API/HTMLSourceElement
HTMLSpanElementFullhttps://developer.mozilla.org/en-US/docs/Web/API/HTMLSpanElement
HTMLStyleElementFullhttps://developer.mozilla.org/en-US/docs/Web/API/HTMLStyleElement
HTMLCaptionElementFullhttps://developer.mozilla.org/en-US/docs/Web/API/HTMLCaptionElement
HTMLTableCaptionElementFullhttps://developer.mozilla.org/en-US/docs/Web/API/HTMLTableCaptionElement
HTMLTableCellElementFullhttps://developer.mozilla.org/en-US/docs/Web/API/HTMLTableCellElement
HTMLTableColElementFullhttps://developer.mozilla.org/en-US/docs/Web/API/HTMLTableColElement
HTMLTableElementFullhttps://developer.mozilla.org/en-US/docs/Web/API/HTMLTableElement
HTMLTableRowElementFullhttps://developer.mozilla.org/en-US/docs/Web/API/HTMLTableRowElement
HTMLTableSectionElementFullhttps://developer.mozilla.org/en-US/docs/Web/API/HTMLTableSectionElement
HTMLTemplateElementFullhttps://developer.mozilla.org/en-US/docs/Web/API/HTMLTemplateElement
HTMLTextAreaElementFullhttps://developer.mozilla.org/en-US/docs/Web/API/HTMLTextAreaElement
HTMLTimeElementFullhttps://developer.mozilla.org/en-US/docs/Web/API/HTMLTimeElement
HTMLTitleElementFullhttps://developer.mozilla.org/en-US/docs/Web/API/HTMLTitleElement
IndexeddbFullhttps://developer.mozilla.org/fr/docs/Web/API/IndexedDB_API
Iterator--
JSONFullhttps://developer.mozilla.org/fr/docs/Web/JavaScript/Reference/Global_Objects/JSON
LocationFullhttps://developer.mozilla.org/fr/docs/Web/API/window/location
MessageEventFullhttps://developer.mozilla.org/fr/docs/Web/API/MessageEvent
NamedNodeMapFullhttps://developer.mozilla.org/fr/docs/Web/API/NamedNodeMap
NavigatorPartialhttps://developer.mozilla.org/en-US/docs/Web/API/Navigator
NavigatorPreloadManagerFullhttps://developer.mozilla.org/en-US/docs/Web/API/NavigationPreloadManager
NodeFullhttps://developer.mozilla.org/en-US/docs/Web/API/Node
NodeListConsiderated at Full (Partial implemented but no more need )https://developer.mozilla.org/fr/docs/Web/API/NodeList
ObjectPartialhttps://developer.mozilla.org/fr/docs/Web/JavaScript/Reference/Global_Objects/Object
MapFullhttps://developer.mozilla.org/fr/docs/Web/JavaScript/Reference/Global_Objects/Map
PermissionsFullhttps://developer.mozilla.org/en-US/docs/Web/API/Permissions_API
PermissionStatusFullhttps://developer.mozilla.org/en-US/docs/Web/API/PermissionStatus
ProgressEventFullhttps://developer.mozilla.org/en-US/docs/Web/API/ProgressEvent
PromiseFullhttps://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise
PushManagerFullhttps://developer.mozilla.org/en-US/docs/Web/API/PushManager
ReadableStreamFullhttps://developer.mozilla.org/en-US/docs/Web/API/ReadableStream

| Response | Full | https://developer.mozilla.org/fr/docs/Web/API/Response | | ServiceWorker | Full | https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker| | ServiceWorkerContainer | Full | https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer| | ServiceWorkerRegistration | Full | https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerRegistration | | Storage | Full | https://developer.mozilla.org/fr/docs/Mozilla/Add-ons/WebExtensions/API/storage | | Stream | Partial implemented | https://developer.mozilla.org/fr/docs/Web/API/Streams_API | | StyleSheet | Full | https://developer.mozilla.org/en-US/docs/Web/API/StyleSheet | | Uint8array | Partial implemented | https://developer.mozilla.org/fr/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array | UrlSearchParams | Full | https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams | | Url | Full | https://developer.mozilla.org/en-US/docs/Web/API/URL | | ValidityState | Full | https://developer.mozilla.org/en-US/docs/Web/API/ValidityState | | Websocket | Full | https://developer.mozilla.org/fr/docs/Web/API/WebSocket | | Webassembly | Partial |https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly| | Window | Partial |https://developer.mozilla.org/en-US/docs/Web/API/Window | | Worker | Full | https://developer.mozilla.org/en-US/docs/Web/API/Worker | | WorkerGlobalScope| Partial | https://developer.mozilla.org/en-US/docs/Web/API/WorkerGlobalScope | | XMLHttpRequest | Partial implemented | https://developer.mozilla.org/fr/docs/Web/API/XMLHttpRequest/XMLHttpRequest |

Custom components

A toaster components for hogosuru

https://github.com/realPy/hogosurutoaster

A pagination components for hogosuru with templating

https://github.com/realPy/hogosurupagination

A datatable components for hogosuru with templating

https://github.com/realPy/hogosurudatatable

How to help

All help is welcome. If you are interested by this project, please contact me.