Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion packages/core/application/application-common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import type { Frame } from '../ui/frame';
import type { NavigationEntry } from '../ui/frame/frame-interfaces';
import type { StyleScope } from '../ui/styling/style-scope';
import type { AndroidApplication as IAndroidApplication, iOSApplication as IiOSApplication } from './';
import type { ApplicationEventData, CssChangedEventData, DiscardedErrorEventData, FontScaleChangedEventData, LaunchEventData, LoadAppCSSEventData, NativeScriptError, OrientationChangedEventData, SystemAppearanceChangedEventData, UnhandledErrorEventData } from './application-interfaces';
import type { ApplicationEventData, CssChangedEventData, DiscardedErrorEventData, FontScaleChangedEventData, InitRootViewEventData, LaunchEventData, LoadAppCSSEventData, NativeScriptError, OrientationChangedEventData, SystemAppearanceChangedEventData, UnhandledErrorEventData } from './application-interfaces';

// prettier-ignore
const ORIENTATION_CSS_CLASSES = [
Expand Down Expand Up @@ -125,6 +125,7 @@ export class ApplicationCommon {
readonly livesyncEvent = 'livesync';
readonly loadAppCssEvent = 'loadAppCss';
readonly cssChangedEvent = 'cssChanged';
readonly initRootViewEvent = 'initRootView';

// Expose statically for backwards compat on AndroidApplication.on etc.
/**
Expand Down Expand Up @@ -368,6 +369,7 @@ export class ApplicationCommon {
this.setRootViewCSSClasses(rootView);
initAccessibilityCssHelper();
initAccessibilityFontScale();
this.notify(<InitRootViewEventData>{ eventName: this.initRootViewEvent, rootView });
}

/**
Expand Down
7 changes: 7 additions & 0 deletions packages/core/application/application-interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,13 @@ export interface CssChangedEventData extends ApplicationEventData {
cssText?: string;
}

/**
* Event data containing information about application css change.
*/
export interface InitRootViewEventData extends ApplicationEventData {
rootView: View;
}

/**
* Data for the Android activity events.
*/
Expand Down