mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-18 03:00:58 +08:00
fix(prerender): local references to window/document
This commit is contained in:
@ -12,8 +12,11 @@ import { getButtonClassMap, getElementClassMap, openURL } from '../../utils/them
|
||||
}
|
||||
})
|
||||
export class Button {
|
||||
|
||||
@Element() private el: HTMLElement;
|
||||
|
||||
@Prop({ context: 'window' }) win: Window;
|
||||
|
||||
@State() keyFocus: boolean;
|
||||
|
||||
/**
|
||||
@ -145,7 +148,7 @@ export class Button {
|
||||
onFocus={this.onFocus.bind(this)}
|
||||
onKeyUp={this.onKeyUp.bind(this)}
|
||||
onBlur={this.onBlur.bind(this)}
|
||||
onClick={(ev) => openURL(this.href, ev, this.routerDirection)}>
|
||||
onClick={(ev) => openURL(this.win, this.href, ev, this.routerDirection)}>
|
||||
<span class='button-inner'>
|
||||
<slot name='icon-only'></slot>
|
||||
<slot name='start'></slot>
|
||||
|
Reference in New Issue
Block a user