diff options
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 |