Today I spent quite a bit of time working on my ebay wordpress plugin. I was trying to the EPN custom Banner in a page, but loading it after the page had loaded. As it is the custom Banner code relies on document.write
, which delays the rest of the page loading until all the javascript has been downloaded, parsed, and executed.
The actual javascript file being called contained just one reference to document.write, so I was hoping that I could just pull the file contents in as a string (rather than js), strip off the document.write
, and then insert the contents of the document.write
into the page as HTML.
Unfortunately Same Origin Policy meant that this was impossible. I tried a large number of different things, even looking at external services such as YQL. But I couldn't work out anything that would work. One solution that should work, and I didn't try, was using the host site as a proxy. Possibly I will try that in the future.
Ebay had rejected my request to use "eBay" as part of the plugin name, so I spent quite a while renaming all the files, classes, database records etc. to do with the plugin. When this was done, I had another plugin that the eBay plugin partly relied on. So I decided to work on that and make sure that was working before I did any more work on the eBay plugin.
The other plugin is a lot smaller and simpler in scope, so I should hopefully be able to have the plugin up and running properly a lot quicker than it will take to finish off the ebay plugin. I did still have quite a few issues with this plugin that I was debugging today, and that will have to continue tomorrow now.
No comments:
Post a Comment