Skip to content

Commit

Permalink
chore(all): prepare release 1.0.0-beta.3.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
EisenbergEffect committed Apr 17, 2018
1 parent 9c3fa8a commit 99c2419
Show file tree
Hide file tree
Showing 13 changed files with 63 additions and 30 deletions.
17 changes: 12 additions & 5 deletions dist/dom.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ export interface IDom {
* @param callback The function that receives a notification when an event of the specified type occurs.
* @param capture If true, useCapture indicates that the user wishes to initiate capture.
*/
addEventListener(eventName: string, callback: EventListener, capture: boolean): void;
addEventListener(eventName: string, callback: EventListenerOrEventListenerObject, capture: boolean): void;
/**
* Remove an event listener from the document.
* @param eventName A string representing the event type to listen for.
* @param callback The function to remove from the event.
* @param capture Specifies whether the listener to be removed was registered as a capturing listener or not.
*/
removeEventListener(eventName: string, callback: EventListener, capture: boolean): void;
removeEventListener(eventName: string, callback: EventListenerOrEventListenerObject, capture: boolean): void;
/**
* Adopts a node from an external document.
* @param node The node to be adopted.
Expand All @@ -47,7 +47,8 @@ export interface IDom {
* @param tagName A string that specifies the type of element to be created.
* @return The created element.
*/
createElement(tagName: string): Element;
createElement<T extends keyof HTMLElementTagNameMap>(tagName: T): HTMLElementTagNameMap[T];
createElement(tagName: string): HTMLElement;
/**
* Creates the specified HTML attribute
* @param name A string that specifies the name of attribute to be created.
Expand Down Expand Up @@ -102,11 +103,17 @@ export interface IDom {
*/
getElementById(id: string): Element;
/**
* Performs a query selector on the document and returns first matched element, depth first.
* @param query The query to use in searching the document.
* @return A list of all matched elements in the document.
*/
querySelector<E extends Element = Element>(selectors: string): E | null;
/**
* Performs a query selector on the document and returns all located matches.
* @param query The query to use in searching the document.
* @return A list of all matched elements in the document.
*/
querySelectorAll(query: string): NodeList;
querySelectorAll<E extends Element = Element>(selectors: string): NodeListOf<E>;
/**
* Gets the element that is the next sibling of the provided element.
* @param element The element whose next sibling is being located.
Expand All @@ -118,7 +125,7 @@ export interface IDom {
* @param markup A string containing the markup to turn into a template. Note: This string must contain the template element as well.
* @return The instance of HTMLTemplateElement that was created from the provided markup.
*/
createTemplateFromMarkup(markup: string): Element;
createTemplateFromMarkup(markup: string): HTMLTemplateElement;
/**
* Appends a node to the parent, if provided, or the document.body otherwise.
* @param newNode The node to append.
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 13 additions & 6 deletions dist/nodejs-dom.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
import { IDom } from './dom';
import { IGlobal } from './global';
declare module './global' {
interface IGlobal {
window: any;
document: any;
}
}
/**
* Represents the core APIs of the DOM.
*/
Expand All @@ -12,22 +18,23 @@ export declare class NodeJsDom implements IDom {
boundary: string;
title: string;
activeElement: Element;
addEventListener(eventName: string, callback: EventListener, capture: boolean): void;
removeEventListener(eventName: string, callback: EventListener, capture: boolean): void;
createElement(tagName: string): Element;
addEventListener(eventName: string, callback: EventListenerOrEventListenerObject, capture: boolean): void;
removeEventListener(eventName: string, callback: EventListenerOrEventListenerObject, capture: boolean): void;
createElement<T extends keyof HTMLElementTagNameMap>(tagName: T): HTMLElementTagNameMap[T];
createAttribute(name: string): Attr;
createTextNode(text: string): Text;
createComment(text: string): Comment;
createDocumentFragment(): DocumentFragment;
createTemplateElement(): HTMLTemplateElement;
createMutationObserver(callback: (changes: MutationRecord[], instance: MutationObserver) => void): MutationObserver;
createCustomEvent(eventType: string, options: Object): CustomEvent;
createCustomEvent(eventType: string, options?: Object): CustomEvent;
dispatchEvent(evt: Event): void;
getComputedStyle(element: Element): CSSStyleDeclaration;
getElementById(id: string): Element;
querySelectorAll(query: string): NodeList;
querySelector<E extends Element = Element>(query: string): E | null;
querySelectorAll<E extends Element = Element>(query: string): NodeListOf<E>;
nextElementSibling(element: Element): Element;
createTemplateFromMarkup(markup: string): Element;
createTemplateFromMarkup(markup: string): HTMLTemplateElement;
injectStyles(styles: string, destination?: Element, prepend?: boolean): Node;
adoptNode(node: Node): Node;
appendNode(newNode: Node, parentNode?: Node): void;
Expand Down
3 changes: 3 additions & 0 deletions dist/nodejs-dom.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 99c2419

Please sign in to comment.