servo/components/script_bindings
Kingsley Yung e3818a33c0
script_bindings(python): Handle WebIDL methods named with Rust keywords (#39343)
Some WebIDL methods, attributes and dictionary members are named with
Rust keywords such as `type`, `use` and `continue`. Using those
identifiers directly in the generated Rust code would cause compilation
errors.

The code generator already addresses this issue for attributes and
dictionary members by adding a `_` suffix to the conflicting
identifiers, but does not yet apply the same treatment to methods. This
patch extends the handling to methods as well.

Fixes: #39286

Signed-off-by: Kingsley Yung <kingsley@kkoyung.dev>
2025-09-17 04:09:02 +00:00
..
codegen script_bindings(python): Handle WebIDL methods named with Rust keywords (#39343) 2025-09-17 04:09:02 +00:00
webidls Add signal to request (#39290) 2025-09-16 20:41:12 +00:00
build.rs Mergeruff.toml into pyproject.toml (#37741) 2025-07-04 12:21:48 +00:00
callback.rs script: Measure heap usage of various ignored fields (#38791) 2025-08-20 08:43:58 +00:00
Cargo.toml script: Pass more information to the MouseEvent constructor (#37672) 2025-06-25 12:29:27 +00:00
constant.rs Update rustfmt to the 2024 style edition (#35764) 2025-03-03 11:26:53 +00:00
constructor.rs Move generated bindings to script_bindings (#36323) 2025-04-04 06:45:08 +00:00
conversions.rs script: Make root_from_handle_value a safe function by accepting SafeJSContext (#39193) 2025-09-09 19:26:02 +00:00
error.rs script: Add message to SyntaxError (#39056) 2025-09-02 05:51:36 +00:00
finalize.rs script_bindings Start wrapping unsafe code in unsafe {} (#38545) 2025-08-08 12:21:31 +00:00
guard.rs Move generated bindings to script_bindings (#36323) 2025-04-04 06:45:08 +00:00
import.rs Make ImageData more spec compliant (#37620) 2025-06-25 16:48:58 +00:00
inheritance.rs More miscellaneous script splitting changes (#36220) 2025-03-30 11:06:30 +00:00
interface.rs script: Add support for creating globals in isolated compartments (#38236) 2025-07-23 11:34:37 +00:00
interfaces.rs codegen: use FromJSValConvertible trait for Promise (#36966) 2025-05-12 11:05:46 +00:00
iterable.rs Move generated bindings to script_bindings (#36323) 2025-04-04 06:45:08 +00:00
lib.rs script_bindings: Assert that serializable/transferable types have accurate WebIDL annotations (#38615) 2025-08-13 08:36:04 +00:00
like.rs Move more bindings types to script_bindings (#35620) 2025-02-23 14:25:46 +00:00
lock.rs Miscellaneous script splitting preparation changes (#36216) 2025-03-29 08:11:27 +00:00
mem.rs script_bindings Start wrapping unsafe code in unsafe {} (#38545) 2025-08-08 12:21:31 +00:00
namespace.rs Move generated bindings to script_bindings (#36323) 2025-04-04 06:45:08 +00:00
num.rs script: Implement QuotaExceededError WebIDL interface (#38507) 2025-08-14 17:58:50 +00:00
principals.rs Move generated bindings to script_bindings (#36323) 2025-04-04 06:45:08 +00:00
proxyhandler.rs script_bindings: Remove jsstring_to_str (#38527) 2025-08-09 11:50:14 +00:00
realms.rs cargo: Bump rustc to 1.89 (#36818) 2025-08-19 11:07:53 +00:00
record.rs Implement URLPattern::{text, exec} (#37044) 2025-05-24 11:12:11 +00:00
reflector.rs cargo: Bump rustc to 1.89 (#36818) 2025-08-19 11:07:53 +00:00
root.rs script_bindings: Remove Cell wrapper from thread-local RootCollection. (#39043) 2025-08-30 19:47:26 +00:00
script_runtime.rs Move more bindings code to script_bindings (#35578) 2025-02-22 04:46:56 +00:00
settings_stack.rs Move generated bindings to script_bindings (#36323) 2025-04-04 06:45:08 +00:00
str.rs script_bindings Start wrapping unsafe code in unsafe {} (#38545) 2025-08-08 12:21:31 +00:00
structuredclone.rs script_bindings: Assert that serializable/transferable types have accurate WebIDL annotations (#38615) 2025-08-13 08:36:04 +00:00
trace.rs cargo: Bump rustc to 1.89 (#36818) 2025-08-19 11:07:53 +00:00
utils.rs script: Make set_dictionary_property a safe function (#39191) 2025-09-07 11:56:20 +00:00
weakref.rs Move generated bindings to script_bindings (#36323) 2025-04-04 06:45:08 +00:00