Web/JavaScript 39

DOMContentLoaded, load, beforeunload, unload 이벤트

https://ko.javascript.info/onload-ondomcontentloaded#ref-401 DOMContentLoaded, load, beforeunload, unload 이벤트 ko.javascript.info HTML 문서의 생명주기엔 다음과 같은 3가지 주요 이벤트가 관여합니다. DOMContentLoaded – 브라우저가 HTML을 전부 읽고 DOM 트리를 완성하는 즉시 발생합니다. 이미지 파일()이나 스타일시트 등의 기타 자원은 기다리지 않습니다. load – HTML로 DOM 트리를 만드는 게 완성되었을 뿐만 아니라 이미지, 스타일시트 같은 외부 자원도 모두 불러오는 것이 끝났을 때 발생합니다. beforeunload/unload – 사용자가 페이지를 떠날 때 발생합니다. D..

Web/JavaScript 2023.10.19

[Mozilla WEB API] HTMLElement: dataset property

dataset 은 사용자 정의 데이터 속성으로 HTMLElement 읽기/쓰기 액세스를 제공한다. An HTML data-* attribute and its corresponding DOM dataset.property modify their shared name according to where they are read or written:In HTML The attribute name begins with data-. It can contain only letters, numbers, dashes (-), periods (.), colons (:), and underscores (_). Any ASCII capital letters (A to Z) are converted to lowercase. I..

Web/JavaScript 2023.10.19

자주 쓰이는 자바스크립트 코드 함수들 정리 1

function Example(a, b){ //this = {} this.a = a; this.b = b; this.print = function(){ console.log("a= ${a}, b= ${b}"); }; // return this; } const example1 = new Example("hi", "bye"); const example1 = Example("hi", "bye"); // undefined 반환하는 값이 없다 객체 key 는 변수도 가능하다 const user = { [1 + 4]: 5, ["안녕" + "하세요"]: "Hello" } // {5: 5, 안녕하세요: "Hello"} Object.assign(초기값, 병합할값1... ); //객체 복제 초기값과 같은 이름일 경우 병합..

Web/JavaScript 2023.10.12

강의 들으면서 정리하기2

https://github.com/dream-ellie/learn-javascript/blob/master/notes/variable.js 와.. 뭐야 이 강의 너무 친절해...ㅠ 정리한 것도 다 공유라니.... 증맬...사랑입니닷... primitive 타입은 값 자체를 저장 object 타입은 ref 가 있어서 ref 안의 요소는 바뀔 수가 있다 Immutable data types : primitive types, frozen objects (i.e. object.freeze()) Mutable data types : all objects by default are mutable in JS Operator.js String concatenation Numeric operators Increment ..

Web/JavaScript 2023.08.30

강의 들으면서 정리하기1

https://youtu.be/OCCpGh4ujb8?list=PLv2d7VI9OotTVOL4QmPfvJWPJvkmv6h-2 template literals -> `${변수} 이렇게` false : 0, null, undefined, NaN, '' true : any other value null < any 아무것도 없는 텅 빈 상태 undefined < 아무 것도 정해지지 않은 상태 Symbol('변수') create unique identifiers for objects 각 변수마다 고유의 식별자임 for 을 써서 변수에 담긴 값이 같은지 확인 가능 javascript - Dynamic typing String 은 charAt(0) TypeScript 는 자바스크립트에 타입을 지정해준 언어 object..

Web/JavaScript 2023.08.29

[mozilla document] Equality_comparisons_and_sameness

https://developer.mozilla.org/en-US/docs/Web/API Web APIs | MDN When writing code for the Web, there are a large number of Web APIs available. Below is a list of all the APIs and interfaces (object types) that you may be able to use while developing your Web app or site. developer.mozilla.org 프론트가 너무 약해서 오늘부터 조금씩 다시 공부해보려고 하는 중! 일이 너무 바빠서 거의 몇달을 안하고 쉬었네ㅜㅠ 다시 조금씩이라도 해보자 알든 모르든 문서를 무조건 한번은 훑어보는게 목..

Web/JavaScript 2023.08.23
728x90