Skip to content

plemont/iframe-rpc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

iframe-rpc

Provides the means to call functions within an iframe from the parent window, or vice-versa.

For example, setting up endpoint in iframe HTML:

// Create endpoint named 'iFrame' - should correspond with id of <iframe>
let rpc = plemont.IframeRpc.create(this, 'iFrame');

// Call 'add' function in the parent window, and print result
rpc.execute('parent', 'add', [1, 2])
    .then(result => {
      console.log(result);
    })
    .catch(error => {
      console.log('Error:' + error);
    });

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published