aboutsummaryrefslogtreecommitdiffstats
path: root/vid-webpack-master/src/app/shared/utils/iframe.service.ts
blob: 9a6636f4ef7841d328151dcf0ff2566c021d7617 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import {Injectable} from "@angular/core";

@Injectable()
export class IframeService {

  addClassOpenModal(elementClassName: string) {
    var parentBodyElement = parent.document.getElementsByClassName(elementClassName)[0];
    if (parentBodyElement)  {
      parentBodyElement.classList.add("modal-open");
    }
  }

  removeClassCloseModal(elementClassName: string) {
    var parentBodyElement = parent.document.getElementsByClassName(elementClassName)[0];
    if (parentBodyElement)  {
      parentBodyElement.classList.remove("modal-open");
    }
  }
}