Hi Xiaocheng,
I've spent a lot of time (probably too much time) trying to do more or less exactly this. I have many thoughts, docs, and slide decks that are available upon request (or if you want to really dig into it, feel free to put something on my calendar). But here are the bullet points:
1. It's really super incredibly hard. I did a project in this area called Non-Blocking Commit which was absolutely the tiniest incremental piece I could shave off of this problem, and it took me about 18 months to ship it.
2. We would need to add new API's to unlock some of the biggest benefits. It's not a change that will immediately benefit the entire web.
3. There is likely a low ceiling as to the potential benefit to be unlocked, mostly because a) there is just a massive amount of long-running javascript on the web, and b) javascript has run-to-completion semantics. The upshot is that you may have a rendering thread that is pumped and ready to work; but there's no work for that thread to do while an uninterruptible javascript task is running. If we're *very* clever, we could maybe eliminate one or two frames of jank out of a sequence of hundreds of missed frame deadlines while a 3-second javascript task runs.
I hate to be a wet blanket, and I don't want to discourage anyone from taking a look into this area with fresh eyes. I just want to hopefully give you a head start and help you avoid going down some of the deepest rabbit holes.