[gallery-y-common-dombind] events attach method refactor