Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Added Reverse Inspect feature in MultiBrowserLive Preview using the existing Websocket transport architecture #13103

Merged
merged 1 commit into from
Feb 22, 2017

Conversation

saurabh95
Copy link
Contributor

@saurabh95 saurabh95 commented Feb 14, 2017

  • Will add tests for reverse inspect in both Live Preview and Multibrowser Live Preview

@@ -337,7 +337,7 @@ function RemoteFunctions(experimental, remoteWSPort) {
_trigger(element, "highlight", 1);
}

if (!window.event && !isInViewport(element)) {
if ((!window.event || window.event instanceof MessageEvent) && !isInViewport(element)) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

check for window.event instanceof MessageEvent is added because in latest version of chrome, when it receives a message through websocket, then it considers it as window event and thus window.event is true, so we are bypassing such scenario by checking if the event is of type Message, then we can safely ignore this.

@swmitra
Copy link
Collaborator

swmitra commented Feb 22, 2017

@saurabh95 Please create a task to update and add tests for this feature post 1.9 release. Great work 👍

@swmitra
Copy link
Collaborator

swmitra commented Feb 22, 2017

Merging...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants