Supporting data class for JS backend (3)

This is a third version (I only know how to create a brand new PR, not update existing one :(  )