Giter VIP home page Giter VIP logo

humble's Issues

Cannot PreventDefault behavior on "view.AddListener()" elements

When adding a listener on an event such as:

if err := view.AddListener(r, "a.remove", "click", r.deleteClicked); err != nil {
        return err
    }

When the link is clicked, it's default behavior still activates even when event.PreventDefault() is called in the event handler function. Right now the work around is to write:

<a href="javascript:void(0)" class="remove">X</a>

But it would be nice to prevent default behavior from within the callback.

TodoMVC project layout and alternative model approach

Hey,

I made a fork of the TodoMVC example and consolidated it into single repository.

Having the code in two places felt weird (especially firing up a 2nd web server for the html/js/css). Maybe you should just outline the ability to speak to multiple REST backends with this approach but it felt unnecessary for an introduction example.

Have you seen this demo of using net/rpc over websockets? I applied it to this example and I urge you to take a look at it - it deletes so much marshaling and parameter decoding code. My execution is a bit whacky (directly using client.Call, having the client sit in the AppView) but a proper implementation could use the same interface for the rpc client as well as the backend.

ps: Maybe refactor the example a bit with regards to error handling. All the panic(err)s tingle my gophersenses.

Despite all that: Thanks for this really interesting project!

Model XHR requests do not send cookies

If you want to use a session model, or any REST API request which requires the browser cookies to be sent with the request, this is not currently supported. This should be configurable somehow.

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.