Open wskorodecki opened 8 years ago
I investigated and debug mode shows that these errors appear because the first script https://static.xx.fbcdn.net/rsrc.php/v2/y-/r/wytNyhRQgmX.js?myParam=myValue is not loaded.
It's not loaded because it seems there is a CORS issue, because of the crossorigin attribute on the <script>
element (crossorigin="anonymous"). When this attribute is removed, the redirection is made and all work as expected.
Perhaps something is missing in the changeUrl() implementation?
Perhaps something is missing in the changeUrl() implementation?
I've found newChannel2()
, newChannelFromURI2()
methods which are newer versions of the methods currently being used in SlimerJS. Perhaps they will allow to fix this bug but I don't know how to use them properly.
More info here:
https://dxr.mozilla.org/mozilla-central/source/netwerk/base/nsILoadInfo.idl
https://lists.mozilla.org/pipermail/dev-platform/2015-May/010063.html
which are newer versions of the methods currently being used in SlimerJS
I don't use newChannel()
I don't use newChannel()
I've found it in the following files:
src/modules/addon-sdk/sdk/deprecated/tab-browser.js
method getChromeURLContents()
src/modules/addon-sdk/sdk/net/url.js
methods readAsync()
and readURISync()
src/modules/addon-sdk/sdk/url.js
function toFilename()
src/modules/slUtils.jsm
method readChromeFile()
so you mean that these files are not a part of SlimerJS?
src/modules/addon-sdk are external libs, not developed by myself, and both, readChromeFile() and the addon-sdk, are not used for the feature on which there is the bug.
I have problems when I use changeUrl() method to redirect each main resource (page) and JavaScript resources to a new URL (the same but with added query string parameters). This method breaks the flow of dependency injection. It does occur only on websites which are using inline require() method. Facebook is a good example, because there is
<script>require("TimeSlice")
(line 11). I could not find any other examples.versions
Steps to reproduce the issue
Test script
Actual results:
Expected results:
No errors.