Code Monkey home page Code Monkey logo

Comments (4)

alexcrichton avatar alexcrichton commented on May 22, 2024 1

Ah currently this is just the main way to add methods to an otherwise "bland JsValue", but internally it's just a JsValue so I pushed up alexcrichton@fc81d8f which allows interconversion

from wasm-bindgen.

alexcrichton avatar alexcrichton commented on May 22, 2024

A good question!

This wasn't actually super easy to do before so I've been thinking a bit and have decided to tweak how some functions are accessed exposed. I've now written up an example of how to do this as well!

For now that functionality is only available on master, but I'll publish 0.2 soon with that!

from wasm-bindgen.

alexcrichton avatar alexcrichton commented on May 22, 2024

Please let me know though if the example is confusing or otherwise needs to be fleshed out more, I'd love to expand it!

from wasm-bindgen.

akritrime avatar akritrime commented on May 22, 2024

@alexcrichton That example is quite enough. One doubt though, why can't JsValue be used instead of a new type of HTMLDocument?

from wasm-bindgen.

Related Issues (20)

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.