It's common for US domestic flights to cross into Canadian or Mexican airspace. For example, a flight from Alaska to New York, Seattle to Boston, or Hawaii to Texas would likely cross into foreign airspace.
However, as far as I know, this is not legally considered a border crossing. In my experience, there is no passport control.
What exactly does the law say about this? What is the determining factor of a whether border crossing has occurred when air travel is involved? Can CBP check passenger IDs on domestic flights that crossed into foreign airspace?
Furthermore, if an domestic flight made an emergency landing in another country, what would happen to the passengers who don't have their documents with them? Is there a special legal provision for such scenarios?