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

Опубликовано: 12 Ноябрь 2021
на канале: 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


На этой странице сайта вы можете посмотреть видео онлайн ILLEGAL Source Code?! | Javascript Dataset Tutorial and How to Encode/Decode HTML длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь Dave Gray 12 Ноябрь 2021, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 4,631 раз и оно понравилось 121 зрителям. Приятного просмотра!