My understanding is the li-ion batteries in the 787 have more extensive safety features than typical consumer batteries, and are supposed to contain failures better. After one flight had a battery fire there was some talk of replacing them with safer, but heavier, NiMH batteries, but I don't know if they went through with that.