MCPcopy Create free account
hub / github.com/Acode-Foundation/Acode / defineProperties

Function defineProperties

src/components/collapsableList.js:88–154  ·  view source on GitHub ↗
($el)

Source from the content-addressed store, hash-verified

86 }
87
88 function defineProperties($el) {
89 Object.defineProperties($el, {
90 $title: {
91 get() {
92 return $title;
93 },
94 },
95 $ul: {
96 get() {
97 return $ul;
98 },
99 },
100 ontoggle: {
101 get() {
102 return options.ontoggle;
103 },
104 set(fun) {
105 if (typeof fun === "function") options.ontoggle = fun;
106 },
107 },
108 collapse: {
109 get() {
110 return collapse || (() => {});
111 },
112 set(fun) {
113 if (typeof fun === "function") collapse = fun;
114 },
115 },
116 expand: {
117 get() {
118 return expand || (() => {});
119 },
120 set(fun) {
121 if (typeof fun === "function") expand = fun;
122 },
123 },
124 collapsed: {
125 get() {
126 return $mainWrapper.classList.contains("hidden");
127 },
128 },
129 unclasped: {
130 get() {
131 return !this.collapsed;
132 },
133 },
134 onscroll: {
135 get() {
136 return onscroll;
137 },
138 set(fun) {
139 if (typeof fun === "function") {
140 onscroll = fun;
141 }
142 },
143 },
144 scrollTop: {
145 get() {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected