Giter Club home page Giter Club logo

Comments (5)

ded avatar ded commented on July 26, 2024

gotcha. will investigate.

from script.js.

ded avatar ded commented on July 26, 2024

this should be fixed now.

from script.js.

Geist-zz avatar Geist-zz commented on July 26, 2024

Yes, it's working now, thank you.

There is, however, still one inconsistency - when script file doesn't exists (and is not empty ""):

$script("test", function() {
alert("Shows only in IE8");
});

/*$script("test");
$script("test", function() {
alert("Shows everywhere");
});*/

from script.js.

ded avatar ded commented on July 26, 2024

this was fixed :) aa7d59e

from script.js.

Geist-zz avatar Geist-zz commented on July 26, 2024

Recently tested (results below).
Quick summary:
Chrome has problem with empty script name (""),
FF4 with non-existing file,
IE8 is the best :)

Some thoughts:
Treat empty script name ("") as invalid (ex. replace "" with null/undefined), it's one special case less.
$script(""); in FF4 seems to load entire html document in head (or it's firebug problem).

-------------- Tests:
-browser - alert doesn't show only in that browser
+browser - alert shows only in that browser
+all - works in all browsers
tested with non-existing file ("test") / tested with existing file

// +ie8 / with existing file -chrome
/*$script("", function() {
$script("test", function() {
alert("test");
});
});

// as above
$script("test", function() {
$script("", function() {
alert("test");
});
});*/

// -------------------------------------------

// -FF4 / +all
/*$script("test", function() {
$script("test", function() {
alert("test");
});
});*/


//2. -FF4 / +all
/*$script("test", "test");
$script.ready("test", function() {
alert("test");
});

*/

// -FF4 / +all
/*$script("test", function() {
alert("test");
});*/

//---------------------------------------

//1. -chrome
/*$script("", function() {
$script("", function() {
alert("test");
});
});

// -chrome
$script("", "test");
$script.ready("test", function() {
alert("test");
});

//3. -chrome
/*$script("", function() {
alert("test");
});*/

from script.js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.