Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
react-vanilla
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Кубота
react-vanilla
Commits
3a185893
Commit
3a185893
authored
Feb 11, 2022
by
Иван Кубота
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix population of names with dashes.
Test Promise feature
parent
f5708865
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
DOM.js
DOM.js
+13
-0
No files found.
DOM.js
View file @
3a185893
...
...
@@ -327,6 +327,9 @@ NS.apply = function(a,b) {
isInDOM
&&
D
.
_recursiveCmpCall
(
el
,
{
childNodes
:
newChild
},
'afterAddToDOM'
);
};
var
_Promise
=
Promise
;
D
.
appendChild
=
function
(
el
,
subEl
){
var
type
=
typeof
subEl
;
...
...
@@ -336,6 +339,15 @@ NS.apply = function(a,b) {
var
notObject
=
type
!==
'object'
;
var
isHook
=
!
notObject
&&
(
'hook'
in
subEl
);
if
(
subEl
instanceof
_Promise
){
var
origin
=
subEl
;
subEl
=
function
(
update
)
{
origin
.
then
(
function
(
a
,
b
)
{
update
(
a
);
});
}
}
if
(
isHook
){
type
=
'function'
;
notObject
=
true
;
}
...
...
@@ -535,6 +547,7 @@ NS.apply = function(a,b) {
first
=
tokens
.
shift
();
// ES 6 consts are not in global scope. So we can not just add vars to window
first
=
first
.
replace
(
/-/g
,
''
);
var
pointer
=
first
?
new
Function
(
'glob'
,
'return typeof '
+
first
+
' !== "undefined"?'
+
first
+
':(glob["'
+
first
+
'"] = {})'
)(
glob
)
:
glob
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment