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

iframe #943

Merged
merged 9 commits into from
Aug 26, 2023
Merged

iframe #943

merged 9 commits into from
Aug 26, 2023

Conversation

GarboMuffin
Copy link
Member

@GarboMuffin GarboMuffin commented Aug 24, 2023

only works in staging right now

Copy link
Contributor

@LilyMakesThings LilyMakesThings left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Try running this script; the X and Y values don't appear to line up with how someone would expect them to work.
image

extensions/iframe.js Outdated Show resolved Hide resolved
@GarboMuffin
Copy link
Member Author

apparently i did just forget to test if y position worked

@GarboMuffin
Copy link
Member Author

i dont remember if we get any mouse events at all while an iframe is focused, will have to see

@Ianyourgod
Copy link

the set x position and y position work kinda weird. it will only reset it to the new value if that value is not within the iframe at all. A better way to do this (imo) would be to just always set the middle to that position. I think this is what lily was saying. It seems that the mouse x and y do not change while it is over the iframe. You could add an event listener to the iframe that while set those things.

@GarboMuffin
Copy link
Member Author

Unfortunately browsers just dont give us mouse events while you're hovering over the iframe. you may notice another Scratch mod's version of this has the same problem.

@Ianyourgod
Copy link

could yuo use messages to send back the mouse pos to the main page?

@GarboMuffin
Copy link
Member Author

How do you propose I run custom scripts on https://example.com?

@Ianyourgod
Copy link

oh.

@GarboMuffin
Copy link
Member Author

There is very good reason for browsers to do that. Consider if I found a way to embed Wordle. By looking at your mouse movements I could figure out which words you're typing with the on-screen keyboard. That's relatively harmless, but now consider that it's not Wordle, but rather your bank. That's the problem

@GarboMuffin
Copy link
Member Author

might be wrong about this actually, wait

@GarboMuffin
Copy link
Member Author

Aside from the mouse events not firing when the frame is being hovered issue -- what other blocks should be added?

@NexusKitten

This comment was marked as spam.

@GarboMuffin GarboMuffin merged commit bac9645 into master Aug 26, 2023
3 checks passed
@GarboMuffin GarboMuffin deleted the iframe branch August 26, 2023 17:09
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.

4 participants