Giter Club home page Giter Club logo

snabbdom.scala's Issues

Run tests in Selenium

Selenium is slower than JSDom but provides a real browser with a real DOM, an environment much closer to where your code will actually run.

There are some commented rambles in build.sbt, but I was so far unable to get this to work. I think we need this scalajs-bundler ticket addressed to get this to work. scalacenter/scalajs-bundler#89

unable to run examples

The short example is not working,the symbol := and lots of other things are undefined,do i have to add some other dependencies or the api is changed?

Type unsoundness in ModuleHooks

Our hooks have correct types except for one edge case, when the hooks for the initial app container are processed. Snabbdom creates a virtual empty node for the first argument of patch method when it's a real DOM element, and that empty virtual node is not an instance of our own Node class but a plain JS object which although has a similar shape will be missing any additional fields and methods defined in Scala. This is especially a problem for libraries based on Snabbdom.scala that subclass Node and NodeData.

There are a couple ways to fix that. One is to make the types reflect this reality. Another is to keep current types but avoid calling Scala-provided hook on the snabbdom-created node in that edge case.

I kinda favour the latter option because we will probably not lose anything of significance, but it would be a departure from Snabbdom.js API, so needs to be considered more carefully. Which is why this is not yet resolved.

Current Status of Snabbdom.scala

For anyone wondering what's happening with this project:

Since I originally wrote Snabbdom.scala I have been busy working on other Scala.js DOM-related projects. To minimize redundancy in all those projects, I have extracted parts of Snabbdom.scala into more generic packages โ€“ Scala DOM Types and Scala DOM TestUtils.

I am currently working on migrating Snabbdom.scala to use these libraries. Once that is done I will publish version 0.1 of Snabbdom.scala to Maven Central. If you want to get notified when that happens you can watch this project on github, or subscribe to this specific issue.

svg support

Hi,

I'm currently migrating a snabbdom project to snabbdom.scala. I found an issue with svgs. Maybe you can supply a solution to that problem:

snabbdom does some magic in it's h-function, that sets the namespace for svg elements. See: https://github.com/snabbdom/snabbdom/blob/v0.7.3/src/h.ts#L42
As far as I know, snabbdom.scala doesn't use that function so the namespace won't be set. Without the namespace, I can't set some attributes (like viewBox) as the xml relies on case sensitivity and normal html elements are case insensitive.

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.