Judging by the reaction to a “Saturday Night Live” writer’s tweet, one norm of American politics remains unshakable: The children of presidents should be off limits.

It is a rule that has been cited — and sometimes broken — through a succession of first daughters. Now, for the first time in more than half a century, the president has a young son.

Shortly after President Trump took the oath of office on Friday, a comedy writer for “S.N.L.,” Katie Rich, tweeted what was intended to be a joke about Barron Trump and school shootings, prompting a barrage of criticism. Within a few hours, Ms. Rich deleted the tweet and locked down her Twitter account, but it remained a topic on social media all weekend.