Coder Social home page Coder Social logo

webcomponentsjs's Introduction

webcomponentsjs's People

Contributors

addyosmani avatar aomarks avatar bbsteventill avatar bicknellr avatar dfreedm avatar dnmllr avatar ebidel avatar eeid26 avatar fluorescenthallucinogen avatar garlicnation avatar jacobrossi avatar jakemac53 avatar jmalonzo avatar justinfagnani avatar keanulee avatar kevinpschaaf avatar koenkivits avatar mysticatea avatar nazar-pc avatar nevir avatar notwaldorf avatar rictic avatar sorvell avatar talee avatar timoxley avatar timvdlippe avatar treshugart avatar valdrinkoshi avatar vicb avatar web-padawan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

webcomponentsjs's Issues

Unable to install Polymer/core-components

Get an error, seems no way around it, platform doesnt have tag.. I get various ways down the install..

bower platform#^0.5.0 ENORESTARGET No tag found that was able to satisfy ^0.5.0

E:\Programming\px>bower -V install --save Polymer/core-elements
bower platform#^0.5.0       not-cached https://github.com/Polymer/platform.git#^0.5.0
bower platform#^0.5.0          resolve https://github.com/Polymer/platform.git#^0.5.0
bower core-elements#*           cached https://github.com/Polymer/core-elements.git#0.5.0
bower core-elements#*         validate 0.5.0 against https://github.com/Polymer/core-elements.git#*
bower core-animation#^0.5.0     cached https://github.com/Polymer/core-animation.git#0.5.0
bower core-animation#^0.5.0   validate 0.5.0 against https://github.com/Polymer/core-animation.git#^0.5.0
bower core-doc-viewer#^0.5.0    cached https://github.com/Polymer/core-doc-viewer.git#0.5.0
bower core-doc-viewer#^0.5.0  validate 0.5.0 against https://github.com/Polymer/core-doc-viewer.git#^0.5.0
bower core-animated-pages#^0.5.0           cached https://github.com/Polymer/core-animated-pages.git#0.5.0
bower core-animated-pages#^0.5.0         validate 0.5.0 against https://github.com/Polymer/core-animated-pages.git#^0.5.0
bower core-drag-drop#^0.5.0                cached https://github.com/Polymer/core-drag-drop.git#0.5.0
bower core-drag-drop#^0.5.0              validate 0.5.0 against https://github.com/Polymer/core-drag-drop.git#^0.5.0
bower core-docs#^0.5.0                     cached https://github.com/Polymer/core-docs.git#0.5.0
bower core-docs#^0.5.0                   validate 0.5.0 against https://github.com/Polymer/core-docs.git#^0.5.0
bower core-dropdown#^0.5.0                 cached https://github.com/Polymer/core-dropdown.git#0.5.0
bower core-dropdown#^0.5.0               validate 0.5.0 against https://github.com/Polymer/core-dropdown.git#^0.5.0
bower core-drawer-panel#^0.5.0             cached https://github.com/Polymer/core-drawer-panel.git#0.5.0
bower core-drawer-panel#^0.5.0           validate 0.5.0 against https://github.com/Polymer/core-drawer-panel.git#^0.5.0
bower core-dropdown-menu#^0.5.0            cached https://github.com/Polymer/core-dropdown-menu.git#0.5.0
bower core-dropdown-menu#^0.5.0          validate 0.5.0 against https://github.com/Polymer/core-dropdown-menu.git#^0.5.0
bower core-collapse#^0.5.0                 cached https://github.com/Polymer/core-collapse.git#0.5.0
bower core-collapse#^0.5.0               validate 0.5.0 against https://github.com/Polymer/core-collapse.git#^0.5.0
bower core-header-panel#^0.5.0             cached https://github.com/Polymer/core-header-panel.git#0.5.0
bower core-header-panel#^0.5.0           validate 0.5.0 against https://github.com/Polymer/core-header-panel.git#^0.5.0
bower core-icons#^0.5.0                    cached https://github.com/Polymer/core-icons.git#0.5.0
bower core-icons#^0.5.0                  validate 0.5.0 against https://github.com/Polymer/core-icons.git#^0.5.0
bower core-image#^0.5.0                    cached https://github.com/Polymer/core-image.git#0.5.0
bower core-image#^0.5.0                  validate 0.5.0 against https://github.com/Polymer/core-image.git#^0.5.0
bower core-icon-button#^0.5.0              cached https://github.com/Polymer/core-icon-button.git#0.5.0
bower core-icon-button#^0.5.0            validate 0.5.0 against https://github.com/Polymer/core-icon-button.git#^0.5.0
bower core-input#^0.5.0                    cached https://github.com/Polymer/core-input.git#0.5.0
bower core-input#^0.5.0                  validate 0.5.0 against https://github.com/Polymer/core-input.git#^0.5.0
bower core-item#^0.5.0                     cached https://github.com/Polymer/core-item.git#0.5.0
bower core-item#^0.5.0                   validate 0.5.0 against https://github.com/Polymer/core-item.git#^0.5.0
bower core-label#^0.5.0                    cached https://github.com/Polymer/core-label.git#0.5.0
bower core-label#^0.5.0                  validate 0.5.0 against https://github.com/Polymer/core-label.git#^0.5.0
bower core-list#^0.5.0                     cached https://github.com/Polymer/core-list.git#0.5.0
bower core-list#^0.5.0                   validate 0.5.0 against https://github.com/Polymer/core-list.git#^0.5.0
bower core-localstorage#^0.5.0             cached https://github.com/Polymer/core-localstorage.git#0.5.0
bower core-localstorage#^0.5.0           validate 0.5.0 against https://github.com/Polymer/core-localstorage.git#^0.5.0
bower core-layout-trbl#^0.5.0              cached https://github.com/Polymer/core-layout-trbl.git#0.5.0
bower core-layout-trbl#^0.5.0            validate 0.5.0 against https://github.com/Polymer/core-layout-trbl.git#^0.5.0
bower core-layout-grid#^0.5.0              cached https://github.com/Polymer/core-layout-grid.git#0.5.0
bower core-layout-grid#^0.5.0            validate 0.5.0 against https://github.com/Polymer/core-layout-grid.git#^0.5.0
bower core-menu#^0.5.0                     cached https://github.com/Polymer/core-menu.git#0.5.0
bower core-menu#^0.5.0                   validate 0.5.0 against https://github.com/Polymer/core-menu.git#^0.5.0
bower core-media-query#^0.5.0              cached https://github.com/Polymer/core-media-query.git#0.5.0
bower core-media-query#^0.5.0            validate 0.5.0 against https://github.com/Polymer/core-media-query.git#^0.5.0
bower core-meta#^0.5.0                     cached https://github.com/Polymer/core-meta.git#0.5.0
bower core-meta#^0.5.0                   validate 0.5.0 against https://github.com/Polymer/core-meta.git#^0.5.0
bower core-menu-button#^0.5.0              cached https://github.com/Polymer/core-menu-button.git#0.5.0
bower core-menu-button#^0.5.0            validate 0.5.0 against https://github.com/Polymer/core-menu-button.git#^0.5.0
bower core-overlay#^0.5.0                  cached https://github.com/Polymer/core-overlay.git#0.5.0
bower core-overlay#^0.5.0                validate 0.5.0 against https://github.com/Polymer/core-overlay.git#^0.5.0
bower core-pages#^0.5.0                    cached https://github.com/Polymer/core-pages.git#0.5.0
bower core-pages#^0.5.0                  validate 0.5.0 against https://github.com/Polymer/core-pages.git#^0.5.0
bower core-range#^0.5.0                    cached https://github.com/Polymer/core-range.git#0.5.0
bower core-range#^0.5.0                  validate 0.5.0 against https://github.com/Polymer/core-range.git#^0.5.0
bower core-scroll-header-panel#^0.5.0      cached https://github.com/Polymer/core-scroll-header-panel.git#0.5.0
bower core-scroll-header-panel#^0.5.0    validate 0.5.0 against https://github.com/Polymer/core-scroll-header-panel.git#^0.5.0
bower core-selection#^0.5.0                cached https://github.com/Polymer/core-selection.git#0.5.0
bower core-selection#^0.5.0              validate 0.5.0 against https://github.com/Polymer/core-selection.git#^0.5.0
bower core-ajax#^0.5.0                     cached https://github.com/Polymer/core-ajax.git#0.5.0
bower core-ajax#^0.5.0                   validate 0.5.0 against https://github.com/Polymer/core-ajax.git#^0.5.0
bower core-scaffold#^0.5.0                 cached https://github.com/Polymer/core-scaffold.git#0.5.0
bower core-scaffold#^0.5.0               validate 0.5.0 against https://github.com/Polymer/core-scaffold.git#^0.5.0
bower core-signals#^0.5.0                  cached https://github.com/Polymer/core-signals.git#0.5.0
bower core-signals#^0.5.0                validate 0.5.0 against https://github.com/Polymer/core-signals.git#^0.5.0
bower core-selector#^0.5.0                 cached https://github.com/Polymer/core-selector.git#0.5.0
bower core-selector#^0.5.0               validate 0.5.0 against https://github.com/Polymer/core-selector.git#^0.5.0
bower core-splitter#^0.5.0                 cached https://github.com/Polymer/core-splitter.git#0.5.0
bower core-splitter#^0.5.0               validate 0.5.0 against https://github.com/Polymer/core-splitter.git#^0.5.0
bower core-shared-lib#^0.5.0               cached https://github.com/Polymer/core-shared-lib.git#0.5.0
bower core-shared-lib#^0.5.0             validate 0.5.0 against https://github.com/Polymer/core-shared-lib.git#^0.5.0
bower core-style#^0.5.0                    cached https://github.com/Polymer/core-style.git#0.5.0
bower core-style#^0.5.0                  validate 0.5.0 against https://github.com/Polymer/core-style.git#^0.5.0
bower core-toolbar#^0.5.0                  cached https://github.com/Polymer/core-toolbar.git#0.5.0
bower core-toolbar#^0.5.0                validate 0.5.0 against https://github.com/Polymer/core-toolbar.git#^0.5.0
bower core-tests#^0.5.0                    cached https://github.com/Polymer/core-tests.git#0.5.0
bower core-tests#^0.5.0                  validate 0.5.0 against https://github.com/Polymer/core-tests.git#^0.5.0
bower sampler-scaffold#^0.5.0              cached https://github.com/Polymer/sampler-scaffold.git#0.5.0
bower sampler-scaffold#^0.5.0            validate 0.5.0 against https://github.com/Polymer/sampler-scaffold.git#^0.5.0
bower core-transition#^0.5.0               cached https://github.com/Polymer/core-transition.git#0.5.0
bower core-transition#^0.5.0             validate 0.5.0 against https://github.com/Polymer/core-transition.git#^0.5.0
bower core-tooltip#^0.5.0                  cached https://github.com/Polymer/core-tooltip.git#0.5.0
bower core-tooltip#^0.5.0                validate 0.5.0 against https://github.com/Polymer/core-tooltip.git#^0.5.0
bower core-field#^0.5.0                    cached https://github.com/Polymer/core-field.git#0.5.0
bower core-field#^0.5.0                  validate 0.5.0 against https://github.com/Polymer/core-field.git#^0.5.0
bower platform#^0.5.0                ENORESTARGET No tag found that was able to satisfy ^0.5.0

