Skip to content

feat: comprehensive browser runtime enhancements and string manipulation functions#12

Open
ferrlindev wants to merge 7 commits into
maxmindlin:mainfrom
ferrlindev:support-other-browser-runtime
Open

feat: comprehensive browser runtime enhancements and string manipulation functions#12
ferrlindev wants to merge 7 commits into
maxmindlin:mainfrom
ferrlindev:support-other-browser-runtime

Conversation

@ferrlindev
Copy link
Copy Markdown

This PR implements comprehensive browser runtime enhancements and adds essential string/DOM manipulation functions to the Scout interpreter.

Key Enhancements

String Functions

  • trim(), trimStart(), trimEnd()
  • toLowerCase(), toUpperCase()
  • split(), replace()

DOM Functions

  • attr() for element attributes

Improvements

  • Fixed EvalError(InvalidFnParams) for missing elements
  • Enhanced error handling
  • Fixed lifetime warnings
  • Updated documentation

Files Changed

  • scout-interpreter/src/builtin.rs
  • scout-interpreter/src/object.rs
  • scout-interpreter/tests/builtin_tests.rs
  • examples/ (various script fixes)
  • docs/browser-setup.md (new comprehensive guide)

Testing

All tests pass, including browser integration tests and new string function tests.

See docs/browser-setup.md for detailed browser setup instructions.

ferrlindev added 7 commits May 9, 2026 01:04
- Add trim functions: trim(), trimStart(), trimEnd()
- Add case conversion: toLowerCase(), toUpperCase()
- Add string operations: split(), replace()
- Add DOM attribute access: attr() function
- Fix element function error handling for missing/null elements
- Update example scripts to use correct selectors and syntax
- Add comprehensive tests for new builtin functions

Resolves EvalError(InvalidFnParams) when selectors don't match elements
Enables full string manipulation and DOM attribute access in Scout scripts
- Fix lifetime elision warnings by adding explicit '_ lifetimes
- Update to_display() and obj_map_to_json() function signatures
- Eliminates 'hiding a lifetime that's elided elsewhere' warnings

Resolves compiler warnings about confusing lifetime syntax
- Document Firefox and Chrome setup for macOS/Linux/Windows
- Include ChromeDriver version compatibility guide
- Add troubleshooting section for common issues
- Provide CI/CD setup examples
- Include testing instructions
@ferrlindev ferrlindev force-pushed the support-other-browser-runtime branch from d82c442 to a3de4e8 Compare May 9, 2026 05:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant