Expose castAttribute on Element