<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - "use strict"; delete ProgressEvent.length; should not throw"
href="https://bugs.webkit.org/show_bug.cgi?id=158062">158062</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>"use strict"; delete ProgressEvent.length; should not throw
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr>
<tr>
<th>Product</th>
<td>WebKit
</td>
</tr>
<tr>
<th>Version</th>
<td>WebKit Nightly Build
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Unspecified
</td>
</tr>
<tr>
<th>OS</th>
<td>Unspecified
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>Normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P2
</td>
</tr>
<tr>
<th>Component</th>
<td>JavaScriptCore
</td>
</tr>
<tr>
<th>Assignee</th>
<td>webkit-unassigned@lists.webkit.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>zcorpan@gmail.com
</td>
</tr></table>
<p>
<div>
<pre>See <a href="https://github.com/w3c/web-platform-tests/pull/3068">https://github.com/w3c/web-platform-tests/pull/3068</a>
This fails in WebKit:
<!DOCTYPE html>
<script>
"use strict";
try {
delete ProgressEvent.length;
w('PASS');
} catch(e) {
w('FAIL');
}
</script>
<a href="http://software.hixie.ch/utilities/js/live-dom-viewer/saved/4231">http://software.hixie.ch/utilities/js/live-dom-viewer/saved/4231</a>
Per ES6 deleting a function's "length" property should apparently not throw (even in strict mode). It throws in WebKit for a vanilla function:
<!DOCTYPE html>
<script>
"use strict";
var x = function(x) {};
try {
delete x.length;
w('PASS');
} catch(e) {
w('FAIL');
}
</script>
<a href="http://software.hixie.ch/utilities/js/live-dom-viewer/saved/4232">http://software.hixie.ch/utilities/js/live-dom-viewer/saved/4232</a>
Also, the ProgressEvent interface object is typeof "object" in WebKit but per WebIDL should be "function".
<!DOCTYPE html>
<script>
w(typeof ProgressEvent == "function" ? "PASS" : "FAIL");
</script>
<a href="http://software.hixie.ch/utilities/js/live-dom-viewer/saved/4233">http://software.hixie.ch/utilities/js/live-dom-viewer/saved/4233</a></pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>