Additional error details:
Available versions: 0.4.2, 0.4.1, 0.4.0, 0.3.6, 0.3.5, 0.3.4, 0.3.3, 0.3.2, 0.3.1, 0.3.0, 0.2.4, 0.2.3, 0.2.2, 0.2.1, 0.2.0, 0.1.4, 0.1.
, 0.0.20131003, 0.0.20130912, 0.0.20130905, 0.0.20130829, 0.0.20130816


Error: No tag found that was able to satisfy ^0.5.0

System info:
Bower version: 1.3.12
Node version: 0.10.31
OS: Windows_NT 6.1.7601 x64

E:\Programming\px>

CustomElements - document.importNode/adoptNode does not upgrade custom elements

Using document.importNode/adoptNode on a page using the custom elements polyfill (eg: Firefox, IE) does not perform upgrading of custom elements. Performing the same function on browsers with a native implementation (ie: Chrome) triggers the upgrade instantly.

Note: I've not tried this with a proper Polymer element, this is simply when using only the custom elements polyfill.

An example of this issue can be seen at http://jsfiddle.net/0hj3u6p4/4/

On Chrome, the output shows both "mod-copy1" and "mod-copy2". On other browsers, it only shows "mod-copy2".

Add CustomEvent test

This should be in both HTMLImports and CustomElements tests. It should verify specifically that event.detail can be used.

