Screenshot from China Central Television report on military drills.

It’s hard not to see it as a response, of sorts, to Taiwan’s elections.

Days after Taiwanese voters elected the leader of a pro-independence party to the president’s office, China’s military announced that a unit based opposite Taiwan had carried out live firing drills and mock landing exercises.

Separately, thousands of trolls from mainland China jumped over the Great Firewall to flood the Facebook page of Taiwan’s next president, Tsai Ing-wen, with hostile comments.

The Chinese government has responded warily to Tsai’s election, saying it wants good relations with an island it considers part of its sovereign territory. But it also demands Tsai embrace the idea that there is only “one China” and renounce any notion that Taiwan could one day declare formal independence.

The military drills could be seen as a gentle reminder that China would view any declaration of independence as tantamount to a declaration of war.

Footage broadcast on China Central Television showed amphibious landing craft firing shells from sea to land, helicopters firing missiles, soldiers parachuting down and tanks rolling through the countryside.

The exercise, it said, was carried out by the 31st army group based in Xiamen, Fujian province, which lies directly opposite Taiwan. It said the drills had taken place “in recent days” but it did not specify their location or make any mention of Taiwan’s elections.

Taiwan's Defence Ministry said it was "aware of the information", and declined further immediate comment, Reuters reported. China also held live-fire drills in the Taiwan Strait back in September, while in July state television showed a video of soldiers storming a mock-up of Taiwan’s presidential palace.

Tsai’s Democratic People’s Party (DPP) believes Taiwan is a sovereign, independent country but does not want to anger China by making any formal declaration of independence.

In her victory speech on Saturday, Tsai said she wanted good relations with China, indicated she was prepared to meet Beijing halfway and would avoid any provocations.

Opposition leader’s landslide win in Taiwan puts onus on China to respond

But it is clear that the Chinese government and many Chinese people remain wary of Tsai.

On Wednesday evening, her Facebook page was flooded with hostile comments, in what appeared to be a coordinated effort by nationalist Netizens from the mainland, originating from an online discussion forum and apparently meant to counter pro-Taiwan independence comments seen on social media this week.

"Your root is here, come back soon, this will only make our Chinese nationality lose face," one user wrote.

Another took a more combative tone. "Taiwan is such a poor and backward place, do you still have any face to talk? What is the use of talking about this without any power? Do you have a say in the international community? If you have guts, declare independence."

A third asked separatists to leave Taiwan.  "Can you stop barking in China’s territory?," the user wrote.

It was a repeat of a similar incident back in November. By Thursday afternoon, Tsai’s Facebook page had received more than 40,000 comments, mainly in the simplified Chinese characters used by mainlanders, who had presumably used VPN technology to bypass China’s Great Firewall, the censorship mechanism that blocks Facebook, Google, Twitter and many other foreign websites.

DPP spokesman Ruan Chao-hsiung said Chinese internet users were just "exercising their freedom of speech,” Reuters reported, while Tsai herself appeared unfazed.

"The greatness of this country lies in how every single person can exercise their own rights," she posted on Facebook on Thursday.

Taiwanese people reacted similarly, pointing out that they enjoyed freedoms that mainlanders lack.

"We have freedom of speech, freedom of assembly and personal freedom. You people have none of that," wrote one.

None of this means that China’s government will take a hardline posture with Tsai, or that cross-Strait relations will inevitably decline.

But it does underline the scale of the challenge ahead for both sides to keep relations on an even keel, especially at a time when nationalist sentiment often runs high on Chinese state media.

Liu Liu contributed to this report.

Watch: Teenage pop star’s humiliating apology to China for waving Taiwan flag