Electromagnetic fields in fractal continua