Skip to main content
View on YouTube to comment and like!

Syntax Video

Getting Started with Exploring Browser APIs Course

Chapter 1 00:00

Transcript

hey what's up this is Scott with level up tutorials and in this video we're going to be getting started with our project now we're going to be using vanilla JS as an no Frameworks or anything but we still have a bit of a project set up and it's really only to make things easier for you when you're working so let's get going by both cloning our repo and getting [Music] going hey what's up this is Scott with level up tutorials and we are going to be getting started in this video with our codebase for exploring browser apis now for this application we're not going to be using any Frameworks whatsoever just straight JavaScript in the browser we are however going to be using something called V to run our development server as well as have nice features like hot reload now you could certainly run any of these examples just by importing or using your JavaScript in

a straight up HTML file so don't feel like you have to use V or uh you have to follow along exactly as is because everything that we're going to be doing in this course codewise um is going to just work in browser and in JavaScript now also if you don't want to run these examples locally we have a git pod set up for you preconfigured that you can already fork and get started on the examples with all of the same startup code that we're going to be using in the course so also don't feel like you need to run this locally you can always just pull this up on git pod okay so with all of that said let's go ahead and take a look at how we're going to get started if you want to follow along locally now I'll have the repo for this Linked In the video description and if you want to just hunt for it on your own it's under level up TTS on GitHub exploring browser

apis start as and this is the starting code for this course now if we would like to grab this code all we simply need to do is clone this repository so this video will assume that you have git knowledge as well as nodejs installed on your computer so that we can run vit that said again you can run these examples in just straight JavaScript if you would like to do so as well however if you'd like to follow along what we want to do is Select code grab the path here it says the SSH path we can just grab this path right here copy it and then in our terminal get clone and then paste in that path hit enter and watch this download our application now if we check our directories you can see that we do have exploring browser apis start saved into our folder where we can change directories into exploring hyphen

browser apis hyphen start next we want to do npm install to grab any dependencies that we need and again the only reason we even need to run npm install is for vit itself now to get these things up and running in our own browser at this point all we need to do is npm run Dev and that is going to get us up and running at Local Host Port 3000 and when we fire up that Local Host Port 3000 this is what you should see level up browser API eyes it looks just like this now again since we aren't using any Frameworks these are just straight up links to individual HTML files so you can see when we click on any of these links like this they look a little bit something like this okay so you can just use your back button you can always come here or you can just type in the URLs directly none of which are going to be that

intense next we're going to open up this project in VSS code code or Visual Studio code you can use any text editor of your choice if you'd like to follow along exactly as is you can do like what we're doing and run it in vs code now for me since I have the code CLI installed I can just type in code. SL you can also drag and drop this directory onto vs code and it will open you can say yes I trust the authors there's not too much going on in this I'll bump up the font size here so you can see exactly what's happening and if you're wondering what color theme or scheme I'm using here let's go to theme and the color theme I'm using is level up syntax remix it's in the level up official package just one thing to call out just in case you want yours to look like mine colors wise okay so from here you'll be able to see that we have a basic index.html that says it's just a v app this is a vanilla JS V app with links

using normal adrs and uh normal link tags and those are linking directly to an examples folder that examples folder has different folders inside of it such as battery clipboard Dom events and you'll be able to see in all of these folders is one index.html file and one index.js file now you won't need to link these files together in any sort of way because all of the index.html files are preconfigured to load up the stylesheets as well as load up the JavaScript that we'll be using after the Dom content has loaded so you can see that our scrip type JavaScript is down here and then our style.css is here and some of these even have additional JavaScript and CSS files or I should just say just CSS files there and we also have a few public files we have a quick audio clip we have a logo a

logo.svg a specific override CSS for one of the components and then we just have our style. CSS s now we won't be writing any CSS in this course and we won't be writing too many things outside of the individual. JS files again we're going to keep this really structured really simple in terms of how we do all of this so because these files are already linked all you're really going to have to do is load up the index.js files and start typing and we'll be talking through the following things now some of these examples will be used across multiple videos as we dive further into into the apis so you'll see that the number here doesn't exactly match the number of videos in this course however these folders will match these exactly right here so I will almost always refer to what we're doing by the folder name okay so with that said what we're ready

to do is we are ready to start diving into basics of working with the browser and with the Dom in JavaScript now if if you're an experienced JavaScript developer the first few of these videos is going to feel basic as we really cover the modern ways in which you can interact uh with dom elements add events and create new elements and then we're going to be diving into some things like using the Navigator and a user agent and why you might or might want not want to use the user agent before diving into things like the clipboard API as well as permissions and then getting into some really fancy stuff like text to speech um the brand new share API using things like device sensors like the battery and visibility sensors geolocation and file system stuff we're going to be covering a lot of really fun examples some things that are exceedingly Cutting Edge and some things that have been in the

browser for a little while now so it's going to be a nice mix of exciting and brand new experimental apis as well as time tested ones as we show you just some of the things that you can do in the browser using Straight Up vanilla JavaScript so let's get started in the next video what you can fire up is the Dom folder and then index.html as well as index.js you'll see frequently I'll have these kind of split side by side here and I'll close this this is going to be a very common way in which we'll interface with this code and then the actual HTML will also be output so let's get going as we dive into working with the Dom in modern JavaScript

Quote it with credit and a link. Quoting Syntax