Whats the legality of prosecuting someone for doing something that is illegal in their home state, but legal in another state

All good answers, but typically states can get around extra-territory restrictions by defining the crime as that which happened in their own jurisdiction. To use the thread example, a state could pass the law as leaving the state with the intent to obtain an abortion which would be illegal in the home state.

Then the elements, the intent, the leaving would not have occurred in another state, but all of the criminal acts would have occurred in the home state where the home state has jurisdiction.