-
Notifications
You must be signed in to change notification settings - Fork 50.4k
Add tagName to all overloaded DOM components #877
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Do you know why github diff is completely broken? |
|
Line endings change maybe? |
|
@vjeux Yes gah, installed something that messed up my git line ending settings, one sec I'll fix it. |
|
Nice, I like this diff |
|
Looks like this won't work if you rebase to a commit after descriptors. We can either do like diff --git a/src/browser/ReactDOM.js b/src/browser/ReactDOM.js
index 5cd3b35..2d6d9b7 100644
--- a/src/browser/ReactDOM.js
+++ b/src/browser/ReactDOM.js
@@ -47,6 +47,7 @@ function createDOMComponentClass(omitClose, tag) {
Constructor.prototype = new ReactDOMComponent(tag, omitClose);
Constructor.prototype.constructor = Constructor;
Constructor.displayName = tag;
+ Constructor.tagName = tag;
var ConvenienceConstructor = ReactDescriptor.createFactory(Constructor);and then do @sebmarkbage Do you have a preference between these? |
|
This will mess with the debugger that lists these twice. This seems wrong since these are not real DOM nodes it can mess with all kind of feature detection. The internal tests that used this are fixed by now. It uses a Let's just make ReactTestUtils.Simulate.x more permissive and let it be called on anything that can resolve getDOMNode. |
|
Let's do what @sebmarkbage said. I filed 1445. |
Fixes #1185.
#873
Putting this PR here for discussion, if we should keep
tagNamein overloaded DOM components or not.I chose to reference the initial tagName rather than redefine, compresses better and keeps them nicely in sync.