Coder Social home page Coder Social logo

holo-host / loader Goto Github PK

View Code? Open in Web Editor NEW
25.0 23.0 1.0 6.74 MB

A JavaScript framework to bootstrap loading of a P2P Holochain app in a web browser via Holo hosting services.

Home Page: https://Holo.host

License: GNU General Public License v3.0

JavaScript 72.12% HTML 10.06% CSS 17.82%
holochain web3 holo

loader's Introduction

Holo.host Loader

This is Pre-Alpha software only for testing purposes.

Description

This is a repository of the JavaScript tool which run on initial load of a web application running on Holo.Host P2P infrastructure.

Every Holo web application starts from the hLoader index.html and index.js. The loader function initHapp reads the current URL and uses this to query the resolver service for Hosts which can provide the static assets and also a holochain node for the app that is registered at this URL.

The resolved returns a collection of host URLs, currently the first one is selected.

The loader then loads content of the hApp into the iFrame. This is also used to configure the websocket connection in hClient.js, the client side holo library, so that it can redirect holochain calls to the holo host.

In the next iteration iFrame will communicate with parent window to update page title, update url and handle browsing history.

Deployment

TODO: Set up automatic deployment to holo infrastructure

loader's People

Contributors

artbrock avatar jetttech avatar paulbhartzog-holo avatar peeech avatar samrose avatar willemolding avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

samrose

loader's Issues

document.write() causes errors in Chrome

The way that we replace html is frowned upon by Google. A non-standard feature of blocking document.write() in certain situations causes problems while using loader.

Possible solutions:

  • load content of the hApp into iframe
  • use document.getElementsByTagName('html')[0].innerHTML = html instead of document.write()

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.