MutationObserver polyfill included but not needed in platform.js

Issue by jmesserly
Tuesday Sep 23, 2014 at 03:56 GMT
Originally opened as https://github.com/Polymer/platform-dev/issues/52


CustomElements and HTMLImports transitively pull in https://github.com/Polymer/MutationObservers

however this is not needed because https://github.com/Polymer/ShadowDOM/blob/master/src/MutationObserver.js always kicks in first, so it's just dead code.

In other words, I think it's safe to assume browser_has_shadowdom implies browser_has_mutationobservers, especially given MO's are implemented everywhere now http://caniuse.com/#feat=mutationobserver

IE can't reload webcomponents.js on a framed page

One common method to force a framed page (on the same domain) to reload is to invoke contentWindow.location.reload(). This method fails in IE if the framed page loads webcomponents.js.

To repro:

  1. Copy http://jsbin.com/ruceci/edit somewhere. This framing page just tries to frame another page. You'll need both it and the framed page to be on the same domain to avoid security constraints.
  2. Update the URL in the iframe so that it points to a target page on the same domain. It doesn't matter what the target page does, as long as it loads webcomponents.js. It doesn't need to load polymer.html.
  3. Open the framing page and click the Reload button.

On IE, this causes an exception to be thrown in HTMLElement.js, line 247:

  registerWrapper(OriginalHTMLElement, HTMLElement,
                  document.createElement('b'));

