mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-25 17:25:08 +02:00
Previously, this was attached to the traversable navigable. Using a singleton instead allows us to use the context for detached documents.
9 lines
228 B
HTML
9 lines
228 B
HTML
<!DOCTYPE html>
|
|
<script>
|
|
var doc = document.implementation.createHTMLDocument("");
|
|
var canvas = doc.createElement("canvas");
|
|
doc.body.appendChild(canvas);
|
|
var ctx = canvas.getContext("2d");
|
|
ctx.fillRect(0, 0, 50, 50);
|
|
</script>
|