Last active
April 8, 2018 08:52
-
-
Save HomoEfficio/6f2176124b6c46adb7a3d8529292cf82 to your computer and use it in GitHub Desktop.
CodeSpitz75-2일차-숙제
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>CodeSpitz71-1</title> | |
</head> | |
<body> | |
abc | |
<section id="data"></section> | |
<script> | |
const Github = class{ | |
constructor(id, repo){ | |
this._base = `https://api.github.com/repos/${id}/${repo}/contents/`; | |
} | |
load(path){ | |
const id = 'callback' + Github._id++; | |
const f = Github[id] = ({data:{content}})=>{ | |
delete Github[id]; | |
document.head.removeChild(s); | |
this._loaded(content); | |
}; | |
const s = document.createElement('script'); | |
s.src = `${this._base + path}?callback=Github. ${id}`; | |
document.head.appendChild(s); | |
} | |
_loaded(v){throw 'override!';} | |
}; | |
Github._id = 0; | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
1(8) : 0 (전체 과제 코드의 구현이 되지 않았습니다.)
2(4) : 0 (전체 과제 코드의 구현이 되지 않았습니다.)
0/12 = 0