Open ghost opened 7 years ago
Any thought ?
There is a weird bug where seamless initialises postmessage under the 'pm' property of the window object. But in some cases where seamless is called directly by another script, the window object is not passed in. It kind of expects seamless to be called by the html document so that the script runs under the window context i.e. this = window
if you are using webpack try
const seamless = require('!raw-loader!seamless/build/seamless.parent.min.js');
eval.call(null, seamless.default);
or via a promise
import('!raw-loader!../../../node_modules/seamless/build/seamless.parent.min.js').then(rawModule => {
eval.call(null, rawModule.default);
When using either the parent or child version of seamless.js I get the following message in the console:
You must install the postmessage.js module to use seamless.js
. I did not find a mention of postmessage in the install instructions.I tried using
seamless.child.nopm.js
because I assumed that "nopm" would mean "no postmessage", but the result is the same.I am using Seamless 1.2.0.