api.CanvasRenderingContext2D.globalAlpha - Doesn't work after safari 16.x and also 17.x version
Open
Nobody has claimed this yet.
browser:safari
data:api
- Dominant language
- JSON
- Stars
- 5.8k
- Forks
- 2.6k
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 186
Description
What type of issue is this?
Browser bug (a bug with a feature that may impact site compatibility)
What information was incorrect, unhelpful, or incomplete?
<style> #canvas { border: 1px solid black; } </style><script>
const canvas = document.getElementById("canvas");
const ctx = canvas.getContext("2d");
ctx.fillStyle = "red";
ctx.fillRect(50, 50, 200, 200);
ctx.globalCompositeOperation = "destination-in";
ctx.fillRect(50, 50, 200, 200);
ctx.globalAlpha = 0.5;
// 绘制目标形状(圆形)
ctx.fillStyle = "blue";
ctx.beginPath();
ctx.arc(200, 200, 100, 0, Math.PI * 2);
ctx.closePath();
ctx.fill();
</script>
What browsers does this problem apply to, if applicable?
Safari
What did you expect to see?
The transparency of image doesn't work on safari
Did you test this? If so, how?
Yes, deployed my code and show it on safari
Can you link to any release notes, bugs, pull requests, or MDN pages related to this?
No response
Do you have anything more you want to share?
I am not sure exact safari version.
MDN URL
https://developer.mozilla.org/zh-CN/docs/Web/API/CanvasRenderingContext2D/globalAlpha
MDN metadata
MDN page report details
- Query:
api.CanvasRenderingContext2D.globalAlpha - Report started: 2024-03-15T03:49:59.009Z
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the MDN CanvasRenderingContext2D.globalAlpha page and reproduce the supplied HTML/JavaScript canvas example in Safari 16.x and 17.x. Done means confirming the affected Safari versions and the observed compatibility behavior so the browser-compatibility data can be assessed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100