edit base-element with better code (from @aria42) to support adding div