Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Further simplification of the javascript loading code. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | refactor-js-handling |
Files: | files | file ages | folders |
SHA3-256: |
b7f70ffc14489d7fd320f96b6f4905f1 |
User & Date: | drh 2020-07-31 21:57:18.316 |
Context
2020-07-31
| ||
22:04 | Simplify the internal interfaces used for injecting built-in Javascript files onto a web page. ... (check-in: 036a9d5c58 user: drh tags: trunk) | |
21:57 | Further simplification of the javascript loading code. ... (Closed-Leaf check-in: b7f70ffc14 user: drh tags: refactor-js-handling) | |
21:47 | Replace various style_emit_script...() calls with builtin_request_js(). ... (check-in: 699a977cfc user: drh tags: refactor-js-handling) | |
Changes
Changes to src/fileedit.c.
︙ | ︙ | |||
1954 1955 1956 1957 1958 1959 1960 | style_emit_script_fossil_bootstrap(0); append_diff_javascript(1); builtin_request_js("fossil.fetch.js"); builtin_request_js("fossil.dom.js"); builtin_request_js("fossil.tabs.js"); builtin_request_js("fossil.confirmer.js"); builtin_request_js("fossil.storage.js"); | < | > > | | 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 | style_emit_script_fossil_bootstrap(0); append_diff_javascript(1); builtin_request_js("fossil.fetch.js"); builtin_request_js("fossil.dom.js"); builtin_request_js("fossil.tabs.js"); builtin_request_js("fossil.confirmer.js"); builtin_request_js("fossil.storage.js"); /* ** Set up a JS-side mapping of the AJAX_RENDER_xyz values. This is ** used for dynamically toggling certain UI components on and off. ** Must come before fossil.page.fileedit.js and after the fetches ** above. */ builtin_fulfill_js_requests(); ajax_emit_js_preview_modes(1); builtin_request_js("fossil.page.fileedit.js"); if(blob_size(&endScript)>0){ style_emit_script_tag(0,0); CX("\n(function(){\n"); CX("try{\n%b}\n" "catch(e){" "fossil.error(e); console.error('Exception:',e);" "}\n", |
︙ | ︙ |
Changes to src/forum.c.
︙ | ︙ | |||
759 760 761 762 763 764 765 | */ static void forum_emit_page_js(){ static int once = 0; if(0==once){ once = 1; builtin_request_js("forum.js"); style_emit_script_fossil_bootstrap(0); | | | | 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 | */ static void forum_emit_page_js(){ static int once = 0; if(0==once){ once = 1; builtin_request_js("forum.js"); style_emit_script_fossil_bootstrap(0); builtin_request_js("fossil.dom.js"); builtin_request_js("fossil.page.forumpost.js"); } } /* ** WEBPAGE: forumpost ** ** Show a single forum posting. The posting is shown in context with |
︙ | ︙ |
Changes to src/style.c.
︙ | ︙ | |||
1465 1466 1467 1468 1469 1470 1471 | */ CX("window.fossil.page = {" "name:\"%T\"" "};\n", g.zPath); CX("})();\n"); /* The remaining fossil object bootstrap code is not dependent on ** C-runtime state... */ | < < < < | < | 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 | */ CX("window.fossil.page = {" "name:\"%T\"" "};\n", g.zPath); CX("})();\n"); /* The remaining fossil object bootstrap code is not dependent on ** C-runtime state... */ style_emit_script_tag(1,0); builtin_request_js("fossil.bootstrap.js"); } } /* ** If passed 0 as its first argument, it emits a script opener tag ** with this request's nonce. If passed non-0 it emits a script ** closing tag. Mnemonic for remembering the order in which to pass 0 |
︙ | ︙ | |||
1504 1505 1506 1507 1508 1509 1510 | }else{ CX("<script nonce='%s'>", style_nonce()); } }else{ CX("</script>\n"); } } | < < < < < < < < < < < < < < < < < < < < < < < < | 1499 1500 1501 1502 1503 1504 1505 | }else{ CX("<script nonce='%s'>", style_nonce()); } }else{ CX("</script>\n"); } } |