2

JavaScript is not real code! Shots fired!

Comments
  • 7
    I thought the girl in the picture was naked. Such a strange blur lol
  • 11
    This rant is not a real rant.
  • 6
    @AleCx04 Yeah, It's a very confusing picture in general.
  • 1
    Give me a non JS alternative to interact with a webpages DOM that Doesn't Require JS to interact with it either, I'll be using it tomorrow.

    Until then, it's real, it's used a lot, and my only issue with JS is "full stack JS devs" who do nothing more then "npm start" to think they are full stack.
  • 0
  • 1
    @12bitfloat you need JS to use it, it's not a replacement.

    https://webassembly.org/getting-sta...
  • 1
    @C0D4 Okay but there are surely libs for that. One js function is almost as good as no js function call
  • 1
    @12bitfloat there are, but then you're using more js to interact with it's replacement. Kinda pointless since it's suppose to be a replacement.
  • 1
    @C0D4 The main problem with frontend JS is stupid devs who abuse JS for stuff that ought to be done entirely without JS (using HTML or CSS), or for shit that shouldn't be on a website to begin with.

    My fav in stupidity is some useless div with an onclick handler that changes the URL of the document. That's what a fucking anchor is for!
  • 2
    @AleCx04 dirty minds think alike.
  • 1
    @Fast-Nop πŸ˜‘don't get me started on divs with onclicks, the only place I can half agree with onclicks in elements that aren't links is table headers being used for data sorting, because... it makes sense.
    But yea divs or spans being used as A tags with function calls Like

    <div onclick="goToPage('pageName.html');">
    Some content
    </div>

    Is a delight experience.
  • 0
    @C0D4 And also, the keyboard handling is usually forgotten, or people implement some half-assed shit that doesn't quite get the difference between buttons and links with regard to the space bar.

    Btw., I think this table sorting feature should be a button because it changes in-page state only, and then it would also work via keyboard handling, and it would be in the tab order. Can of course be styled via CSS to not look that button-ish in this case. And disabled in the markup so that with JS blocked, it's at least not confusing.

    The occasions where an onclick on neither a link nor a button makes sense are pretty rare. Like, some games, maybe a chessboard where you click which piece to move where.
  • 2
    @Fast-Nop sure of done right, or the dev has any sense of accessibility... that's something no one cares about anymore either πŸ˜•

    Granted if it's data you want to return to at a sorted state, you would include URi params to listen too, as for keyboard users... I tend to forget about them beyond nav / forms but I see you're point for controllable data sets.
  • 1
    @C0D4 Yeah and then companies wonder why they find themselves losing in court over the inaccessible bullshit their web devs created - like Domino's:

    https://cnbc.com/2019/10/...
  • 2
    @Fast-Nop ah US courts.
    Yea we have a similar thing here in AU, any Gov site by law must be WCAG 2.0 compliant, however anything else is optional, although I try to stay 508 compliant personally.

    https://australia.gov.au/accessibil...
  • 0
    @C0D4 WCAG has already version 2.1, most importantly with regard to the contrast of graphic elements against background. Also, I'd go for level AA and not just A. For the main text contrast, level AAA.

    Making shit legible also benefits non-impaired users. Gosh I hate these fuckheads with their light-grey, thin fonts on white backgrounds that they pulled from their designery asses.

    And the rest is mostly using proper semantic markup - which is what HTML has all been about since the 90s. Mark up shit as what it actually means, and presto, NVDA will read it out so that it makes sense. Boom, solved. If the page makes sense with CSS and JS disabled, that's a solid starter.

    It's only when these presentational monkeys show up with their shitshow that things go south. In recent times, their go-to is Bootstrap which seems to be designed to abuse markup in conjunction with presentational classes. Or at least, I've yet to see a Bootstrap infested site that isn't a presentational shitfest.
  • 0
    @C0D4 "More js than it's replacement"
    I don't understand what you mean?
    You only need js to load a wasm binary, not to run it
  • 1
    @12bitfloat that's my point.
    You still need js.

    What's the point in a replacement if you still need to use the one thing it's designed to replace?
  • 0
    @C0D4 It replaces js where is counts: The actual application. I mean why would you want to replace javascript in the first place? Because it's dynamically typed, it's slow, it's big, etc. All of these things are kinda irrelevant when it's only the wasm loader (that you probably don't even have to code yourself). I can understand the wish to replace JS out of principle, but this doesn't seem like a problem to me
Add Comment