New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 781088 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit 28 days ago
Closed: Dec 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Feature



Sign in to add a comment

Minor Feature Request: Highlight .mjs as JavaScript in the devtools source editor for workspace files

Reported by thejames...@gmail.com, Nov 3 2017

Issue description

UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.75 Safari/537.36

Steps to reproduce the problem:
Open any .mjs file that was added to the Sources workspace and it will be simply be highlighted as plaintext rather than JavaScript.

NOTE: Files served by a webserver are highlighted correctly as Devtools does MIME checking, this only affects files that were added via Add File to workspace.

What is the expected behavior?
As Node.js is intending to support ES modules via the .mjs file extension it's likely to be commonly used in both Node.js and browser environments so it would be nice if Devtools supported highlighting those files as JavaScript by default.

What went wrong?
Devtools doesn't highlight .mjs files in all cases as explained above.

Did this work before? N/A 

Chrome version: 64.0.3251.0  Channel: dev
OS Version: 
Flash Version:
 
Labels: -Type-Bug M-64 Needs-Triage-M64 Type-Feature
Status: Untriaged (was: Unconfirmed)
This seems to be a feature request. Hence, marking it as untriaged for further inputs from dev team.
Thanks...!!
Owner: lushnikov@chromium.org
Status: Assigned (was: Untriaged)
Project Member

Comment 3 by bugdroid1@chromium.org, Nov 28 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/41f6d9bb9df60f3e4b231dabe099a81a041e34f8

commit 41f6d9bb9df60f3e4b231dabe099a81a041e34f8
Author: Andrey Lushnikov <lushnikov@chromium.org>
Date: Tue Nov 28 22:33:14 2017

DevTools: highlight *.mjs as javascript files

This patch starts treating *.mjs files as javascript files.

BUG= 781088 
R=dgozman

Change-Id: I58222d6b7ad3d1c3c3442048da9cf46692b23172
Reviewed-on: https://chromium-review.googlesource.com/794349
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Commit-Queue: Andrey Lushnikov <lushnikov@chromium.org>
Cr-Commit-Position: refs/heads/master@{#519870}
[modify] https://crrev.com/41f6d9bb9df60f3e4b231dabe099a81a041e34f8/third_party/WebKit/Source/devtools/front_end/common/ResourceType.js
[modify] https://crrev.com/41f6d9bb9df60f3e4b231dabe099a81a041e34f8/third_party/WebKit/Source/devtools/front_end/persistence/FileSystemWorkspaceBinding.js

Status: Fixed (was: Assigned)

Sign in to add a comment