Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compatibility for better simulator reloads #78

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open

Conversation

yofreke
Copy link
Contributor

@yofreke yofreke commented Jul 28, 2015

This fixes the problem where multiple requests would be made for a dynamically loaded
file. It also allows for squashing of equivalent sources with different http paths
(eg. "http://mysite.com/modules/x.js" and "modules/x.js")
@@ -370,6 +363,17 @@
this.eval = function(code, path) {};
this.fetch = function(path) { return contentsOfPath; };
this.log = function(args...) {};

this.getNamespace = function(key) { return CONFIG.shortName + ':' + key };
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe getNamespace should live outside of jsio since it seems to be devkit-specific

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there no way to identify a running jsio app? Seems like there must be (I thought CONFIG was from jsio not devkit)

@@ -677,7 +923,7 @@
return possibilities[i];
}

if (path in failedFetch) { possibilities.splice(i--, 1); }
if (ENV.hasFetchFailed(path)) { possibilities.splice(i--, 1); }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why are these functions moving into ENV?

@mgh
Copy link
Contributor

mgh commented Aug 6, 2015

I don't understand the concept of namespaces. Maybe it's the function calling convention: getNamespace('preserveCache') seems like it should return a namespace called preserveCache.

What's a namespace and how might it be used?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants