### Get ready state Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/document Indicates the current loading state of the document. ```TypeScript readyState: DocumentReadyState ``` -------------------------------- ### Get implementation object Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/document Retrieves the DOMImplementation object for the current document. ```TypeScript implementation: DOMImplementation ``` -------------------------------- ### Get all visuals Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/page.page Retrieves a list of all visuals contained on the page. ```javascript page.getVisuals() .then(visuals => { ... }); ``` -------------------------------- ### Get bookmarks Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/bookmarksmanager.bookmarksmanager Retrieves all bookmarks defined in the report. ```javascript // Gets bookmarks that are defined in the report bookmarksManager.getBookmarks() .then(bookmarks => { ... }); ``` ```typescript function getBookmarks(): Promise ``` -------------------------------- ### Get owner document Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/document Returns the owner document. ```TypeScript ownerDocument: null ``` -------------------------------- ### Get fullscreenElement Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/document Returns the document's fullscreen element. ```TypeScript fullscreenElement: null | Element ``` -------------------------------- ### Get Selection Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/window Returns the current selection object. ```TypeScript function getSelection(): null | Selection ``` -------------------------------- ### getVisualByName(string) Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/page.page Gets a visual by name on the page. ```APIDOC ## page.getVisualByName(visualName: string) ### Description Gets a visual by name on the page. ### Parameters - **visualName** (string) - Required - The name of the visual to retrieve. ``` -------------------------------- ### Event handler onanimationstart Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/document Fires when a CSS animation starts. ```TypeScript onanimationstart: null | (this: GlobalEventHandlers, ev: AnimationEvent) => any ``` -------------------------------- ### getSlicers() Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/page.page Gets the list of slicer visuals on the page. ```APIDOC ## page.getSlicers() ### Description Gets the list of slicer visuals on the page. ### Method page.getSlicers() ``` -------------------------------- ### onplaying Event Handler Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/document Occurs when the audio or video has started playing. ```TypeScript onplaying: null | (this: GlobalEventHandlers, ev: Event) => any ``` -------------------------------- ### Get document timeline Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/document Accesses the document's timeline. ```TypeScript timeline: DocumentTimeline ``` -------------------------------- ### Define startPosition property Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-models/iswipeevent Represents the starting position of the swipe event as an IPosition object. ```TypeScript startPosition: IPosition ``` -------------------------------- ### Get visual by name Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/page.page Retrieves a specific visual object on the page using its name. ```javascript page.getVisualByName(visualName: string) .then(visual => { ... }); ``` -------------------------------- ### Get dataset ID Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/create.create Gets the dataset ID from the createConfig or embed URL. ```typescript function getId(): string ``` -------------------------------- ### open() Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/document Methods for opening new windows or documents. ```APIDOC ## open(url: string | URL, name: string, features: string) ### Description Opens a new window and loads a document specified by a given URL. ### Parameters - **url** (string | URL) - The URL to load. - **name** (string) - The window name. - **features** (string) - Window features. ### Returns - **null | Window** - The opened window or null. ## open(unused1?: string, unused2?: string) ### Description Opens a new window that uses the url parameter and the name parameter to collect the output of the write method and the writeln method. ### Parameters - **unused1** (string) - Optional. - **unused2** (string) - Optional. ### Returns - **Document** - The opened document. ``` -------------------------------- ### Get visibility state Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/document Indicates the current visibility state of the document. ```TypeScript visibilityState: DocumentVisibilityState ``` -------------------------------- ### wpmpFactory Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/factories Creates an instance of WindowPostMessageProxy. ```APIDOC ## wpmpFactory(string, boolean, Window) ### Description Creates and returns a WindowPostMessageProxy instance. ### Signature `function wpmpFactory(name?: string, logMessages?: boolean, eventSourceOverrideWindow?: Window): WindowPostMessageProxy` ### Parameters - **name** (string) - Optional - **logMessages** (boolean) - Optional - **eventSourceOverrideWindow** (Window) - Optional ### Returns - **WindowPostMessageProxy** ``` -------------------------------- ### Building the Top N filter Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/filterbuilders.topnfilterbuilder.topnfilterbuilder Finalizes the configuration and creates the TopNFilter instance. ```JavaScript const topNFilterBuilder = new TopNFilterBuilder().build(); ``` ```TypeScript function build(): TopNFilter ``` -------------------------------- ### nodeValue Property Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/htmliframeelement Gets or sets the value of the node. ```TypeScript nodeValue: null | string ``` -------------------------------- ### onloadstart event handler Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/window Occurs when the browser begins looking for media data. ```TypeScript onloadstart: null | (this: GlobalEventHandlers, ev: Event) => any ``` -------------------------------- ### Get or set document URL Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/document Accesses the URL of the current document. ```TypeScript URL: string ``` -------------------------------- ### build() Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/filterbuilders.basicfilterbuilder.basicfilterbuilder Creates and returns the configured BasicFilter object. ```APIDOC ### build() Creates the Basic filter based on the current configuration. #### Returns - **BasicFilter** - The constructed filter object. ``` -------------------------------- ### play(BookmarksPlayMode) Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/bookmarksmanager.bookmarksmanager Enters or exits bookmarks presentation mode. ```APIDOC ## play(playMode: BookmarksPlayMode) ### Description Play bookmarks: Enter or Exit bookmarks presentation mode. ### Parameters - **playMode** (BookmarksPlayMode) - Required - Play mode can be either `Presentation` or `Off`. ### Returns - **Promise>** - A promise that resolves when the play mode has been set. ``` -------------------------------- ### Play bookmarks Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/bookmarksmanager.bookmarksmanager Enters or exits bookmarks presentation mode. ```javascript // Enter presentation mode. bookmarksManager.play(BookmarksPlayMode.Presentation) ``` ```typescript function play(playMode: BookmarksPlayMode): Promise> ``` -------------------------------- ### Get elements by namespace Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/htmliframeelement Retrieves a collection of elements matching the specified namespace and local name. ```TypeScript function getElementsByTagNameNS(namespaceURI: "http://www.w3.org/1999/xhtml", localName: string): HTMLCollectionOf ``` ```TypeScript function getElementsByTagNameNS(namespaceURI: "http://www.w3.org/2000/svg", localName: string): HTMLCollectionOf ``` ```TypeScript function getElementsByTagNameNS(namespace: null | string, localName: string): HTMLCollectionOf ``` -------------------------------- ### new Create() Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/create.create Constructor to initialize a new Power BI report creator component. ```APIDOC ## new Create(service, element, config, phasedRender, isBootstrap) ### Description Initializes a new instance of the Create class. ### Parameters - **service** (Service) - Required - The Power BI service instance. - **element** (HTMLElement) - Required - The DOM element to embed the report creator into. - **config** (IEmbedConfiguration | IReportCreateConfiguration) - Required - The configuration object for the report creation. - **phasedRender** (boolean) - Optional - Whether to use phased rendering. - **isBootstrap** (boolean) - Optional - Whether the component is in bootstrap mode. ``` -------------------------------- ### fetch Method Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/window Initiates a network request to fetch a resource. ```TypeScript function fetch(input: URL | RequestInfo, init?: RequestInit): Promise ``` -------------------------------- ### Retrieve scripts collection Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/document Gets all script objects in the document. ```TypeScript scripts: HTMLCollectionOf ``` -------------------------------- ### nonce Property Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/htmliframeelement Gets or sets the cryptographic nonce for the element. ```TypeScript nonce?: string ``` -------------------------------- ### routerFactory Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/factories Creates an instance of Router. ```APIDOC ## routerFactory(WindowPostMessageProxy) ### Description Creates and returns a Router instance. ### Signature `function routerFactory(wpmp: WindowPostMessageProxy): Router` ### Parameters - **wpmp** (WindowPostMessageProxy) - Required ### Returns - **Router** ``` -------------------------------- ### applyState(string) Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/bookmarksmanager.bookmarksmanager Applies a bookmark state to the report. ```APIDOC ## applyState(state: string) ### Description Apply a bookmark state to the report. ### Parameters - **state** (string) - Required - A base64 bookmark state to be applied. ### Returns - **Promise>** - A promise that resolves when the state has been applied. ``` -------------------------------- ### lang Property Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/htmliframeelement Gets or sets the language attribute of the element. ```TypeScript lang: string ``` -------------------------------- ### innerText Property Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/htmliframeelement Gets or sets the text content of the element. ```TypeScript innerText: string ``` -------------------------------- ### Create Element Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/document Creates instances of HTML elements. ```TypeScript function createElement(tagName: string, options?: ElementCreationOptions): HTMLElement ``` ```TypeScript function createElement(tagName: K, options?: ElementCreationOptions): HTMLElementTagNameMap[K] ``` ```TypeScript function createElement(tagName: K, options?: ElementCreationOptions): HTMLElementDeprecatedTagNameMap[K] ``` -------------------------------- ### Get referrer URL Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/document Retrieves the URL that referred the user to the current page. ```TypeScript referrer: string ``` -------------------------------- ### innerHTML Property Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/htmliframeelement Gets or sets the HTML content of the element. ```TypeScript innerHTML: string ``` -------------------------------- ### Build Top N filter Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/filterbuilders.topnfilterbuilder.topnfilterbuilder Finalizes the configuration and creates the Top N filter object. ```javascript const topNFilterBuilder = new TopNFilterBuilder().build(); ``` -------------------------------- ### getFilters() Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/page.page Gets all page level filters within the report. ```APIDOC ## page.getFilters() ### Description Gets all page level filters within the report. ### Method page.getFilters() ``` -------------------------------- ### focus() Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/window Moves the focus to the window's browsing context. ```APIDOC ## focus() ### Description Moves the focus to the window's browsing context, if any. ``` -------------------------------- ### createImageBitmap Methods Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/window Creates an ImageBitmap from a given source, with optional cropping or configuration. ```TypeScript function createImageBitmap(image: ImageBitmapSource, options?: ImageBitmapOptions): Promise ``` ```TypeScript function createImageBitmap(image: ImageBitmapSource, sx: number, sy: number, sw: number, sh: number, options?: ImageBitmapOptions): Promise ``` -------------------------------- ### Create Basic filter Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/filterbuilders.basicfilterbuilder.basicfilterbuilder Finalizes the builder configuration to create a Basic filter instance. ```javascript const basicFilterBuilder = new BasicFilterBuilder().build(); ``` ```typescript function build(): BasicFilter ``` -------------------------------- ### apply(string) Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/bookmarksmanager.bookmarksmanager Applies a bookmark to the report by its name. ```APIDOC ## apply(bookmarkName: string) ### Description Apply a bookmark to the report by its name. ### Parameters - **bookmarkName** (string) - Required - The name of the bookmark to be applied. ### Returns - **Promise>** - A promise that resolves when the bookmark has been applied. ``` -------------------------------- ### Get root node Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/htmliframeelement Returns the root node of the current element. ```TypeScript function getRootNode(options?: GetRootNodeOptions): Node ``` -------------------------------- ### Get element animations Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/htmliframeelement Retrieves the animations currently running on the element. ```TypeScript function getAnimations(options?: GetAnimationsOptions): Animation[] ``` -------------------------------- ### fullscreen() Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/dashboard.dashboard Requests the browser to render the component's iframe in fullscreen mode. ```APIDOC ## fullscreen() ### Description Requests the browser to render the component's iframe in fullscreen mode. ### Signature `function fullscreen()` ``` -------------------------------- ### Define displayName property Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-models/iaddbookmarkrequest Optional string property for the display name of the bookmark. ```TypeScript displayName?: string ``` -------------------------------- ### Initialize Selector Class Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-models/selector Creates a new instance of the Selector class using a schema string. ```TypeScript new Selector(schema: string) ``` -------------------------------- ### Get bounding client rect Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/htmliframeelement Returns the size and position of the element relative to the viewport. ```TypeScript function getBoundingClientRect(): DOMRect ``` -------------------------------- ### Get scrolling element Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/document Returns the element that is currently scrolling the document. ```TypeScript scrollingElement: null | Element ``` -------------------------------- ### Handle configuration changes Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/tile.tile Updates the tile configuration state. ```TypeScript function configChanged(isBootstrap: boolean) ``` -------------------------------- ### Get elements by tag name Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/htmliframeelement Retrieves elements matching the specified tag name. ```TypeScript function getElementsByTagName(qualifiedName: string): HTMLCollectionOf ``` ```TypeScript function getElementsByTagName(qualifiedName: K): HTMLCollectionOf ``` ```TypeScript function getElementsByTagName(qualifiedName: K): HTMLCollectionOf ``` ```TypeScript function getElementsByTagName(qualifiedName: K): HTMLCollectionOf ``` ```TypeScript function getElementsByTagName(qualifiedName: K): HTMLCollectionOf ``` -------------------------------- ### Get elements by tag name NS Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/htmliframeelement Retrieves elements matching the specified namespace and local name. ```TypeScript function getElementsByTagNameNS(namespaceURI: "http://www.w3.org/1998/Math/MathML", localName: string): HTMLCollectionOf ``` -------------------------------- ### validate(IEmbedConfigurationBase) Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/tile.tile Validates the load configuration for the tile. ```APIDOC ## validate(IEmbedConfigurationBase) ### Description Validate load configuration for the tile component. ### Parameters - **config** (IEmbedConfigurationBase) - Required - The configuration object to validate. ``` -------------------------------- ### Create Element NS Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/document Creates an element with a specific namespace URI. ```TypeScript function createElementNS(namespaceURI: "http://www.w3.org/1998/Math/MathML", qualifiedName: string): MathMLElement ``` -------------------------------- ### Retrieve images collection Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/document Gets a collection of all img objects in the document. ```TypeScript images: HTMLCollectionOf ``` -------------------------------- ### wpmpFactory function Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/factories Creates a WindowPostMessageProxy instance with optional logging and event source overrides. ```TypeScript function wpmpFactory(name?: string, logMessages?: boolean, eventSourceOverrideWindow?: Window): WindowPostMessageProxy ``` -------------------------------- ### Get Computed Style Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/window Retrieves the computed CSS styles for an element. ```TypeScript function getComputedStyle(elt: Element, pseudoElt?: null | string): CSSStyleDeclaration ``` -------------------------------- ### Create PaymentMethodChangeEvent Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/document Instantiates a PaymentMethodChangeEvent. ```TypeScript function createEvent(eventInterface: "PaymentMethodChangeEvent"): PaymentMethodChangeEvent ``` -------------------------------- ### Get Filter Type Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/powerbi-client.models Retrieves the FilterType for a given IFilter object. ```TypeScript function getFilterType(filter: IFilter): FilterType ``` -------------------------------- ### Get client rects Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/htmliframeelement Returns a collection of rectangles that represent the CSS border boxes of the element. ```TypeScript function getClientRects(): DOMRectList ``` -------------------------------- ### ondragstart Event Handler Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/window Fires on the source object when the user starts to drag a text selection or selected object. ```TypeScript ondragstart: null | (this: GlobalEventHandlers, ev: DragEvent) => any ``` -------------------------------- ### default Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/config The default configuration object containing type and version information. ```APIDOC ## Variable: default ### Description The default configuration object for the powerbi-client. ### Type { type: string, version: string } ``` -------------------------------- ### Get Correlation ID Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/dashboard.dashboard Retrieves the correlation ID for the current session. ```javascript // Get the correlationId for the current embed session report.getCorrelationId() .then(correlationId => { ... }); ``` ```typescript function getCorrelationId(): Promise ``` -------------------------------- ### Match Media Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/window Evaluates a CSS media query string. ```TypeScript function matchMedia(query: string): MediaQueryList ``` -------------------------------- ### Get Correlation ID Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/create.create Retrieves the correlation ID for the embedded component. ```typescript function getCorrelationId(): Promise ``` -------------------------------- ### validate(IEmbedConfigurationBase) Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/qna.qna Validates the load configuration for the Q&A component. ```APIDOC ## validate(IEmbedConfigurationBase) ### Description Validate load configuration. ### Parameters - **config** (IEmbedConfigurationBase) - Required - The configuration object to validate. ``` -------------------------------- ### Selector(string) Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-models/selector Constructor for the Selector class, which initializes a new instance with a schema string. ```APIDOC ## Selector(string) ### Description Initializes a new instance of the Selector class. ### Signature `new Selector(schema: string)` ### Parameters - **schema** (string) - The schema definition. ``` -------------------------------- ### Get element from coordinates Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/document Returns the element located at the specified x and y coordinates. ```TypeScript function elementFromPoint(x: number, y: number): null | Element ``` -------------------------------- ### Define apply property Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-models/iaddbookmarkrequest Optional boolean property to determine if the bookmark should be applied. ```TypeScript apply?: boolean ``` -------------------------------- ### Get elements by class name Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/htmliframeelement Returns a collection of elements that have all the specified classes. ```TypeScript function getElementsByClassName(classNames: string): HTMLCollectionOf ``` -------------------------------- ### requestFullscreen Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/htmliframeelement Requests the element to be displayed in fullscreen mode. ```APIDOC ## requestFullscreen(options?: FullscreenOptions) ### Description Displays element fullscreen and resolves promise when done. ``` -------------------------------- ### Get attribute node Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/htmliframeelement Retrieves the attribute node for the given qualified name. ```TypeScript function getAttributeNode(qualifiedName: string): null | Attr ``` -------------------------------- ### Get attribute names Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/htmliframeelement Returns an array of all attribute names present on the element. ```TypeScript function getAttributeNames(): string[] ``` -------------------------------- ### onprogress Event Handler Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/document Occurs to indicate progress while downloading media data. ```TypeScript onprogress: null | (this: GlobalEventHandlers, ev: ProgressEvent) => any ``` -------------------------------- ### Open Window Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/window Opens a new window or navigates an existing one. ```TypeScript function open(url?: string | URL, target?: string, features?: string): null | Window ``` -------------------------------- ### Get attribute value Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/htmliframeelement Returns the value of the attribute with the specified qualified name. ```TypeScript function getAttribute(qualifiedName: string): null | string ``` -------------------------------- ### Get root element Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/document Deprecated property for accessing the root SVG element. ```TypeScript rootElement: null | SVGSVGElement ``` -------------------------------- ### onwebkitanimationstart Event Handler Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/window Deprecated legacy alias for onanimationstart. ```typescript onwebkitanimationstart: null | (this: GlobalEventHandlers, ev: Event) => any ``` -------------------------------- ### Create class constructor Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/create.create Constructor for the Create class. ```typescript new Create(service: Service, element: HTMLElement, config: IEmbedConfiguration | IReportCreateConfiguration, phasedRender?: boolean, isBootstrap?: boolean) ``` -------------------------------- ### Retrieve links collection Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/document Gets all a and area objects that specify an href property. ```TypeScript links: HTMLCollectionOf ``` -------------------------------- ### build() Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/filterbuilders.topnfilterbuilder.topnfilterbuilder Creates the final Top N filter object. ```APIDOC ## build() ### Description Creates and returns the configured Top N filter. ``` -------------------------------- ### Get last modified date Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/document Retrieves the date the page was last modified. ```TypeScript lastModified: string ``` -------------------------------- ### Create Document Fragment Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/document Creates a new document fragment. ```TypeScript function createDocumentFragment(): DocumentFragment ``` -------------------------------- ### Get page slicers Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/page.page Retrieves a list of all slicer visuals present on the page. ```javascript page.getSlicers() .then(slicers => { ... }); ``` -------------------------------- ### origin Property Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/window Returns the origin of the window. ```typescript origin: string ``` -------------------------------- ### Get page level filters Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/page.page Retrieves all filters applied at the page level. ```javascript page.getFilters() .then(filters => { ... }); ``` -------------------------------- ### Get correlation ID Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/create.create Retrieves the correlation ID for the current embed session. ```javascript // Get the correlationId for the current embed session report.getCorrelationId() .then(correlationId => { ... }); ``` -------------------------------- ### createProcessingInstruction(string, string) Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/document Returns a ProcessingInstruction node whose target is target and data is data. ```APIDOC ## createProcessingInstruction(string, string) ### Description Returns a ProcessingInstruction node whose target is target and data is data. Throws an "InvalidCharacterError" DOMException if target or data are invalid. ### Signature `function createProcessingInstruction(target: string, data: string): ProcessingInstruction` ### Parameters - **target** (string) - The target of the processing instruction. - **data** (string) - The data for the processing instruction. ``` -------------------------------- ### Get filters from an embed component Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/ifilterable.ifilterable Retrieves the filters currently applied to the object. ```TypeScript function getFilters(): Promise ``` -------------------------------- ### createElementNS Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/document Creates an element with the specified namespace URI and qualified name. ```APIDOC ## createElementNS(namespaceURI, qualifiedName, options) ### Description Creates an element with a specific namespace. If the local name does not match the Name production, an "InvalidCharacterError" is thrown. ### Parameters - **namespaceURI** (null | string) - Required - The namespace URI of the element. - **qualifiedName** (string) - Required - The qualified name of the element. - **options** (ElementCreationOptions | string) - Optional - Options for creating customized built-in elements. ### Returns - **Element** - The created DOM element. ``` -------------------------------- ### Define settings property Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-models/iloadqnaconfiguration Optional configuration settings for the Q&A experience. ```TypeScript settings?: IQnaSettings ``` -------------------------------- ### Get animations Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/document Returns an array of Animation objects associated with the document or shadow root. ```TypeScript function getAnimations(): Animation[] ``` -------------------------------- ### Get elements from coordinates Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/document Returns an array of elements located at the specified x and y coordinates. ```TypeScript function elementsFromPoint(x: number, y: number): Element[] ``` -------------------------------- ### type property Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-models/iquickcreateconfiguration Optional type property restricted to the value 'quickCreate'. ```TypeScript type?: "quickCreate" ``` -------------------------------- ### queryCommand methods Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/document Deprecated methods for querying command states. ```APIDOC ## queryCommandEnabled(commandId: string) ### Description Returns a Boolean value that indicates whether a specified command can be successfully executed using execCommand. ## queryCommandIndeterm(commandId: string) ### Description Returns a Boolean value that indicates whether the specified command is in the indeterminate state. ## queryCommandState(commandId: string) ### Description Returns a Boolean value that indicates the current state of the command. ## queryCommandSupported(commandId: string) ### Description Returns a Boolean value that indicates whether the current command is supported on the current range. ## queryCommandValue(commandId: string) ### Description Returns the current value of the document, range, or current selection for the given command. ``` -------------------------------- ### Get elements by name Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/document Retrieves a collection of objects based on the NAME or ID attribute. ```TypeScript function getElementsByName(elementName: string): NodeListOf ``` -------------------------------- ### Get element by ID Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/document Retrieves the first object matching the specified ID attribute. ```TypeScript function getElementById(elementId: string): null | HTMLElement ``` -------------------------------- ### btoa Method Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/window Creates a base64-encoded ASCII string from a binary string. ```TypeScript function btoa(data: string): string ``` -------------------------------- ### resizeBy Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/window Resizes the window by a specified amount. ```APIDOC ## resizeBy(x, y) ### Description Resizes the window by the specified horizontal and vertical amounts. ### Parameters - **x** (number) - Required - The horizontal resize amount. - **y** (number) - Required - The vertical resize amount. ``` -------------------------------- ### Apply bookmark by name Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/bookmarksmanager.bookmarksmanager Applies a bookmark to the report using its name. ```javascript bookmarksManager.apply(bookmarkName) ``` ```typescript function apply(bookmarkName: string): Promise> ``` -------------------------------- ### Enter fullscreen mode Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/create.create Requests the browser to render the component's iframe in fullscreen mode. ```typescript function fullscreen() ``` -------------------------------- ### Get attribute by namespace Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/htmliframeelement Returns the value of the attribute with the specified namespace and local name. ```TypeScript function getAttributeNS(namespace: null | string, localName: string): null | string ``` -------------------------------- ### hpmFactory Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/factories Creates an instance of HttpPostMessage. ```APIDOC ## hpmFactory(WindowPostMessageProxy, Window, string, string, string) ### Description Creates and returns an HttpPostMessage instance. ### Signature `function hpmFactory(wpmp: WindowPostMessageProxy, targetWindow?: Window, version?: string, type?: string, origin?: string): HttpPostMessage` ### Parameters - **wpmp** (WindowPostMessageProxy) - Required - **targetWindow** (Window) - Optional - **version** (string) - Optional - **type** (string) - Optional - **origin** (string) - Optional ### Returns - **HttpPostMessage** ``` -------------------------------- ### Manage link color Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/document Deprecated property to set or get the color of document links. ```TypeScript linkColor: string ``` -------------------------------- ### $schema Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-models/selector Property representing the schema string. ```APIDOC ## $schema ### Description Gets or sets the schema string. ### Type string ``` -------------------------------- ### Get smart narrative insights Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/page.page Retrieves insights generated for the current report page. ```javascript page.getSmartNarrativeInsights(); ``` -------------------------------- ### Handle configuration changes Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/qna.qna Used to notify the component of configuration changes. ```TypeScript function configChanged(_isBootstrap: boolean) ``` -------------------------------- ### validate(IEmbedConfigurationBase) Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/qna.qna Validates the load configuration for the component. ```APIDOC ## validate(IEmbedConfigurationBase) ### Description Validate the provided load configuration. ### Parameters - **config** (IEmbedConfigurationBase) - Required - The configuration object to validate. ### Returns - **IError[]** - A list of validation errors. ``` -------------------------------- ### VisualSelector(string) Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-models/visualselector Constructs a new instance of the VisualSelector class. ```APIDOC ## VisualSelector(string) ### Description Creates a new instance of the VisualSelector class using the specified visual name. ### Signature `new VisualSelector(visualName: string)` ### Parameters - **visualName** (string) - The name of the visual to select. ``` -------------------------------- ### Namespace and prefix lookup methods Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/document Methods for resolving namespace URIs and prefixes within the node tree. ```TypeScript function lookupNamespaceURI(prefix: null | string): null | string ``` ```TypeScript function lookupPrefix(namespace: null | string): null | string ``` -------------------------------- ### getVisuals() Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/page.page Retrieves all visuals on the page. ```APIDOC ## getVisuals() ### Description Gets all the visuals on the page. ### Returns - **Promise** ``` -------------------------------- ### Get attribute node by namespace Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/htmliframeelement Retrieves the attribute node for the given namespace and local name. ```TypeScript function getAttributeNodeNS(namespace: null | string, localName: string): null | Attr ``` -------------------------------- ### Manage visited link color Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/document Deprecated property to set or get the color of visited links. ```TypeScript vlinkColor: string ``` -------------------------------- ### postMessage() Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/window Posts a message to the given window. ```APIDOC ## postMessage(any, string, Transferable[]) ### Description Posts a message to the given window. Messages can be structured objects, e.g. nested objects and arrays, can contain JavaScript values (strings, numbers, Date objects, etc), and can contain certain data objects such as File Blob, FileList, and ArrayBuffer objects. Objects listed in the transfer member of options are transferred, not just cloned, meaning that they are no longer usable on the sending side. A target origin can be specified using the targetOrigin member of options. If not provided, it defaults to "/". This default restricts the message to same-origin targets only. If the origin of the target window doesn't match the given target origin, the message is discarded, to avoid information leakage. To send the message to the target regardless of origin, set the target origin to "*". Throws a "DataCloneError" DOMException if transfer array contains duplicate objects or if message could not be cloned. ``` -------------------------------- ### createDocumentFragment() Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/document Creates a new document fragment. ```APIDOC ## createDocumentFragment() ### Description Creates a new document fragment. ### Returns - **DocumentFragment** - The created document fragment. ``` -------------------------------- ### Get input encoding Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/document Deprecated legacy alias for characterSet, returning the document's character encoding. ```TypeScript inputEncoding: string ``` -------------------------------- ### ontransitionstart event handler Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/document Defines the event handler for the transitionstart event. ```TypeScript ontransitionstart: null | (this: GlobalEventHandlers, ev: TransitionEvent) => any ``` -------------------------------- ### Request fullscreen mode Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/htmliframeelement Displays the element in fullscreen mode, returning a promise that resolves when complete. ```TypeScript function requestFullscreen(options?: FullscreenOptions): Promise ``` -------------------------------- ### write/writeln methods Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/document Methods for writing content to the document. ```APIDOC ## write(text: string[]) ### Description Writes one or more HTML expressions to a document in the specified window. ## writeln(text: string[]) ### Description Writes one or more HTML expressions, followed by a carriage return, to a document in the specified window. ``` -------------------------------- ### Check page layout Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/page.page Verifies if the page has a specific layout type applied. ```javascript page.hasLayout(layoutType) .then(hasLayout: boolean => { ... }); ``` -------------------------------- ### Apply bookmark state Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/bookmarksmanager.bookmarksmanager Applies a bookmark state to the report using a base64 string. ```javascript bookmarksManager.applyState(bookmarkState) ``` ```typescript function applyState(state: string): Promise> ``` -------------------------------- ### wpmpName Property Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/service.iserviceconfiguration Inherited from IDebugOptions, specifies the name for the WPMP. ```TypeScript wpmpName?: string ``` -------------------------------- ### Print Window Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/window Opens the print dialog for the current window. ```TypeScript function print() ``` -------------------------------- ### createElementNS Generic Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/document Creates an element with a specified namespace and optional creation options. ```TypeScript function createElementNS(namespaceURI: null | string, qualifiedName: string, options?: ElementCreationOptions): Element ``` ```TypeScript function createElementNS(namespace: null | string, qualifiedName: string, options?: string | ElementCreationOptions): Element ``` -------------------------------- ### build() Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/filterbuilders.relativedatefilterbuilder.relativedatefilterbuilder Creates and returns a RelativeDateFilter object based on the configured builder state. ```APIDOC ## build() ### Description Creates a RelativeDateFilter object. ### Signature `build(): RelativeDateFilter` ### Returns - **RelativeDateFilter** - The constructed filter object. ``` -------------------------------- ### visualSettings Property Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-models/isettings Configures visual settings for the report. ```TypeScript visualSettings?: IVisualSettings ``` -------------------------------- ### Define bookmark property Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-models/iembedconfiguration Optional property for applying a bookmark request. ```TypeScript bookmark?: IApplyBookmarkRequest ``` -------------------------------- ### Import Node Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/document Creates a copy of a node, optionally including its descendants. ```TypeScript function importNode(node: T, deep?: boolean): T ``` -------------------------------- ### Readystate change event handler Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/document Fires when the document's ready state changes. ```TypeScript onreadystatechange: null | (this: Document, ev: Event) => any ``` -------------------------------- ### exitFullscreen() Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/dashboard.dashboard Requests the browser to exit fullscreen mode for the component. ```APIDOC ## exitFullscreen() ### Description Requests the browser to exit fullscreen mode. ### Signature `function exitFullscreen()` ``` -------------------------------- ### build() Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/filterbuilders.advancedfilterbuilder.advancedfilterbuilder Finalizes and creates the Advanced filter object. ```APIDOC ## build() ### Description Creates the Advanced filter instance. ### Example ```javascript const advancedFilterBuilder = new AdvancedFilterBuilder().build(); ``` ``` -------------------------------- ### resizeTo Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/window Resizes the window to specific dimensions. ```APIDOC ## resizeTo(width, height) ### Description Resizes the window to the specified width and height. ### Parameters - **width** (number) - Required - The target width. - **height** (number) - Required - The target height. ``` -------------------------------- ### version Property Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/service.iserviceconfiguration Specifies the version of the service configuration. ```TypeScript version?: string ``` -------------------------------- ### Retrieve plugins collection Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/document Returns an HTMLCollection of embed elements. ```TypeScript plugins: HTMLCollectionOf ``` -------------------------------- ### Media Playback Event Handlers Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/htmliframeelement Handlers for media playback states including pause, play, playing, progress, rate change, and seeked events. ```TypeScript onpause: null | (this: GlobalEventHandlers, ev: Event) => any ``` ```TypeScript onplay: null | (this: GlobalEventHandlers, ev: Event) => any ``` ```TypeScript onplaying: null | (this: GlobalEventHandlers, ev: Event) => any ``` ```TypeScript onprogress: null | (this: GlobalEventHandlers, ev: ProgressEvent) => any ``` ```TypeScript onratechange: null | (this: GlobalEventHandlers, ev: Event) => any ``` ```TypeScript onseeked: null | (this: GlobalEventHandlers, ev: Event) => any ``` -------------------------------- ### createElementNS HTML Namespace Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/document Creates an element with the XHTML namespace. ```TypeScript function createElementNS(namespaceURI: "http://www.w3.org/1999/xhtml", qualifiedName: string): HTMLElement ``` -------------------------------- ### prepend(nodes: (string | Node)[]) Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/htmliframeelement Inserts nodes before the first child of node, while replacing strings in nodes with equivalent Text nodes. ```APIDOC ## prepend(nodes: (string | Node)[]) ### Description Inserts nodes before the first child of node, while replacing strings in nodes with equivalent Text nodes. Throws a "HierarchyRequestError" DOMException if the constraints of the node tree are violated. ### Parameters - **nodes** ((string | Node)[]) - Required - The nodes or strings to prepend. ``` -------------------------------- ### Construct a VisualSelector Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-models/visualselector Initializes a new instance of the VisualSelector class with a specified visual name. ```TypeScript new VisualSelector(visualName: string) ``` -------------------------------- ### parent Property Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/window Refers to the parent window or itself. ```TypeScript parent: Window ``` -------------------------------- ### Define personalizeVisuals property Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-models/icapturebookmarkoptions Specifies whether to capture personalized visuals in the bookmark. ```TypeScript personalizeVisuals?: boolean ``` -------------------------------- ### Initialize PageSelector Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-models/pageselector Constructor for creating a new instance of PageSelector with a specified page name. ```TypeScript new PageSelector(pageName: string) ``` -------------------------------- ### Define mobilePortraitLayout property Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-models/ivisual Optional layout configuration specifically for mobile portrait orientation. ```TypeScript mobilePortraitLayout?: IVisualLayout ``` -------------------------------- ### execCommand(string, boolean, string) Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/document Executes a command on the current document, current selection, or the given range. Note: This API is deprecated. ```APIDOC ## execCommand(string, boolean, string) ### Description Executes a command on the current document, current selection, or the given range. This API is now deprecated. ### Signature `function execCommand(commandId: string, showUI?: boolean, value?: string): boolean` ### Parameters - **commandId** (string) - String that specifies the command to execute. - **showUI** (boolean) - Display the user interface, defaults to false. - **value** (string) - Value to assign. ``` -------------------------------- ### postMessage Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/window Posts a message to the given window. ```APIDOC ## postMessage(message, targetOrigin, transfer) ### Description Posts a message to the given window. Messages can be structured objects and can contain certain data objects. ### Parameters - **message** (any) - Required - The data to send. - **targetOrigin** (string) - Required - The target origin for the message. - **transfer** (Transferable[]) - Optional - Objects to be transferred. ``` -------------------------------- ### Define allPages property Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-models/icapturebookmarkoptions Specifies whether to capture all pages in the bookmark. ```TypeScript allPages?: boolean ``` -------------------------------- ### reportCreationMode property Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-models/iquickcreateconfiguration Optional mode for report creation. ```TypeScript reportCreationMode?: ReportCreationMode ``` -------------------------------- ### BasicFilterWithKeys Constructor Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-models/basicfilterwithkeys Initializes a new instance of the BasicFilterWithKeys class with a target, operator, values, and key values. ```typescript new BasicFilterWithKeys(target: IFilterKeyTarget, operator: BasicFilterOperators, values: string | number | boolean | (string | number | boolean)[], keyValues: (string | number | boolean)[][]) ``` -------------------------------- ### click() method Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/htmliframeelement Simulates a mouse click on the element. ```TypeScript function click() ``` -------------------------------- ### Define commands property Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-models/iextensions Represents the collection of command extensions. ```TypeScript commands: ICommandExtension[] ``` -------------------------------- ### settings property Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-models/ipaginatedreportloadconfiguration Optional settings configuration for the paginated report. ```TypeScript settings?: IPaginatedReportSettings ``` -------------------------------- ### Create RTCTrackEvent Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/document Instantiates an RTCTrackEvent. ```TypeScript function createEvent(eventInterface: "RTCTrackEvent"): RTCTrackEvent ``` -------------------------------- ### Define panes property Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-models/iqnasettings Configures the panes for the Q&A component using the IQnaPanes interface. ```TypeScript panes?: IQnaPanes ``` -------------------------------- ### HTMLIFrameElement Methods Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/htmliframeelement Methods available on the HTMLIFrameElement interface for fullscreen requests. ```APIDOC ## HTMLIFrameElement Methods ### mozRequestFullScreen Type: Function ### msRequestFullscreen Type: Function ### webkitRequestFullscreen Type: () => void ``` -------------------------------- ### sdkWrapperVersion Property Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/service.iserviceconfiguration Specifies the version of the SDK wrapper. ```TypeScript sdkWrapperVersion?: string ``` -------------------------------- ### on(string, IEventHandler) Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/tile.tile Adds an event handler for a specific event. ```APIDOC ## on(string, IEventHandler) ### Description Adds an event handler for a specific event. ### Signature `function on(eventName: string, handler: IEventHandler)` ### Parameters - **eventName** (string) - Required - The name of the event. - **handler** (IEventHandler) - Required - The function to execute when the event occurs. ``` -------------------------------- ### Build method definition Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/filterbuilders.relativedatefilterbuilder.relativedatefilterbuilder The TypeScript definition for the build method. ```typescript function build(): RelativeDateFilter ``` -------------------------------- ### opener Property Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/window Returns a reference to the window that opened this window. ```TypeScript opener: any ``` -------------------------------- ### Create Range Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/document Returns an empty range object with boundary points at the beginning of the document. ```TypeScript function createRange(): Range ``` -------------------------------- ### Define parameterPanel property Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-models/ipaginatedreportscommandssettings Optional configuration for the parameters panel command settings. ```TypeScript parameterPanel?: IParametersPanelCommandSettings ``` -------------------------------- ### Access the default configuration object Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/config Defines the structure of the default configuration object, which includes type and version properties. ```TypeScript default: { type: string, version: string } ``` -------------------------------- ### datasetCreateConfig property Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-models/iquickcreateconfiguration Specifies the configuration for dataset creation. ```TypeScript datasetCreateConfig: IDatasetCreateConfiguration ``` -------------------------------- ### Define layout property Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-models/iclonevisualrequest Specifies the layout configuration for the cloned visual. ```TypeScript layout?: IVisualLayout ``` -------------------------------- ### PageSelector(string) Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-models/pageselector Constructor for the PageSelector class. Initializes a new instance with the specified page name. ```APIDOC ## Constructor: PageSelector(string) ### Description Creates a new instance of the PageSelector class. ### Signature `new PageSelector(pageName: string)` ### Parameters - **pageName** (string) - The name of the page to select. ``` -------------------------------- ### Define icon property Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-models/icommandextension Optional string property representing the icon for the command extension. ```TypeScript icon?: string ``` -------------------------------- ### lookupPrefix method Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/htmliframeelement Returns the prefix associated with the given namespace. ```TypeScript function lookupPrefix(namespace: null | string): null | string ``` -------------------------------- ### Window Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client Returns the Window object associated with the Power BI component. ```APIDOC ## Window ### Description Returns the Window object. ### Signature `Window: () => Window` ``` -------------------------------- ### Base URI Property Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/document Returns the base URL of the document. ```TypeScript baseURI: string ``` -------------------------------- ### extensions Property Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-models/isettings Configures extensions for the report. ```TypeScript extensions?: Extensions ``` -------------------------------- ### Focus the element Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/htmliframeelement Sets focus on the element. ```TypeScript function focus(options?: FocusOptions) ``` -------------------------------- ### Define IExtension command property Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-models/iextension The command property is an optional ICommandExtension used to define extension commands. ```TypeScript command?: ICommandExtension ``` -------------------------------- ### Define question property Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-models/iloadqnaconfiguration Optional initial question to be asked in the Q&A interface. ```TypeScript question?: string ``` -------------------------------- ### before() method Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/htmliframeelement Inserts nodes before the current node. ```TypeScript function before(nodes: (string | Node)[]) ``` -------------------------------- ### VisualTypeSelector(string) Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-models/visualtypeselector Constructor for the VisualTypeSelector class. ```APIDOC ## VisualTypeSelector(string) ### Description Creates a new instance of the VisualTypeSelector class. ### Signature `new VisualTypeSelector(visualType: string)` ### Parameters - **visualType** (string) - The visual type identifier. ``` -------------------------------- ### Resize Window Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/window Methods to resize the window by a relative amount or to an absolute size. ```TypeScript function resizeBy(x: number, y: number) ``` ```TypeScript function resizeTo(width: number, height: number) ``` -------------------------------- ### frames Property Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/window Returns a reference to the window itself. ```TypeScript frames: Window ``` -------------------------------- ### Define visualOptionsMenu property Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-models/iextensionpoints Represents the options menu extension for a visual. ```TypeScript visualOptionsMenu?: IMenuExtension ``` -------------------------------- ### Check fullscreen capability Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/document Returns true if the document supports fullscreen mode. ```TypeScript fullscreenEnabled: boolean ``` -------------------------------- ### Define question property Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-models/iqnainterpretinputdata Required string representing the user's question. ```TypeScript question: string ``` -------------------------------- ### Define visualsLayout property Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-models/ipagelayout Represents the specific layout configuration for individual visuals. ```TypeScript visualsLayout: VisualsLayout ``` -------------------------------- ### Define accessToken property Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-models/icommonembedconfiguration Optional string property for the access token, inherited from IEmbedConfigurationBase. ```TypeScript accessToken?: string ``` -------------------------------- ### Create MutationEvents Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/document Instantiates a MutationEvents event. ```TypeScript function createEvent(eventInterface: "MutationEvents"): MutationEvent ``` -------------------------------- ### commands Property Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-models/isettings Defines command settings for the report. ```TypeScript commands?: ICommandsSettings[] | IPaginatedReportsCommandsSettings ``` -------------------------------- ### reload() Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/create.create Reloads the embedded component using existing configuration. ```APIDOC ## reload() ### Description Reloads the embed using existing configuration, effectively resetting the component to its initial loaded state. ### Returns - **Promise** ``` -------------------------------- ### enterKeyHint Property Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/htmliframeelement Specifies the hint for the enter key on virtual keyboards. ```TypeScript enterKeyHint: string ``` -------------------------------- ### Src Property Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/htmliframeelement Sets or retrieves a URL to be loaded by the object. ```TypeScript src: string ``` -------------------------------- ### customLayout Property Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-models/isettings Specifies a custom layout configuration. ```TypeScript customLayout?: ICustomLayout ``` -------------------------------- ### Define the settings property Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-models/ivisualheader Required property that holds the configuration settings for the visual header. ```TypeScript settings: IVisualHeaderSettings ``` -------------------------------- ### type Property Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/service.iserviceconfiguration Defines the type of the service configuration. ```TypeScript type?: string ``` -------------------------------- ### Define pageName property Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-models/iembedconfiguration Optional string property for the specific page name. ```TypeScript pageName?: string ``` -------------------------------- ### Define datasourceConnectionConfig property Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-models/idatasetcreateconfiguration Optional configuration for the datasource connection. ```TypeScript datasourceConnectionConfig?: IDatasourceConnectionConfiguration ``` -------------------------------- ### nextSibling Property Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/htmliframeelement Returns the next sibling node. ```TypeScript nextSibling: null | ChildNode ``` -------------------------------- ### Create ProgressEvent Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/document Instantiates a ProgressEvent. ```TypeScript function createEvent(eventInterface: "ProgressEvent"): ProgressEvent ``` -------------------------------- ### createEvent(eventInterface: string) Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/document Creates an instance of a specified event interface. ```APIDOC ## createEvent(eventInterface: string) ### Description Creates and returns an instance of the event type specified by the eventInterface parameter. ### Parameters - **eventInterface** (string) - Required - The name of the event interface to create (e.g., "DeviceMotionEvent", "MouseEvent", "KeyboardEvent"). ### Returns - **Event** (Object) - Returns the specific event object corresponding to the requested interface. ``` -------------------------------- ### createEvent(eventInterface: string) Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/document Creates an instance of a specified event interface. ```APIDOC ## createEvent(eventInterface: string) ### Description Creates and returns an instance of the specified event interface. ### Parameters - **eventInterface** (string) - Required - The name of the event interface to create (e.g., "MutationEvent", "PointerEvent", "ProgressEvent"). ### Returns - **Event** (Object) - Returns the specific event object requested. ``` -------------------------------- ### Move Window By Offset Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/window Moves the window by the specified x and y offsets. ```TypeScript function moveBy(x: number, y: number) ``` -------------------------------- ### Create ProcessingInstruction Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/document Returns a ProcessingInstruction node with the specified target and data. ```TypeScript function createProcessingInstruction(target: string, data: string): ProcessingInstruction ``` -------------------------------- ### Define pageNavigation property Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-models/ireportpanes Represents the page navigation pane configuration. ```TypeScript pageNavigation?: IPageNavigationPane ``` -------------------------------- ### Execute Command Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/document Executes a command on the current document or selection. Note that this API is deprecated. ```TypeScript function execCommand(commandId: string, showUI?: boolean, value?: string): boolean ``` -------------------------------- ### Set Q&A question Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/qna.qna Updates the question used to render data in the Q&A component. ```TypeScript function setQuestion(question: string): Promise> ``` -------------------------------- ### Define $schema property in IBaseTarget Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-models/ibasetarget Optional string property representing the schema definition. ```TypeScript $schema?: string ``` -------------------------------- ### Focus Window Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/window Moves focus to the window's browsing context. ```TypeScript function focus() ``` -------------------------------- ### createRange() Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/document Returns an empty range object that has both of its boundary points positioned at the beginning of the document. ```APIDOC ## createRange() ### Description Returns an empty range object that has both of its boundary points positioned at the beginning of the document. ### Signature `function createRange(): Range` ``` -------------------------------- ### Create CDATA Section Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/document Returns a CDATASection node with the provided data. ```TypeScript function createCDATASection(data: string): CDATASection ``` -------------------------------- ### Create Event Methods Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/document Methods to create specific event interfaces for the document. ```TypeScript function createEvent(eventInterface: "StorageEvent"): StorageEvent ``` ```TypeScript function createEvent(eventInterface: "SubmitEvent"): SubmitEvent ``` ```TypeScript function createEvent(eventInterface: "TouchEvent"): TouchEvent ``` ```TypeScript function createEvent(eventInterface: "TrackEvent"): TrackEvent ``` ```TypeScript function createEvent(eventInterface: "TransitionEvent"): TransitionEvent ``` ```TypeScript function createEvent(eventInterface: "UIEvent"): UIEvent ``` ```TypeScript function createEvent(eventInterface: "UIEvents"): UIEvent ``` ```TypeScript function createEvent(eventInterface: "WebGLContextEvent"): WebGLContextEvent ``` ```TypeScript function createEvent(eventInterface: "WheelEvent"): WheelEvent ``` ```TypeScript function createEvent(eventInterface: string): Event ``` -------------------------------- ### Define fields property Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-models/ireportpanes Represents the fields pane configuration. ```TypeScript fields?: IFieldsPane ``` -------------------------------- ### Prompt Dialog Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/window Displays a prompt dialog to collect user input. ```TypeScript function prompt(message?: string, _default?: string): null | string ``` -------------------------------- ### Define command property Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-models/ivisualcustomcommandevent Represents the command string associated with the custom event. ```TypeScript command: string ``` -------------------------------- ### Allow Property Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/htmliframeelement Specifies the permissions policy for the iframe. ```TypeScript allow: string ``` -------------------------------- ### ongamepadconnected event handler Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/window Event handler for gamepad connection events. ```TypeScript ongamepadconnected: null | (this: WindowEventHandlers, ev: GamepadEvent) => any ``` -------------------------------- ### Define displayOption property Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-models/icustomlayout Specifies the display option for the custom layout. ```TypeScript displayOption?: DisplayOption ``` -------------------------------- ### alert Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/window Displays an alert dialog with a specified message. ```APIDOC ## alert(message) ### Description Displays an alert dialog with a specified message. ### Parameters - **message** (any) - Optional - The message to display in the alert. ``` -------------------------------- ### printSettings Property Source: https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-models/isettings Configures print settings for the report. ```TypeScript printSettings?: IPrintSettings ```