President Donald Trump’s critics are up in arms over his criticism of former vice president Joe Biden while abroad in Japan.

They are furious that Trump appeared to agree with North Korean dictator Kim Jong-un; they are also upset at Trump for violating the dictum that “politics stops at the water’s edge.”

It just is the latest example of the media and the opposition re-discovering principles they conveniently shelved for the eight years of Barack Obama’s presidency.

Obama frequently criticized his domestic opponents while abroad — often for the benefit of foreign autocrats. In 2015, for example, while at the G-20 summit in Turkey, Obama blasted Sen. Ted Cruz (R-TX) and other Republicans over their views on the Syrian refugee crisis.

Far from outrage, the media approved of Obama’s criticism: CNN even listed examples of Republican presidential candidates who had come from immigrant backgrounds, to stress Obama’s point.

Obama did the same in the Philippines, claiming Republicans were “they’re scared of widows and orphans coming into the United States of America.”

Obama: GOP critics are too scared of widows and orphans coming into the United States of America. #SyrianRefugeeshttps://t.co/rno67pKwNv — FOX Business (@FoxBusiness) November 18, 2015

A few conservative critics raised the “water’s edge” point, but the media said nothing.

Biden himself slammed Trump abroad this year — and even the United States itself — in an address in Germany. “The America I see values basic human decency, not snatching children from their parents or turning our back on refugees at our border. Americans know that’s not right,” Biden said. The American people understand — please, because it makes us embarrassing. The American people know, overwhelmingly, that that’s not right. That’s not who we are.”

Democrat Joe Biden in Munich: America today is “an embarrassment” pic.twitter.com/VyhmTOKkuk — Ryan Saavedra (@RealSaavedra) February 17, 2019

Notably, Obama and Biden protested when President George W. Bush criticized “appeasement” in a speech to Israel’s Knesset in 2008. They interpreted Bush’s comments as a direct criticism of the Obama campaign’s foreign policy. Biden cited the “water’s edge” principle — the one he would conveniently discard once he and Obama were in office.

Biden hinted at that principle again Tuesday though his main complaint was that Trump has an alleged “pattern of embracing autocrats at the expense of our institutions.” It is a criticism that applies more to the Obama-Biden administration than it does to Trump: not only did the previous administration coddle Russia and others, but Biden joined Obama in pursuing a weak nuclear deal that propped up the Iranian regime while circumventing the Senate.

The media spent much of the day Tuesday blasting Trump for his comments — which only came, notably, after a journalist prompted Trump to respond to Kim’s jab at Biden, after Trump had already discussed Kim extensively. Trump took it all in stride, joking on Twitter that he had actually defended Biden by relaying Kim’s insult to Biden as “low IQ individual” rather than a “low IQ idiot.”

But the media’s hypocrisy, though laughable, is worth noting. They hailed Obama as a hero, even as he abused the press; now they say Trump’s criticism is a threat to press freedom. They praised Obama’s abuses of executive power, even wishing he had the autocratic powers of the Chinese communist dictatorship; now they hype phony Democratic claims that Trump is violating the Constitution.

The idea that politics should stop at the water’s edge is a noble principle: it is also one they have never honored — not then, and not today.

Joel B. Pollak is Senior Editor-at-Large at Breitbart News. He is a winner of the 2018 Robert Novak Journalism Alumni Fellowship. He is also the co-author of How Trump Won: The Inside Story of a Revolution, which is available from Regnery. Follow him on Twitter at @joelpollak.