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
On this page of the site you can watch the video online ILLEGAL Source Code?! | Javascript Dataset Tutorial and How to Encode/Decode HTML with a duration of hours minute second in good quality, which was uploaded by the user Dave Gray 12 November 2021, share the link with friends and acquaintances, this video has already been watched 4,631 times on youtube and it was liked by 121 viewers. Enjoy your viewing!