createImageBitmap - unsupported call signatures
Moderators: trava90, athenian200
-
- Lunatic
- Posts: 344
- Joined: 2019-01-10, 09:37
- Location: Slovenia
createImageBitmap - unsupported call signatures
Just a heads up, it came into my awareness that there are websites out there that rely on additions to createImageBitmap not supported by the platform.
https://pixai.art/ throws an exception about not enough arguments, causing image previews not showing as expected, eg. even on the first page, you're supposed to see the images without having to click their entries to open them.
Related entry on Bugzilla with another example
https://pixai.art/ throws an exception about not enough arguments, causing image previews not showing as expected, eg. even on the first page, you're supposed to see the images without having to click their entries to open them.
Related entry on Bugzilla with another example
-
- Moon Magic practitioner
- Posts: 2378
- Joined: 2018-05-05, 13:29
TypeError: Not enough arguments to Window.createImageBitmap
The createImageBitmap function seems to have received a different signature at some point in time.
https://developer.mozilla.org/en-US/doc ... mageBitmap
Looking at the XRef very quickly UXP does not support the options argument as an extension to the existing supported signatures.
I wanted to play this game: https://skk-atelier.itch.io/sokoban-jelly
The game uses the Cocos JS engine so anything built on it is a valid "in the wild" live example.
Code from the engine just for reference: https://github.com/cocos/cocos-engine/b ... ser.ts#L88
https://developer.mozilla.org/en-US/doc ... mageBitmap
Looking at the XRef very quickly UXP does not support the options argument as an extension to the existing supported signatures.
I wanted to play this game: https://skk-atelier.itch.io/sokoban-jelly

The game uses the Cocos JS engine so anything built on it is a valid "in the wild" live example.
Code from the engine just for reference: https://github.com/cocos/cocos-engine/b ... ser.ts#L88
-
- Pale Moon guru
- Posts: 37465
- Joined: 2011-08-28, 17:27
- Location: Motala, SE
Re: TypeError: Not enough arguments to Window.createImageBitmap
I'm sick and tired of this passing through "options" objects to everyone and their uncle. It's such a terrible hybrid approach to established calls.
But I guess it's Yet Another Spec Change (YASC) we will have to implement.
Issue #2545 (UXP)
But I guess it's Yet Another Spec Change (YASC) we will have to implement.
Issue #2545 (UXP)
"A dead end street is a place to turn around and go into a new direction" - Anonymous
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite
-
- Lunatic
- Posts: 395
- Joined: 2019-03-16, 13:26
- Location: Qld, Aus.
Re: TypeError: Not enough arguments to Window.createImageBitmap
Here's a Modify HTTP Response filter to remove the options.
Code: Select all
[["html-classic.itch.zone",["/_virtual_cc.*\\.js$/",["/(createImageBitmap\\(.),\\{.*?\\}/g","$1"]]]]
-
- Lunatic
- Posts: 344
- Joined: 2019-01-10, 09:37
- Location: Slovenia
Re: TypeError: Not enough arguments to Window.createImageBitmap
For the record, I wrote about this here.
I'm not sure when it comes to technicalities, which board is better. I assumed Browser Development was more for Pale Moon specific things, eg. look 'n feel, web stuff is all handled by the platform AFAIK.
I'm not sure when it comes to technicalities, which board is better. I assumed Browser Development was more for Pale Moon specific things, eg. look 'n feel, web stuff is all handled by the platform AFAIK.
-
- Pale Moon guru
- Posts: 37465
- Joined: 2011-08-28, 17:27
- Location: Motala, SE
Re: TypeError: Not enough arguments to Window.createImageBitmap
That one just slipped under my radar, sorry about that. Yes, platform development is the better location but I'm usually not super strict about where it's put.
I'll merge both topics.
I'll merge both topics.
"A dead end street is a place to turn around and go into a new direction" - Anonymous
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite
-
- Moon Magic practitioner
- Posts: 2378
- Joined: 2018-05-05, 13:29
-
- Lunatic
- Posts: 344
- Joined: 2019-01-10, 09:37
- Location: Slovenia
Re: createImageBitmap - unsupported call signatures
Off-topic:
I've always been more of an invisible type.
I've always been more of an invisible type.
