If the lithium-ion batteries fail, inflight
they have ratings on the side i.e. agrease fire bsomthing c for somthing else i cant remember them all but the most effeicent one is ABC
You can never go wrong with the foam.
I can't see how it would. Your computer would be fried if it did so anything from water to afff (aqueous film forming foam) would work. If by some million to one scenario it did occur I believe staying calm and removing the battery and then extinguishing it would be best. I have never seen a battery start on fire in 18 years as a firefighter.