Modify the applet codebase to work when embedded

is [#42230269]