Plaintiff appeals upon two grounds: (1) That the statutory requirements with reference to service of the counterclaim upon the district attorney, and with reference to his appearance in open court, were not satisfied, *641and that the judgment is void for want of jurisdiction; and (2) that the period of desertion, as shown by the evidence, was for less than the period required by statute.
Sec. 247.14, Stats., provides:
“In any action to affirm or annul a marriage, or for a divorce, the plaintiff and defendant shall, within ten days after making service on the opposite party of his complaint, answer, counterclaim or reply, as the case may be, serve a copy of th’e safne upon the divorce counsel of the county in which the action is begun. . . . Such counsel shall appear in the action when the defendant fails to answer or withdraws his answer before trial; also, when the defendant interposes a counterclaim and the plaintiff thereupon neither supports his complaint nor opposes the counterclaim by proof; and when the court is satisfied that the issues are not contested in good faith by either party.”
Sec. 247.15, Stats., provides:
“No decree in any action in which divorce counsel is required by section 247.14 to appear shall be granted until such counsel or the divorce counsel of the county in which the action is tried shall have appeared in open court and in behalf of the public made a fair and impartial presentation of the case to the court and fully advised the court as to the merits of the case and the rights and interests of the parties and of the public, nor until the proposed findings and judgment shall have been submitted to such divorce counsel. ...”
Sec. 247.01, Stats., provides:
“The circuit court has jurisdiction of all actions to affirm or to annul a marriage, or for a divorce from the bond of matrimony, or from bed and board, and authority to do all acts and things necessary and proper in such actions and to carry its orders and judgments into execution as. hereinafter prescribed. All such actions shall be commenced and conducted and the orders and judgments therein enforced according to the provisions of these statutes in respect to actions in courts of récord, as far as applicable, except as provided in this chapter.”
*642The contention of the appellant is substantially this: that the requirements for service upon the district attorney, his appearance in open court, and his approval of the findings, are mandatory, and that a failure to comply with the requirements constitutes a jurisdictional defect in the proceedings. Appellant invokes the well-established rule that the jurisdiction in divorce actions is entirely statutory. “What the statute does not give, the court, however broad its equity powers in other matters may be, cannot assume.” Towns v. Towns, 171 Wis. 32, 176 N. W. 216.
This court had occasion to consider a somewhat similar situation in Bloomer v. Bloomer, 197 Wis. 140, 221 N. W. 734. In that case the court, with the consent of the appellant, heard some testimony of a salacious character in chambers, and excluded minors and newsgatherers while some of the same character of proof was being offered in the court room. The appellant in that case relied upon sec. 247.12, Stats., which provides:
“All hearings and trials to determine whether or not a decree shall be granted shall be had before the court, and not before a referee, or any other delegated representative, and shall in all cases be public.”
The appellant sought to avoid the effect of the well-established rule that an appellant cannot be heard to complain of any proceeding taken or proof received upon the trial at the instance of the appellant himself, by asserting that this rule does not apply to divorce actions in which the public is a party in interest. The court affirmed the judgment, and in doing so stated that the “statute was enacted to end a practice that had obtained in this state by which testimony in default divorce actions was quite generally taken before referees, who were too often stenographers in the office of the plaintiff’s attorney. It was because this practice made possible the granting of a divorce almost as a matter of form that this act was passed for the purpose *643of abolishing the practice.” The purpose of the act was held to be “accomplished in this case when the presiding judge, the parties, and their counsel retired to the judge’s chambers upon request of defendant’s counsel in order that the salacious testimony should not be detailed before those who were in the court room.”
The reasoning in the Bloomer Case is applicable in the present situation. If the purpose sought to be accomplished by the statute was in this case substantially satisfied, there should not be a reversal for a failure literally to observe the statutory requirements. Secs. 247.14 and 247.15 set out in substance four requirements: first, the original pleadings shall be served upon the district attorney; second, he shall be served with the amended answer and counterclaim; third, he shall appear in open court and fully advise the court as to the merits of the case; and fourth, he shall approve the findings. Of these requirements two were satisfied. The original summons and complaint as well as the answer were served upon the district attorney, and the findings were submitted to him for approval and were approved. While it cannot be said that the proceedings were in strict conformity with the statute, we think it may be said that the purposes sought to be accomplished by these provisions were substantially satisfied in that the district attorney was given a proper opportunity to investigate the situation and was. called upon before the findings were signed to indicate his approval. What is said here should not be taken to indicate that this court approves of the practice of dispensing with the statutory requirements. It is merely held that where there has been a sufficient compliance with this statute so that its purposes may be supposed to have been satisfied, the court will riot hold the judgment void for want of jurisdiction.
Appellarit’s second contention is based upon the fact that plaintiff left the defendant less than four months before she *644started her action for divorce. Sub. (4), sec. 247.07, Stats., provides, as one of the grounds for divorce:
“For the wilful desertion of one party by the other for the term of one year next preceding the commencement of the action.”
At the time of the filing of the defendant’s counterclaim, a period of eighteen months had elapsed from the time plaintiff left the defendant. Upon these facts and upon the statute, plaintiff makes two contentions: The first is that the period during which the plaintiff’s action for divorce was pending should not be considered as a part of the period of desertion. It is our conclusion that this contention is unsound in view of the circumstances of this case. It must be taken as a verity that plaintiff wilfully deserted the defendant on November 22, 1927, and under such circumstances the commencement of a groundless action for divorce should not be held to interrupt the period of wilful desertion.
In Tolzman v. Tolzman, 130 Minn. 342, 153 N. W. 745, it is said:
“In this case the desertion by plaintiff began before she started her action for a separation. Her continued living apart from her husband is not fairly referable to the fact that this action was pending. There would have been nothing improper in plaintiff returning to defendant in spite of the pendency of her action, which the court found had no merit. The commencement of this action by her after she had deserted defendant in no way excuses or gives an innocent character to her continued desertion. The present case is fairly distinguishable from the Hurning Case [80 Minn. 373, 83 N. W. 342], and comes within the reasoning of the opinion in the Wagner Case. We have, too, the consent by plaintiff to the amendment charging her with desertion, and the litigation of the issue by consent.” See, also, Wagner v. Wagner, 39 Minn. 394, 40 N. W. 360.
*645Plaintiff further contends that since the statute requires that the desertion. must have extended for the period of one year next preceding the commencement of the action, and that since something less than four months had elapsed at the time plaintiff commenced her action, the defendant does not show himself entitled to the divorce upon this ground.
May the filing of the counterclaim, under the circumstances of this case, be treated as the commencement of the action? It is considered that it may be so treated. The plaintiff abandoned her action upon the trial, and the court at that time could have summarily dismissed the action. The parties were in court and willing to submit to the court’s jurisdiction, and the court, under those circumstances, permitted the filing of the counterclaim. No doubt the court could have dismissed the proceedings, and left the defendant to issue and -serve a summons and complaint, in which case it would be quite clear that defendant could set up his cause of action for desertion. The court elected to permit the filing of the counterclaim. The parties were in court, willing to proceed to a hearing upon the counterclaim,, and no reason is perceived why the proceedings cannot be treated as the commencement by the defendant of an action, within the meaning of the section. Further than this, it seems to be the generally accepted rule that the defendant may, by counterclaim, set up a cause of action for divorce even though this cause of action is based on facts which occurred after the institution of the suit.
In White v. White, 167 Wis. 615, 168 N. W. 704, it was said:.
“In divorce actions, in which the state has such a substantial, well-recognized interest, a court is not confined in its disposition of them to the facts' as they existed at the time of the commencement of the action merely, but *646it may take cognizance, under proper pleadings, of what is done by either or both parties thereto during the time it is pending before it. 2 Bishop, Marriage, Div. & Sep. § 567; 14 Cyc. 674; Moors v. Moors, 121 Mass. 232; von Bernuth v. von Bernuth, 76 N. J. Eq. 487, 74 Atl. 700; Blanc v. Blanc, 67 Hun, 384, 22 N. Y. Supp. 264; Armstrong v. Armstrong’s Adm’r, 27 Ind. 186; Smith v. Smith, 4 Paige Ch. 432. . . .
“Under the situation disclosed in this case the defendant should be permitted, under sec. 2687 of the Statutes, to make a supplementary answer and assert the adultery of plaintiff subsequent to the trial, either as an absolute bar to plaintiff’s prayer for divorce as by way of recrimination (Hiecke v. Hiecke, 163 Wis. 171, 157 N. W. 747; 9 Ruling Case Law, p. 387, § 180), or she may also allege it by way of counterclaim as grounds for a divorce in her favor, as she shall be advised. We deem such method by supplementary pleading the better practice, as it gives the defendant an opportunity to elect which remedy she would choose and the plaintiff ample opportunity to be heard.”
In von Bernuth v. von Bernuth, 76 N. J. Eq. 487, 74 Atl. 700, cited with approval in the White Case, it was said:
“The defendant did set up in his answer matter which would have been a proper subject of a petition, and he seeks to obtain the same relief thereon that he would have been entitled to on the same facts if he had filed an independent petition. He had alleged and proved a desertion by the wife which had ripened into a cause of action at the time of the filing of the cross-petition. Under the authority of Fuller v. Fuller, supra [41 N. J. Eq. 198, 3 Atl. 409], these facts are competent as a defense and are admissible in evidence for the purpose of barring the petitioner’s suit even though the right accrued after the filing of the original petition. And with the greater reason may these facts be interposed as a defense and be alleged by way of cross-petition for affirmative relief in a case where the right has accrued and the cause of action has become suable prior to the filing of the amended answer and cross-bill.
*647“In Martin v. Martin, 33 W. Va. 695, 11 S. E. 12, the petitioner sought a divorce on the ground of adultery. The defendant answered and filed a cross-bill praying for a divorce against the petitioner on the ground of desertion, although at the time of the filing of the original bill the statutory period of desertion had not elapsed. It had elapsed, however, before the defendant filed his cross-bill. . . . The court granted a decree on the cross-bill, stating in the opinion that ‘at the time the original bill was filed by the plaintiff the period of three years had not elapsed since the said plaintiff left the house of the defendant, and when that time did elapse he found it necessary to file his cross-bill in order to then allege wilful abandonment and desertion of himself by the defendant for three years as a ground for divorce from the said plaintiff. . . . This cross-bill was filed by said defendant for the purpose of obtaining relief which he could not have obtained by an answer in the original suit because at the time the said suit was brought the circumstances did not exist which would entitle him to relief, and this made the cross-bill necessary in order that this might be alleged and full relief might be granted the plaintiff in said cross-bill touching the matters of the original bill.’ ”
It is concluded that there was no error committed in permitting the defendant to file a counterclaim based upon a cause of action for divorce maturing after the original action was started, or in granting judgment upon this counterclaim.
By the Court. — Judgment affirmed.
Fairchild, J., took no part.