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

动态创建的link标签 id属性丢失 #485

Open
jack-le opened this issue Mar 30, 2023 · 0 comments
Open

动态创建的link标签 id属性丢失 #485

jack-le opened this issue Mar 30, 2023 · 0 comments

Comments

@jack-le
Copy link

jack-le commented Mar 30, 2023

描述bug
动态创建的link标签 id属性丢失

如何复现
给出详细的复现步骤
1、动态创建link 并插入到head中 document.createElement('Link').setAttr('src', 'link.css');
2、document.getElementById(id);
`
const link = document.createElement('Link')
link.setAttribute('src', 'https://wujie-micro.github.io/doc/assets/style.de48c47c.css')
link.setAttribute('id', 'testLink')
document.querySelectorAll('head')[0].appendChild(link)

 setTimeout(() => {
  console.log( document.getElementById('testLink'))
 },1000)

`

最小复现仓库或者地址
重要!!!,请尽量给出复现仓库,这样能极大加快bug解决速度

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant