diff options
author | 2022-04-03 02:42:08 -0700 | |
---|---|---|
committer | 2022-04-03 02:42:08 -0700 | |
commit | 4a19a3f07f1887903e5638a3be167f0c7b377ba3 (patch) | |
tree | 24b5ebd36910d19e690352cf343943e0e6b0459d /src/javascript/jsc/bindings/webcore/OffscreenCanvas.cpp | |
parent | e62c7dc9e5709b1ce54838aee30668a4c358a528 (diff) | |
download | bun-4a19a3f07f1887903e5638a3be167f0c7b377ba3.tar.gz bun-4a19a3f07f1887903e5638a3be167f0c7b377ba3.tar.zst bun-4a19a3f07f1887903e5638a3be167f0c7b377ba3.zip |
wip
Diffstat (limited to 'src/javascript/jsc/bindings/webcore/OffscreenCanvas.cpp')
-rw-r--r-- | src/javascript/jsc/bindings/webcore/OffscreenCanvas.cpp | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/javascript/jsc/bindings/webcore/OffscreenCanvas.cpp b/src/javascript/jsc/bindings/webcore/OffscreenCanvas.cpp new file mode 100644 index 000000000..9bdde8205 --- /dev/null +++ b/src/javascript/jsc/bindings/webcore/OffscreenCanvas.cpp @@ -0,0 +1,26 @@ + +#include "root.h" + +#include "OffscreenCanvas.h" +#include "OffscreenCanvasRenderingContext2D.h" + +namespace WebCore { + +OffscreenCanvas::OffscreenCanvas(ScriptExecutionContext& scriptExecutionContext, unsigned width, unsigned height) + : ContextDestructionObserver(&scriptExecutionContext) +{ + m_width = width; + m_height = height; +} + +Ref<OffscreenCanvas> OffscreenCanvas::create(ScriptExecutionContext& scriptExecutionContext, unsigned width, unsigned height) +{ + return adoptRef(*new OffscreenCanvas(scriptExecutionContext, width, height)); +} + +ExceptionOr<std::optional<OffscreenCanvas::OffscreenRenderingContext>> getContext(JSC::JSGlobalObject&, OffscreenCanvas::RenderingContextType) +{ + return Exception { TypeError, "Not implemented yet"_s }; +} + +}
\ No newline at end of file |