Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 64 additions & 8 deletions js-wixcode-sdk/$w/HtmlComponent.service.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,67 @@
"extra":
{ } },
"properties":
[ { "name": "scrolling",
[ { "name": "allow",
"labels": [],
"get": true,
"set": true,
"type": "string",
"locations":
[ { "lineno": 63,
[ { "lineno": 95,
"filename": "HtmlComponent.js" },
{ "lineno": 70,
{ "lineno": 102,
"filename": "HtmlComponent.js" } ],
"docs":
{ "summary": "Sets or gets the browser permissions for the HTML Component.",
"description":
[ "Setting the `allow` property controls which browser features and APIs",
" the HTML Component can access. This helps secure a site by restricting",
" what embedded content can do.",
"",
" The `allow` property accepts a string of permission names",
" separated by semicolons. The possible permissions include:",
"",
" + `camera`: Allows access to the camera.",
" + `encrypted-media`: Allows playback of encrypted media content using the Encrypted Media Extensions API. Required for DRM-protected content like premium video streaming services.",
" + `fullscreen`: Allows the HTML Component content to request fullscreen mode. By default, fullscreen isn't allowed unless explicitly permitted.",
"",
" For example: `\"camera; encrypted-media; fullscreen\"`",
"",
" Getting the `allow` property returns the current permissions",
" for the HTML Component.",
"",
"> **Note:** You can also set the `fullscreen` permission by calling the [`allowFullScreen()`](#allowFullScreen) function, ",
"> which automatically adds `fullscreen` to the existing `allow` property value." ],
"links": [],
"examples":
[ { "title": "Set permissions for encrypted media and fullscreen",
"body":
[ "$w(\"#videoPlayer\").allow = \"encrypted-media; fullscreen\";" ],
"extra":
{ } },
{ "title": "Get current permissions and check if camera is allowed",
"body":
[ "let permissions = $w(\"#myHtmlComponent\").allow;",
"console.log(\"Current permissions:\", permissions);",
"",
"if (permissions.includes(\"camera\")) {",
" console.log(\"Camera access is allowed\");",
"}" ],
"extra":
{ } } ],
"extra":
{ } },
"extra":
{ } },
{ "name": "scrolling",
"labels": [],
"get": true,
"set": true,
"type": "string",
"locations":
[ { "lineno": 62,
"filename": "HtmlComponent.js" },
{ "lineno": 69,
"filename": "HtmlComponent.js" } ],
"docs":
{ "summary": "Sets or gets whether the HTML Component displays scrollbars.",
Expand Down Expand Up @@ -110,13 +162,17 @@
"ret":
{ "type": "$w.HtmlComponent" },
"locations":
[ { "lineno": 222,
[ { "lineno": 257,
"filename": "HtmlComponent.js" } ],
"docs":
{ "summary": "Allows the HTML Component to be put into full screen mode.",
"description":
[ "By default, users cannot place the HTML Component in full screen mode. Calling",
" this function allows a user to place the HTML Component in full screen mode." ],
[ "By default, code can't place the HTML Component in full screen mode. Calling",
" this function allows code to place the HTML Component in full screen mode.",
"",
" This function automatically adds the `fullscreen` permission to the HTML Component's",
" [`allow`](#allow) property. You can also set fullscreen permissions directly",
" by including `\"fullscreen\"` in the `allow` property value." ],
"links": [],
"examples":
[ { "title": "Allow an HTML Component to be placed in full screen mode",
Expand All @@ -139,7 +195,7 @@
{ "type": "$w.HtmlComponent",
"doc": "The HTML Code element that triggered the event." },
"locations":
[ { "lineno": 169,
[ { "lineno": 204,
"filename": "HtmlComponent.js" } ],
"docs":
{ "summary": "Adds an event handler that runs when the HTML Component\n sends a message.",
Expand Down Expand Up @@ -270,7 +326,7 @@
"ret":
{ "type": "void" },
"locations":
[ { "lineno": 97,
[ { "lineno": 132,
"filename": "HtmlComponent.js" } ],
"docs":
{ "summary": "Sends a message to the HTML Component.",
Expand Down
5 changes: 3 additions & 2 deletions js-wixcode-sdk/$w/SearchButton.service.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,13 @@
"extra":
{ } },
{ "name": "customClassList",
"labels": [],
"labels":
[ "new" ],
"get": true,
"set": false,
"type": "$w.CustomClassList",
"locations":
[ { "lineno": 280,
[ { "lineno": 281,
"filename": "SearchButton.js" } ],
"docs":
{ "summary": "A property that represents an element's custom CSS classes.",
Expand Down
2 changes: 1 addition & 1 deletion js-wixcode-sdk/wix-window-frontend.service.json
Original file line number Diff line number Diff line change
Expand Up @@ -2560,4 +2560,4 @@
"labels": [] } ],
"extra":
{ "scopes":
[ "frontend" ] } }
[ "frontend" ] } }