Court actions can be complex when divorcing couples dispute child custody. Spouses sometimes accuse one another of being unfit parents to make a case for primary custody. For child custody cases that cross international lines, the road to resolution is even more difficult, especially when one country involved has not signed The Hague Convention treaty designed to prevent parental child abductions.
Marriage and divorce laws differ from state to state, just as they differ between Canada and the United States. Generally, if your marriage is recognized in one state or one country, it will be recognized in another. And if you follow the laws of Illinois when you got married, you should be able to get divorced in Illinois, assuming again that you follow the divorce laws.