When the exception is thrown, OriginalHTMLElement is undefined.

This problem is not seen in Chrome, Firefox, and Safari.

webcomponents-lite.js not included in the tagged versions of this repo

As of the Readme:

Pre-built (concatenated & minified) versions of the polyfills are maintained in the tagged versions of this repo. There are two variants:

webcomponents.js includes all of the polyfills.

webcomponents-lite.js includes all polyfills except for shadow DOM.

Just want to note, that the webcomponents-lite.js file is missing in the tagged version.

webcomponentsjs Naming does not follow convention.

None of the other repos in under the Polymer organization have 'js' appended to the end of the repo name. Additionally, when doing imports the covention is reponame/reponame.html. While this is not an import should the same convention not be used.

tldr; Rename repo to webcomponents

observe-js is included in both polymer.js and platform.js

Issue by jmesserly
Friday Sep 05, 2014 at 22:36 GMT
Originally opened as https://github.com/Polymer/platform-dev/issues/45


What's going on here is ShadowDOM depends on observe-js's ArraySplice for ShadowRenderer.js. So it gets pulled into platform.js via platform-dev/build.json and ShadowDOM/build.json

But it also gets pulled into polymer.js via polymer-dev/build.json and TemplateBinding/build.json.

What's the right answer here? I presume we can't rely on polymer.js having platform.js loaded, so maybe the ArraySplice duplication is unavoidable. Is it worth extracting only that feature into its own file?

We have a similar issue with WeakMap, but it's a lot smaller (<50 lines). observe.js is ~1700 lines and ~45kb before minification.

Log flag parsing should move to polymer repo

