create method

Creates a new XDomainRequest object.

 

Syntax

HRESULT retVal = object.create(ppxdr);

Parameters

Return value

Type: HRESULT

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

Examples

This method is called when the factory object is invoked with DISPID DISPATCH_CONSTRUCT. Such invocation creates and returns an object that supports the IHTMLXDomainRequest interface. The method is called explicitly on the factory object, or implicitly by use of the the new syntax. The following example demonstrates how this might be accomplished in script.

// Implicit create, with new
oXDomainRequest = new XDomainRequest();

// Explicit create, with factory object
factoryObj = window.XDomainRequest;
oXDomainRequest = factoryObj.create();

See also

Reference

IHTMLXDomainRequestFactory

IHTMLXDomainRequest

XDomainRequest