Niro* by cho45

#15 DSi browser hacks

You may often write javascript for DSi browser so I do. I have some knowledge for it.

How to change the cursor.

You may try 'cursor: default' CSS but DSi browser ignores it.

But you can change to default cursor by 'position: absolute'.

How to show caret on input area.

You can show caret on input area by using JavaScirpt focus() function, and press 'A' button to input \n.

When focus event is fired.

It is fired *after* inputting text.

Keyboard events that you are able to handle.

  • 'A' key events are always fired.
  • Pressing 'L' key or 'R' key, ↑↓←→ key events are fired.
    • But page is fixed (that is cannot be scrolled), ↑↓ key events are fired without 'L' or 'R'.

That's all.

And some information:

  • keyup event is not fired, only keypress and keydown event are fired.
  • Pressing continuously, keydown events are fired many times.

HTML canvas on DSi browser

You cannot use drawImage() function. It is callable but unusable.

Color's low 4bits are cutoffed. For Example, if you specified #FFFFFF as fillStyle and call fillRect, drawing color is #F0F0F0 actually. And that this rule is also applied to alpha channel, more properly, #FFFFFF is treat as rgba(240, 240, 240, 0.94). So you can exactly not draw true white color.

blog comments powered by Disqus