Adding mode property for Element and Widget abstract classes