mirror of
https://github.com/MercuryWorkshop/scramjet.git
synced 2025-05-13 14:30:02 -04:00
temporary hack, we need a full rewrite of element.ts
This commit is contained in:
parent
b9f4eba034
commit
acfa6d2c8a
1 changed files with 7 additions and 0 deletions
|
@ -82,6 +82,13 @@ export default function (client: ScramjetClient, self: typeof window) {
|
||||||
self.Element.prototype.getAttribute,
|
self.Element.prototype.getAttribute,
|
||||||
{
|
{
|
||||||
apply(target, thisArg, argArray) {
|
apply(target, thisArg, argArray) {
|
||||||
|
if (
|
||||||
|
attrs.includes(argArray[0]) &&
|
||||||
|
thisArg.hasAttribute(`data-${argArray[0]}`)
|
||||||
|
) {
|
||||||
|
return thisArg.getAttribute(`data-${argArray[0]}`);
|
||||||
|
}
|
||||||
|
|
||||||
if (attrs.includes(argArray[0]) && thisArg.$origattrs[argArray[0]]) {
|
if (attrs.includes(argArray[0]) && thisArg.$origattrs[argArray[0]]) {
|
||||||
return thisArg.$origattrs[argArray[0]];
|
return thisArg.$origattrs[argArray[0]];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue