Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(canvas-mock): add todataurl in canvas mock #2923

Closed
wants to merge 1 commit into from

Conversation

kherP
Copy link

@kherP kherP commented Jun 1, 2021

No description provided.

@kherP kherP changed the title add todataurl in canvas mock refactor(canvas-mock): add todataurl in canvas mock Jun 1, 2021
@kherP kherP requested a review from a team October 6, 2021 16:35
Copy link
Member

@rwaskiewicz rwaskiewicz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I apologize that it took so long for a member of the team to take a look at this! If you're willing/able, I had a small ask to move the declaration for toDataURL. If not, I completely understand. Thanks again for you contribution, and again I apologize for the lack of response here

@@ -372,6 +372,7 @@ export class MockCanvasElement extends MockHTMLElement {
data: new Array(w * h * 4),
};
},
toDataURL() {},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be hoisted to be a method on MockCanvasMethod, rather than the object returned by getContext - it appears that toDataURL is an instance method on a Canvas element according to https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toDataURL (please let me know if my understanding is incorrect though!).

@christian-bromann
Copy link
Member

This was implemented in #5773 and released as part of Stencil v4.18.3!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants