> More precisely it is taxation by citizenship, not residence.
Both. Non-citizens (inc. illegal immigrants) are required to pay US taxes just for residing in the United States. The US will actually give non-citizens a unique tax ID (TIN) for this express purpose.
So the US will tax both based on residential status AND citizenship status.