[{"data":1,"prerenderedAt":1331},["ShallowReactive",2],{"i-simple-icons:github":3,"i-lucide:arrow-right":8,"doc-\u002Fdocs\u002Felements\u002Fform":10,"docs-sidebar":1202,"i-lucide:file-text":1327,"i-lucide:arrow-left":1329},{"left":4,"top":4,"width":5,"height":5,"rotate":4,"vFlip":6,"hFlip":6,"body":7},0,24,false,"\u003Cpath fill=\"currentColor\" d=\"M12 .297c-6.63 0-12 5.373-12 12c0 5.303 3.438 9.8 8.205 11.385c.6.113.82-.258.82-.577c0-.285-.01-1.04-.015-2.04c-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729c1.205.084 1.838 1.236 1.838 1.236c1.07 1.835 2.809 1.305 3.495.998c.108-.776.417-1.305.76-1.605c-2.665-.3-5.466-1.332-5.466-5.93c0-1.31.465-2.38 1.235-3.22c-.135-.303-.54-1.523.105-3.176c0 0 1.005-.322 3.3 1.23c.96-.267 1.98-.399 3-.405c1.02.006 2.04.138 3 .405c2.28-1.552 3.285-1.23 3.285-1.23c.645 1.653.24 2.873.12 3.176c.765.84 1.23 1.91 1.23 3.22c0 4.61-2.805 5.625-5.475 5.92c.42.36.81 1.096.81 2.22c0 1.606-.015 2.896-.015 3.286c0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12\"\u002F>",{"left":4,"top":4,"width":5,"height":5,"rotate":4,"vFlip":6,"hFlip":6,"body":9},"\u003Cpath fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M5 12h14m-7-7l7 7l-7 7\"\u002F>",{"id":11,"title":12,"body":13,"description":1193,"extension":1194,"group":1195,"groupOrder":93,"meta":1196,"navTitle":1197,"navigation":1080,"order":199,"path":1198,"seo":1199,"stem":1200,"__hash__":1201},"docs\u002Fdocs\u002Felements\u002Fform.md","\u003Cwmcp-form>",{"type":14,"value":15,"toc":1184},"minimark",[16,23,44,312,322,327,524,544,548,698,722,726,857,906,910,932,1006,1025,1032,1048,1153,1169,1173,1180],[17,18,20],"h1",{"id":19},"wmcp-form",[21,22,12],"code",{},[24,25,26,27,30,31,35,36,39,40,43],"p",{},"Wrap a ",[21,28,29],{},"\u003Cform>"," to expose it as ",[32,33,34],"strong",{},"one"," WebMCP tool. Its ",[21,37,38],{},"inputSchema"," has one property per control ",[21,41,42],{},"name",", synthesized the way Chrome's declarative form API does it; calling the tool fills every control through the same validate-and-announce path a direct call would, then focuses the submit button for the person to review and submit.",[45,46,51],"pre",{"className":47,"code":48,"language":49,"meta":50,"style":50},"language-html shiki shiki-themes github-light-default ayu-dark","\u003Cwmcp-form name=\"booking\" label=\"Book a table\" expose>\n  \u003Cform>\n    \u003Cwmcp-input name=\"email\" label=\"Email\" type=\"email\" required>\u003C\u002Fwmcp-input>\n    \u003Cwmcp-select name=\"party\" label=\"Party size\">\n      \u003Coption value=\"2\">2 guests\u003C\u002Foption>\n      \u003Coption value=\"4\">4 guests\u003C\u002Foption>\n    \u003C\u002Fwmcp-select>\n    \u003Cwmcp-checkbox name=\"window\" label=\"Window seat\">\u003C\u002Fwmcp-checkbox>\n    \u003Cwmcp-button type=\"submit\">Book\u003C\u002Fwmcp-button>\n  \u003C\u002Fform>\n\u003C\u002Fwmcp-form>\n\u003C!-- registers one \"fill-booking\" tool with email, party and window as properties -->\n","html","",[21,52,53,91,102,142,166,197,222,232,260,286,296,305],{"__ignoreMap":50},[54,55,58,62,65,69,73,77,80,82,85,88],"span",{"class":56,"line":57},"line",1,[54,59,61],{"class":60},"sqV5G","\u003C",[54,63,19],{"class":64},"sfBZl",[54,66,68],{"class":67},"sI192"," name",[54,70,72],{"class":71},"siQKT","=",[54,74,76],{"class":75},"sxLuP","\"booking\"",[54,78,79],{"class":67}," label",[54,81,72],{"class":71},[54,83,84],{"class":75},"\"Book a table\"",[54,86,87],{"class":67}," expose",[54,89,90],{"class":60},">\n",[54,92,94,97,100],{"class":56,"line":93},2,[54,95,96],{"class":60},"  \u003C",[54,98,99],{"class":64},"form",[54,101,90],{"class":60},[54,103,105,108,111,113,115,118,120,122,125,128,130,132,135,138,140],{"class":56,"line":104},3,[54,106,107],{"class":60},"    \u003C",[54,109,110],{"class":64},"wmcp-input",[54,112,68],{"class":67},[54,114,72],{"class":71},[54,116,117],{"class":75},"\"email\"",[54,119,79],{"class":67},[54,121,72],{"class":71},[54,123,124],{"class":75},"\"Email\"",[54,126,127],{"class":67}," type",[54,129,72],{"class":71},[54,131,117],{"class":75},[54,133,134],{"class":67}," required",[54,136,137],{"class":60},">\u003C\u002F",[54,139,110],{"class":64},[54,141,90],{"class":60},[54,143,145,147,150,152,154,157,159,161,164],{"class":56,"line":144},4,[54,146,107],{"class":60},[54,148,149],{"class":64},"wmcp-select",[54,151,68],{"class":67},[54,153,72],{"class":71},[54,155,156],{"class":75},"\"party\"",[54,158,79],{"class":67},[54,160,72],{"class":71},[54,162,163],{"class":75},"\"Party size\"",[54,165,90],{"class":60},[54,167,169,172,175,178,180,183,186,190,193,195],{"class":56,"line":168},5,[54,170,171],{"class":60},"      \u003C",[54,173,174],{"class":64},"option",[54,176,177],{"class":67}," value",[54,179,72],{"class":71},[54,181,182],{"class":75},"\"2\"",[54,184,185],{"class":60},">",[54,187,189],{"class":188},"sBz_o","2 guests",[54,191,192],{"class":60},"\u003C\u002F",[54,194,174],{"class":64},[54,196,90],{"class":60},[54,198,200,202,204,206,208,211,213,216,218,220],{"class":56,"line":199},6,[54,201,171],{"class":60},[54,203,174],{"class":64},[54,205,177],{"class":67},[54,207,72],{"class":71},[54,209,210],{"class":75},"\"4\"",[54,212,185],{"class":60},[54,214,215],{"class":188},"4 guests",[54,217,192],{"class":60},[54,219,174],{"class":64},[54,221,90],{"class":60},[54,223,225,228,230],{"class":56,"line":224},7,[54,226,227],{"class":60},"    \u003C\u002F",[54,229,149],{"class":64},[54,231,90],{"class":60},[54,233,235,237,240,242,244,247,249,251,254,256,258],{"class":56,"line":234},8,[54,236,107],{"class":60},[54,238,239],{"class":64},"wmcp-checkbox",[54,241,68],{"class":67},[54,243,72],{"class":71},[54,245,246],{"class":75},"\"window\"",[54,248,79],{"class":67},[54,250,72],{"class":71},[54,252,253],{"class":75},"\"Window seat\"",[54,255,137],{"class":60},[54,257,239],{"class":64},[54,259,90],{"class":60},[54,261,263,265,268,270,272,275,277,280,282,284],{"class":56,"line":262},9,[54,264,107],{"class":60},[54,266,267],{"class":64},"wmcp-button",[54,269,127],{"class":67},[54,271,72],{"class":71},[54,273,274],{"class":75},"\"submit\"",[54,276,185],{"class":60},[54,278,279],{"class":188},"Book",[54,281,192],{"class":60},[54,283,267],{"class":64},[54,285,90],{"class":60},[54,287,289,292,294],{"class":56,"line":288},10,[54,290,291],{"class":60},"  \u003C\u002F",[54,293,99],{"class":64},[54,295,90],{"class":60},[54,297,299,301,303],{"class":56,"line":298},11,[54,300,192],{"class":60},[54,302,19],{"class":64},[54,304,90],{"class":60},[54,306,308],{"class":56,"line":307},12,[54,309,311],{"class":310},"s5O_a","\u003C!-- registers one \"fill-booking\" tool with email, party and window as properties -->\n",[24,313,314,315,318,319,321],{},"This is the form-level counterpart to per-control ",[21,316,317],{},"expose",". A twelve-field checkout becomes one tool call instead of twelve, which is how Chrome's WebMCP guidance says to budget an agent's context, and it is the shape agents are being taught to drive forms with. Controls inside may still carry their own ",[21,320,317],{}," when a single field needs to be adjustable on its own.",[323,324,326],"h2",{"id":325},"element-attributes","Element attributes",[328,329,330,349],"table",{},[331,332,333],"thead",{},[334,335,336,340,343,346],"tr",{},[337,338,339],"th",{},"Attribute",[337,341,342],{},"Type",[337,344,345],{},"Default",[337,347,348],{},"Description",[350,351,352,389,409,431,454,476,492,508],"tbody",{},[334,353,354,359,364,367],{},[355,356,357],"td",{},[21,358,42],{},[355,360,361],{},[21,362,363],{},"string",[355,365,366],{},"—",[355,368,369,370,373,374,377,378,381,382,384,385,388],{},"Identifier used for the default tool name: ",[21,371,372],{},"fill-\u003Cname>",", or ",[21,375,376],{},"submit-\u003Cname>"," with ",[21,379,380],{},"auto-submit",". Falls back to the form's ",[21,383,42],{}," or ",[21,386,387],{},"id",".",[334,390,391,396,400,402],{},[355,392,393],{},[21,394,395],{},"label",[355,397,398],{},[21,399,363],{},[355,401,366],{},[355,403,404,405,408],{},"Human-readable name of the form; the tool's ",[21,406,407],{},"title"," and the noun in its description.",[334,410,411,415,420,425],{},[355,412,413],{},[21,414,380],{},[355,416,417],{},[21,418,419],{},"boolean",[355,421,422],{},[21,423,424],{},"false",[355,426,427,428,388],{},"Submit after filling. Off by default: the agent fills, the submit button receives focus, and the person submits. Marks the tool ",[21,429,430],{},"consequentialHint: true",[334,432,433,438,442,446],{},[355,434,435],{},[21,436,437],{},"consequential",[355,439,440],{},[21,441,419],{},[355,443,444],{},[21,445,424],{},[355,447,448,449,451,452,388],{},"Mark the tool ",[21,450,430],{}," even without ",[21,453,380],{},[334,455,456,460,464,468],{},[355,457,458],{},[21,459,317],{},[355,461,462],{},[21,463,419],{},[355,465,466],{},[21,467,424],{},[355,469,470,471,388],{},"Register the ",[472,473,475],"a",{"href":474},"\u002Fdocs\u002Fwebmcp","WebMCP tool",[334,477,478,483,487,489],{},[355,479,480],{},[21,481,482],{},"tool-name",[355,484,485],{},[21,486,363],{},[355,488,366],{},[355,490,491],{},"Override the generated tool name.",[334,493,494,499,503,505],{},[355,495,496],{},[21,497,498],{},"tool-description",[355,500,501],{},[21,502,363],{},[355,504,366],{},[355,506,507],{},"Override the generated description.",[334,509,510,515,519,521],{},[355,511,512],{},[21,513,514],{},"agent-active",[355,516,517],{},[21,518,419],{},[355,520,366],{},[355,522,523],{},"Reflected (read-only) while an agent call is filling or submitting the form.",[24,525,526,527,529,530,533,534,533,537,540,541,543],{},"The inner ",[21,528,29],{}," may instead carry Chrome's own attributes — ",[21,531,532],{},"toolname",", ",[21,535,536],{},"tooldescription",[21,538,539],{},"toolautosubmit"," — and ",[21,542,12],{}," reads them. On a browser that implements the declarative API natively, a form annotated that way is left to the browser.",[323,545,547],{"id":546},"the-generated-schema","The generated schema",[328,549,550,560],{},[331,551,552],{},[334,553,554,557],{},[337,555,556],{},"Control",[337,558,559],{},"Property schema",[350,561,562,588,604,619],{},[334,563,564,572],{},[355,565,566,533,569],{},[21,567,568],{},"\u003Cwmcp-input>",[21,570,571],{},"\u003Cwmcp-textarea>",[355,573,574,577,578,581,582,585,586],{},[21,575,576],{},"{ type: 'string' }"," (",[21,579,580],{},"number"," for ",[21,583,584],{},"type=\"number\"","), description from ",[21,587,395],{},[334,589,590,598],{},[355,591,592,533,595],{},[21,593,594],{},"\u003Cwmcp-select>",[21,596,597],{},"\u003Cwmcp-radio-group>",[355,599,600,603],{},[21,601,602],{},"{ type: 'string', enum: [...] }"," of the live options",[334,605,606,614],{},[355,607,608,533,611],{},[21,609,610],{},"\u003Cwmcp-checkbox>",[21,612,613],{},"\u003Cwmcp-switch>",[355,615,616],{},[21,617,618],{},"{ type: 'boolean' }",[334,620,621,633],{},[355,622,623,624,533,627,533,630],{},"native ",[21,625,626],{},"\u003Cinput>",[21,628,629],{},"\u003Cselect>",[21,631,632],{},"\u003Ctextarea>",[355,634,635,636,638,639,642,643,638,646,533,649,652,653,656,657,660,661,533,664,666,667,660,669,672,673,638,676,638,679,682,683,686,687,690,691,694,695],{},"Chrome's mapping: ",[21,637,580],{},"\u002F",[21,640,641],{},"range"," → number with ",[21,644,645],{},"minimum",[21,647,648],{},"maximum",[21,650,651],{},"checkbox"," → boolean, ",[21,654,655],{},"radio"," group → ",[21,658,659],{},"enum"," + ",[21,662,663],{},"anyOf { const, title }",[21,665,629],{}," → ",[21,668,659],{},[21,670,671],{},"anyOf"," titled by option text, ",[21,674,675],{},"email",[21,677,678],{},"url",[21,680,681],{},"date"," → string with ",[21,684,685],{},"format","; description from ",[21,688,689],{},"toolparamdescription",", then the ",[21,692,693],{},"\u003Clabel>",", then ",[21,696,697],{},"aria-description",[24,699,700,703,704,707,708,711,712,533,715,533,718,721],{},[21,701,702],{},"required"," on a control puts its name in ",[21,705,706],{},"required[]",". Hidden, password, file and disabled controls, and buttons, are left out. ",[21,709,710],{},"\u003Cwmcp-*>"," controls contribute their schema through a small public protocol (",[21,713,714],{},"toolParameterSchema()",[21,716,717],{},"applyToolParameter(value)",[21,719,720],{},"validationMessage","), which any custom element can implement to take part.",[323,723,725],{"id":724},"tool-results","Tool results",[45,727,731],{"className":728,"code":729,"language":730,"meta":50,"style":50},"language-json shiki shiki-themes github-light-default ayu-dark","{\n  \"ok\": true,\n  \"message\": \"Filled 3 fields. The form is ready for the user to review and submit; it was not submitted.\",\n  \"filled\": { \"email\": \"ada@example.com\", \"party\": \"4\", \"window\": true },\n  \"ignored\": [],\n  \"invalid\": [],\n  \"submitted\": false,\n  \"autoSubmit\": false\n}\n","json",[21,732,733,738,753,765,807,819,830,842,852],{"__ignoreMap":50},[54,734,735],{"class":56,"line":57},[54,736,737],{"class":188},"{\n",[54,739,740,743,746,750],{"class":56,"line":93},[54,741,742],{"class":64},"  \"ok\"",[54,744,745],{"class":71},":",[54,747,749],{"class":748},"sQY3k"," true",[54,751,752],{"class":71},",\n",[54,754,755,758,760,763],{"class":56,"line":104},[54,756,757],{"class":64},"  \"message\"",[54,759,745],{"class":71},[54,761,762],{"class":75}," \"Filled 3 fields. The form is ready for the user to review and submit; it was not submitted.\"",[54,764,752],{"class":71},[54,766,767,770,772,775,777,779,782,785,788,790,793,795,798,800,802,805],{"class":56,"line":144},[54,768,769],{"class":64},"  \"filled\"",[54,771,745],{"class":71},[54,773,774],{"class":188}," { ",[54,776,117],{"class":64},[54,778,745],{"class":71},[54,780,781],{"class":75}," \"ada@example.com\"",[54,783,784],{"class":71},",",[54,786,787],{"class":64}," \"party\"",[54,789,745],{"class":71},[54,791,792],{"class":75}," \"4\"",[54,794,784],{"class":71},[54,796,797],{"class":64}," \"window\"",[54,799,745],{"class":71},[54,801,749],{"class":748},[54,803,804],{"class":188}," }",[54,806,752],{"class":71},[54,808,809,812,814,817],{"class":56,"line":168},[54,810,811],{"class":64},"  \"ignored\"",[54,813,745],{"class":71},[54,815,816],{"class":188}," []",[54,818,752],{"class":71},[54,820,821,824,826,828],{"class":56,"line":199},[54,822,823],{"class":64},"  \"invalid\"",[54,825,745],{"class":71},[54,827,816],{"class":188},[54,829,752],{"class":71},[54,831,832,835,837,840],{"class":56,"line":224},[54,833,834],{"class":64},"  \"submitted\"",[54,836,745],{"class":71},[54,838,839],{"class":748}," false",[54,841,752],{"class":71},[54,843,844,847,849],{"class":56,"line":234},[54,845,846],{"class":64},"  \"autoSubmit\"",[54,848,745],{"class":71},[54,850,851],{"class":748}," false\n",[54,853,854],{"class":56,"line":262},[54,855,856],{"class":188},"}\n",[24,858,859,860,862,863,867,868,870,871,874,875,878,879,881,882,885,886,889,890,533,892,895,896,899,900,388],{},"A control that fails validation after filling (its ",[21,861,702],{},", native constraints, or a ",[472,864,866],{"href":865},"\u002Fdocs\u002Fvalidation","Standard Schema"," on a ",[21,869,710],{}," control) comes back in ",[21,872,873],{},"invalid"," with its message and ",[21,876,877],{},"ok: false",", and an ",[21,880,380],{}," form is ",[32,883,884],{},"not"," submitted. Properties that match no control are listed in ",[21,887,888],{},"ignored",". With ",[21,891,380],{},[21,893,894],{},"submitted"," reports whether the form's ",[21,897,898],{},"submit"," event really fired, the same truthful contract as ",[472,901,903],{"href":902},"\u002Fdocs\u002Felements\u002Fbutton",[21,904,905],{},"\u003Cwmcp-button type=\"submit\">",[323,907,909],{"id":908},"agent-activity","Agent activity",[24,911,912,913,915,916,919,920,923,924,927,928,931],{},"While an agent call runs, the element reflects ",[21,914,514],{},", and the inner form carries ",[21,917,918],{},"tool-form-active"," (its submit button ",[21,921,922],{},"tool-submit-active",") until the form submits or resets. These attributes stand in for Chrome's ",[21,925,926],{},":tool-form-active"," and ",[21,929,930],{},":tool-submit-active"," pseudo-classes, which cannot be polyfilled; the default style draws a dashed ring around the form:",[45,933,937],{"className":934,"code":935,"language":936,"meta":50,"style":50},"language-css shiki shiki-themes github-light-default ayu-dark",":root {\n  --form-agent-ring: var(--brand);\n  --form-agent-ring-width: 2px;\n  --form-agent-ring-offset: 4px;\n}\n","css",[21,938,939,948,972,988,1002],{"__ignoreMap":50},[54,940,941,945],{"class":56,"line":57},[54,942,944],{"class":943},"sybcr",":root",[54,946,947],{"class":188}," {\n",[54,949,950,954,956,960,963,966,969],{"class":56,"line":93},[54,951,953],{"class":952},"sCHdd","  --form-agent-ring",[54,955,745],{"class":71},[54,957,959],{"class":958},"sAJRi"," var",[54,961,962],{"class":188},"(",[54,964,965],{"class":952},"--brand",[54,967,968],{"class":188},")",[54,970,971],{"class":71},";\n",[54,973,974,977,979,982,986],{"class":56,"line":104},[54,975,976],{"class":952},"  --form-agent-ring-width",[54,978,745],{"class":71},[54,980,981],{"class":748}," 2",[54,983,985],{"class":984},"s7jPt","px",[54,987,971],{"class":71},[54,989,990,993,995,998,1000],{"class":56,"line":144},[54,991,992],{"class":952},"  --form-agent-ring-offset",[54,994,745],{"class":71},[54,996,997],{"class":748}," 4",[54,999,985],{"class":984},[54,1001,971],{"class":71},[54,1003,1004],{"class":56,"line":168},[54,1005,856],{"class":188},[24,1007,1008,1009,1012,1013,1016,1017,1020,1021,1024],{},"The form also dispatches ",[21,1010,1011],{},"wmcp-tool-call"," (before filling, ",[21,1014,1015],{},"detail: { name, input }",") and ",[21,1018,1019],{},"wmcp-tool-result"," (after, ",[21,1022,1023],{},"detail: { name, result }","), so a page can log, animate, or react to agent-driven changes.",[323,1026,1028,1029],{"id":1027},"without-the-element-exposeform","Without the element: ",[21,1030,1031],{},"exposeForm()",[24,1033,1034,1035,1038,1039,1041,1042,1044,1045,745],{},"The same behaviour is available for ",[32,1036,1037],{},"any"," ",[21,1040,29],{}," on ",[32,1043,1037],{}," page, with no components, from ",[21,1046,1047],{},"@webmcpui\u002Fwebmcp\u002Fforms",[45,1049,1053],{"className":1050,"code":1051,"language":1052,"meta":50,"style":50},"language-ts shiki shiki-themes github-light-default ayu-dark","import { exposeForm, observeDeclarativeForms } from '@webmcpui\u002Fwebmcp\u002Fforms';\n\n\u002F\u002F One form, reading its toolname \u002F tooldescription \u002F toolautosubmit attributes:\nconst dispose = exposeForm(document.querySelector('form#support')!);\n\n\u002F\u002F Or polyfill the declarative API for the whole document:\nconst stop = observeDeclarativeForms();\n","ts",[21,1054,1055,1076,1082,1087,1127,1131,1136],{"__ignoreMap":50},[54,1056,1057,1060,1063,1065,1068,1071,1074],{"class":56,"line":57},[54,1058,1059],{"class":984},"import",[54,1061,1062],{"class":188}," { exposeForm",[54,1064,784],{"class":71},[54,1066,1067],{"class":188}," observeDeclarativeForms } ",[54,1069,1070],{"class":984},"from",[54,1072,1073],{"class":75}," '@webmcpui\u002Fwebmcp\u002Fforms'",[54,1075,971],{"class":71},[54,1077,1078],{"class":56,"line":93},[54,1079,1081],{"emptyLinePlaceholder":1080},true,"\n",[54,1083,1084],{"class":56,"line":104},[54,1085,1086],{"class":310},"\u002F\u002F One form, reading its toolname \u002F tooldescription \u002F toolautosubmit attributes:\n",[54,1088,1089,1092,1096,1100,1104,1107,1110,1113,1115,1118,1120,1123,1125],{"class":56,"line":144},[54,1090,1091],{"class":984},"const",[54,1093,1095],{"class":1094},"sgp7R"," dispose",[54,1097,1099],{"class":1098},"snFdW"," =",[54,1101,1103],{"class":1102},"s2DMw"," exposeForm",[54,1105,1106],{"class":188},"(document",[54,1108,388],{"class":1109},"s0eYM",[54,1111,1112],{"class":1102},"querySelector",[54,1114,962],{"class":188},[54,1116,1117],{"class":75},"'form#support'",[54,1119,968],{"class":188},[54,1121,1122],{"class":1098},"!",[54,1124,968],{"class":188},[54,1126,971],{"class":71},[54,1128,1129],{"class":56,"line":168},[54,1130,1081],{"emptyLinePlaceholder":1080},[54,1132,1133],{"class":56,"line":199},[54,1134,1135],{"class":310},"\u002F\u002F Or polyfill the declarative API for the whole document:\n",[54,1137,1138,1140,1143,1145,1148,1151],{"class":56,"line":224},[54,1139,1091],{"class":984},[54,1141,1142],{"class":1094}," stop",[54,1144,1099],{"class":1098},[54,1146,1147],{"class":1102}," observeDeclarativeForms",[54,1149,1150],{"class":188},"()",[54,1152,971],{"class":71},[24,1154,1155,1156,533,1159,1162,1163,1165,1166,1168],{},"This is a polyfill for Chrome's declarative API on top of the imperative one, filling the gap the W3C polyfill leaves open. What stays native-only: ",[21,1157,1158],{},"SubmitEvent.agentInvoked",[21,1160,1161],{},"SubmitEvent.respondWith()",", and the ",[21,1164,926],{}," \u002F ",[21,1167,930],{}," pseudo-classes. The declarative vocabulary left the WebMCP spec in October 2026 and is maintained as an explainer, so this entry point is kept separate from the core exposure layer.",[323,1170,1172],{"id":1171},"accessibility","Accessibility",[24,1174,1175,1176,1179],{},"The element renders a single ",[21,1177,1178],{},"\u003Cslot>"," and adds no ARIA of its own; the form and its controls keep their native semantics. Focusing the submit button after an agent fills the form tells screen-reader users where the agent left off.",[1181,1182,1183],"style",{},"html pre.shiki code .sqV5G, html code.shiki .sqV5G{--shiki-default:#1F2328;--shiki-dark:#39BAE680}html pre.shiki code .sfBZl, html code.shiki .sfBZl{--shiki-default:#116329;--shiki-dark:#39BAE6}html pre.shiki code .sI192, html code.shiki .sI192{--shiki-default:#0550AE;--shiki-dark:#FFB454}html pre.shiki code .siQKT, html code.shiki .siQKT{--shiki-default:#1F2328;--shiki-dark:#BFBDB6B3}html pre.shiki code .sxLuP, html code.shiki .sxLuP{--shiki-default:#0A3069;--shiki-dark:#AAD94C}html pre.shiki code .sBz_o, html code.shiki .sBz_o{--shiki-default:#1F2328;--shiki-dark:#BFBDB6}html pre.shiki code .s5O_a, html code.shiki .s5O_a{--shiki-default:#6E7781;--shiki-default-font-style:inherit;--shiki-dark:#5A6673;--shiki-dark-font-style:italic}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sQY3k, html code.shiki .sQY3k{--shiki-default:#0550AE;--shiki-dark:#D2A6FF}html pre.shiki code .sybcr, html code.shiki .sybcr{--shiki-default:#0550AE;--shiki-dark:#95E6CB}html pre.shiki code .sCHdd, html code.shiki .sCHdd{--shiki-default:#953800;--shiki-dark:#BFBDB6}html pre.shiki code .sAJRi, html code.shiki .sAJRi{--shiki-default:#0550AE;--shiki-dark:#F07178}html pre.shiki code .s7jPt, html code.shiki .s7jPt{--shiki-default:#CF222E;--shiki-dark:#FF8F40}html pre.shiki code .sgp7R, html code.shiki .sgp7R{--shiki-default:#0550AE;--shiki-dark:#BFBDB6}html pre.shiki code .snFdW, html code.shiki .snFdW{--shiki-default:#CF222E;--shiki-dark:#F29668}html pre.shiki code .s2DMw, html code.shiki .s2DMw{--shiki-default:#8250DF;--shiki-dark:#FFB454}html pre.shiki code .s0eYM, html code.shiki .s0eYM{--shiki-default:#1F2328;--shiki-dark:#F29668}",{"title":50,"searchDepth":93,"depth":93,"links":1185},[1186,1187,1188,1189,1190,1192],{"id":325,"depth":93,"text":326},{"id":546,"depth":93,"text":547},{"id":724,"depth":93,"text":725},{"id":908,"depth":93,"text":909},{"id":1027,"depth":93,"text":1191},"Without the element: exposeForm()",{"id":1171,"depth":93,"text":1172},"Expose a whole form as one WebMCP tool — the agent fills every field in a single call, the person reviews and submits.","md","Elements",{},"Form","\u002Fdocs\u002Felements\u002Fform",{"title":12,"description":1193},"docs\u002Felements\u002Fform","YgO34mS7Y2YP7npHFUGXcOk7ZZWw5-il3b2lCB7GjYU",[1203,1208,1212,1216,1220,1224,1227,1231,1232,1235,1239,1243,1247,1250,1253,1257,1261,1265,1268,1272,1275,1279,1283,1288,1291,1295,1299,1302,1306,1310,1314,1317,1320,1323,1325],{"path":1204,"title":1205,"navTitle":1206,"group":1207,"order":93,"groupOrder":144},"\u002Fdocs\u002Felements\u002Falert","\u003Cwmcp-alert>","Alert","Presentational",{"path":1209,"title":1210,"navTitle":1211,"group":1207,"order":104,"groupOrder":144},"\u002Fdocs\u002Felements\u002Favatar","\u003Cwmcp-avatar>","Avatar",{"path":1213,"title":1214,"navTitle":1215,"group":1207,"order":57,"groupOrder":144},"\u002Fdocs\u002Felements\u002Fbadge","\u003Cwmcp-badge>","Badge",{"path":902,"title":1217,"navTitle":1218,"group":1219,"order":57,"groupOrder":104},"\u003Cwmcp-button>","Button","Interaction",{"path":1221,"title":1222,"navTitle":1223,"group":1207,"order":199,"groupOrder":144},"\u002Fdocs\u002Felements\u002Fcard","\u003Cwmcp-card>","Card",{"path":1225,"title":610,"navTitle":1226,"group":1195,"order":144,"groupOrder":93},"\u002Fdocs\u002Felements\u002Fcheckbox","Checkbox",{"path":1228,"title":1229,"navTitle":1230,"group":1219,"order":93,"groupOrder":104},"\u002Fdocs\u002Felements\u002Fdialog","\u003Cwmcp-dialog>","Dialog",{"path":1198,"title":12,"navTitle":1197,"group":1195,"order":199,"groupOrder":93},{"path":1233,"title":568,"navTitle":1234,"group":1195,"order":57,"groupOrder":93},"\u002Fdocs\u002Felements\u002Finput","Input",{"path":1236,"title":1237,"navTitle":1238,"group":1219,"order":104,"groupOrder":104},"\u002Fdocs\u002Felements\u002Fmenu","\u003Cwmcp-menu>","Menu",{"path":1240,"title":1241,"navTitle":1242,"group":1219,"order":168,"groupOrder":104},"\u002Fdocs\u002Felements\u002Fpopover","\u003Cwmcp-popover>","Popover",{"path":1244,"title":1245,"navTitle":1246,"group":1207,"order":144,"groupOrder":144},"\u002Fdocs\u002Felements\u002Fprogress","\u003Cwmcp-progress>","Progress",{"path":1248,"title":597,"navTitle":1249,"group":1195,"order":168,"groupOrder":93},"\u002Fdocs\u002Felements\u002Fradio","Radio group",{"path":1251,"title":594,"navTitle":1252,"group":1195,"order":104,"groupOrder":93},"\u002Fdocs\u002Felements\u002Fselect","Select",{"path":1254,"title":1255,"navTitle":1256,"group":1207,"order":168,"groupOrder":144},"\u002Fdocs\u002Felements\u002Fseparator","\u003Cwmcp-separator>","Separator",{"path":1258,"title":1259,"navTitle":1260,"group":1207,"order":224,"groupOrder":144},"\u002Fdocs\u002Felements\u002Fskeleton","\u003Cwmcp-skeleton>","Skeleton",{"path":1262,"title":1263,"navTitle":1264,"group":1207,"order":234,"groupOrder":144},"\u002Fdocs\u002Felements\u002Fspinner","\u003Cwmcp-spinner>","Spinner",{"path":1266,"title":613,"navTitle":1267,"group":1219,"order":224,"groupOrder":104},"\u002Fdocs\u002Felements\u002Fswitch","Switch",{"path":1269,"title":1270,"navTitle":1271,"group":1219,"order":144,"groupOrder":104},"\u002Fdocs\u002Felements\u002Ftabs","\u003Cwmcp-tabs>","Tabs",{"path":1273,"title":571,"navTitle":1274,"group":1195,"order":93,"groupOrder":93},"\u002Fdocs\u002Felements\u002Ftextarea","Textarea",{"path":1276,"title":1277,"navTitle":1278,"group":1219,"order":199,"groupOrder":104},"\u002Fdocs\u002Felements\u002Ftoast","\u003Cwmcp-toast>","Toast",{"path":1280,"title":1281,"navTitle":1282,"group":1219,"order":234,"groupOrder":104},"\u002Fdocs\u002Felements\u002Ftooltip","\u003Cwmcp-tooltip>","Tooltip",{"path":1284,"title":1285,"navTitle":1286,"group":1287,"order":144,"groupOrder":168},"\u002Fdocs\u002Fexamples\u002Fbrain-dump","Brain-dump → to-do list","Brain-dump → to-dos","Examples",{"path":1289,"title":1290,"navTitle":1290,"group":1287,"order":168,"groupOrder":168},"\u002Fdocs\u002Fexamples\u002Fcrm-lead","Email → CRM lead",{"path":1292,"title":1293,"navTitle":1294,"group":1287,"order":224,"groupOrder":168},"\u002Fdocs\u002Fexamples\u002Fdashboard","Ask the dashboard a question","Dashboard control",{"path":1296,"title":1297,"navTitle":1298,"group":1287,"order":199,"groupOrder":168},"\u002Fdocs\u002Fexamples\u002Fexpense-report","Receipt → expense report","Receipt → expense",{"path":1300,"title":1287,"navTitle":1301,"group":1287,"order":57,"groupOrder":168},"\u002Fdocs\u002Fexamples","Overview",{"path":1303,"title":1304,"navTitle":1305,"group":1287,"order":93,"groupOrder":168},"\u002Fdocs\u002Fexamples\u002Frecipe-cart","Recipe → grocery cart","Recipe → cart",{"path":1307,"title":1308,"navTitle":1309,"group":1287,"order":104,"groupOrder":168},"\u002Fdocs\u002Fexamples\u002Frestaurant-booking","Book a table in one sentence","Restaurant booking",{"path":1311,"title":1312,"navTitle":1312,"group":1313,"order":199,"groupOrder":57},"\u002Fdocs\u002Fframeworks","React & Vue","Getting started",{"path":1315,"title":1316,"navTitle":1316,"group":1313,"order":57,"groupOrder":57},"\u002Fdocs","Introduction",{"path":1318,"title":1319,"navTitle":1319,"group":1313,"order":93,"groupOrder":57},"\u002Fdocs\u002Finstallation","Installation",{"path":1321,"title":1322,"navTitle":1322,"group":1313,"order":168,"groupOrder":57},"\u002Fdocs\u002Ftesting","Testing",{"path":865,"title":1324,"navTitle":1324,"group":1313,"order":104,"groupOrder":57},"Validation",{"path":474,"title":1326,"navTitle":1326,"group":1313,"order":144,"groupOrder":57},"WebMCP exposure",{"left":4,"top":4,"width":5,"height":5,"rotate":4,"vFlip":6,"hFlip":6,"body":1328},"\u003Cg fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\">\u003Cpath d=\"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z\"\u002F>\u003Cpath d=\"M14 2v5a1 1 0 0 0 1 1h5M10 9H8m8 4H8m8 4H8\"\u002F>\u003C\u002Fg>",{"left":4,"top":4,"width":5,"height":5,"rotate":4,"vFlip":6,"hFlip":6,"body":1330},"\u003Cpath fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"m12 19l-7-7l7-7m7 7H5\"\u002F>",1796013673687]