(name, value)
| 315 | return null; |
| 316 | }, |
| 317 | setAttribute(name, value) { |
| 318 | if (name.includes('[')) { |
| 319 | throw new Error('invalid characters'); |
| 320 | } |
| 321 | for (let i = 0; i < this.attributes.length; i++) { |
| 322 | if (this.attributes[i].name === name) { |
| 323 | this.attributes[i].value = value; |
| 324 | return; |
| 325 | } |
| 326 | } |
| 327 | this.attributes.push(new FakeAttr(name, value)); |
| 328 | }, |
| 329 | removeAttribute(name) { |
| 330 | for (let i = 0; i < this.attributes.length; i++) { |
| 331 | if (this.attributes[i].name === name) { |