Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> What's the site? I'd love to see it.

One of my projects where I'm using this approach is this one: https://jpdb.io

> And could you tell us more about the DOM diffing algorithm?

I'll paste what I wrote in another reply to a post asking the same question:

It's really nothing special. I wrote the whole thing in, like, a single afternoon. If you're interested, here it is:

https://pastebin.com/V7UiWj1e

It's not really a general purpose diffing algorithm. It probably doesn't handle every corner case as it only does what I need it to do in the few places I actually need it.



To be expected from your previous comments, but your website is snappy. Navigating it feels great.


The search works great. Having furigana next to kanji is very useful. Fantastic work!

While playing around, I got the play button to work only once and then got this error:

  Uncaught TypeError: this.previousElementSibling.play is not a function
    onclick https://jpdb.io/search?q=ごめんあさい#a:1


That's interesting! It works for me, both on Firefox and Chromium.

May I ask what web browser and OS are you using?


Firefox 87.0 (64-bit) on Win10. It is reproducible. Disabling uBlock Origin didn't make a difference. Let me know if I can help debug!


Okay, so this is indeed very interesting. I just launched the same version of Firefox in a Win10 VM, and it works there too. So it might be one of your extensions, maybe? (I use uBlock Origin too, so that's not it.)

Could you try these things out please?

1. Try disabling all of your extensions and try again. (IIRC by default private mode disables all of the extensions, so that should be an easy way to do it.)

2. Can you open the dev console and try running something like this in it?

    document.querySelector("audio").play()
Based on your original error either the `previousElementSibling` is not an `<audio>` tag, or for some reason audio tags don't have a play method, so it'd be good to know which one it is.


Hello, just tried disabling extensions one by one and it seems that https://addons.mozilla.org/en-GB/firefox/addon/rikaichamp/ causes the problem. I can reliably enable/disable the extension to reproduce/fix the problem.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: