Helper functions for xblocks custom elements