fix(prerender): local references to window/document

This commit is contained in:
Manu Mtz.-Almeida
2018-04-19 13:26:49 +02:00
parent 86a6cde4a1
commit 78bd146ad2
42 changed files with 174 additions and 139 deletions

View File

@ -12,6 +12,8 @@ import { Side, isRightSide } from '../../utils/helpers';
export class ItemOptions {
@Element() private el: HTMLElement;
@Prop({ context: 'window' }) win: Window;
/**
* The side the option button should be on.
* Possible values: `"start"` and `"end"`.
@ -27,7 +29,7 @@ export class ItemOptions {
@Method()
isRightSide() {
return isRightSide(this.side);
return isRightSide(this.win, this.side);
}
@Method()