Partager via


add method

Creates a new namespace object and adds it to the collection.

Syntax

var ppNamespace = namespaces.add(bstrNamespace, bstrUrn, implementationUrl);

Parameters

  • bstrNamespace [in]
    Type: BSTR

    BSTR that specifies the name of the namespace.

  • bstrUrn [in, optional]
    Type: BSTR

    BSTR that specifies the URN of the namespace to create.

  • implementationUrl [in, optional]
    Type: VARIANT

    VARIANT that specifies the URL of the element behavior to import into the namespace. Specifying this parameter is the same as calling the IHTMLNamespace::doImport method.

  • ppNamespace [out, retval]
    Type: IDispatch

    Address of a pointer to an IDispatch interface that receives a namespace object.

Return value

Type: HRESULT

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

Adding a new namespace with the same name as an existing namespace will replace the existing namespace.

See also

namespaces

Conceptual

Introduction to Viewlink

About Element Behaviors