Skip to main content

configure_frame_depth

Function configure_frame_depth 

Source
pub(crate) fn configure_frame_depth(global: &Rc<RefCell<Scope>>, depth: u32)
Expand description

フレーム階層深さ(0 = 最上位ページ、1.. = 子 <iframe>)に応じて window.parent / window.top を設定する。 子 <iframe> 内では window.self !== window.parent および window.self !== window.top が真となり、 window.parent.postMessage(...) で親フレームへメッセージを送れる(YouTube 埋め込みの IFrame Player API 等)。