mirror of
https://github.com/servo/servo.git
synced 2025-08-12 17:05:33 +01:00
Barebones media UI
This commit is contained in:
parent
4f6b86f9f5
commit
1c02fc94a8
11 changed files with 177 additions and 25 deletions
23
resources/media_controls.js
Normal file
23
resources/media_controls.js
Normal file
|
@ -0,0 +1,23 @@
|
|||
console.log('YO');
|
||||
let controls = document.servoGetMediaControls("@@@id@@@");
|
||||
|
||||
let style = document.createElement("style");
|
||||
style.textContent = `#controls {
|
||||
-servo-top-layer: top;
|
||||
display: block;
|
||||
position: fixed;
|
||||
left: 0px;
|
||||
bottom: 0px;
|
||||
height: 30px;
|
||||
width: 100%;
|
||||
background: blue;
|
||||
}`;
|
||||
controls.appendChild(style);
|
||||
|
||||
let div = document.createElement("div");
|
||||
div.setAttribute("id", "controls");
|
||||
let button = document.createElement("button");
|
||||
button.textContent = "Click me";
|
||||
div.appendChild(button);
|
||||
controls.appendChild(div);
|
||||
console.log('INNER', div.innerHTML);
|
Loading…
Add table
Add a link
Reference in a new issue