Opened 10 years ago

Closed 10 years ago

#9353 closed defect (fixed)

[cla][patch] Better Element test for getComputedStyle

Reported by: Mark Wubben Owned by: James Burke
Priority: high Milestone: 1.3.2
Component: General Version: 1.3.0
Keywords: Cc: sjmiles, Douglas Hays, bill, Adam Peller
Blocked By: Blocking:

Description

gcs() in dojo._base.html tests if node instanceof HTMLElement, due to #6657 and #7467. I'm running into a situation where the Dojo code is loaded inside a Greasemonkey script context, and acting on the DOM tree of a different web page. Here the instanceof HTMLElement fails.

A better test would be to check if the nodeType of node equals 1, as is done in the IE branch of the code. See attached patch.

Attachments (1)

html.js.patch (741 bytes) - added by Mark Wubben 10 years ago.

Download all attachments as: .zip

Change History (7)

Changed 10 years ago by Mark Wubben

Attachment: html.js.patch added

comment:1 Changed 10 years ago by James Burke

Milestone: tbd1.4
Owner: changed from anonymous to James Burke

comment:2 Changed 10 years ago by James Burke

Resolution: fixed
Status: newclosed

(In [17631]) Fixes #9353: Fix from Mark Wubben (CLA on file) for a better node test that works in other environments like greasemonkey. \!strict for existing code

comment:3 Changed 10 years ago by Douglas Hays

Cc: Douglas Hays bill added

If we want to support Safari 4 in 1.3.x, this needs to be backported since this change fixes several problems with dijit/tests/_base/test_scroll.html using Safari 4.

comment:4 Changed 10 years ago by Douglas Hays

Cc: Adam Peller added
Milestone: 1.41.3.2
Resolution: fixed
Status: closedreopened

comment:5 Changed 10 years ago by Adam Peller

+1

comment:6 Changed 10 years ago by James Burke

Resolution: fixed
Status: reopenedclosed

Hmm svn out of sync. Fixed in [18385]: "Fixes #9353 in the 1.3 branch to help with Safari 4 issues. \!strict"

Note: See TracTickets for help on using tickets.