diff options
author | gman@google.com <gman@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-20 19:21:35 +0000 |
---|---|---|
committer | gman@google.com <gman@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-20 19:21:35 +0000 |
commit | 756ac71a81a5be5e4e1b23c2734b5631848fe0fc (patch) | |
tree | 68fbc1816ae4233f2258edc08ae3a0588393a477 /o3d/samples | |
parent | d900c2c753c9eb478a0229a21b31983ce00cc5d7 (diff) | |
download | chromium_src-756ac71a81a5be5e4e1b23c2734b5631848fe0fc.zip chromium_src-756ac71a81a5be5e4e1b23c2734b5631848fe0fc.tar.gz chromium_src-756ac71a81a5be5e4e1b23c2734b5631848fe0fc.tar.bz2 |
The compiled version of the o3djs libs WORK!
Sadly there is some really strange voodoo to make it work.
util.js was using document.getElementsByTagName('script')
and it was not returning all the scripts. Lots of dump()
lines later the voodoo of calling
document.getElementsByTagName('script').length (the length
is important) in some place earlier in the code fixes the
issue.
Also, added the copyright to the compiled file
Added parameter docs
Review URL: http://codereview.chromium.org/159049
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21085 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'o3d/samples')
-rw-r--r-- | o3d/samples/o3djs/base.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/o3d/samples/o3djs/base.js b/o3d/samples/o3djs/base.js index ff86e42..9b93ba4 100644 --- a/o3d/samples/o3djs/base.js +++ b/o3d/samples/o3djs/base.js @@ -188,6 +188,14 @@ o3djs.getObjectByName = function(name, opt_obj) { * @param {string} rule Rule to include, in the form o3djs.package.part. */ o3djs.require = function(rule) { + // TODO(gman): For some unknown reason, when we call + // o3djs.util.getScriptTagText_ it calls + // document.getElementsByTagName('script') and for some reason the scripts do + // not always show up. Calling it here seems to fix that as long as we + // actually ask for the length, at least in FF 3.5.1 It would be nice to + // figure out why. + var dummy = document.getElementsByTagName('script').length; + // if the object already exists we do not need do do anything if (o3djs.getObjectByName(rule)) { return; |