polymer only works when launched with chrome dev editor - polymer

It's more of a question of why rather than please fix this. Polymer elements are made for websites, not just chrome apps, right? So why when I open the html file with chrome does it not work but when I run it with chrome dev editor and it opens with chrome does it work? I'd like to build a website using polymer elements, and I'm more than happy to use chrome dev editor, I just wanna know how it'll work if I try to publish.

In order to run a website or webpage that is build with Polymer you will need a server.
Chrome Dev Editor provides a local server when we try to run our code, thus it works from Chrome Dev Editor. However when you open the html file with chrome there is no server set up.
When you run using Chrome Dev Editor you can see in address bar something like this http://127.0.0.1:31999/test/test.html
However when you try opening the html file in chrome you can see in address bar something like this file:///D:/Users/test/test.html
If you don't want Chrome Dev Editor to run your code then you can have local server set up using NodeJS etc. Or use editors like Brackets - it will set up a local server and run your webpage in browser.

Related

In VS code, whenever I save a file in Html its being saved as Brave Html document when I actually want it to save as Chrome Html doc. How to do it?

Earlier I used to have Brave as my default browser and installed vs code using Brave browser. I then uninstalled vs code and reinstalled it from chrome browser. Still I'm getting the same problem.
Right click then click open with and choose more apps and select chrome then select always open with chrome and tada.

file not found error in chrome for html code

I have been trying to open html file from my desktop folder using chrome. It shows file_not_found it may be deleted or moved. But same is getting open in Edge browser. I'm using windows 10. code written in VS Code editor. Need help. I'm a beginner in programming language.
Install a live-server extension in VS code then you can serve your page from there
You can download from the extensions tab by searching live Server by ritwickdey or
use this link https://marketplace.visualstudio.com/items?itemName=ritwickdey.LiveServer

Chrome 32 - Tab opened with chrome extension doesn't render plug-in correctly

We have a Chrome extension that can be used to open a page into our website. From there the user then continues onto the next page which has a custom NPAPI plug-in embedded in it. This has always worked fine. However, since the version 32 update the plug-in loads and runs (it's a video conferencing plug-in and is clearly running as the other side can see video) however it doesn't show up on the page. Examining the DOM everything looks fine. Grabbing the border and re-sizing the browser will cause the plug-in to suddenly render correctly. I've tried all manner of javascript/css tricks to try and mimic this behavior as a workaround but nothing works. Tabs opened manually (not using chrome.tabs.create) work fine.
This worked up till 32.
Any ideas around this?
Chrome 32 is phasing out NPAPI, read the announcement here.
There is a deprecation guide that you can read here.
It seems like Google wants you to use it's Native Client tech to run native compiled code on user's machines. It is cool stuff...but so far I've found it difficult/more limiting to work with when compared to NPAPI (but there are obvious upsides, security for instance).
You could also build a native app and use native message passing to communicate from extension -> app. Once downside to this is that there is currently no way to bundle a native app into an extension install, so the user will need to download and install your app separately.

Netbeans with Chrome integration on HTML5 project

I have successfully installed both netbeans and the chrome extension for doing html/css/js work. It appears to work for the most part but I've seen some questionable activity that is... "limiting".
Netbeans > Chrome seems like a fragile interaction. In netbeans, I select run file, and the page opens in chrome always in a new window (is that right?). Part of the marketing here is that you're supposed to be able to edit the css without having to constantly go to the browser and reload. But in netbeans, when I go to the tab of the css file (in the same project), the chrome page bombs with the Dead Folder icon and the text "Something went wrong while displaying this webpage".
What's supposed to be the process here? It seems to work in principle, but not in practice.
[update]
I had also had the addon problem that if I did Run Main Project while looking at the css file, it would show the css file as if it were the main html file. After setting chrome as the default browser, this action shows the actual main html file. At that point, making any change to the css file, any typing at all, will bomb the chrome page.
Take a look at this tutorial.
Once you run a page/project in Chrome with NetBeans integration, in NetBeans there is a window CSS Styles and slightly different Navigator (in 7.3). Now in browser you can start Inspect mode (for instance right click on NetBeans logo in omnibar and check "Inspect in NetBeans mode") and then you can for instance click on elements in browser and if you do that, the CSS Styles window in IDE shows all css properties and rules applied to selected element. You can edit CSS from either CSS Styles or by plain old editing of CSS file in NetBeans. In both cases, changes are visible in Chrome without any reload (without even saving the css file). And you can also use JavaScript debugger in NetBeans.
I don't know what do you mean by "chrome page bombs", but page cannot be debugged by 2 "debuggers" at the same time in Chrome - so you can either use NetBeans or Chrome Developer tools.
There are many new features in the upcoming NetBeans 7.4 (you can download 7.4 Beta from netbeans.org). You can try it as well.

Not able to copy text,XPath or other attribute from the chrome developer tool

I followed the approach mentioned in how to emulate a mobile (android) browser on desktop
to project the mobile webpage's properties on desktop chrome browser. I was successfully able to do that but now I have some queries as mentioned below, please let me know your inputs on that
a) How to use the "Select element option" of chrome developer toolbar to view an element's property for a mobile webpage. In normal desktop chrome browser we have the web page displayed and below that the developer toolbar is displayed and we can easily spot the element using a pointer but with mobile webpage displayed on desktop chrome browser i am not able to use this option as the webpage is not displayed.
b) I tried to copy the xpath and other things from the displayed HTML (HTML of mobile webpage on desktop chrome browser) but it gave me an error that "You need to install a Chrome extension that grants clipboard access to Developer tools". I installed one such extension named: "Auto Copy" but then also I was not able to copy. Please let me know how to go about it.
Thanks a lot in advance,
Namit
For (B) – Judging from the discussion when that message was introduced, it sounds like you need to roll your own simple custom extension to enable clipboard access. Here's a sample manifest.json – I haven't tested it out myself, but it looks pretty straightforward. The extension development Getting Started guide explains how to turn a file like this into a working extension and install it locally.