[gallery-y-common-dombind] minor code refactor and docs