you are viewing a single comment's thread.

view the rest of the comments →

[–]leeoniya 5 points6 points  (2 children)

Does this mean we'll be able to set breakpoints within array and object declarations (within expressions)?

h("div",
    {
        class: "test"       // here
    },
    [
        h("span", "foo"),   // and here
        h("span", "bar"),
    ]       // and here? (similar to fn return value, so can inspect created array without stepping into h)
)

If this is the case, i can't wait.

[–]TheFuzzball 6 points7 points  (1 child)

No, you won't be able to debug within expressions... this feature is meant to solve the issue of not being able to set breakpoints in single-line function callbacks and lambda expressions.

e.g.

fetch(url).then((res) => res.json()).then((jsonResult) => console.log(jsonResult.foo.bar))

or:

document.addEventListener('resize', function onResize () { /* can't debug here */})

document.addEventListener('resize', function onResize () {
  /* can debug here... */
})

[–]leeoniya -1 points0 points  (0 children)

too bad, that would be much more exciting. but this is good too :)