Skip to content
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

页面中存在 <form><input name="tagName"></form>,录制会抛出 TypeError #56

Closed
revonia opened this issue Dec 21, 2020 · 2 comments
Labels
bug Something isn't working

Comments

@revonia
Copy link

revonia commented Dec 21, 2020

Hi,我在使用 rrweb 进行录制时遇到一种特殊情况,如果一个form中,有 name=tagName 的元素

<form><input name="tagName"></form>

会抛出 TypeError: e.toLowerCase is not a function,看起来是 serializeNode 中取 tagName 时,错误地取得了里面的 input 元素导致的

TypeError: e.toLowerCase is not a function
    at rrweb-snapshot.js:18
    at v (rrweb-snapshot.js:171)
    at g (rrweb-snapshot.js:360)
    at g (rrweb-snapshot.js:407)
    at g (rrweb-snapshot.js:407)
    at g (rrweb-snapshot.js:407)
    at L.o.blockClass (rrweb-snapshot.js:468)
    at L (index.ts:153)
    at P (index.ts:210)
    at Object.ue [as record] (index.ts:334)

这是复现代码:https://jsbin.com/mejocigero/edit?html,css,js,output

@Yuyz0112 Yuyz0112 added the bug Something isn't working label Dec 21, 2020
@Yuyz0112
Copy link
Member

看起来 form 有一个 OverrideBuiltins 行为 https://www.w3.org/TR/2011/WD-html5-author-20110809/the-form-element.html

@revonia
Copy link
Author

revonia commented Dec 24, 2020

谢谢!👏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants