FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
qmlweb.github.io/main.js at master · qmlweb/qmlweb.github.io · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
qmlweb
/
qmlweb.github.io
Public
Notifications
You must be signed in to change notification settings
Fork
3
Star
3
Code
Issues
0
Pull requests
1
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
qmlweb.github.io
/
main.js
Copy path
More file actions
More file actions
Latest commit
History
History
History
24 lines (19 loc) · 595 Bytes
Breadcrumbs
qmlweb.github.io
/
main.js
Copy path
File metadata and controls
24 lines (19 loc) · 595 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
window
.
addEventListener
(
"DOMContentLoaded"
,
function
(
)
{
var
textarea
=
document
.
querySelector
(
'#code textarea'
)
;
var
editor
=
CodeMirror
.
fromTextArea
(
textarea
,
{
lineNumbers
:
true
}
)
;
var
iframe
=
document
.
querySelector
(
"#result iframe"
)
;
iframe
.
addEventListener
(
"load"
,
function
(
)
{
iframe
.
contentWindow
.
postMessage
(
textarea
.
value
,
"*"
)
;
}
)
;
var
execute
=
function
(
)
{
iframe
.
src
=
iframe
.
src
;
}
;
textarea
.
addEventListener
(
"change"
,
execute
)
;
editor
.
on
(
"change"
,
function
(
)
{
textarea
.
value
=
editor
.
getValue
(
)
;
execute
(
)
;
}
)
;
execute
(
)
;
}
)
;
Back
|
FazBrowse Home
|
New Git URL