-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(ui5-tooling-modules): ensure scoping suffix is set before define …
…of modules (#1123)
- Loading branch information
1 parent
774a209
commit db10bd3
Showing
11 changed files
with
12,886 additions
and
5,256 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
packages/ui5-tooling-modules/lib/templates/monkey_patches/RegisterAllEvents.hbs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// Will be fixed with TBD in UI5 1.130 | ||
import hyphenate from "sap/base/strings/hyphenate"; | ||
import WebComponent from "sap/ui/core/webc/WebComponent"; | ||
|
||
WebComponent.prototype.__attachCustomEventsListeners = function() { | ||
// ##### MODIFICATION START ##### | ||
var oEvents = this.getMetadata().getAllEvents(); | ||
// ##### MODIFICATION END ##### | ||
for (var sEventName in oEvents) { | ||
var sCustomEventName = hyphenate(sEventName); | ||
this.getDomRef().addEventListener(sCustomEventName, this.__handleCustomEventBound); | ||
} | ||
}; | ||
|
||
WebComponent.prototype.__detachCustomEventsListeners = function() { | ||
var oDomRef = this.getDomRef(); | ||
if (!oDomRef) { | ||
return; | ||
} | ||
|
||
// ##### MODIFICATION START ##### | ||
var oEvents = this.getMetadata().getAllEvents(); | ||
// ##### MODIFICATION END ##### | ||
for (var sEventName in oEvents) { | ||
if (oEvents.hasOwnProperty(sEventName)) { | ||
var sCustomEventName = hyphenate(sEventName); | ||
oDomRef.removeEventListener(sCustomEventName, this.__handleCustomEventBound); | ||
} | ||
} | ||
}; |
File renamed without changes.
31 changes: 30 additions & 1 deletion
31
packages/ui5-tooling-modules/test/__snap__/4370bd2f/@ui5/webcomponents-base.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
packages/ui5-tooling-modules/test/__snap__/4370bd2f/@ui5/webcomponents.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.