# live, static

live -> document에 element를 추가/삭제 했을 때 바로 반영됨

static -> 바로 반영되지 않음

```javascript
const buttons = document.getElementById("buttons");
const sports = document.querySelectorAll("sports");


const onClickHandler = () => {
    const el = document.createElement("li"); //param은 태그이름으로 엘리먼트 생성, 다큐먼트에 표현되려면 노드에 먼저 반영되어야함
    el.textContext = "버튼";
    buttons.appendChild(el);
    sports.appendChild(el); //nodeList는 바로 반영되지 않음
}

buttons.onClick = onClickHandler; //buttons를 클릭하면 마지막 child에 생김

//노드 트리에 노드(엘리먼트)를 추가/삭제하면 HTMLCollection에 추가되고 바로 반영됨

const el = document.createElementNS(namespace, "div");

<div xmlns:a="https://www.w3.org/TR/html5/" /> //namespace 엘리먼트간의 충돌을 방지하기 위해 URI로 표현

```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://vlog.ireneworks.com/javascript/document-object-model/live-static.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
