Any employer subject to this chapter who subscribes and pays into the workers' compensation fund the premiums provided by this chapter or who elects to make direct payments of compensation as provided in this section is not liable to respond in damages at common law or by statute for the injury or death of any employee, however occurring, after so subscribing or electing, and during any period in which the employer is not in default in the payment of the premiums or direct payments and has complied fully with all other provisions of this chapter. Continuation in the service of the employer shall be considered a waiver by the employee and by the parents of any minor employee of the right of action as aforesaid, which the employee or his or her parents would otherwise have: Provided, That in case of employers not required by this chapter to subscribe and pay premiums into the workers' compensation fund, the injured employee has remained in the employer's service with notice that his or her employer has elected to pay into the workers' compensation fund the premiums provided by this chapter, or has elected to make direct payments as aforesaid.