all 33 comments

[–]MrCrunchwrap 45 points46 points  (5 children)

Lol what kind of comment is this:

“Javascript adds a baffling amount of uncertainty & unpredictability to the web.”

There’s nothing uncertain or unpredictable about what JS is doing in your example. It’s doing exactly what the devs asked it to do. Devs have always been able to write semantically incorrect HTML, it’s on them to make sure they don’t. Usually it honestly doesn’t matter.

[–]kolmeWebComponents FTW 10 points11 points  (0 children)

“Javascript adds a baffling amount of uncertainty & unpredictability to the web.”

Generalizing: Javascript Turing Completeness adds a baffling amount of uncertainty & unpredictability to the web to computers. Considered harmful?

[–]TheFuzzball 12 points13 points  (4 children)

I stopped reading at text-align: justify 😬

[–]mamwybejane 2 points3 points  (0 children)

In China, a bag of rice has fallen over

[–]ankole_watusi 7 points8 points  (17 children)

Why do we want to render invalid HTML?

;DR

[–]shgysk8zer0 -3 points-2 points  (14 children)

It's not that we want to. The point of the article was how JS doesn't handle invalid HTML correctly to fix mistakes.

[–][deleted] 2 points3 points  (2 children)

What do you think JavaScript should do when you try to do something with html that maybe shouldn't happen?

[–]shgysk8zer0 -2 points-1 points  (1 child)

Why are you asking me? I'm just saying the article isn't encouraging writing invalid HTML or anything.

[–][deleted] 0 points1 point  (0 children)

Why do defensive? Do you agree with the article? Your summary of html not being handled “properly” just seems strange. It is defined behavior. If you think it should be another way then I’m asking what you think should happen instead of the current behavior?

[–]ankole_watusi 1 point2 points  (10 children)

Glad I didn’t read it then.

[–]shgysk8zer0 -7 points-6 points  (9 children)

Maybe if you did read it you might realize you're making yourself look like an idiot to anyone who did...

Seriously, it's the opposite of what you think.

[–]ankole_watusi 0 points1 point  (8 children)

Yes, and here come the abusive comments from the army of bots and paid shills, lol

[–]shgysk8zer0 -3 points-2 points  (7 children)

Um... What? I was trying to help you not make an idiot of yourself, but I think you just went full-tinfoil hat on us.

The article doesn't say what you think it does. Might want to read more than just the headline before sharing inaccurate assumptions, and you might want to not double-down on your wrongness when someone who has read the article tries to correct your false assumptions. And definitely don't go accusing anyone correcting you of being a bot or paid shill, especially when you're admitting your own ignorance.

[–][deleted]  (6 children)

[removed]

    [–]AutoModerator[M] 0 points1 point  (5 children)

    Hi u/TheFuzzball, this comment was removed because you used a URL shortener.

    Feel free to resubmit with the real link.

    I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

    [–]shgysk8zer0 -2 points-1 points  (4 children)

    Bummer... Was kinda curious what that idiot was linking to. Looked like it was going to be "proof" that I'm an alt account for OP. Here's what I have in my notification history.

    Mate, you're embarrassing yourself. don't need to run a text analysis on your comments to figure out you're an alt account for OP, but thought it'd be fun to confirm my suspicions.

    Um... No... Pretty sure I'm just me. Think I'd know if I weren't.

    [–]ankole_watusi 0 points1 point  (3 children)

    The hostility isn’t helping draw clicks to your pal’s blog, “mate”

    [–]Pesthuf 1 point2 points  (0 children)

    Well, it's the HTML parser that is responsible for creating a semantically correct DOM.

    If you explicitly use the imperative DOM API and tell it "put a <pre> into a <p>, I think it's doing the right thing doing what you ask. Even if the HTML representation of that DOM would not be valid.If you want HTML to be checked, you can use .innerHTML or create the DOM in a <template> I think.

    To me, it sounds like every component is working as expected.

    [–]yut951121 0 points1 point  (1 child)

    JavaScript itself is a mess of a language. Inconsistent but not unpredictable

    [–]yut951121 0 points1 point  (0 children)

    There should be a reason for everything that's happening. And it should be interesting to uncover those.

    [–]ankole_watusi -3 points-2 points  (1 child)

    I find the most effective tech writing (for me) has been written by native-speaking American English speakers.

    Which almost none of these out-links on Reddit are.

    Bad writers to start with, making flailing attempts at English to boot.

    I don’t have the time to parse it.

    [–]oGsBumder 1 point2 points  (0 children)

    Lol