ILLEGAL Source Code?! | Javascript Dataset Tutorial and How to Encode/Decode HTML

Veröffentlicht am: 12 November 2021
auf dem Kanal: Dave Gray
4,631
121

Web Dev Roadmap for Beginners (Free!): https://bit.ly/DaveGrayWebDevRoadmap

Is this source code ILLEGAL?!! Maybe in Missouri. In this tutorial, you will learn how and why we can use the Javascript dataset property to store data inside of an HTML element without displaying it in the browser. You will also learn how the Missouri Governor wanted to prosecute a reporter for viewing the HTML source code on a website.

🚩 Subscribe ➜ https://bit.ly/3nGHmNn

🚀 This tutorial is part of a How To in Javascript tutorial playlist:
   • How To in JavaScript  

ILLEGAL Source Code?! | Javascript Dataset Tutorial and How to Encode/Decode HTML

(00:00) Intro
(00:09) Welcome
(00:16) The Backstory: Illegal Source Code in Missouri?!
(01:41) Why and how to store hidden data in HTML elements
(07:37) How to retrieve data from a dataset with Javascript
(10:42) Can we really "decode the HTML"?
(11:40) Creating a decode the HTML function
(15:17) An Easier Way: the he package

📺 Referenced Tutorials:
Don't Use forEach with Async/Await:    • forEach is BAD! for Async Await Code | Adv...  
2 BIG Reasons to avoid using innerHTML:    • DO NOT use innerHTML - 2 BIG Reasons Why |...  
Get Started with Node.js:    • Introduction to Node JS | Node.js Tutorial...  
Learn about NPM Modules:    • NPM Node Package Manager Modules | NPM Tut...  

📚 References:
MDN "Using data attributes": https://developer.mozilla.org/en-US/d...
MDN DOMParser: https://developer.mozilla.org/en-US/d...
List of HTML Entities: https://unicode-table.com/en/html-ent...
NPM he package: https://www.npmjs.com/package/he
CDNJS he package: https://cdnjs.com/libraries/he

✅ Follow Me:
Twitter:   / yesdavidgray  
LinkedIn:   / davidagray  
Blog: https://yesdavidgray.com
Reddit:   / daveoneleven  

Was this tutorial about how and why to store data attributes in HTML and retrieve the data with Javascript helpful? If so, please share. Let me know your thoughts in the comments.

#javascript #dataset #html


Auf dieser Seite können Sie das Online-Video ILLEGAL Source Code?! | Javascript Dataset Tutorial and How to Encode/Decode HTML mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Dave Gray 12 November 2021 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 4,631 Mal angesehen und es wurde von 121 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!