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

Publicado el: 12 noviembre 2021
en el canal de: 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


En esta página del sitio puede ver el video en línea ILLEGAL Source Code?! | Javascript Dataset Tutorial and How to Encode/Decode HTML de Duración hora minuto segunda en buena calidad , que subió el usuario Dave Gray 12 noviembre 2021, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 4,631 veces y le gustó 121 a los espectadores. Disfruta viendo!