提交 e7709ce4 编写于 作者: K Kamran Ahmed

Allo getting title, description and popover from element

上级 8dc4a39a
......@@ -129,6 +129,15 @@ export default class Element {
});
}
/**
* Gets the popover for the current element if any
* @returns {Popover|*}
* @public
*/
getPopover() {
return this.popover;
}
/**
* Is called when element is about to be deselected
* i.e. when moving the focus to next element of closing
......
......@@ -67,6 +67,24 @@ export default class Popover extends Element {
this.closeBtnNode = popover.querySelector(`.${CLASS_CLOSE_BTN}`);
}
/**
* Gets the title node for the popover
* @returns {Element | null | *}
* @public
*/
getTitleNode() {
return this.titleNode;
}
/**
* Gets the description node for the popover
* @returns {Element | null | *}
* @public
*/
getDescriptionNode() {
return this.descriptionNode;
}
/**
* Hides the popover
* @public
......
......@@ -275,6 +275,12 @@ declare module 'driver.js' {
*/
public getSize(): Driver.ElementSize;
/**
* Gets the popover on current element if any
* @returns {Driver.Popover}
*/
public getPopover(): Driver.Popover;
/**
* Removes the highlight classes from current element if any
*/
......@@ -458,6 +464,18 @@ declare module 'driver.js' {
* @param {Driver.Position} position
*/
private autoPosition(position: Driver.Position): void;
/**
* Gets the title node for popover
* @returns {Node | HTMLElement}
*/
public getTitleNode(): Node | HTMLElement;
/**
* Gets the description node for popover
* @returns {Node | HTMLElement}
*/
public getDescriptionNode(): Node | HTMLElement;
}
class Stage extends Element {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册