Opened 8 years ago

Closed 6 years ago

#17591 closed defect (patchwelcome)

vml detection should not assume a browser environment

Reported by: eradman Owned by: Eric Durocher
Priority: undecided Milestone: 1.13
Component: DojoX GFX Version: 1.9.1
Keywords: Cc:
Blocked By: Blocking:


Under dojo-1.8.3 my test config is structured like so:

// run.js
dojoConfig = {
        {name: 'doh', location: './src/util/doh'},
        {name: 'dojo', location: './src/dojo'},
        {name: 'dojox', location: './src/dojox'},
        {name: 'app', location: '../public'},

Which I run using:

node ./run.js load=doh

Were ui.js is contains the tests


var jsdom = require("jsdom").jsdom;

// test code;

With 1.8.5 and 1.9.1 I receive the following error:

0 'tests to run in' 0 'groups'
         0 tests in 0 groups
         0 errors
         0 failures

                                return vm.runInThisContext(__text, __urlHint);
TypeError: Cannot set property 'innerHTML' of undefined
    at Object.vml (/home/eradman/www/
    at req.has (/var/www/htdocs/dojo-release-1.8.5-src/dojo/dojo.js:135:72)
    at Object.load (/home/eradman/www/
    at injectPlugin (/var/www/htdocs/dojo-release-1.8.5-src/dojo/dojo.js:1312:13)
    at injectModule (/var/www/htdocs/dojo-release-1.8.5-src/dojo/dojo.js:1392:6)
    at forEach (/var/www/htdocs/dojo-release-1.8.5-src/dojo/dojo.js:93:6)
    at /var/www/htdocs/dojo-release-1.8.5-src/dojo/dojo.js:718:5
    at guardCheckComplete (/var/www/htdocs/dojo-release-1.8.5-src/dojo/dojo.js:1238:5)
    at injectDependencies (/var/www/htdocs/dojo-release-1.8.5-src/dojo/dojo.js:717:4)
    at /var/www/htdocs/dojo-release-1.8.5-src/dojo/dojo.js:1578:6

Somewhere between 1.8.3 and 1.8.5 the behavior changed. Perhaps I'm using DOH incorrectly.

Change History (4)

comment:1 Changed 8 years ago by ben hockey

Component: GeneralDojoX GFX
Owner: set to Patrick Ruzand
Status: newassigned

i see the problem... vml detection was added in but it isn't considering the case where the code might not be running in a browser.

eradman - to work around this, is there some way you can avoid loading dojox/gfx/renderer? (it's loaded by dojox/gfx in case that helps you)

comment:2 Changed 8 years ago by ben hockey

Summary: Running tests with Node.js broke after 1.8.3vml detection should not assume a browser environment

comment:3 Changed 8 years ago by Patrick Ruzand

Owner: changed from Patrick Ruzand to Eric Durocher

comment:4 Changed 6 years ago by dylan

Milestone: tbd1.12
Resolution: patchwelcome
Status: assignedclosed

Given that no one has shown interest in creating a patch in the past 2+ years, I'm closing this as patchwelcome. Please let us know if you would like to get involved in helping make this change to Dojo!

Note: See TracTickets for help on using tickets.