Code Monkey home page Code Monkey logo

html2incdom's Introduction

html2incdom

Converts html strings into incremental dom calls.

Usage

Just call HTML2IncDom.run with your html string and it will call the appropriate incremental dom functions for that html to be rendered.

If you want to convert the html but not run it right way though, you can call HTML2IncDom.buildFn instead, which will give you a function you can run later.

html2incdom uses the Pure Javascript HTML5 Parser by default, but this can be customized as needed. To use another parser you can just call HTML2IncDom.setParser. The only gotcha here is that the new parser needs to follow the api from our default parser. That's really simple though, basically a function that receives an html string and an object with handlers for when the parser finds a tag start, tag end or raw text. It's easy to convert any parser out there to this format.

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.