Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(web): support web renderer for 3.0 #4043

Merged
merged 25 commits into from
Sep 19, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
f0a3970
feat(web-renderer): init web-renderer
gguoyu Jul 4, 2023
c52d724
feat(web-renderer): node operate & node event logic commit
gguoyu Jul 7, 2023
68c122d
feat(web-renderer): compatible 3.x ui module change
gguoyu Jul 7, 2023
7cf49df
feat(web-renderer): compatible 3.x event system change
gguoyu Jul 10, 2023
8e22ac9
feat(web-renderer): compatible 3.x event system change
gguoyu Jul 10, 2023
3b868a1
feat(web-renderer): compatible 3.x image & input component change
gguoyu Jul 11, 2023
088d05b
feat(web-renderer): compatible 3.x swiper component change
gguoyu Jul 11, 2023
64810a9
feat(web-renderer): compatible 3.x event & component change
gguoyu Jul 12, 2023
f944211
feat(web-renderer): remove unused type
gguoyu Jul 12, 2023
8355f69
feat(web-renderer): fix getBoundingClientRect callback issue
gguoyu Jul 12, 2023
bb38f27
feat(web-renderer): support dynamicLoad & global variable
gguoyu Jul 13, 2023
cd82947
feat(web-renderer): simple fix list-view scroll outside range issue
gguoyu Jul 13, 2023
a9f9e26
feat(web-renderer): fix nested scroll demo issue
gguoyu Jul 14, 2023
be170a4
feat(web-renderer): fix text-input default value issue
gguoyu Jul 14, 2023
9151c03
feat(web-renderer): fix build type mismatch issue
gguoyu Jul 14, 2023
7b48a68
feat(web-renderer): fix react demo misspelling name
gguoyu Jul 14, 2023
dd69b5c
feat(web-renderer): add animation support
gguoyu Jul 27, 2023
d57f68c
Merge branch 'Tencent:main' into feature/support-webrenderer-for-3.0
gguoyu Aug 30, 2023
2737544
feat(web-render): fix e2e test issue & update docs
gguoyu Aug 30, 2023
9237ee0
feat(web-render): remove unused code
gguoyu Aug 30, 2023
696f203
fix(web-renderer): fix codeReview issue
gguoyu Sep 22, 2023
4c52f90
fix(vue-next): fix vue patchProp params type issue
gguoyu Mar 18, 2024
6b50f54
Merge remote-tracking branch 'origin/feature/support-webrenderer-for-…
gguoyu Mar 18, 2024
dd97912
feat(vue): support ul refresh scroll (#4032)
zealotchen0 Sep 18, 2024
da6a8b9
feat(web): fix dymamic load for web render
zealotchen0 Sep 19, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat(web-renderer): support dynamicLoad & global variable
  • Loading branch information
gguoyu committed Jul 13, 2023
commit bb38f27bc7c589a0a17d0e29fae56e0c159ae8d7
23 changes: 13 additions & 10 deletions driver/js/packages/hippy-web-renderer/src/env/dynamic-load.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,17 @@
* limitations under the License.
*/

import { warn } from '../common';

export const dynamicLoad = (/* path, encode, cb */) => {
warn('dynamicLoad is unsupported');
// let requestPath = path || '';
// const isSchema = ['https://', 'http://', '//'].some(schema => requestPath.indexOf(schema) === 0);
// if (!isSchema) {
// requestPath = global.__HIPPYCURDIR__ + path;
// }
// ContextifyModule.LoadUntrustedContent(requestPath, encode, cb);
export const dynamicLoad = (path: string, cb) => {
const s = document.createElement('script');
s.async = true;
s.setAttribute('src', path);
if (cb) {
s.onload = () => {
cb();
};
s.onerror = () => {
cb('load script error');
};
}
document.head.appendChild(s);
};
5 changes: 5 additions & 0 deletions driver/js/packages/hippy-web-renderer/src/env/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ import { dynamicLoad } from './dynamic-load';

const global = getGlobal();

if (typeof window !== 'undefined') {
// compatible global variable used
window.global = global as any;
}

// global
global.Hippy = {} as any;
global.__GLOBAL__ = {} as any;
Expand Down