I don't see the parallel there. HTML was always a secular technology, unlike DirectX which was created and developed by Microsoft for Microsoft.
Exactly same thing here. They used DX to lock 3D graphics into their platforms.
Whether they lost deservedly or not, lock-in is always a crooked practice.
See my other comment[1], that with DX12, it's more clear that MS are doing it for the sake of lock-in. Problem with it - it doesn't compete on merits on Xbox for instance. Because it's the only thing supported there.