add "replaceCanvases" method into applet