<postprocess>, fix tab open/close, fix some URL bugs
This commit is contained in:
@@ -430,6 +430,9 @@ func get_all_images() -> Array[String]:
|
||||
func get_all_scripts() -> Array[String]:
|
||||
return get_attribute_values("script", "src")
|
||||
|
||||
func get_all_postprocess() -> Array[String]:
|
||||
return get_attribute_values("postprocess", "src")
|
||||
|
||||
func process_scripts(lua_api: LuaAPI, _lua_vm) -> void:
|
||||
if not lua_api:
|
||||
print("Warning: Lua API not available for script processing")
|
||||
@@ -459,6 +462,14 @@ func process_external_scripts(lua_api: LuaAPI, _lua_vm, base_url: String = "") -
|
||||
if not script_content.is_empty():
|
||||
lua_api.execute_lua_script(script_content)
|
||||
|
||||
func process_postprocess() -> HTMLParser.HTMLElement:
|
||||
var postprocess_elements = find_all("postprocess")
|
||||
if postprocess_elements.is_empty():
|
||||
return null
|
||||
|
||||
# Return the last postprocess element (last defined wins)
|
||||
return postprocess_elements[-1]
|
||||
|
||||
func get_all_stylesheets() -> Array[String]:
|
||||
return get_attribute_values("style", "src")
|
||||
|
||||
|
||||
@@ -672,7 +672,7 @@ func _handle_dom_operation(operation: Dictionary):
|
||||
"get_text":
|
||||
_handle_text_getting(operation)
|
||||
"append_element":
|
||||
LuaDOMUtils.handle_element_append(operation, dom_parser, self)
|
||||
LuaDOMUtils.handle_element_append(operation, dom_parser)
|
||||
"add_class":
|
||||
LuaClassListUtils.handle_add_class(operation, dom_parser)
|
||||
"remove_class":
|
||||
@@ -682,7 +682,7 @@ func _handle_dom_operation(operation: Dictionary):
|
||||
"remove_element":
|
||||
LuaDOMUtils.handle_element_remove(operation, dom_parser)
|
||||
"insert_before":
|
||||
LuaDOMUtils.handle_insert_before(operation, dom_parser, self)
|
||||
LuaDOMUtils.handle_insert_before(operation, dom_parser)
|
||||
"insert_after":
|
||||
LuaDOMUtils.handle_insert_after(operation, dom_parser)
|
||||
"replace_child":
|
||||
|
||||
Reference in New Issue
Block a user