If developing without webcomponents.js you can't turn on logging via the url because that is enabled by webcomponents.js even though it doesn't have anything to do with that package.

Incompatible with MathJax

Issue by yuri0
Tuesday Jul 01, 2014 at 05:27 GMT
Originally opened as https://github.com/Polymer/platform-dev/issues/30


As far as I can tell, this is caused by MathJax using document.body, which is not wrapped by Polymer. If I try document.body = ShadowDOMPolyfill(document.body), I get

TypeError: Value being assigned to HTMLDocument.body does not implement interface HTMLElement.

Is there any way for Polymer to address this, or does MathJax need to be changed??

Styles added at runtime with shim-shadowdom don't get shimmed

Issue by JanMiksovsky
Wednesday Sep 10, 2014 at 17:20 GMT
Originally opened as https://github.com/Polymer/platform/issues/91


I'm trying to use the shim-shadowdom attribute described in Styling elements. This works with <style> elements that exists at page load, but doesn't appear to shim styles in a <style> element added (or modified) at runtime. I can see that I can manually invoke the style shimmer, but I'm dealing with a case right now where it would have been useful to have the normal handling of <style shim-shadowdom> happen automatically.

Change shimCssText to accept a separate selector for :host

Issue by vsavkin
Monday Sep 01, 2014 at 22:09 GMT
Originally opened as https://github.com/Polymer/platform-dev/issues/44


AngularDart uses ShadowCSS for implementing the css encapsulation feature in older browsers. It is done by calling ShadowCSS.shimCssText. The problem is that in Angular any query can be used to define a component (e.g., div[my-component]), which is not supported by ShadowCSS.

Example:

:host {
    color: red;
}

div {
    color: green;
}

is transformed into:

my-component {
    color: red;
}

div[my-component] {
    color: green;
}

This does not work when the selector is not a tag, but something like div[a],div[b].

One way to solve this problem would be to change the API so we can pass two selectors: one for the host element, and the other one for the rest. In this case we would be able to use a pair of unique attribute names as follows:

[host-8787] {
    color: red;
}

div[template-8787] {
    color: green;
}

UPDATE:

API Proposal:

shimCssText(text, hostSelector, templateSelector) {
  if (! templateSelector) templateSelector = "[" + hostSelector + "]";
}

DetachedCallback/AttachedCallback NOT fired for removing and re-attaching an existing component

Issue by shaohua
Thursday Oct 16, 2014 at 20:26 GMT
Originally opened as https://github.com/Polymer/platform/issues/97


When removing an existing component from the DOM and reattaching it back to the DOM, the detachedCallback is NOT fired for the removal and the attachedCallback is NOT fired for the re-attachment.

Look at this CodePen, where we attach, remove and re-attach one web component.

In Chrome 38, you get three callbacks: attached -> detached -> attached
In all other browsers, you only get one callback: attached

Assertion failed with jquery.autosize.js

I get an Error: Assertion failed with both Safari 8.0 and Firefox 32.0.3. The call stack is as follow:

[Error] Error: Assertion failed
    assert (webcomponents.js, line 113)
    assertIsNodeWrapper (webcomponents.js, line 1566)
    insertBefore (webcomponents.js, line 1779)
    appendChild (webcomponents.js, line 1776)
    buildFragment (jquery.js, line 5126)
    domManip (jquery.js, line 5363)
    append (jquery.js, line 5194)
    autosize (jquery.autosize.js, line 54)
    initContent (channel.js, line 373)
    fire (jquery.js, line 3073)
    fireWith (jquery.js, line 3185)
    ready (jquery.js, line 3391)
    completed (jquery.js, line 3407)

The assertion in https://github.com/Polymer/webcomponentsjs/blob/master/src/ShadowDOM/wrappers/Node.js#L30 fails following the append triggered by https://github.com/jackmoore/autosize/blob/master/jquery.autosize.js#L54

polyfill-unscoped-rule content conflicts with "::after content"

'content' is a css property frequently used with :after selectors.
webcomponents polyfill-unscoped-rule hijacks 'content' property.
There is a workaround:

