Skip to content

Question: Accessing modules living in different window object? #1865

@reezom

Description

@reezom

What is a good/proper/recommended way to access modules in a different window object?
For example, take the iframe scenario (assuming same domain) below:

module Container {
    export function magic() { /*...*/ };    
}
module Frame {
    function doContainerMagic() {
        window.parent.Container.magic(); // COMPILER ERROR
    }
}

"Casting to a module" seems not possible. Would #420 (modules implementing interface) provide a possible solution?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions