|
@@ -125,6 +125,21 @@ export class AbstractApp extends Component {
|
125
|
125
|
dispatch(appWillUnmount(this));
|
126
|
126
|
}
|
127
|
127
|
|
|
128
|
+ /**
|
|
129
|
+ * Gets a Location object from the window with information about the current
|
|
130
|
+ * location of the document. Explicitly defined to allow extenders to
|
|
131
|
+ * override because React Native does not usually have a location property
|
|
132
|
+ * on its window unless debugging remotely in which case the browser that is
|
|
133
|
+ * the remote debugger will provide a location property on the window.
|
|
134
|
+ *
|
|
135
|
+ * @public
|
|
136
|
+ * @returns {Location} A Location object with information about the current
|
|
137
|
+ * location of the document.
|
|
138
|
+ */
|
|
139
|
+ getWindowLocation() {
|
|
140
|
+ return undefined;
|
|
141
|
+ }
|
|
142
|
+
|
128
|
143
|
/**
|
129
|
144
|
* Implements React's {@link Component#render()}.
|
130
|
145
|
*
|
|
@@ -226,7 +241,7 @@ export class AbstractApp extends Component {
|
226
|
241
|
// If the execution environment provides a Location abstraction, then
|
227
|
242
|
// this App at already at that location but it must be made aware of the
|
228
|
243
|
// fact.
|
229
|
|
- const windowLocation = this._getWindowLocation();
|
|
244
|
+ const windowLocation = this.getWindowLocation();
|
230
|
245
|
|
231
|
246
|
if (windowLocation) {
|
232
|
247
|
const href = windowLocation.toString();
|
|
@@ -272,21 +287,6 @@ export class AbstractApp extends Component {
|
272
|
287
|
return store;
|
273
|
288
|
}
|
274
|
289
|
|
275
|
|
- /**
|
276
|
|
- * Gets a Location object from the window with information about the current
|
277
|
|
- * location of the document. Explicitly defined to allow extenders to
|
278
|
|
- * override because React Native does not usually have a location property
|
279
|
|
- * on its window unless debugging remotely in which case the browser that is
|
280
|
|
- * the remote debugger will provide a location property on the window.
|
281
|
|
- *
|
282
|
|
- * @protected
|
283
|
|
- * @returns {Location} A Location object with information about the current
|
284
|
|
- * location of the document.
|
285
|
|
- */
|
286
|
|
- _getWindowLocation() {
|
287
|
|
- return undefined;
|
288
|
|
- }
|
289
|
|
-
|
290
|
290
|
/**
|
291
|
291
|
* Creates a Redux store to be used by this AbstractApp if such as store is
|
292
|
292
|
* not defined by the consumer of this AbstractApp through its
|