For example:

polyfill-unscoped-rule {
      content: '.pdnk-book.core-selected:after';
      content: "\2713";
      position: absolute;
}

compiles to:

"\2713" {
    content: '.pdnk-book.core-selected:after';
}

The workaround is to put webcomponents content after css content.

polyfill-unscoped-rule {
      content: "\2713";
      content: '.pdnk-book.core-selected:after';
      position: absolute;
}

Counterintuitive, but it works. It compiles to:

.pdnk-book.core-selected:after {
      content: "\2713";
      ;
      position: absolute;
}

You should probably document this workaround in docs/polymer/styling.html

The reason I encountered this is because new paper-action-dialogs rip the content outside of paper-action-dialog scope, making my style rules not match.

Runtime configuration does not appear to work

Issue by arthurevans
Saturday Aug 30, 2014 at 02:18 GMT
Originally opened as https://github.com/Polymer/platform/issues/86


Related to: Polymer/old-docs-site#610

Many of the items on the runtime configuration page don't appear to work:

http://www.polymer-project.org/docs/polymer/runtime-config.html

According to Steve, the debug flags are obsolete and we should remove them. However, testing with the polyfill flags was also problematic.

Trying to force on the shadow DOM polyfill using the attribute or URL parameter method, I'm getting a blank screen instead of my app. (Using the finished version of the tutorial app.)

It fails outright when I try to set any of the flags using the script method:

<script>
  Platform = {flags: {shadow: 'polyfill'}};
</script>
<script src="platform.js"></script>

All I get is a bunch of exceptions.

Maybe we broke this when we refactored platform?

Setting register as a URL parameter doesn't seem to break anything, but I can't actually tell if it's doing anything.

Didn't test the Polyfill settings flags.

Is this entire page obsolete? Or should some of these things be fixed?

platform.js corrupts firefox debug

Issue by dsportes
Monday Aug 04, 2014 at 13:13 GMT
Originally opened as https://github.com/Polymer/platform/issues/77


Firefox: 31, platform.js : 0.3.4
Just load this page in firefox :
image

Start the debugger and set a breakpoint on the line foo= ... The breakpoint appears at right as registered.
Reload the page. the execution normally stops on the line.
Remove the comment in order to load platform.js.
Reload the page : no breakpoints cannot be set and the existing breakpoint is ignored. Redo that several time, no way !
Put again platform.js in comment.
Reload the page : breakpoints are ignored, the debug is corrupted, even on any other pages (without platform.js). The only way I found for fixing firefox is a complete new install !
You have super powers :-) I ignored it was possible to break the firefox debug with a javascript file.

Polymer UA detection broken in IE edge mode

For context, see our recent announcement about IE's new "living" edgehtml mode. In this mode (currently available to a randomly selected set of Windows 10 Tech Preview and RemoteIE users, or by opting in through about:flags "Enable Experimental Web Platform Features"), IE uses a new UA String that no longer includes the Trident token.

Note that I believe this is currently breaking ChromeStatus.com completely in edge.

A quick search yields several instances of Trident sniffing. Looking through these instances, here are my suggestions:

  1. As an immediate fix, augment existingTrident sniffs with "Edge" sniffs (see the edge UA string here).
  2. Longer term, let's see if we can remove UA sniffing for IE altogether.

I noticed a few instances where Polymer is using UA sniffs to work around legitimate bugs in the IE platform (such as this). However, I'm happy to report that some of these issues are fixed in edge mode (such as this).

I can help prioritize fixing bugs in IE to help remove these sniffs from Polymer. One thing that helps is if you include the impact on Polymer when filing bugs on Connect. That helps us prioritize it.

0.4.2 tag creates the wrong directory

If you run bower install Polymer/webcomponentsjs it will create a directory called bower_components/webcomponents.js instead of the expected bower_components/webcomponentsjs. It looks like this has been changed for the next release.

platform fails to load

