Hello I'm having mutating Prototype Error in my firefox 33.1 kindly see image below
http://i.gyazo.com/85b852e2572121d234dd374798d5d8a7.png
i also included webcomponents.js and platform.js on my html
post also on google polymer group and they said that
"That's not an error, that's a warning, and you can ignore it."
Related
This is very similar to the question posted here but nothing useful was mentioned.
I'm trying to look for documentation on how to create a new EditMode tool for the markup extension. Documentation is very scarce and I can't find the source code for markup extensions. The only thing I can find is here.
I'm trying to decipher this file: https://developer.api.autodesk.com/modelderivative/v2/viewers/7.*/extensions/Markup/Markup.js but it has a lot of webpack references and is hard to read.
Has anyone managed to create a custom EditMode tool?
Edit
A member of my team has managed to find the source for the markup extension:
https://autodeskviewer.com/viewers/latest/docs/extensions_Markup_core_Markup.js.html
Unfortunately, implementing a custom markup type is not officially supported today. The documentation you found (https://autodeskviewer.com/viewers/latest/docs/tutorial-feature_markup.html#create-a-new-drawing-tool-a-new-editmode) is not production ready.
Edit:
While I still believe the markup code is not ready for custom markup implementation, here's a work-in-progress, custom markup tool drawing smiley faces:
https://github.com/petrbroz/forge-basic-app/blob/sample/custom-markup/public/smiley-markup.js
In the sample app it is activated with a button click:
https://github.com/petrbroz/forge-basic-app/blob/sample/custom-markup/public/main.js#L11-L20
And here it is in action: https://imgur.com/a/2SFrGIM
My website works fine in Chrome.
I am trying to get it working in IE11 as well.
But see an error message at this line of code.
When i go in, i see that it is due to below line of code in paper-button element.
From past experience i know that polymer doesn't work in IE11 if i don't use colon separator and use function keyword to declare a function in javascript. e.g. as shown below.
_onDownKey: function(event) {}
I am using Polymer 1.9.3
Need guidance on understanding this new get keyword.
What is this new get keyword in front of the function name, what it does and how to make polymer elements compatible with IE11 as well if possible ?
Information about get can be found here. Obviously IE is not able to use this, thats why you have to transpile your code from es6 to javascript/es5. You can use polymer build for this. Also if you transpiled your code and if you have included the webcomponents polyfill it will work in IE11. Hope this helps!
I've created a simple example http://jsbin.com/yifekigo/21/edit. It works in Chrome and does not in Firefox/Safari. It will work in Firefox if I change <nest-row mCols="{{mCols}}" y="{{y}}"></nest-row> to <nest-row mCols="4" y="{{y}}"></nest-row>.
How can I get Firefox and Safari to pass the value of mCols from nest-grid through to nest-row?
EDIT: See Scott's comment on his answer for the use of domReady as a workaround.
Sadly, on Firefox/Safari/IE, the DRY Polymer syntax is not supported in the main document. IOW, you must do:
Polymer('nest-grid', {...
instead of
Polymer({...
Again, this is only true for calls like this in the main document (which typically includes JsBin and friends). Polymer elements in imports can use the DRY syntax on all platforms.
Sorry for the trouble.
I've been working with a fairly simple animation, powered by Adobe Edge Animate, on my site for a while now. I didn't change anything to do with it for the longest time, but something's obviously happened, because now when i run the animation, i get
Uncaught TypeError: Object [object Object] has no method 'stringify' edge.2.0.0.min.js
from Chromes Console Log. I have no idea what this means, but it has something to do with the json. I'm not sure if my image is being loaded, but there's no reason it shouldn't be, since i never changed the path of it. Can somebody tell me what "Object [object Object]" is supposed to refer to?
Thanks!
P.S My animation setup is just the stage, with about 17 copies of an .svg that i use as a sprite sheet, plus some text. Every single object has animations that includes opacity, top, left, and height.
EDIT:
Here's what i get when i do a console.log(JSON);
In case you can't read it:
Native.initialize
$replaceChars: function (a){return JSON.$specialChars[a]||"\\u00"+Math.floor(a.charCodeAt()/16).toString(16)+(a.charCodeAt()%16).toString(16);
$specialChars: Object
decode: function (string,secure){if($type(string)!="string"||!string.length){return null;}if(secure&&!(/^[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]*$/).test(string.replace(/\\./g,"#").replace(/"[^"\\\n\r]*"/g,""))){return null;
encode: function (b){switch($type(b)){case"string":return'"'+b.replace(/[\x00-\x1f\\"]/g,JSON.$replaceChars)+'"';case"array":return"["+String(b.map(JSON.encode).clean())+"]";
__proto__: Object
Update:
I think i may have figured it out. In the preloader, i'm calling the dependent files with the full path, so i don't think they get called. But when i fix the path, i get that really annoying
Uncaught SyntaxError: Unexpected token <
These files get interpreted as text/html, so now those dependent .js files are full of my html.
(I'm using Sinatra, with a layout file).
Here's Chromes message:
Resource interpreted as Script but transferred with MIME type text/html: "http://127.0.0.1/bird_Animations_edgeActions.js".
This is how the preloader calls those files:
{load:"/bird_Animations_edge.js"},{load:"/bird_Animations_edgeActions.js"}.
Now my question is: How do i get these files to be transferred as scripts?
Edit:
Because i confused myself with that, the way Edge Animate works is that it gives you three .js files. One is focused on general stuff, making the object, creating the animations. The second is focused on actions, I.E clicking on an element. The third loads the previous two files, and every other files necessary for the whole page to work, plus some other stuff that i don't know. The third file is then called in the head tag of the page you want the animation to run, with a div in the body of that same page.
After so many edits, and awesome comments, i figured it out.
I was using the wrong path in the preloader, which is why stringify failed, it wasn't finding any object whatsoever.
Then, with the interpreted but transferred as error, it was because in my HKEY_CLASSES_ROOT\.js (regedit) the content type was set to text/html. Setting it to application/javascript fully fixed my problem. Thanks a ton for everyones help!
I had a similar problem. The root of this error can be from a bug in Mootools. Mootools before version 1.3.2 will override JSON object. You have to use a newer version of Mootools to solve the JSON.parse and JSON.stringify problem.
Hello kind people of the internet,
I've been hacking at this for a while...and have seen several similar postings, but I can't seem to figure this out:
The HTML5 input field validation CSS works in Firefox, Chrome...but alas, not in IE8...and much of my target audience will be using IE8.
...and yes: I'm using Modernizr, and I used Initializr to get the page template and CSS...I'm a bit confused why I can't get things working properly in IE8.
Here's a link to my test page:
Test html5 page
The input field is red before proper entry, then validation simply turns green when input a valid account number, such as:
50011111111
The HTML5 code is as follows:
<label for="account">Account Number: </label>
<input id="account" name="inputAccount"
placeholder="input billing account number"
pattern="/(^500)|^\d{11}"
required
autofocus
type="text"/>
Any suggestions on what is probably a fairly simple thing to fix would be mucho appreciated!
IE just ignors HTML5 elements because it dosen't know about them. From the Modernizr docs
Modernizr runs through a little loop in JavaScript to enable the
various elements from HTML5 (as well as abbr) for styling in Internet
Explorer. Note that this does not mean it suddenly makes IE support
the Audio or Video element, it just means that you can use section
instead of div and style them in CSS.
What this says is that Modernizr will tell IE about the new tags in HTML5 so that you can use CSS on them, but dosen't actually make them do anything. Note too that Modernizr dosen't add default styles for the elements, so they recommend you use an HTML5 CSS reset that makes <section> tags display: block; for example.
With respect to your form validation topek was correct in explaining that Modernizr only detects browser capability, it dosen't actually do anything about it. The proccess behind Modernizr is that you use the built-in yepnope testing feature to see if the user's browser can do 'x' (in this case form validation) and then conditionally and asynchronously load a script or style to "polyfill" (a polite way of saying 'use javascript to mimic native behaviour) for it.
In your case, you will want to use Modernizr.load() to test for Modernizr.input.required and probably Modernizr.input.autofocus too, like this:
//the modernizr conditional load function
Modernizr.load({
//specify the tests, refer to the Modernizr docs for object names
test: Modernizr.input.required && Modernizr.input.placeholder,
//specify what to do if the browser fails the test, can be a function
nope: 'path/to/polyfill/script',
//sometimes you need to run some JS to init that script
complete: function(){ polyfillinitorwhatever(); }
});
And there you go, a pretty stripped-down Modernizr.load. While I find their docs meandering, they actually are very good. Every time I've had a problem and tweeted at Paul Irish, he's sent back a link to the docs where I actually did find my answer upon closer inspection.
Validation is one of the most complex HTML5 features for the browser makers to implement as a standard. While I really like it's simplicity, I've been continuing to use jQuery.validate in all cases except if the user has Chrome or Opera - the FF native validate is weak still. I'd recommend you stick with jQuery for now.
I recently found a new plugin jquery.h5form.
Using this, form validation, like in Opera, will be enabled in all browsers, even IE8.
I think, what you are still missing, is a html5 polyfill for the field validation. You could use for example: http://ericleads.com/h5validate/
More polyfills can be found under: https://github.com/Modernizr/Modernizr/wiki/HTML5-Cross-Browser-Polyfills
IE8 does not support all, if any, HTML5 elements. You need to have an addon for html5 to work. One addon is modernizer
List of browsers with their score/compatibility in HTML5