Skip to content

Instantly share code, notes, and snippets.

@goonan24
Last active September 11, 2023 01:02
Show Gist options
  • Save goonan24/ff44fb895d01655164715d601fc1ece6 to your computer and use it in GitHub Desktop.
Save goonan24/ff44fb895d01655164715d601fc1ece6 to your computer and use it in GitHub Desktop.
Week 3 HW.md
### Video 1:
# What made the idea viable?
- We are able to use a specific libary called highlight.js which allows you to pass code into it and it will give you different information about it.
# What is the original issue with the Lit code highlighter?
- I believe the original issue was the fact that the code that made the "highligting" work and possible was hard coded. Because of this it forces you to talk to someone that knows how this was specifally set up inorder to any changes to it.
# What’s a strategy you can engage in in order to refactor toward better code? What strategy / how many iterations did I go through to get “better code”? - What makes this code better?
- You can use the inspect element inorder to look at the code you are producing or working on and with inspect your able to look at how it is being output and you can see how direct changes you are making is affecting how the out put of the code looks.
### Video 2:
# What weird event did I implement to solve a UX problem?
- it uses an event listener that checks first if it was visable or not and then it checks if it was playing or not.
## What is the difference between document and window in javascript? Find the Mozilla Developer Network page about this.
- the document object is what controls the browser windows that is running the JavaScript code, and the document object is what runs the HTML document loaaded in the browser which you can use to select HTML elements and modify them.
- https://developer.mozilla.org/en-US/docs/Web/API/Window
## Find 8 events that user input can generate via the MDN Web Docs. Link to examples
- scheduler https://developer.mozilla.org/en-US/docs/Web/API/Window/scheduler
- sessionStorage https://developer.mozilla.org/en-US/docs/Web/API/Window/sessionStorage
- name https://developer.mozilla.org/en-US/docs/Web/API/Window/name
- blur() https://developer.mozilla.org/en-US/docs/Web/API/Window/blur
- frames https://developer.mozilla.org/en-US/docs/Web/API/Window/frames
- history https://developer.mozilla.org/en-US/docs/Web/API/Window/history
- location https://developer.mozilla.org/en-US/docs/Web/API/Window/location
- toolbar https://developer.mozilla.org/en-US/docs/Web/API/Window/toolbar
# codePen
- https://codepen.io/goonan24/pen/VwqPbve
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment