This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
I realize there's an import coming. I am not sure that import (?) does the same thing as an include would. my purpose for the include would be to simply include a js file as if it were part of a library, not a package. I have some js pieces that are dependent upon others. for example: I have a /zeropad.js library. it is used by both the /dollar-commas.js and /time-funcs.js library. /time-funcs.js wants to include /atoi64.js, /zeropad.js, etc. I consider this basic language functionality. I am surprised java doesn't already have this - it would be extremely useful for large projects and preventing duplication of code and code maintenance headaches (fore instance, having to maintain 2 copies of a function instead of just 1). why wasn't this in he language before? c/c++ has it. lots of languages have it. include '/zeropad.js'; or maybe it would take a comma-separated list of arguments (where the items are included in order) like this: include('/atoi64.js','/getid.js','/zeropad.js','/time-funcs.js','/dollar-commas.js','/getmathfield.js'); would be common for me.
I just found this page confirming the need for an include statement. import does not equal include. http://www.coderanch.com/t/393854/java/java/import-include
I suppose a person could even do something like: include('/atoi64.js,/getid.js,/zeropad.js,/time-funcs.js,/dollar-commas.js,/getmathfield.js'.split(',')); maybe taking an array of strings as a parameter would be a nice flexibility option.
This is outside the scope of the JavaScript / Web ECMAScript spec. See <http://javascript.spec.whatwg.org/#goals>. To propose new features to the ECMAScript language, please file a bug on https://bugs.ecmascript.org/.