MCPcopy Index your code
hub / github.com/nodejs/node / button

Method button

deps/v8/tools/js/web-api-helper.mjs:229–238  ·  view source on GitHub ↗
(label, clickHandler)

Source from the content-addressed store, hash-verified

227 }
228
229 static button(label, clickHandler) {
230 const button = DOM.element('button');
231 button.innerText = label;
232 if (typeof clickHandler != 'function') {
233 throw new Error(
234 `DOM.button: Expected function but got clickHandler=${clickHandler}`);
235 }
236 button.onclick = clickHandler;
237 return button;
238 }
239
240 static div(options) {
241 return this.element('div', options);

Callers 2

addRowMethod · 0.80
_createFooterMethod · 0.80

Calls 1

elementMethod · 0.45

Tested by

no test coverage detected