-
Notifications
You must be signed in to change notification settings - Fork 14
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
setTransform turns into getTransform on Chrome #97
Comments
First, if you need a quick workaround, since js1k deadline is so close :
Now let's focus on the issue itself. |
Oh I see. I thought the hash was hard-coded based upon two letters which were decided to represent all properties uniquely. I already fixed the issue in my own code by replacing setTransform with save/restore, but here is a minimal example which will reproduce the problem:
|
The hash is not static, RegPack has a list of possible hashes and tries to find the best match
Under Firefox, <html><head>
</head>
<body>
<div id="d"></div>
</body>
<script>
var a = document.createElement("canvas");
var c = a.getContext("2d");
var methods = [];
for (var i in c) {
methods.push(i + " ["+i[1]+[i[4]]+"]");
}
methods.sort();
var text = methods.join('",<br>"');
document.getElementById("d").innerHTML=text;
</script>
</html> |
Yepp, both are listed:
|
I'll upgrade Chrome tomorrow and see how it behaves. |
Switched to Chrome 73.0.3683.86 Did you pack your code with Firefox, then attempt to run it with Chrome ? |
Yes I did. Honestly didn't occur to me to try regpack in Chrome. |
So this is issue #20 , reloaded with recent versions of the browsers. |
Straightforward problem. When it should use setTransform in Chrome 73.0.3683.86 it uses getTransform instead.
Hash properties:
for(i in c)c[i[1]+[i[4]]]=i
getTransform/setTransform
c[c.er](...)
The text was updated successfully, but these errors were encountered: