TypeError: "parameter 1 is not of type "Element"." on Firefox.
See original GitHub issue- I have searched the issues of this repository and believe that this is not a duplicate.
Reproduction link
https://testbdweb.educoder.net/ec_courses/148/ec_course_support_setting
Steps to reproduce
I am using this code in a dynamic form. And I got the error on firefox when the form init. The code works fine on Chrome. Any ideas? Thanks.
{getFieldDecorator(`target_contents[${k}]`, {
// validateTrigger: ['onChange', 'onBlur'],
rules: [{
required: true,
// whitespace: true,
message: "请填入目标内容",
}],
})(
<TextArea autosize placeholder="" style={{ width: '100%', marginRight: 8 }} />
)}
/**
* Starts observing provided element.
*
* @param {Element} target - Element to be observed.
* @returns {void}
*/
ResizeObserverSPI.prototype.observe = function (target) {
if (!arguments.length) {
throw new TypeError('1 argument required, but only 0 present.');
}
// Do nothing if current environment doesn't have the Element interface.
if (typeof Element === 'undefined' || !(Element instanceof Object)) {
return;
}
if (!(target instanceof getWindowOf(target).Element)) {
throw new TypeError('parameter 1 is not of type "Element".');
}
What is expected?
no error.
What is actually happening?
got error: TypeError: “parameter 1 is not of type “Element”.”
observe ResizeObserver.es.js:778 e ResizeObserver.es.js:916 value TextArea.js:148 value TextArea.js:122 br react-dom.production.min.js:229 gr react-dom.production.min.js:220 vr react-dom.production.min.js:219 pr react-dom.production.min.js:216 ir react-dom.production.min.js:214
Environment | Info |
---|---|
antd | 3.11.6 |
React | 16.3.0-alpha.2 |
System | windows10 |
Browser | firefox 65.0.1 |
website id and password : kosasa33! open the website and click edit button.
Issue Analytics
- State:
- Created 5 years ago
- Comments:21 (8 by maintainers)
Top Results From Across the Web
'observe' on 'MutationObserver': parameter 1 is not of type 'Node'
This error means that document.querySelectorAll(".no")[2] is not a Node . Most likely this means there isn't such an element; ...
Read more >TypeError: More arguments needed - JavaScript | MDN
There is an error with how a function is called. More arguments need to be provided. Examples. Required arguments not provided. The Object....
Read more >TypeError: "x" is not a function - JavaScript - MDN Web Docs
The JavaScript exception "is not a function" occurs when there was an attempt to call a value from a function, but the value...
Read more >TypeError - JavaScript - MDN Web Docs
A TypeError may be thrown when: an operand or argument passed to a function is incompatible with the type expected by that operator...
Read more >TypeError: can't assign to property "x" on "y": not an object
The problem might be that an unexpected value is flowing at an unexpected place, or that an object variant of a String or...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
不好意思,是我们自己的问题。 应该基本确定问题了,是有全局加载的js覆盖掉了Window.Element,会导致这个判断通不过:
if (!(target instanceof getWindowOf(target).Element)) {
https://github.com/souporserious/react-measure/issues/76#issuecomment-358448544 https://github.com/deepsweet/hocs/issues/15
something related from google.