Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#344@trivial: Continue on CSSStyleDeclaration.
- Loading branch information
1 parent
d1a0bac
commit 36aceeb
Showing
11 changed files
with
274 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import IEventInit from '../IEventInit'; | ||
|
||
export default interface IMediaQueryListInit extends IEventInit { | ||
matches?: boolean; | ||
media?: string; | ||
} |
25 changes: 25 additions & 0 deletions
25
packages/happy-dom/src/event/events/MediaQueryListEvent.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import Event from '../Event'; | ||
import IMediaQueryListInit from './IMediaQueryListInit'; | ||
|
||
/** | ||
* | ||
*/ | ||
export default class MediaQueryListEvent extends Event { | ||
public readonly matches: boolean = false; | ||
public readonly media: string = ''; | ||
|
||
/** | ||
* Constructor. | ||
* | ||
* @param type Event type. | ||
* @param [eventInit] Event init. | ||
*/ | ||
constructor(type: string, eventInit: IMediaQueryListInit = null) { | ||
super(type, eventInit); | ||
|
||
if (eventInit) { | ||
this.matches = eventInit.matches || false; | ||
this.media = eventInit.media || ''; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.