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

[Help!]There is a problem that load the css in iframe #199

Open
q569608465 opened this issue Sep 18, 2015 · 0 comments
Open

[Help!]There is a problem that load the css in iframe #199

q569608465 opened this issue Sep 18, 2015 · 0 comments

Comments

@q569608465
Copy link

I have a tip module that is defined as this:

// tip.js
define(['jquery','css!./tips'],function ($) {
})

In the above module, I use the require-css plugin (version: 0.1.8), load tips.css that is in the same directory.

Then I define a base module that requires the tip module:

// base.js
define(['module','jquery','avalon', 'ui/tips'], function (module, $, avalon, bootstrap, tips){
});

and the web page has a iframe which will load a sub page, the sub page has a main module that requires the base module:

define(['jquery', 'base', function ($, Base){
$(function() { // sub page initialization script })
});

When the iframe start loading the sub page,the sub page has been waiting for the state, and
the Initialization script in sub page has not been executed!

But When I removed the 'css!./tips' dependency in tip.js , that is :

// removed the 'css!./tips' dependency
define(['jquery'],function ($) {
})

the initialization script can be executed when the iframe loaded the sub page.

The above problem appears in IE8 , IE9 and above are not.

I've been investigating the two days, is there someone who can help me look at this problem?

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

No branches or pull requests

1 participant