Core frame updates, and throw a system error if the frame and page details dont match

This commit is contained in:
Deon George
2022-05-13 16:13:46 +10:00
parent 7eaa99b4e6
commit 690c507d11
10 changed files with 7 additions and 9 deletions

View File

@@ -166,6 +166,10 @@ PageFrame.prototype.load = function(filename) {
this[SAVED_FRAME_ATTRS[property]] = load[SAVED_FRAME_ATTRS[property]];
}
// If the page doesnt match the filename, throw an error
if (this.page !== filename)
throw 'Frame doesnt match filename';
} catch (error) {
log(LOG_ERROR,'Frame error: '+error);