diff --git a/test/image/strict-d3.js b/test/image/strict-d3.js index a35a80fddba..44197876c94 100644 --- a/test/image/strict-d3.js +++ b/test/image/strict-d3.js @@ -32,10 +32,10 @@ selProto.style = function() { if(sel.size()) { if(typeof obj === 'string') { - if(arguments.length === 1) { + if(arguments.length === 1 && !d3.event) { throw new Error('d3 selection.style called as getter: ' + - 'disallowed as it can fail for unattached elements. ' + - 'Use node.style.attribute instead.'); + 'disallowed outside event handlers as it can fail for ' + + 'unattached elements. Use node.style.attribute instead.'); } checkStyleVal(sel, obj, arguments[1]); } else {