Tizen and WebOS were made by different companies so there is no code sharing (unless they both bought some underdog and started from a common code base which is not likely). The APIs are similar as both companies were fighting against Android's and iOS'es application development model. By focusing on web developers (using familiar technologies and targeting a wide developer and user audience) they probably hoped to gain more backers to their platform.