Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Short-circuit HAS_EXTENDED_CREATE_ELEMENT_SYNTAX #67

Closed
wants to merge 1 commit into from

2 participants

@victor-homyakov

HAS_EXTENDED_CREATE_ELEMENT_SYNTAX may be true only in IE8 and below (and is used only as a workaround for IE specific bug), so testing this feature in non-IE browsers doesn't have sense and only wastes time.

@victor-homyakov victor-homyakov Short-circuit HAS_EXTENDED_CREATE_ELEMENT_SYNTAX
HAS_EXTENDED_CREATE_ELEMENT_SYNTAX may be true only in IE8 and below (and is used only as a workaround for IE specific bug), so testing this feature in non-IE browsers doesn't have sense and only wastes time.
60c424b
@savetheclocktower
Collaborator

Probably, but the point of feature testing is that you don't trust the UA string and want to see for yourself.

I'm closing this for now. I'm open to a reassessment of our feature testing strategy; but if we want a change in policy, best to do it all at once rather than piecemeal. Keep this in mind for 1.8.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Sep 21, 2012
  1. @victor-homyakov

    Short-circuit HAS_EXTENDED_CREATE_ELEMENT_SYNTAX

    victor-homyakov authored
    HAS_EXTENDED_CREATE_ELEMENT_SYNTAX may be true only in IE8 and below (and is used only as a workaround for IE specific bug), so testing this feature in non-IE browsers doesn't have sense and only wastes time.
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  src/prototype/dom/dom.js
View
2  src/prototype/dom/dom.js
@@ -121,7 +121,7 @@
}
// IE requires that `name` and `type` attributes be set this way.
- var HAS_EXTENDED_CREATE_ELEMENT_SYNTAX = (function(){
+ var HAS_EXTENDED_CREATE_ELEMENT_SYNTAX = Prototype.Browser.IE && (function(){
try {
var el = document.createElement('<input name="x">');
return el.tagName.toLowerCase() === 'input' && el.name === 'x';
Something went wrong with that request. Please try again.