implementation only for html extension