This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 10267 - What happens if you delete an attribute? For the following test case, Chrome outputs "string undefined", while Firefox and Opera give "string string": data:text/html,<!doctype html><script>var el = document.createElement("a"); var type = typeof el.id; de
Summary: What happens if you delete an attribute? For the following test case, Chrome...
Status: CLOSED INVALID
Alias: None
Product: HTML WG
Classification: Unclassified
Component: pre-LC1 HTML5 spec (editor: Ian Hickson) (show other bugs)
Version: unspecified
Hardware: Other other
: P3 normal
Target Milestone: ---
Assignee: Ian 'Hixie' Hickson
QA Contact: HTML WG Bugzilla archive list
URL: http://www.whatwg.org/specs/web-apps/...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-30 00:03 UTC by contributor
Modified: 2010-10-04 14:27 UTC (History)
4 users (show)

See Also:


Attachments

Description contributor 2010-07-30 00:03:19 UTC
Section: http://www.whatwg.org/specs/web-apps/current-work/#reflecting-content-attributes-in-idl-attributes

Comment:
What happens if you delete an attribute?  For the following test case, Chrome
outputs "string undefined", while Firefox and Opera give "string string":
data:text/html,<!doctype html><script>var el = document.createElement("a");
var type = typeof el.id; delete el.id; alert(type + " " + typeof
el.id);</script>

Posted from: 68.175.61.233
Comment 1 Aryeh Gregor 2010-07-30 00:04:18 UTC
With manual newlines/spaces so it works reliably:

data:text/html,<!doctype html>
 <script>
 var el = document.createElement("a");
 var type = typeof el.id;
 delete el.id;
 alert(type + " " + typeof el.id);
 </script>
Comment 2 Aryeh Gregor 2010-07-30 00:44:13 UTC
I'm told this is a WebIDL issue.