Issue by dimerman
Sunday Jul 06, 2014 at 00:13 GMT
Originally opened as https://github.com/Polymer/platform/issues/68


First there is this warning:
Script contained non-latin characters that were forced to latin. Some characters may be wrong.
Then this error:
Uncaught SyntaxError: Unexpected number

using bower to install version 0.3.3
using ruby on rails + sprockets + emcee

Polymer member methods aren't public in Safari

Issue by funkjunky
Thursday Oct 23, 2014 at 22:06 GMT
Originally opened as https://github.com/Polymer/platform/issues/98


EDIT: Sorry I swamped with work currently. You can ignore this until I post a plunkr, if my description of the issue isn't clear enough.

I just found out our client mostly uses Safari, which initially didn't work because I wasn't including platform.js, THEN didn't work because apparently the difference between 7.06 and 7.1 was Polymer not loading and giving a cryptic message, and polymer loading.
... A bunch more headaches with Safari ...

At this point I'm trying to call a public method on one of my web components and im getting the error that it is undefined.

so my web component is something like:
Polymer('mycomponent', { myMethod: function() { console.log('hi'); } }

and I'm attempting to call it later
mycomponent.myMethod();

when i console.log mycomponent, the member variables are showing, but none of the method.

Wrong document scope in HTML Import

Using Firefox Developer Edition 35.0a2 the "scope" of document.currentScript.ownerDocument points to index.html and is the same as document. But instead document.currentScript.ownerDocument should point to demo.html.

index.html

<!DOCTYPE HTML>
<html>
    <head>
        <link rel="import" href="demo.html">
        <script src="webcomponents.js"></script>
    </head>
    <body></body>
</html>

demo.html

<template>
    <div></div>
</template>
<script>

    // thisDoc refers to the "importee", which is demo.html
    var thisDoc = document.currentScript.ownerDocument;

    // thatDoc refers to the "importer", which is index.html
    var thatDoc = document;

</script>

WebComponents.JS blocks page render for ~15s on Android

Hi, unfortunately I don't have many devices to get more data- and I'm unsure how to help troubleshoot this issue. Any help on fixing or diagnosing the below greatly appreciated!

I'm creating an app for a specific device running android 4.4, and when including webcomponents.js page rendering speed drops dramatically here's a screenshot of an example timeline view

image

As you can see, purely evaluating the javascript triggers a recalculate style, layout and 6 GC events. What is happening here? Is the bug hardware or software related?

If there's any further information I could provide that would help diagnose the issue, or additional steps I could take- please advise me on the best course.

Thanks!

IE11 strict mode arguments error

I started working on upgrading my app-router examples to Polymer and webcomponentsjs 0.5.0 and I'm seeing this error in IE 11.

webcomponents.js line 1159
"Accessing the 'arguments' property of a function is not allowed in strict mode"

This doesn't sound like any of the errors listed on MSDN. I do see some places in webcomponents.js like line 1177 where the arguments are being assigned to and that violates one of the strict mode rules listed on MSDN.
http://msdn.microsoft.com/en-us/library/ie/br230269(v=vs.94).aspx

URL Polyfill Missing

webcomponents.js seems to have dropped support for the URL() constructor function.

<!doctype html>
<html>
  <head>
    <script src="/bower_components/webcomponentsjs/webcomponents.js"></script>
  </head>
  <body>
    <script>
      var url = new URL('http://localhost:8080/test.html');
    </script>
  </body>
</html>

throws error

"Object doesn't support this action"

This worked in platform.js.

<!doctype html>
<html>
  <head>
    <script src="/bower_components/platform/platform.js"></script>
  </head>
  <body>
    <script>
      var url = new URL('http://localhost:8080/test.html');
    </script>
  </body>
</html>

platform.js referenced URL in build.json. webcomponents.js doesn't seem to reference it anywhere.

Break Out HTMLTemplateElement

I see the list of Web Components specs listed in the readme, but HTMLTemlateElement isn't listed for some reason. Does this library include it? If so, where is that? Also, would it be possible to break that out into an individual file like the other polyfills?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.