mirror of
https://github.com/lightpanda-io/browser.git
synced 2026-03-31 17:39:46 +00:00
Follow up to https://github.com/lightpanda-io/browser/pull/1495 which introduced the concept of a fast getter. This commit expands the new behavior to all comptime-known scalar getters. It also leverages the new `v8__FunctionTemplate__New__Config` to 1 - flag fast getters as having no side effect 2 - set the length (arity) on all functions
20 lines
590 B
HTML
20 lines
590 B
HTML
<!DOCTYPE html>
|
|
<body></body>
|
|
<script src="../testing.js"></script>
|
|
<script id=createElement>
|
|
testing.expectEqual(1, document.createElement.length);
|
|
|
|
const div1 = document.createElement('div');
|
|
testing.expectEqual(true, div1 instanceof HTMLDivElement);
|
|
testing.expectEqual("DIV", div1.tagName);
|
|
div1.id = "hello";
|
|
testing.expectEqual(null, $('#hello'));
|
|
|
|
const div2 = document.createElement('DIV');
|
|
testing.expectEqual(true, div2 instanceof HTMLDivElement);
|
|
|
|
document.getElementsByTagName('body')[0].appendChild(div1);
|
|
testing.expectEqual(div1, $('#hello'));
|
|
</script>
|
|
|