MCPcopy Create free account
hub / github.com/WebThingsIO/webthing-node / setHrefPrefix

Method setHrefPrefix

lib/thing.ts:176–188  ·  view source on GitHub ↗

* Set the prefix of any hrefs associated with this thing. * * @param {String} prefix The prefix

(prefix: string)

Source from the content-addressed store, hash-verified

174 * @param {String} prefix The prefix
175 */
176 setHrefPrefix(prefix: string): void {
177 this.hrefPrefix = prefix;
178
179 for (const property of Object.values(this.properties)) {
180 property.setHrefPrefix(prefix);
181 }
182
183 for (const actionName in this.actions) {
184 for (const action of this.actions[actionName]) {
185 action.setHrefPrefix(prefix);
186 }
187 }
188 }
189
190 /**
191 * Set the href of this thing's custom UI.

Callers 3

addPropertyMethod · 0.45
performActionMethod · 0.45
constructorMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected