Issue 853711 3

use app_modal_dialog-like element query approach
- turn single prototype to per prototype.method
- turn id query into class query

pass current test cases
I think the goal is to render DOM elements dynamically.