Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 28aafda

Browse files
committed
Add @readonly to the new properties
1 parent 9632cef commit 28aafda

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

lib/dom.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2120,20 +2120,23 @@ Document.prototype = {
21202120
* The number of child elements of the current document.
21212121
*
21222122
* @type {number}
2123+
* @readonly
21232124
*/
21242125
childElementCount: 0,
21252126

21262127
/**
21272128
* The first child element of the current document.
21282129
*
21292130
* @type {Element | null}
2131+
* @readonly
21302132
*/
21312133
firstElementChild: null,
21322134

21332135
/**
21342136
* The last child element of the current document.
21352137
*
21362138
* @type {Element | null}
2139+
* @readonly
21372140
*/
21382141
lastElementChild: null,
21392142

@@ -2407,20 +2410,23 @@ Element.prototype = {
24072410
* The number of child elements of this element.
24082411
*
24092412
* @type {number}
2413+
* @readonly
24102414
*/
24112415
childElementCount: 0,
24122416

24132417
/**
24142418
* An element's first child Element, or null if there are no child elements.
24152419
*
24162420
* @type {Element | null}
2421+
* @readonly
24172422
*/
24182423
firstElementChild: null,
24192424

24202425
/**
24212426
* An element's last child Element, or null if there are no child elements.
24222427
*
24232428
* @type {Element | null}
2429+
* @readonly
24242430
*/
24252431
lastElementChild: null,
24262432

@@ -2429,6 +2435,7 @@ Element.prototype = {
24292435
* if the specified element is the last one in the list.
24302436
*
24312437
* @type {Element | null}
2438+
* @readonly
24322439
*/
24332440
nextElementSibling: null,
24342441

@@ -2437,6 +2444,7 @@ Element.prototype = {
24372444
* if the specified element is the last one in the list.
24382445
*
24392446
* @type {Element | null}
2447+
* @readonly
24402448
*/
24412449
previousElementSibling: null,
24422450

@@ -2768,20 +2776,23 @@ DocumentFragment.prototype.nodeType = DOCUMENT_FRAGMENT_NODE;
27682776
* The amount of child elements the `DocumentFragment` has.
27692777
*
27702778
* @type {number}
2779+
* @readonly
27712780
*/
27722781
DocumentFragment.prototype.childElementCount = 0;
27732782
/**
27742783
* The Element that is the first child of the `DocumentFragment` object, or null if there is
27752784
* none.
27762785
*
27772786
* @type {Element | null}
2787+
* @readonly
27782788
*/
27792789
DocumentFragment.prototype.firstElementChild = null;
27802790
/**
27812791
* The Element that is the last child of the `DocumentFragment` object, or null if there is
27822792
* none.
27832793
*
27842794
* @type {Element | null}
2795+
* @readonly
27852796
*/
27862797
DocumentFragment.prototype.lastElementChild = null;
27872798
_extends(DocumentFragment, Node);

0 commit comments

Comments
 (0)